MultipleMaids.MaidUpdate.cs 917 KB

1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950515253545556575859606162636465666768697071727374757677787980818283848586878889909192939495969798991001011021031041051061071081091101111121131141151161171181191201211221231241251261271281291301311321331341351361371381391401411421431441451461471481491501511521531541551561571581591601611621631641651661671681691701711721731741751761771781791801811821831841851861871881891901911921931941951961971981992002012022032042052062072082092102112122132142152162172182192202212222232242252262272282292302312322332342352362372382392402412422432442452462472482492502512522532542552562572582592602612622632642652662672682692702712722732742752762772782792802812822832842852862872882892902912922932942952962972982993003013023033043053063073083093103113123133143153163173183193203213223233243253263273283293303313323333343353363373383393403413423433443453463473483493503513523533543553563573583593603613623633643653663673683693703713723733743753763773783793803813823833843853863873883893903913923933943953963973983994004014024034044054064074084094104114124134144154164174184194204214224234244254264274284294304314324334344354364374384394404414424434444454464474484494504514524534544554564574584594604614624634644654664674684694704714724734744754764774784794804814824834844854864874884894904914924934944954964974984995005015025035045055065075085095105115125135145155165175185195205215225235245255265275285295305315325335345355365375385395405415425435445455465475485495505515525535545555565575585595605615625635645655665675685695705715725735745755765775785795805815825835845855865875885895905915925935945955965975985996006016026036046056066076086096106116126136146156166176186196206216226236246256266276286296306316326336346356366376386396406416426436446456466476486496506516526536546556566576586596606616626636646656666676686696706716726736746756766776786796806816826836846856866876886896906916926936946956966976986997007017027037047057067077087097107117127137147157167177187197207217227237247257267277287297307317327337347357367377387397407417427437447457467477487497507517527537547557567577587597607617627637647657667677687697707717727737747757767777787797807817827837847857867877887897907917927937947957967977987998008018028038048058068078088098108118128138148158168178188198208218228238248258268278288298308318328338348358368378388398408418428438448458468478488498508518528538548558568578588598608618628638648658668678688698708718728738748758768778788798808818828838848858868878888898908918928938948958968978988999009019029039049059069079089099109119129139149159169179189199209219229239249259269279289299309319329339349359369379389399409419429439449459469479489499509519529539549559569579589599609619629639649659669679689699709719729739749759769779789799809819829839849859869879889899909919929939949959969979989991000100110021003100410051006100710081009101010111012101310141015101610171018101910201021102210231024102510261027102810291030103110321033103410351036103710381039104010411042104310441045104610471048104910501051105210531054105510561057105810591060106110621063106410651066106710681069107010711072107310741075107610771078107910801081108210831084108510861087108810891090109110921093109410951096109710981099110011011102110311041105110611071108110911101111111211131114111511161117111811191120112111221123112411251126112711281129113011311132113311341135113611371138113911401141114211431144114511461147114811491150115111521153115411551156115711581159116011611162116311641165116611671168116911701171117211731174117511761177117811791180118111821183118411851186118711881189119011911192119311941195119611971198119912001201120212031204120512061207120812091210121112121213121412151216121712181219122012211222122312241225122612271228122912301231123212331234123512361237123812391240124112421243124412451246124712481249125012511252125312541255125612571258125912601261126212631264126512661267126812691270127112721273127412751276127712781279128012811282128312841285128612871288128912901291129212931294129512961297129812991300130113021303130413051306130713081309131013111312131313141315131613171318131913201321132213231324132513261327132813291330133113321333133413351336133713381339134013411342134313441345134613471348134913501351135213531354135513561357135813591360136113621363136413651366136713681369137013711372137313741375137613771378137913801381138213831384138513861387138813891390139113921393139413951396139713981399140014011402140314041405140614071408140914101411141214131414141514161417141814191420142114221423142414251426142714281429143014311432143314341435143614371438143914401441144214431444144514461447144814491450145114521453145414551456145714581459146014611462146314641465146614671468146914701471147214731474147514761477147814791480148114821483148414851486148714881489149014911492149314941495149614971498149915001501150215031504150515061507150815091510151115121513151415151516151715181519152015211522152315241525152615271528152915301531153215331534153515361537153815391540154115421543154415451546154715481549155015511552155315541555155615571558155915601561156215631564156515661567156815691570157115721573157415751576157715781579158015811582158315841585158615871588158915901591159215931594159515961597159815991600160116021603160416051606160716081609161016111612161316141615161616171618161916201621162216231624162516261627162816291630163116321633163416351636163716381639164016411642164316441645164616471648164916501651165216531654165516561657165816591660166116621663166416651666166716681669167016711672167316741675167616771678167916801681168216831684168516861687168816891690169116921693169416951696169716981699170017011702170317041705170617071708170917101711171217131714171517161717171817191720172117221723172417251726172717281729173017311732173317341735173617371738173917401741174217431744174517461747174817491750175117521753175417551756175717581759176017611762176317641765176617671768176917701771177217731774177517761777177817791780178117821783178417851786178717881789179017911792179317941795179617971798179918001801180218031804180518061807180818091810181118121813181418151816181718181819182018211822182318241825182618271828182918301831183218331834183518361837183818391840184118421843184418451846184718481849185018511852185318541855185618571858185918601861186218631864186518661867186818691870187118721873187418751876187718781879188018811882188318841885188618871888188918901891189218931894189518961897189818991900190119021903190419051906190719081909191019111912191319141915191619171918191919201921192219231924192519261927192819291930193119321933193419351936193719381939194019411942194319441945194619471948194919501951195219531954195519561957195819591960196119621963196419651966196719681969197019711972197319741975197619771978197919801981198219831984198519861987198819891990199119921993199419951996199719981999200020012002200320042005200620072008200920102011201220132014201520162017201820192020202120222023202420252026202720282029203020312032203320342035203620372038203920402041204220432044204520462047204820492050205120522053205420552056205720582059206020612062206320642065206620672068206920702071207220732074207520762077207820792080208120822083208420852086208720882089209020912092209320942095209620972098209921002101210221032104210521062107210821092110211121122113211421152116211721182119212021212122212321242125212621272128212921302131213221332134213521362137213821392140214121422143214421452146214721482149215021512152215321542155215621572158215921602161216221632164216521662167216821692170217121722173217421752176217721782179218021812182218321842185218621872188218921902191219221932194219521962197219821992200220122022203220422052206220722082209221022112212221322142215221622172218221922202221222222232224222522262227222822292230223122322233223422352236223722382239224022412242224322442245224622472248224922502251225222532254225522562257225822592260226122622263226422652266226722682269227022712272227322742275227622772278227922802281228222832284228522862287228822892290229122922293229422952296229722982299230023012302230323042305230623072308230923102311231223132314231523162317231823192320232123222323232423252326232723282329233023312332233323342335233623372338233923402341234223432344234523462347234823492350235123522353235423552356235723582359236023612362236323642365236623672368236923702371237223732374237523762377237823792380238123822383238423852386238723882389239023912392239323942395239623972398239924002401240224032404240524062407240824092410241124122413241424152416241724182419242024212422242324242425242624272428242924302431243224332434243524362437243824392440244124422443244424452446244724482449245024512452245324542455245624572458245924602461246224632464246524662467246824692470247124722473247424752476247724782479248024812482248324842485248624872488248924902491249224932494249524962497249824992500250125022503250425052506250725082509251025112512251325142515251625172518251925202521252225232524252525262527252825292530253125322533253425352536253725382539254025412542254325442545254625472548254925502551255225532554255525562557255825592560256125622563256425652566256725682569257025712572257325742575257625772578257925802581258225832584258525862587258825892590259125922593259425952596259725982599260026012602260326042605260626072608260926102611261226132614261526162617261826192620262126222623262426252626262726282629263026312632263326342635263626372638263926402641264226432644264526462647264826492650265126522653265426552656265726582659266026612662266326642665266626672668266926702671267226732674267526762677267826792680268126822683268426852686268726882689269026912692269326942695269626972698269927002701270227032704270527062707270827092710271127122713271427152716271727182719272027212722272327242725272627272728272927302731273227332734273527362737273827392740274127422743274427452746274727482749275027512752275327542755275627572758275927602761276227632764276527662767276827692770277127722773277427752776277727782779278027812782278327842785278627872788278927902791279227932794279527962797279827992800280128022803280428052806280728082809281028112812281328142815281628172818281928202821282228232824282528262827282828292830283128322833283428352836283728382839284028412842284328442845284628472848284928502851285228532854285528562857285828592860286128622863286428652866286728682869287028712872287328742875287628772878287928802881288228832884288528862887288828892890289128922893289428952896289728982899290029012902290329042905290629072908290929102911291229132914291529162917291829192920292129222923292429252926292729282929293029312932293329342935293629372938293929402941294229432944294529462947294829492950295129522953295429552956295729582959296029612962296329642965296629672968296929702971297229732974297529762977297829792980298129822983298429852986298729882989299029912992299329942995299629972998299930003001300230033004300530063007300830093010301130123013301430153016301730183019302030213022302330243025302630273028302930303031303230333034303530363037303830393040304130423043304430453046304730483049305030513052305330543055305630573058305930603061306230633064306530663067306830693070307130723073307430753076307730783079308030813082308330843085308630873088308930903091309230933094309530963097309830993100310131023103310431053106310731083109311031113112311331143115311631173118311931203121312231233124312531263127312831293130313131323133313431353136313731383139314031413142314331443145314631473148314931503151315231533154315531563157315831593160316131623163316431653166316731683169317031713172317331743175317631773178317931803181318231833184318531863187318831893190319131923193319431953196319731983199320032013202320332043205320632073208320932103211321232133214321532163217321832193220322132223223322432253226322732283229323032313232323332343235323632373238323932403241324232433244324532463247324832493250325132523253325432553256325732583259326032613262326332643265326632673268326932703271327232733274327532763277327832793280328132823283328432853286328732883289329032913292329332943295329632973298329933003301330233033304330533063307330833093310331133123313331433153316331733183319332033213322332333243325332633273328332933303331333233333334333533363337333833393340334133423343334433453346334733483349335033513352335333543355335633573358335933603361336233633364336533663367336833693370337133723373337433753376337733783379338033813382338333843385338633873388338933903391339233933394339533963397339833993400340134023403340434053406340734083409341034113412341334143415341634173418341934203421342234233424342534263427342834293430343134323433343434353436343734383439344034413442344334443445344634473448344934503451345234533454345534563457345834593460346134623463346434653466346734683469347034713472347334743475347634773478347934803481348234833484348534863487348834893490349134923493349434953496349734983499350035013502350335043505350635073508350935103511351235133514351535163517351835193520352135223523352435253526352735283529353035313532353335343535353635373538353935403541354235433544354535463547354835493550355135523553355435553556355735583559356035613562356335643565356635673568356935703571357235733574357535763577357835793580358135823583358435853586358735883589359035913592359335943595359635973598359936003601360236033604360536063607360836093610361136123613361436153616361736183619362036213622362336243625362636273628362936303631363236333634363536363637363836393640364136423643364436453646364736483649365036513652365336543655365636573658365936603661366236633664366536663667366836693670367136723673367436753676367736783679368036813682368336843685368636873688368936903691369236933694369536963697369836993700370137023703370437053706370737083709371037113712371337143715371637173718371937203721372237233724372537263727372837293730373137323733373437353736373737383739374037413742374337443745374637473748374937503751375237533754375537563757375837593760376137623763376437653766376737683769377037713772377337743775377637773778377937803781378237833784378537863787378837893790379137923793379437953796379737983799380038013802380338043805380638073808380938103811381238133814381538163817381838193820382138223823382438253826382738283829383038313832383338343835383638373838383938403841384238433844384538463847384838493850385138523853385438553856385738583859386038613862386338643865386638673868386938703871387238733874387538763877387838793880388138823883388438853886388738883889389038913892389338943895389638973898389939003901390239033904390539063907390839093910391139123913391439153916391739183919392039213922392339243925392639273928392939303931393239333934393539363937393839393940394139423943394439453946394739483949395039513952395339543955395639573958395939603961396239633964396539663967396839693970397139723973397439753976397739783979398039813982398339843985398639873988398939903991399239933994399539963997399839994000400140024003400440054006400740084009401040114012401340144015401640174018401940204021402240234024402540264027402840294030403140324033403440354036403740384039404040414042404340444045404640474048404940504051405240534054405540564057405840594060406140624063406440654066406740684069407040714072407340744075407640774078407940804081408240834084408540864087408840894090409140924093409440954096409740984099410041014102410341044105410641074108410941104111411241134114411541164117411841194120412141224123412441254126412741284129413041314132413341344135413641374138413941404141414241434144414541464147414841494150415141524153415441554156415741584159416041614162416341644165416641674168416941704171417241734174417541764177417841794180418141824183418441854186418741884189419041914192419341944195419641974198419942004201420242034204420542064207420842094210421142124213421442154216421742184219422042214222422342244225422642274228422942304231423242334234423542364237423842394240424142424243424442454246424742484249425042514252425342544255425642574258425942604261426242634264426542664267426842694270427142724273427442754276427742784279428042814282428342844285428642874288428942904291429242934294429542964297429842994300430143024303430443054306430743084309431043114312431343144315431643174318431943204321432243234324432543264327432843294330433143324333433443354336433743384339434043414342434343444345434643474348434943504351435243534354435543564357435843594360436143624363436443654366436743684369437043714372437343744375437643774378437943804381438243834384438543864387438843894390439143924393439443954396439743984399440044014402440344044405440644074408440944104411441244134414441544164417441844194420442144224423442444254426442744284429443044314432443344344435443644374438443944404441444244434444444544464447444844494450445144524453445444554456445744584459446044614462446344644465446644674468446944704471447244734474447544764477447844794480448144824483448444854486448744884489449044914492449344944495449644974498449945004501450245034504450545064507450845094510451145124513451445154516451745184519452045214522452345244525452645274528452945304531453245334534453545364537453845394540454145424543454445454546454745484549455045514552455345544555455645574558455945604561456245634564456545664567456845694570457145724573457445754576457745784579458045814582458345844585458645874588458945904591459245934594459545964597459845994600460146024603460446054606460746084609461046114612461346144615461646174618461946204621462246234624462546264627462846294630463146324633463446354636463746384639464046414642464346444645464646474648464946504651465246534654465546564657465846594660466146624663466446654666466746684669467046714672467346744675467646774678467946804681468246834684468546864687468846894690469146924693469446954696469746984699470047014702470347044705470647074708470947104711471247134714471547164717471847194720472147224723472447254726472747284729473047314732473347344735473647374738473947404741474247434744474547464747474847494750475147524753475447554756475747584759476047614762476347644765476647674768476947704771477247734774477547764777477847794780478147824783478447854786478747884789479047914792479347944795479647974798479948004801480248034804480548064807480848094810481148124813481448154816481748184819482048214822482348244825482648274828482948304831483248334834483548364837483848394840484148424843484448454846484748484849485048514852485348544855485648574858485948604861486248634864486548664867486848694870487148724873487448754876487748784879488048814882488348844885488648874888488948904891489248934894489548964897489848994900490149024903490449054906490749084909491049114912491349144915491649174918491949204921492249234924492549264927492849294930493149324933493449354936493749384939494049414942494349444945494649474948494949504951495249534954495549564957495849594960496149624963496449654966496749684969497049714972497349744975497649774978497949804981498249834984498549864987498849894990499149924993499449954996499749984999500050015002500350045005500650075008500950105011501250135014501550165017501850195020502150225023502450255026502750285029503050315032503350345035503650375038503950405041504250435044504550465047504850495050505150525053505450555056505750585059506050615062506350645065506650675068506950705071507250735074507550765077507850795080508150825083508450855086508750885089509050915092509350945095509650975098509951005101510251035104510551065107510851095110511151125113511451155116511751185119512051215122512351245125512651275128512951305131513251335134513551365137513851395140514151425143514451455146514751485149515051515152515351545155515651575158515951605161516251635164516551665167516851695170517151725173517451755176517751785179518051815182518351845185518651875188518951905191519251935194519551965197519851995200520152025203520452055206520752085209521052115212521352145215521652175218521952205221522252235224522552265227522852295230523152325233523452355236523752385239524052415242524352445245524652475248524952505251525252535254525552565257525852595260526152625263526452655266526752685269527052715272527352745275527652775278527952805281528252835284528552865287528852895290529152925293529452955296529752985299530053015302530353045305530653075308530953105311531253135314531553165317531853195320532153225323532453255326532753285329533053315332533353345335533653375338533953405341534253435344534553465347534853495350535153525353535453555356535753585359536053615362536353645365536653675368536953705371537253735374537553765377537853795380538153825383538453855386538753885389539053915392539353945395539653975398539954005401540254035404540554065407540854095410541154125413541454155416541754185419542054215422542354245425542654275428542954305431543254335434543554365437543854395440544154425443544454455446544754485449545054515452545354545455545654575458545954605461546254635464546554665467546854695470547154725473547454755476547754785479548054815482548354845485548654875488548954905491549254935494549554965497549854995500550155025503550455055506550755085509551055115512551355145515551655175518551955205521552255235524552555265527552855295530553155325533553455355536553755385539554055415542554355445545554655475548554955505551555255535554555555565557555855595560556155625563556455655566556755685569557055715572557355745575557655775578557955805581558255835584558555865587558855895590559155925593559455955596559755985599560056015602560356045605560656075608560956105611561256135614561556165617561856195620562156225623562456255626562756285629563056315632563356345635563656375638563956405641564256435644564556465647564856495650565156525653565456555656565756585659566056615662566356645665566656675668566956705671567256735674567556765677567856795680568156825683568456855686568756885689569056915692569356945695569656975698569957005701570257035704570557065707570857095710571157125713571457155716571757185719572057215722572357245725572657275728572957305731573257335734573557365737573857395740574157425743574457455746574757485749575057515752575357545755575657575758575957605761576257635764576557665767576857695770577157725773577457755776577757785779578057815782578357845785578657875788578957905791579257935794579557965797579857995800580158025803580458055806580758085809581058115812581358145815581658175818581958205821582258235824582558265827582858295830583158325833583458355836583758385839584058415842584358445845584658475848584958505851585258535854585558565857585858595860586158625863586458655866586758685869587058715872587358745875587658775878587958805881588258835884588558865887588858895890589158925893589458955896589758985899590059015902590359045905590659075908590959105911591259135914591559165917591859195920592159225923592459255926592759285929593059315932593359345935593659375938593959405941594259435944594559465947594859495950595159525953595459555956595759585959596059615962596359645965596659675968596959705971597259735974597559765977597859795980598159825983598459855986598759885989599059915992599359945995599659975998599960006001600260036004600560066007600860096010601160126013601460156016601760186019602060216022602360246025602660276028602960306031603260336034603560366037603860396040604160426043604460456046604760486049605060516052605360546055605660576058605960606061606260636064606560666067606860696070607160726073607460756076607760786079608060816082608360846085608660876088608960906091609260936094609560966097609860996100610161026103610461056106610761086109611061116112611361146115611661176118611961206121612261236124612561266127612861296130613161326133613461356136613761386139614061416142614361446145614661476148614961506151615261536154615561566157615861596160616161626163616461656166616761686169617061716172617361746175617661776178617961806181618261836184618561866187618861896190619161926193619461956196619761986199620062016202620362046205620662076208620962106211621262136214621562166217621862196220622162226223622462256226622762286229623062316232623362346235623662376238623962406241624262436244624562466247624862496250625162526253625462556256625762586259626062616262626362646265626662676268626962706271627262736274627562766277627862796280628162826283628462856286628762886289629062916292629362946295629662976298629963006301630263036304630563066307630863096310631163126313631463156316631763186319632063216322632363246325632663276328632963306331633263336334633563366337633863396340634163426343634463456346634763486349635063516352635363546355635663576358635963606361636263636364636563666367636863696370637163726373637463756376637763786379638063816382638363846385638663876388638963906391639263936394639563966397639863996400640164026403640464056406640764086409641064116412641364146415641664176418641964206421642264236424642564266427642864296430643164326433643464356436643764386439644064416442644364446445644664476448644964506451645264536454645564566457645864596460646164626463646464656466646764686469647064716472647364746475647664776478647964806481648264836484648564866487648864896490649164926493649464956496649764986499650065016502650365046505650665076508650965106511651265136514651565166517651865196520652165226523652465256526652765286529653065316532653365346535653665376538653965406541654265436544654565466547654865496550655165526553655465556556655765586559656065616562656365646565656665676568656965706571657265736574657565766577657865796580658165826583658465856586658765886589659065916592659365946595659665976598659966006601660266036604660566066607660866096610661166126613661466156616661766186619662066216622662366246625662666276628662966306631663266336634663566366637663866396640664166426643664466456646664766486649665066516652665366546655665666576658665966606661666266636664666566666667666866696670667166726673667466756676667766786679668066816682668366846685668666876688668966906691669266936694669566966697669866996700670167026703670467056706670767086709671067116712671367146715671667176718671967206721672267236724672567266727672867296730673167326733673467356736673767386739674067416742674367446745674667476748674967506751675267536754675567566757675867596760676167626763676467656766676767686769677067716772677367746775677667776778677967806781678267836784678567866787678867896790679167926793679467956796679767986799680068016802680368046805680668076808680968106811681268136814681568166817681868196820682168226823682468256826682768286829683068316832683368346835683668376838683968406841684268436844684568466847684868496850685168526853685468556856685768586859686068616862686368646865686668676868686968706871687268736874687568766877687868796880688168826883688468856886688768886889689068916892689368946895689668976898689969006901690269036904690569066907690869096910691169126913691469156916691769186919692069216922692369246925692669276928692969306931693269336934693569366937693869396940694169426943694469456946694769486949695069516952695369546955695669576958695969606961696269636964696569666967696869696970697169726973697469756976697769786979698069816982698369846985698669876988698969906991699269936994699569966997699869997000700170027003700470057006700770087009701070117012701370147015701670177018701970207021702270237024702570267027702870297030703170327033703470357036703770387039704070417042704370447045704670477048704970507051705270537054705570567057705870597060706170627063706470657066706770687069707070717072707370747075707670777078707970807081708270837084708570867087708870897090709170927093709470957096709770987099710071017102710371047105710671077108710971107111711271137114711571167117711871197120712171227123712471257126712771287129713071317132713371347135713671377138713971407141714271437144714571467147714871497150715171527153715471557156715771587159716071617162716371647165716671677168716971707171717271737174717571767177717871797180718171827183718471857186718771887189719071917192719371947195719671977198719972007201720272037204720572067207720872097210721172127213721472157216721772187219722072217222722372247225722672277228722972307231723272337234723572367237723872397240724172427243724472457246724772487249725072517252725372547255725672577258725972607261726272637264726572667267726872697270727172727273727472757276727772787279728072817282728372847285728672877288728972907291729272937294729572967297729872997300730173027303730473057306730773087309731073117312731373147315731673177318731973207321732273237324732573267327732873297330733173327333733473357336733773387339734073417342734373447345734673477348734973507351735273537354735573567357735873597360736173627363736473657366736773687369737073717372737373747375737673777378737973807381738273837384738573867387738873897390739173927393739473957396739773987399740074017402740374047405740674077408740974107411741274137414741574167417741874197420742174227423742474257426742774287429743074317432743374347435743674377438743974407441744274437444744574467447744874497450745174527453745474557456745774587459746074617462746374647465746674677468746974707471747274737474747574767477747874797480748174827483748474857486748774887489749074917492749374947495749674977498749975007501750275037504750575067507750875097510751175127513751475157516751775187519752075217522752375247525752675277528752975307531753275337534753575367537753875397540754175427543754475457546754775487549755075517552755375547555755675577558755975607561756275637564756575667567756875697570757175727573757475757576757775787579758075817582758375847585758675877588758975907591759275937594759575967597759875997600760176027603760476057606760776087609761076117612761376147615761676177618761976207621762276237624762576267627762876297630763176327633763476357636763776387639764076417642764376447645764676477648764976507651765276537654765576567657765876597660766176627663766476657666766776687669767076717672767376747675767676777678767976807681768276837684768576867687768876897690769176927693769476957696769776987699770077017702770377047705770677077708770977107711771277137714771577167717771877197720772177227723772477257726772777287729773077317732773377347735773677377738773977407741774277437744774577467747774877497750775177527753775477557756775777587759776077617762776377647765776677677768776977707771777277737774777577767777777877797780778177827783778477857786778777887789779077917792779377947795779677977798779978007801780278037804780578067807780878097810781178127813781478157816781778187819782078217822782378247825782678277828782978307831783278337834783578367837783878397840784178427843784478457846784778487849785078517852785378547855785678577858785978607861786278637864786578667867786878697870787178727873787478757876787778787879788078817882788378847885788678877888788978907891789278937894789578967897789878997900790179027903790479057906790779087909791079117912791379147915791679177918791979207921792279237924792579267927792879297930793179327933793479357936793779387939794079417942794379447945794679477948794979507951795279537954795579567957795879597960796179627963796479657966796779687969797079717972797379747975797679777978797979807981798279837984798579867987798879897990799179927993799479957996799779987999800080018002800380048005800680078008800980108011801280138014801580168017801880198020802180228023802480258026802780288029803080318032803380348035803680378038803980408041804280438044804580468047804880498050805180528053805480558056805780588059806080618062806380648065806680678068806980708071807280738074807580768077807880798080808180828083808480858086808780888089809080918092809380948095809680978098809981008101810281038104810581068107810881098110811181128113811481158116811781188119812081218122812381248125812681278128812981308131813281338134813581368137813881398140814181428143814481458146814781488149815081518152815381548155815681578158815981608161816281638164816581668167816881698170817181728173817481758176817781788179818081818182818381848185818681878188818981908191819281938194819581968197819881998200820182028203820482058206820782088209821082118212821382148215821682178218821982208221822282238224822582268227822882298230823182328233823482358236823782388239824082418242824382448245824682478248824982508251825282538254825582568257825882598260826182628263826482658266826782688269827082718272827382748275827682778278827982808281828282838284828582868287828882898290829182928293829482958296829782988299830083018302830383048305830683078308830983108311831283138314831583168317831883198320832183228323832483258326832783288329833083318332833383348335833683378338833983408341834283438344834583468347834883498350835183528353835483558356835783588359836083618362836383648365836683678368836983708371837283738374837583768377837883798380838183828383838483858386838783888389839083918392839383948395839683978398839984008401840284038404840584068407840884098410841184128413841484158416841784188419842084218422842384248425842684278428842984308431843284338434843584368437843884398440844184428443844484458446844784488449845084518452845384548455845684578458845984608461846284638464846584668467846884698470847184728473847484758476847784788479848084818482848384848485848684878488848984908491849284938494849584968497849884998500850185028503850485058506850785088509851085118512851385148515851685178518851985208521852285238524852585268527852885298530853185328533853485358536853785388539854085418542854385448545854685478548854985508551855285538554855585568557855885598560856185628563856485658566856785688569857085718572857385748575857685778578857985808581858285838584858585868587858885898590859185928593859485958596859785988599860086018602860386048605860686078608860986108611861286138614861586168617861886198620862186228623862486258626862786288629863086318632863386348635863686378638863986408641864286438644864586468647864886498650865186528653865486558656865786588659866086618662866386648665866686678668866986708671867286738674867586768677867886798680868186828683868486858686868786888689869086918692869386948695869686978698869987008701870287038704870587068707870887098710871187128713871487158716871787188719872087218722872387248725872687278728872987308731873287338734873587368737873887398740874187428743874487458746874787488749875087518752875387548755875687578758875987608761876287638764876587668767876887698770877187728773877487758776877787788779878087818782878387848785878687878788878987908791879287938794879587968797879887998800880188028803880488058806880788088809881088118812881388148815881688178818881988208821882288238824882588268827882888298830883188328833883488358836883788388839884088418842884388448845884688478848884988508851885288538854885588568857885888598860886188628863886488658866886788688869887088718872887388748875887688778878887988808881888288838884888588868887888888898890889188928893889488958896889788988899890089018902890389048905890689078908890989108911891289138914891589168917891889198920892189228923892489258926892789288929893089318932893389348935893689378938893989408941894289438944894589468947894889498950895189528953895489558956895789588959896089618962896389648965896689678968896989708971897289738974897589768977897889798980898189828983898489858986898789888989899089918992899389948995899689978998899990009001900290039004900590069007900890099010901190129013901490159016901790189019902090219022902390249025902690279028902990309031903290339034903590369037903890399040904190429043904490459046904790489049905090519052905390549055905690579058905990609061906290639064906590669067906890699070907190729073907490759076907790789079908090819082908390849085908690879088908990909091909290939094909590969097909890999100910191029103910491059106910791089109911091119112911391149115911691179118911991209121912291239124912591269127912891299130913191329133913491359136913791389139914091419142914391449145914691479148914991509151915291539154915591569157915891599160916191629163916491659166916791689169917091719172917391749175917691779178917991809181918291839184918591869187918891899190919191929193919491959196919791989199920092019202920392049205920692079208920992109211921292139214921592169217921892199220922192229223922492259226922792289229923092319232923392349235923692379238923992409241924292439244924592469247924892499250925192529253925492559256925792589259926092619262926392649265926692679268926992709271927292739274927592769277927892799280928192829283928492859286928792889289929092919292929392949295929692979298929993009301930293039304930593069307930893099310931193129313931493159316931793189319932093219322932393249325932693279328932993309331933293339334933593369337933893399340934193429343934493459346934793489349935093519352935393549355935693579358935993609361936293639364936593669367936893699370937193729373937493759376937793789379938093819382938393849385938693879388938993909391939293939394939593969397939893999400940194029403940494059406940794089409941094119412941394149415941694179418941994209421942294239424942594269427942894299430943194329433943494359436943794389439944094419442944394449445944694479448944994509451945294539454945594569457945894599460946194629463946494659466946794689469947094719472947394749475947694779478947994809481948294839484948594869487948894899490949194929493949494959496949794989499950095019502950395049505950695079508950995109511951295139514951595169517951895199520952195229523952495259526952795289529953095319532953395349535953695379538953995409541954295439544954595469547954895499550955195529553955495559556955795589559956095619562956395649565956695679568956995709571957295739574957595769577957895799580958195829583958495859586958795889589959095919592959395949595959695979598959996009601960296039604960596069607960896099610961196129613961496159616961796189619962096219622962396249625962696279628962996309631963296339634963596369637963896399640964196429643964496459646964796489649965096519652965396549655965696579658965996609661966296639664966596669667966896699670967196729673967496759676967796789679968096819682968396849685968696879688968996909691969296939694969596969697969896999700970197029703970497059706970797089709971097119712971397149715971697179718971997209721972297239724972597269727972897299730973197329733973497359736973797389739974097419742974397449745974697479748974997509751975297539754975597569757975897599760976197629763976497659766976797689769977097719772977397749775977697779778977997809781978297839784978597869787978897899790979197929793979497959796979797989799980098019802980398049805980698079808980998109811981298139814981598169817981898199820982198229823982498259826982798289829983098319832983398349835983698379838983998409841984298439844984598469847984898499850985198529853985498559856985798589859986098619862986398649865986698679868986998709871987298739874987598769877987898799880988198829883988498859886988798889889989098919892989398949895989698979898989999009901990299039904990599069907990899099910991199129913991499159916991799189919992099219922992399249925992699279928992999309931993299339934993599369937993899399940994199429943994499459946994799489949995099519952995399549955995699579958995999609961996299639964996599669967996899699970997199729973997499759976997799789979998099819982998399849985998699879988998999909991999299939994999599969997999899991000010001100021000310004100051000610007100081000910010100111001210013100141001510016100171001810019100201002110022100231002410025100261002710028100291003010031100321003310034100351003610037100381003910040100411004210043100441004510046100471004810049100501005110052100531005410055100561005710058100591006010061100621006310064100651006610067100681006910070100711007210073100741007510076100771007810079100801008110082100831008410085100861008710088100891009010091100921009310094100951009610097100981009910100101011010210103101041010510106101071010810109101101011110112101131011410115101161011710118101191012010121101221012310124101251012610127101281012910130101311013210133101341013510136101371013810139101401014110142101431014410145101461014710148101491015010151101521015310154101551015610157101581015910160101611016210163101641016510166101671016810169101701017110172101731017410175101761017710178101791018010181101821018310184101851018610187101881018910190101911019210193101941019510196101971019810199102001020110202102031020410205102061020710208102091021010211102121021310214102151021610217102181021910220102211022210223102241022510226102271022810229102301023110232102331023410235102361023710238102391024010241102421024310244102451024610247102481024910250102511025210253102541025510256102571025810259102601026110262102631026410265102661026710268102691027010271102721027310274102751027610277102781027910280102811028210283102841028510286102871028810289102901029110292102931029410295102961029710298102991030010301103021030310304103051030610307103081030910310103111031210313103141031510316103171031810319103201032110322103231032410325103261032710328103291033010331103321033310334103351033610337103381033910340103411034210343103441034510346103471034810349103501035110352103531035410355103561035710358103591036010361103621036310364103651036610367103681036910370103711037210373103741037510376103771037810379103801038110382103831038410385103861038710388103891039010391103921039310394103951039610397103981039910400104011040210403104041040510406104071040810409104101041110412104131041410415104161041710418104191042010421104221042310424104251042610427104281042910430104311043210433104341043510436104371043810439104401044110442104431044410445104461044710448104491045010451104521045310454104551045610457104581045910460104611046210463104641046510466104671046810469104701047110472104731047410475104761047710478104791048010481104821048310484104851048610487104881048910490104911049210493104941049510496104971049810499105001050110502105031050410505105061050710508105091051010511105121051310514105151051610517105181051910520105211052210523105241052510526105271052810529105301053110532105331053410535105361053710538105391054010541105421054310544105451054610547105481054910550105511055210553105541055510556105571055810559105601056110562105631056410565105661056710568105691057010571105721057310574105751057610577105781057910580105811058210583105841058510586105871058810589105901059110592105931059410595105961059710598105991060010601106021060310604106051060610607106081060910610106111061210613106141061510616106171061810619106201062110622106231062410625106261062710628106291063010631106321063310634106351063610637106381063910640106411064210643106441064510646106471064810649106501065110652106531065410655106561065710658106591066010661106621066310664106651066610667106681066910670106711067210673106741067510676106771067810679106801068110682106831068410685106861068710688106891069010691106921069310694106951069610697106981069910700107011070210703107041070510706107071070810709107101071110712107131071410715107161071710718107191072010721107221072310724107251072610727107281072910730107311073210733107341073510736107371073810739107401074110742107431074410745107461074710748107491075010751107521075310754107551075610757107581075910760107611076210763107641076510766107671076810769107701077110772107731077410775107761077710778107791078010781107821078310784107851078610787107881078910790107911079210793107941079510796107971079810799108001080110802108031080410805108061080710808108091081010811108121081310814108151081610817108181081910820108211082210823108241082510826108271082810829108301083110832108331083410835108361083710838108391084010841108421084310844108451084610847108481084910850108511085210853108541085510856108571085810859108601086110862108631086410865108661086710868108691087010871108721087310874108751087610877108781087910880108811088210883108841088510886108871088810889108901089110892108931089410895108961089710898108991090010901109021090310904109051090610907109081090910910109111091210913109141091510916109171091810919109201092110922109231092410925109261092710928109291093010931109321093310934109351093610937109381093910940109411094210943109441094510946109471094810949109501095110952109531095410955109561095710958109591096010961109621096310964109651096610967109681096910970109711097210973109741097510976109771097810979109801098110982109831098410985109861098710988109891099010991109921099310994109951099610997109981099911000110011100211003110041100511006110071100811009110101101111012110131101411015110161101711018110191102011021110221102311024110251102611027110281102911030110311103211033110341103511036110371103811039110401104111042110431104411045110461104711048110491105011051110521105311054110551105611057110581105911060110611106211063110641106511066110671106811069110701107111072110731107411075110761107711078110791108011081110821108311084110851108611087110881108911090110911109211093110941109511096110971109811099111001110111102111031110411105111061110711108111091111011111111121111311114111151111611117111181111911120111211112211123111241112511126111271112811129111301113111132111331113411135111361113711138111391114011141111421114311144111451114611147111481114911150111511115211153111541115511156111571115811159111601116111162111631116411165111661116711168111691117011171111721117311174111751117611177111781117911180111811118211183111841118511186111871118811189111901119111192111931119411195111961119711198111991120011201112021120311204112051120611207112081120911210112111121211213112141121511216112171121811219112201122111222112231122411225112261122711228112291123011231112321123311234112351123611237112381123911240112411124211243112441124511246112471124811249112501125111252112531125411255112561125711258112591126011261112621126311264112651126611267112681126911270112711127211273112741127511276112771127811279112801128111282112831128411285112861128711288112891129011291112921129311294112951129611297112981129911300113011130211303113041130511306113071130811309113101131111312113131131411315113161131711318113191132011321113221132311324113251132611327113281132911330113311133211333113341133511336113371133811339113401134111342113431134411345113461134711348113491135011351113521135311354113551135611357113581135911360113611136211363113641136511366113671136811369113701137111372113731137411375113761137711378113791138011381113821138311384113851138611387113881138911390113911139211393113941139511396113971139811399114001140111402114031140411405114061140711408114091141011411114121141311414114151141611417114181141911420114211142211423114241142511426114271142811429114301143111432114331143411435114361143711438114391144011441114421144311444114451144611447114481144911450114511145211453114541145511456114571145811459114601146111462114631146411465114661146711468114691147011471114721147311474114751147611477114781147911480114811148211483114841148511486114871148811489114901149111492114931149411495114961149711498114991150011501115021150311504115051150611507115081150911510115111151211513115141151511516115171151811519115201152111522115231152411525115261152711528115291153011531115321153311534115351153611537115381153911540115411154211543115441154511546115471154811549115501155111552115531155411555115561155711558115591156011561115621156311564115651156611567115681156911570115711157211573115741157511576115771157811579115801158111582115831158411585115861158711588115891159011591115921159311594115951159611597115981159911600116011160211603116041160511606116071160811609116101161111612116131161411615116161161711618116191162011621116221162311624116251162611627116281162911630116311163211633116341163511636116371163811639116401164111642116431164411645116461164711648116491165011651116521165311654116551165611657116581165911660116611166211663116641166511666116671166811669116701167111672116731167411675116761167711678116791168011681116821168311684116851168611687116881168911690116911169211693116941169511696116971169811699117001170111702117031170411705117061170711708117091171011711117121171311714117151171611717117181171911720117211172211723117241172511726117271172811729117301173111732117331173411735117361173711738117391174011741117421174311744117451174611747117481174911750117511175211753117541175511756117571175811759117601176111762117631176411765117661176711768117691177011771117721177311774117751177611777117781177911780117811178211783117841178511786117871178811789117901179111792117931179411795117961179711798117991180011801118021180311804118051180611807118081180911810118111181211813118141181511816118171181811819118201182111822118231182411825118261182711828118291183011831118321183311834118351183611837118381183911840118411184211843118441184511846118471184811849118501185111852118531185411855118561185711858118591186011861118621186311864118651186611867118681186911870118711187211873118741187511876118771187811879118801188111882118831188411885118861188711888118891189011891118921189311894118951189611897118981189911900119011190211903119041190511906119071190811909119101191111912119131191411915119161191711918119191192011921119221192311924119251192611927119281192911930119311193211933119341193511936119371193811939119401194111942119431194411945119461194711948119491195011951119521195311954119551195611957119581195911960119611196211963119641196511966119671196811969119701197111972119731197411975119761197711978119791198011981119821198311984119851198611987119881198911990119911199211993119941199511996119971199811999120001200112002120031200412005120061200712008120091201012011120121201312014120151201612017120181201912020120211202212023120241202512026120271202812029120301203112032120331203412035120361203712038120391204012041120421204312044120451204612047120481204912050120511205212053120541205512056120571205812059120601206112062120631206412065120661206712068120691207012071120721207312074120751207612077120781207912080120811208212083120841208512086120871208812089120901209112092120931209412095120961209712098120991210012101121021210312104121051210612107121081210912110121111211212113121141211512116121171211812119121201212112122121231212412125121261212712128121291213012131121321213312134121351213612137121381213912140121411214212143121441214512146121471214812149121501215112152121531215412155121561215712158121591216012161121621216312164121651216612167121681216912170121711217212173121741217512176121771217812179121801218112182121831218412185121861218712188121891219012191121921219312194121951219612197121981219912200122011220212203122041220512206122071220812209122101221112212122131221412215122161221712218122191222012221122221222312224122251222612227122281222912230122311223212233122341223512236122371223812239122401224112242122431224412245122461224712248122491225012251122521225312254122551225612257122581225912260122611226212263122641226512266122671226812269122701227112272122731227412275122761227712278122791228012281122821228312284122851228612287122881228912290122911229212293122941229512296122971229812299123001230112302123031230412305123061230712308123091231012311123121231312314123151231612317123181231912320123211232212323123241232512326123271232812329123301233112332123331233412335123361233712338123391234012341123421234312344123451234612347123481234912350123511235212353123541235512356123571235812359123601236112362123631236412365123661236712368123691237012371123721237312374123751237612377123781237912380123811238212383123841238512386123871238812389123901239112392123931239412395123961239712398123991240012401124021240312404124051240612407124081240912410124111241212413124141241512416124171241812419124201242112422124231242412425124261242712428124291243012431124321243312434124351243612437124381243912440124411244212443124441244512446124471244812449124501245112452124531245412455124561245712458124591246012461124621246312464124651246612467124681246912470124711247212473124741247512476124771247812479124801248112482124831248412485124861248712488124891249012491124921249312494124951249612497124981249912500125011250212503125041250512506125071250812509125101251112512125131251412515125161251712518125191252012521125221252312524125251252612527125281252912530125311253212533125341253512536125371253812539125401254112542125431254412545125461254712548125491255012551125521255312554125551255612557125581255912560125611256212563125641256512566125671256812569125701257112572125731257412575125761257712578125791258012581125821258312584125851258612587125881258912590125911259212593125941259512596125971259812599126001260112602126031260412605126061260712608126091261012611126121261312614126151261612617126181261912620126211262212623126241262512626126271262812629126301263112632126331263412635126361263712638126391264012641126421264312644126451264612647126481264912650126511265212653126541265512656126571265812659126601266112662126631266412665126661266712668126691267012671126721267312674126751267612677126781267912680126811268212683126841268512686126871268812689126901269112692126931269412695126961269712698126991270012701127021270312704127051270612707127081270912710127111271212713127141271512716127171271812719127201272112722127231272412725127261272712728127291273012731127321273312734127351273612737127381273912740127411274212743127441274512746127471274812749127501275112752127531275412755127561275712758127591276012761127621276312764127651276612767127681276912770127711277212773127741277512776127771277812779127801278112782127831278412785127861278712788127891279012791127921279312794127951279612797127981279912800128011280212803128041280512806128071280812809128101281112812128131281412815128161281712818128191282012821128221282312824128251282612827128281282912830128311283212833128341283512836128371283812839128401284112842128431284412845128461284712848128491285012851128521285312854128551285612857128581285912860128611286212863128641286512866128671286812869128701287112872128731287412875128761287712878128791288012881128821288312884128851288612887128881288912890128911289212893128941289512896128971289812899129001290112902129031290412905129061290712908129091291012911129121291312914129151291612917129181291912920129211292212923129241292512926129271292812929129301293112932129331293412935129361293712938129391294012941129421294312944129451294612947129481294912950129511295212953129541295512956129571295812959129601296112962129631296412965129661296712968129691297012971129721297312974129751297612977129781297912980129811298212983129841298512986129871298812989129901299112992129931299412995129961299712998129991300013001130021300313004130051300613007130081300913010130111301213013130141301513016130171301813019130201302113022130231302413025130261302713028130291303013031130321303313034130351303613037130381303913040130411304213043130441304513046130471304813049130501305113052130531305413055130561305713058130591306013061130621306313064130651306613067130681306913070130711307213073130741307513076130771307813079130801308113082130831308413085130861308713088130891309013091130921309313094130951309613097130981309913100131011310213103131041310513106131071310813109131101311113112131131311413115131161311713118131191312013121131221312313124131251312613127131281312913130131311313213133131341313513136131371313813139131401314113142131431314413145131461314713148131491315013151131521315313154131551315613157131581315913160131611316213163131641316513166131671316813169131701317113172131731317413175131761317713178131791318013181131821318313184131851318613187131881318913190131911319213193131941319513196131971319813199132001320113202132031320413205132061320713208132091321013211132121321313214132151321613217132181321913220132211322213223132241322513226132271322813229132301323113232132331323413235132361323713238132391324013241132421324313244132451324613247132481324913250132511325213253132541325513256132571325813259132601326113262132631326413265132661326713268132691327013271132721327313274132751327613277132781327913280132811328213283132841328513286132871328813289132901329113292132931329413295132961329713298132991330013301133021330313304133051330613307133081330913310133111331213313133141331513316133171331813319133201332113322133231332413325133261332713328133291333013331133321333313334133351333613337133381333913340133411334213343133441334513346133471334813349133501335113352133531335413355133561335713358133591336013361133621336313364133651336613367133681336913370133711337213373133741337513376133771337813379133801338113382133831338413385133861338713388133891339013391133921339313394133951339613397133981339913400134011340213403134041340513406134071340813409134101341113412134131341413415134161341713418134191342013421134221342313424134251342613427134281342913430134311343213433134341343513436134371343813439134401344113442134431344413445134461344713448134491345013451134521345313454134551345613457134581345913460134611346213463134641346513466134671346813469134701347113472134731347413475134761347713478134791348013481134821348313484134851348613487134881348913490134911349213493134941349513496134971349813499135001350113502135031350413505135061350713508135091351013511135121351313514135151351613517135181351913520135211352213523135241352513526135271352813529135301353113532135331353413535135361353713538135391354013541135421354313544135451354613547135481354913550135511355213553135541355513556135571355813559135601356113562135631356413565135661356713568135691357013571135721357313574135751357613577135781357913580135811358213583135841358513586135871358813589135901359113592135931359413595135961359713598135991360013601136021360313604136051360613607136081360913610136111361213613136141361513616136171361813619136201362113622136231362413625136261362713628136291363013631136321363313634136351363613637136381363913640136411364213643136441364513646136471364813649136501365113652136531365413655136561365713658136591366013661136621366313664136651366613667136681366913670136711367213673136741367513676136771367813679136801368113682136831368413685136861368713688136891369013691136921369313694136951369613697136981369913700137011370213703137041370513706137071370813709137101371113712137131371413715137161371713718137191372013721137221372313724137251372613727137281372913730137311373213733137341373513736137371373813739137401374113742137431374413745137461374713748137491375013751137521375313754137551375613757137581375913760137611376213763137641376513766137671376813769137701377113772137731377413775137761377713778137791378013781137821378313784137851378613787137881378913790137911379213793137941379513796137971379813799138001380113802138031380413805138061380713808138091381013811138121381313814138151381613817138181381913820138211382213823138241382513826138271382813829138301383113832138331383413835138361383713838138391384013841138421384313844138451384613847138481384913850138511385213853138541385513856138571385813859138601386113862138631386413865138661386713868138691387013871138721387313874138751387613877138781387913880138811388213883138841388513886138871388813889138901389113892138931389413895138961389713898138991390013901139021390313904139051390613907139081390913910139111391213913139141391513916139171391813919139201392113922139231392413925139261392713928139291393013931139321393313934139351393613937139381393913940139411394213943139441394513946139471394813949139501395113952139531395413955139561395713958139591396013961139621396313964139651396613967139681396913970139711397213973139741397513976139771397813979139801398113982139831398413985139861398713988139891399013991139921399313994139951399613997139981399914000140011400214003140041400514006140071400814009140101401114012140131401414015140161401714018140191402014021140221402314024140251402614027140281402914030140311403214033140341403514036140371403814039140401404114042140431404414045140461404714048140491405014051140521405314054140551405614057140581405914060140611406214063140641406514066140671406814069140701407114072140731407414075140761407714078140791408014081140821408314084140851408614087140881408914090140911409214093140941409514096140971409814099141001410114102141031410414105141061410714108141091411014111141121411314114141151411614117141181411914120141211412214123141241412514126141271412814129141301413114132141331413414135141361413714138141391414014141141421414314144141451414614147141481414914150141511415214153141541415514156141571415814159141601416114162141631416414165141661416714168141691417014171141721417314174141751417614177141781417914180141811418214183141841418514186141871418814189141901419114192141931419414195141961419714198141991420014201142021420314204142051420614207142081420914210142111421214213142141421514216142171421814219142201422114222142231422414225142261422714228142291423014231142321423314234142351423614237142381423914240142411424214243142441424514246142471424814249142501425114252142531425414255142561425714258142591426014261142621426314264142651426614267142681426914270142711427214273142741427514276142771427814279142801428114282142831428414285142861428714288142891429014291142921429314294142951429614297142981429914300143011430214303143041430514306143071430814309143101431114312143131431414315143161431714318143191432014321143221432314324143251432614327143281432914330143311433214333143341433514336143371433814339143401434114342143431434414345143461434714348143491435014351143521435314354143551435614357143581435914360143611436214363143641436514366143671436814369143701437114372143731437414375143761437714378143791438014381143821438314384143851438614387143881438914390143911439214393143941439514396143971439814399144001440114402144031440414405144061440714408144091441014411144121441314414144151441614417144181441914420144211442214423144241442514426144271442814429144301443114432144331443414435144361443714438144391444014441144421444314444144451444614447144481444914450144511445214453144541445514456144571445814459144601446114462144631446414465144661446714468144691447014471144721447314474144751447614477144781447914480144811448214483144841448514486144871448814489144901449114492144931449414495144961449714498144991450014501145021450314504145051450614507145081450914510145111451214513145141451514516145171451814519145201452114522145231452414525145261452714528145291453014531145321453314534145351453614537145381453914540145411454214543145441454514546145471454814549145501455114552145531455414555145561455714558145591456014561145621456314564145651456614567145681456914570145711457214573145741457514576145771457814579145801458114582145831458414585145861458714588145891459014591145921459314594145951459614597145981459914600146011460214603146041460514606146071460814609146101461114612146131461414615146161461714618146191462014621146221462314624146251462614627146281462914630146311463214633146341463514636146371463814639146401464114642146431464414645146461464714648146491465014651146521465314654146551465614657146581465914660146611466214663146641466514666146671466814669146701467114672146731467414675146761467714678146791468014681146821468314684146851468614687146881468914690146911469214693146941469514696146971469814699147001470114702147031470414705147061470714708147091471014711147121471314714147151471614717147181471914720147211472214723147241472514726147271472814729147301473114732147331473414735147361473714738147391474014741147421474314744147451474614747147481474914750147511475214753147541475514756147571475814759147601476114762147631476414765147661476714768147691477014771147721477314774147751477614777147781477914780147811478214783147841478514786147871478814789147901479114792147931479414795147961479714798147991480014801148021480314804148051480614807148081480914810148111481214813148141481514816148171481814819148201482114822148231482414825148261482714828148291483014831148321483314834148351483614837148381483914840148411484214843148441484514846148471484814849148501485114852148531485414855148561485714858148591486014861148621486314864148651486614867148681486914870148711487214873148741487514876148771487814879148801488114882148831488414885148861488714888148891489014891148921489314894148951489614897148981489914900149011490214903149041490514906149071490814909149101491114912149131491414915149161491714918149191492014921149221492314924149251492614927149281492914930149311493214933149341493514936149371493814939149401494114942149431494414945149461494714948149491495014951149521495314954149551495614957149581495914960149611496214963149641496514966149671496814969149701497114972149731497414975149761497714978149791498014981149821498314984149851498614987149881498914990149911499214993149941499514996149971499814999150001500115002150031500415005150061500715008150091501015011150121501315014150151501615017150181501915020150211502215023150241502515026150271502815029150301503115032150331503415035150361503715038150391504015041150421504315044150451504615047150481504915050150511505215053150541505515056150571505815059150601506115062150631506415065150661506715068150691507015071150721507315074150751507615077150781507915080150811508215083150841508515086150871508815089150901509115092150931509415095150961509715098150991510015101151021510315104151051510615107151081510915110151111511215113151141511515116151171511815119151201512115122151231512415125151261512715128151291513015131151321513315134151351513615137151381513915140151411514215143151441514515146151471514815149151501515115152151531515415155151561515715158151591516015161151621516315164151651516615167151681516915170151711517215173151741517515176151771517815179151801518115182151831518415185151861518715188151891519015191151921519315194151951519615197151981519915200152011520215203152041520515206152071520815209152101521115212152131521415215152161521715218152191522015221152221522315224152251522615227152281522915230152311523215233152341523515236152371523815239152401524115242152431524415245152461524715248152491525015251152521525315254152551525615257152581525915260152611526215263152641526515266152671526815269152701527115272152731527415275152761527715278152791528015281152821528315284152851528615287152881528915290152911529215293152941529515296152971529815299153001530115302153031530415305153061530715308153091531015311153121531315314153151531615317153181531915320153211532215323153241532515326153271532815329153301533115332153331533415335153361533715338153391534015341153421534315344153451534615347153481534915350153511535215353153541535515356153571535815359153601536115362153631536415365153661536715368153691537015371153721537315374153751537615377153781537915380153811538215383153841538515386153871538815389153901539115392153931539415395153961539715398153991540015401154021540315404154051540615407154081540915410154111541215413154141541515416154171541815419154201542115422154231542415425154261542715428154291543015431154321543315434154351543615437154381543915440154411544215443154441544515446154471544815449154501545115452154531545415455154561545715458154591546015461154621546315464154651546615467154681546915470154711547215473154741547515476154771547815479154801548115482154831548415485154861548715488154891549015491154921549315494154951549615497154981549915500155011550215503155041550515506155071550815509155101551115512155131551415515155161551715518155191552015521155221552315524155251552615527155281552915530155311553215533155341553515536155371553815539155401554115542155431554415545155461554715548155491555015551155521555315554155551555615557155581555915560155611556215563155641556515566155671556815569155701557115572155731557415575155761557715578155791558015581155821558315584155851558615587155881558915590155911559215593155941559515596155971559815599156001560115602156031560415605156061560715608156091561015611156121561315614156151561615617156181561915620156211562215623156241562515626156271562815629156301563115632156331563415635156361563715638156391564015641156421564315644156451564615647156481564915650156511565215653156541565515656156571565815659156601566115662156631566415665156661566715668156691567015671156721567315674156751567615677156781567915680156811568215683156841568515686156871568815689156901569115692156931569415695156961569715698156991570015701157021570315704157051570615707157081570915710157111571215713157141571515716157171571815719157201572115722157231572415725157261572715728157291573015731157321573315734157351573615737157381573915740157411574215743157441574515746157471574815749157501575115752157531575415755157561575715758157591576015761157621576315764157651576615767157681576915770157711577215773157741577515776157771577815779157801578115782157831578415785157861578715788157891579015791157921579315794157951579615797157981579915800158011580215803158041580515806158071580815809158101581115812158131581415815158161581715818158191582015821158221582315824158251582615827158281582915830158311583215833158341583515836158371583815839158401584115842158431584415845158461584715848158491585015851158521585315854158551585615857158581585915860158611586215863158641586515866158671586815869158701587115872158731587415875158761587715878158791588015881158821588315884158851588615887158881588915890158911589215893158941589515896158971589815899159001590115902159031590415905159061590715908159091591015911159121591315914159151591615917159181591915920159211592215923159241592515926159271592815929159301593115932159331593415935159361593715938159391594015941159421594315944159451594615947159481594915950159511595215953159541595515956159571595815959159601596115962159631596415965159661596715968159691597015971159721597315974159751597615977159781597915980159811598215983159841598515986159871598815989159901599115992159931599415995159961599715998159991600016001160021600316004160051600616007160081600916010160111601216013160141601516016160171601816019160201602116022160231602416025160261602716028160291603016031160321603316034160351603616037160381603916040160411604216043160441604516046160471604816049160501605116052160531605416055160561605716058160591606016061160621606316064160651606616067160681606916070160711607216073160741607516076160771607816079160801608116082160831608416085160861608716088160891609016091160921609316094160951609616097160981609916100161011610216103161041610516106161071610816109161101611116112161131611416115161161611716118161191612016121161221612316124161251612616127161281612916130161311613216133161341613516136161371613816139161401614116142161431614416145161461614716148161491615016151161521615316154161551615616157161581615916160161611616216163161641616516166161671616816169161701617116172161731617416175161761617716178161791618016181161821618316184161851618616187161881618916190161911619216193161941619516196161971619816199162001620116202162031620416205162061620716208162091621016211162121621316214162151621616217162181621916220162211622216223162241622516226162271622816229162301623116232162331623416235162361623716238162391624016241162421624316244162451624616247162481624916250162511625216253162541625516256162571625816259162601626116262162631626416265162661626716268162691627016271162721627316274162751627616277162781627916280162811628216283162841628516286162871628816289162901629116292162931629416295162961629716298162991630016301163021630316304163051630616307163081630916310163111631216313163141631516316163171631816319163201632116322163231632416325163261632716328163291633016331163321633316334163351633616337163381633916340163411634216343163441634516346163471634816349163501635116352163531635416355163561635716358163591636016361163621636316364163651636616367163681636916370163711637216373163741637516376163771637816379163801638116382163831638416385163861638716388163891639016391163921639316394163951639616397163981639916400164011640216403164041640516406164071640816409164101641116412164131641416415164161641716418164191642016421164221642316424164251642616427164281642916430164311643216433164341643516436164371643816439164401644116442164431644416445164461644716448164491645016451164521645316454164551645616457164581645916460164611646216463164641646516466164671646816469164701647116472164731647416475164761647716478164791648016481164821648316484164851648616487164881648916490164911649216493164941649516496164971649816499165001650116502165031650416505165061650716508165091651016511165121651316514165151651616517165181651916520165211652216523165241652516526165271652816529165301653116532165331653416535165361653716538165391654016541165421654316544165451654616547165481654916550165511655216553165541655516556165571655816559165601656116562165631656416565165661656716568165691657016571165721657316574165751657616577165781657916580165811658216583165841658516586165871658816589165901659116592165931659416595165961659716598165991660016601166021660316604166051660616607166081660916610166111661216613166141661516616166171661816619166201662116622166231662416625166261662716628166291663016631166321663316634166351663616637166381663916640166411664216643166441664516646166471664816649166501665116652166531665416655166561665716658166591666016661166621666316664166651666616667166681666916670166711667216673166741667516676166771667816679166801668116682166831668416685166861668716688166891669016691166921669316694166951669616697166981669916700167011670216703167041670516706167071670816709167101671116712167131671416715167161671716718167191672016721167221672316724167251672616727167281672916730167311673216733167341673516736167371673816739167401674116742167431674416745167461674716748167491675016751167521675316754167551675616757167581675916760167611676216763167641676516766167671676816769167701677116772167731677416775167761677716778167791678016781167821678316784167851678616787167881678916790167911679216793167941679516796167971679816799168001680116802168031680416805168061680716808168091681016811168121681316814168151681616817168181681916820168211682216823168241682516826168271682816829168301683116832168331683416835168361683716838168391684016841168421684316844168451684616847168481684916850168511685216853168541685516856168571685816859168601686116862168631686416865168661686716868168691687016871168721687316874168751687616877168781687916880168811688216883168841688516886168871688816889168901689116892168931689416895168961689716898168991690016901169021690316904169051690616907169081690916910169111691216913169141691516916169171691816919169201692116922169231692416925169261692716928169291693016931169321693316934169351693616937169381693916940169411694216943169441694516946169471694816949169501695116952169531695416955169561695716958169591696016961169621696316964169651696616967169681696916970169711697216973169741697516976169771697816979169801698116982169831698416985169861698716988169891699016991169921699316994169951699616997169981699917000170011700217003170041700517006170071700817009170101701117012170131701417015170161701717018170191702017021170221702317024170251702617027170281702917030170311703217033170341703517036170371703817039170401704117042170431704417045170461704717048170491705017051170521705317054170551705617057170581705917060170611706217063170641706517066170671706817069170701707117072170731707417075170761707717078170791708017081170821708317084170851708617087170881708917090170911709217093170941709517096170971709817099171001710117102171031710417105171061710717108171091711017111171121711317114171151711617117171181711917120171211712217123171241712517126171271712817129171301713117132171331713417135171361713717138171391714017141171421714317144171451714617147171481714917150171511715217153171541715517156171571715817159171601716117162171631716417165171661716717168171691717017171171721717317174171751717617177171781717917180171811718217183171841718517186171871718817189171901719117192171931719417195171961719717198171991720017201172021720317204172051720617207172081720917210172111721217213172141721517216172171721817219172201722117222172231722417225172261722717228172291723017231172321723317234172351723617237172381723917240172411724217243172441724517246172471724817249172501725117252172531725417255172561725717258172591726017261172621726317264172651726617267172681726917270172711727217273172741727517276172771727817279172801728117282172831728417285172861728717288172891729017291172921729317294172951729617297172981729917300173011730217303173041730517306173071730817309173101731117312173131731417315173161731717318173191732017321173221732317324173251732617327173281732917330173311733217333173341733517336173371733817339173401734117342173431734417345173461734717348173491735017351173521735317354173551735617357173581735917360173611736217363173641736517366173671736817369173701737117372173731737417375173761737717378173791738017381173821738317384173851738617387173881738917390173911739217393173941739517396173971739817399174001740117402174031740417405174061740717408174091741017411174121741317414174151741617417174181741917420174211742217423174241742517426174271742817429174301743117432174331743417435174361743717438174391744017441174421744317444
  1. using System;
  2. using System.Collections;
  3. using System.Collections.Generic;
  4. using System.Diagnostics;
  5. using System.IO;
  6. using System.Linq;
  7. using System.Reflection;
  8. using System.Text.RegularExpressions;
  9. using ExIni;
  10. using UnityEngine;
  11. using Object = UnityEngine.Object;
  12. using Random = System.Random;
  13. namespace CM3D2.MultipleMaids.Plugin
  14. {
  15. public partial class MultipleMaids
  16. {
  17. private void MaidUpdate()
  18. {
  19. if (isHaiti)
  20. {
  21. for (int i = 0; i < maxMaidCnt; i++)
  22. {
  23. if (gHandL[i])
  24. {
  25. HandL1[i] = null;
  26. Destroy(gHandL[i]);
  27. Destroy(gArmL[i]);
  28. Destroy(gFootL[i]);
  29. Destroy(gHizaL[i]);
  30. Destroy(gHandR[i]);
  31. Destroy(gArmR[i]);
  32. Destroy(gFootR[i]);
  33. Destroy(gHizaR[i]);
  34. Destroy(gClavicleL[i]);
  35. Destroy(gClavicleR[i]);
  36. Destroy(gNeck[i]);
  37. Destroy(gSpine[i]);
  38. Destroy(gSpine0a[i]);
  39. Destroy(gSpine1a[i]);
  40. Destroy(gSpine1[i]);
  41. Destroy(gPelvis[i]);
  42. }
  43. }
  44. for (int j = 0; j < maidCnt; j++)
  45. {
  46. Vector3 zero = Vector3.zero;
  47. Vector3 zero2 = Vector3.zero;
  48. if (selectList.Count <= 7)
  49. {
  50. if (selectList.Count % 2 == 1)
  51. {
  52. switch (j)
  53. {
  54. case 0:
  55. maidArray[j].SetPos(new Vector3(0f, 0f, 0f));
  56. break;
  57. case 1:
  58. maidArray[j].SetPos(new Vector3(-0.6f, 0f, 0.26f));
  59. break;
  60. case 2:
  61. maidArray[j].SetPos(new Vector3(0.6f, 0f, 0.26f));
  62. break;
  63. case 3:
  64. maidArray[j].SetPos(new Vector3(-1.1f, 0f, 0.69f));
  65. break;
  66. case 4:
  67. maidArray[j].SetPos(new Vector3(1.1f, 0f, 0.69f));
  68. break;
  69. case 5:
  70. maidArray[j].SetPos(new Vector3(-1.47f, 0f, 1.1f));
  71. break;
  72. case 6:
  73. maidArray[j].SetPos(new Vector3(1.47f, 0f, 1.1f));
  74. break;
  75. }
  76. }
  77. else
  78. {
  79. switch (j)
  80. {
  81. case 0:
  82. maidArray[j].SetPos(new Vector3(0.3f, 0f, 0f));
  83. break;
  84. case 1:
  85. maidArray[j].SetPos(new Vector3(-0.3f, 0f, 0f));
  86. break;
  87. case 2:
  88. maidArray[j].SetPos(new Vector3(0.7f, 0f, 0.4f));
  89. break;
  90. case 3:
  91. maidArray[j].SetPos(new Vector3(-0.7f, 0f, 0.4f));
  92. break;
  93. case 4:
  94. maidArray[j].SetPos(new Vector3(1f, 0f, 0.9f));
  95. break;
  96. case 5:
  97. maidArray[j].SetPos(new Vector3(-1f, 0f, 0.9f));
  98. break;
  99. }
  100. }
  101. }
  102. else
  103. {
  104. float num = 0f;
  105. if (selectList.Count >= 11)
  106. {
  107. num = -0.4f;
  108. if (selectList.Count % 2 == 1)
  109. {
  110. switch (j)
  111. {
  112. case 0:
  113. maidArray[j].SetPos(new Vector3(0f, 0f, 0f + num));
  114. break;
  115. case 1:
  116. maidArray[j].SetPos(new Vector3(-0.5f, 0f, 0.2f + num));
  117. break;
  118. case 2:
  119. maidArray[j].SetPos(new Vector3(0.5f, 0f, 0.2f + num));
  120. break;
  121. case 3:
  122. maidArray[j].SetPos(new Vector3(-0.9f, 0f, 0.55f + num));
  123. break;
  124. case 4:
  125. maidArray[j].SetPos(new Vector3(0.9f, 0f, 0.55f + num));
  126. break;
  127. case 5:
  128. maidArray[j].SetPos(new Vector3(-1.25f, 0f, 0.9f + num));
  129. break;
  130. case 6:
  131. maidArray[j].SetPos(new Vector3(1.25f, 0f, 0.9f + num));
  132. break;
  133. case 7:
  134. maidArray[j].SetPos(new Vector3(-1.57f, 0f, 1.3f + num));
  135. break;
  136. case 8:
  137. maidArray[j].SetPos(new Vector3(1.57f, 0f, 1.3f + num));
  138. break;
  139. case 9:
  140. maidArray[j].SetPos(new Vector3(-1.77f, 0f, 1.72f + num));
  141. break;
  142. case 10:
  143. maidArray[j].SetPos(new Vector3(1.77f, 0f, 1.72f + num));
  144. break;
  145. case 11:
  146. maidArray[j].SetPos(new Vector3(-1.85f, 0f, 2.17f + num));
  147. break;
  148. case 12:
  149. maidArray[j].SetPos(new Vector3(1.85f, 0f, 2.17f + num));
  150. break;
  151. default:
  152. maidArray[j].SetPos(new Vector3(0f, 0f, 0.7f + num));
  153. break;
  154. }
  155. }
  156. else
  157. {
  158. switch (j)
  159. {
  160. case 0:
  161. maidArray[j].SetPos(new Vector3(0.25f, 0f, 0f + num));
  162. break;
  163. case 1:
  164. maidArray[j].SetPos(new Vector3(-0.25f, 0f, 0f + num));
  165. break;
  166. case 2:
  167. maidArray[j].SetPos(new Vector3(0.7f, 0f, 0.25f + num));
  168. break;
  169. case 3:
  170. maidArray[j].SetPos(new Vector3(-0.7f, 0f, 0.25f + num));
  171. break;
  172. case 4:
  173. maidArray[j].SetPos(new Vector3(1.05f, 0f, 0.6f + num));
  174. break;
  175. case 5:
  176. maidArray[j].SetPos(new Vector3(-1.05f, 0f, 0.6f + num));
  177. break;
  178. case 6:
  179. maidArray[j].SetPos(new Vector3(1.35f, 0f, 0.9f + num));
  180. break;
  181. case 7:
  182. maidArray[j].SetPos(new Vector3(-1.35f, 0f, 0.9f + num));
  183. break;
  184. case 8:
  185. maidArray[j].SetPos(new Vector3(1.6f, 0f, 1.3f + num));
  186. break;
  187. case 9:
  188. maidArray[j].SetPos(new Vector3(-1.6f, 0f, 1.3f + num));
  189. break;
  190. case 10:
  191. maidArray[j].SetPos(new Vector3(1.8f, 0f, 1.72f + num));
  192. break;
  193. case 11:
  194. maidArray[j].SetPos(new Vector3(-1.8f, 0f, 1.72f + num));
  195. break;
  196. case 12:
  197. maidArray[j].SetPos(new Vector3(1.9f, 0f, 2.17f + num));
  198. break;
  199. case 13:
  200. maidArray[j].SetPos(new Vector3(-1.9f, 0f, 2.17f + num));
  201. break;
  202. default:
  203. maidArray[j].SetPos(new Vector3(0f, 0f, 0.7f + num));
  204. break;
  205. }
  206. }
  207. }
  208. else if (selectList.Count >= 8)
  209. {
  210. if (selectList.Count >= 9)
  211. {
  212. num = -0.2f;
  213. }
  214. if (selectList.Count % 2 == 1)
  215. {
  216. switch (j)
  217. {
  218. case 0:
  219. maidArray[j].SetPos(new Vector3(0f, 0f, 0f + num));
  220. break;
  221. case 1:
  222. maidArray[j].SetPos(new Vector3(-0.55f, 0f, 0.2f + num));
  223. break;
  224. case 2:
  225. maidArray[j].SetPos(new Vector3(0.55f, 0f, 0.2f + num));
  226. break;
  227. case 3:
  228. maidArray[j].SetPos(new Vector3(-1f, 0f, 0.6f + num));
  229. break;
  230. case 4:
  231. maidArray[j].SetPos(new Vector3(1f, 0f, 0.6f + num));
  232. break;
  233. case 5:
  234. maidArray[j].SetPos(new Vector3(-1.35f, 0f, 1f + num));
  235. break;
  236. case 6:
  237. maidArray[j].SetPos(new Vector3(1.35f, 0f, 1f + num));
  238. break;
  239. case 7:
  240. maidArray[j].SetPos(new Vector3(-1.6f, 0f, 1.4f + num));
  241. break;
  242. case 8:
  243. maidArray[j].SetPos(new Vector3(1.6f, 0f, 1.4f + num));
  244. break;
  245. }
  246. }
  247. else
  248. {
  249. switch (j)
  250. {
  251. case 0:
  252. maidArray[j].SetPos(new Vector3(0.28f, 0f, 0f + num));
  253. break;
  254. case 1:
  255. maidArray[j].SetPos(new Vector3(-0.28f, 0f, 0f + num));
  256. break;
  257. case 2:
  258. maidArray[j].SetPos(new Vector3(0.78f, 0f, 0.3f + num));
  259. break;
  260. case 3:
  261. maidArray[j].SetPos(new Vector3(-0.78f, 0f, 0.3f + num));
  262. break;
  263. case 4:
  264. maidArray[j].SetPos(new Vector3(1.22f, 0f, 0.7f + num));
  265. break;
  266. case 5:
  267. maidArray[j].SetPos(new Vector3(-1.22f, 0f, 0.7f + num));
  268. break;
  269. case 6:
  270. maidArray[j].SetPos(new Vector3(1.55f, 0f, 1.1f + num));
  271. break;
  272. case 7:
  273. maidArray[j].SetPos(new Vector3(-1.55f, 0f, 1.1f + num));
  274. break;
  275. case 8:
  276. maidArray[j].SetPos(new Vector3(1.77f, 0f, 1.58f + num));
  277. break;
  278. case 9:
  279. maidArray[j].SetPos(new Vector3(-1.77f, 0f, 1.58f + num));
  280. break;
  281. }
  282. }
  283. }
  284. }
  285. zero2.y = (float) (Math.Atan2((double) maidArray[j].transform.position.x,
  286. (double) (maidArray[j].transform.position.z - 1.5f)) * 180.0 / 3.1415926535897931) + 180f;
  287. maidArray[j].SetRot(zero2);
  288. }
  289. isHaiti = false;
  290. }
  291. if (isYobidashi)
  292. {
  293. bool flag = false;
  294. for (int j = 0; j < maxMaidCnt; j++)
  295. {
  296. if (selectList.Count > j && maidArray[j] != null && maidArray[j].IsBusy)
  297. {
  298. flag = true;
  299. }
  300. }
  301. if (!flag)
  302. {
  303. for (int k = 0; k < selectList.Count; k++)
  304. {
  305. if ((k == maxMaidCnt - 1 || (k < maxMaidCnt - 1 && maidArray[k + 1] == null)) && maidArray[k] == null)
  306. {
  307. if ((k != 0 || !(maidArray[k + 1] == null) || !(maidArray[k] == null))
  308. && (k <= 0 || !(maidArray[k - 1] != null) || maidArray[k - 1].IsBusy))
  309. {
  310. return;
  311. }
  312. if ((int) selectList[k] >= 12)
  313. {
  314. maidArray[k] = GameMain.Instance.CharacterMgr.GetStockMaid((int) selectList[k]);
  315. if (!maidArray[k].body0.isLoadedBody)
  316. {
  317. maidArray[k].DutPropAll();
  318. maidArray[k].AllProcPropSeqStart();
  319. }
  320. maidArray[k].Visible = true;
  321. }
  322. else if (sceneLevel != 5)
  323. {
  324. maidArray[k] =
  325. GameMain.Instance.CharacterMgr.Activate((int) selectList[k], (int) selectList[k], false, false);
  326. maidArray[k] = GameMain.Instance.CharacterMgr.CharaVisible((int) selectList[k], true, false);
  327. }
  328. else if (k == 0 && (int) selectList[k] == 0)
  329. {
  330. maidArray[k] =
  331. GameMain.Instance.CharacterMgr.Activate((int) selectList[k], (int) selectList[k], false, false);
  332. maidArray[k] = GameMain.Instance.CharacterMgr.CharaVisible((int) selectList[k], true, false);
  333. }
  334. else if (k == 0)
  335. {
  336. maidArray[k] = GameMain.Instance.CharacterMgr.Activate(0, (int) selectList[k], false, false);
  337. maidArray[k] = GameMain.Instance.CharacterMgr.CharaVisible(0, true, false);
  338. }
  339. else if ((int) selectList[k] + 1 == 12)
  340. {
  341. maidArray[k] = GameMain.Instance.CharacterMgr.GetStockMaid((int) selectList[k]);
  342. if (!maidArray[k].body0.isLoadedBody)
  343. {
  344. maidArray[k].DutPropAll();
  345. maidArray[k].AllProcPropSeqStart();
  346. }
  347. maidArray[k].Visible = true;
  348. }
  349. else
  350. {
  351. maidArray[k] =
  352. GameMain.Instance.CharacterMgr.Activate((int) selectList[k] + 1, (int) selectList[k], false, false);
  353. maidArray[k] = GameMain.Instance.CharacterMgr.CharaVisible((int) selectList[k] + 1, true, false);
  354. }
  355. if (maidArray[k] && maidArray[k].Visible)
  356. {
  357. maidArray[k].body0.boHeadToCam = true;
  358. maidArray[k].body0.boEyeToCam = true;
  359. }
  360. }
  361. }
  362. isHaiti = true;
  363. isYobidashi = false;
  364. }
  365. }
  366. if (sceneLevel == 5 && !isFadeOut && Input.GetKeyDown(KeyCode.F7) && this.getModKeyPressing(modKey.Shift))
  367. {
  368. if (!isF7S)
  369. {
  370. isF7S = true;
  371. isF7SInit = true;
  372. bGui = false;
  373. base.Preferences["config"]["shift_f7"].Value = "true";
  374. base.SaveConfig();
  375. GameMain.Instance.SoundMgr.PlaySe("se002.ogg", false);
  376. bgmCombo.selectedItemIndex = 2;
  377. }
  378. else
  379. {
  380. isF7S = false;
  381. base.Preferences["config"]["shift_f7"].Value = "false";
  382. base.SaveConfig();
  383. if (!isF7)
  384. {
  385. this.init2();
  386. okFlg = false;
  387. bGui = false;
  388. }
  389. GameMain.Instance.SoundMgr.PlaySe("se003.ogg", false);
  390. }
  391. }
  392. else if (sceneLevel == 5 && !isFadeOut && Input.GetKeyDown(KeyCode.F7))
  393. {
  394. if (isF7S && !isF7)
  395. {
  396. okFlg = true;
  397. faceFlg = false;
  398. poseFlg = false;
  399. sceneFlg = false;
  400. kankyoFlg = false;
  401. kankyo2Flg = false;
  402. bGui = true;
  403. isGuiInit = true;
  404. isF7 = true;
  405. bgmCombo.selectedItemIndex = 2;
  406. }
  407. else if (isF7S && isF7)
  408. {
  409. bGui = false;
  410. isF7 = false;
  411. }
  412. else if (!isF7)
  413. {
  414. this.init();
  415. okFlg = true;
  416. isGuiInit = true;
  417. comboBoxControl.selectedItemIndex = 0;
  418. comboBoxList = new GUIContent[11];
  419. comboBoxList[0] = new GUIContent("通常");
  420. comboBoxList[1] = new GUIContent("横一列");
  421. comboBoxList[2] = new GUIContent("縦一列");
  422. comboBoxList[3] = new GUIContent("斜め");
  423. comboBoxList[4] = new GUIContent("円(外向き)");
  424. comboBoxList[5] = new GUIContent("円(内向き)");
  425. comboBoxList[6] = new GUIContent("扇");
  426. comboBoxList[7] = new GUIContent("V");
  427. comboBoxList[8] = new GUIContent("^");
  428. comboBoxList[9] = new GUIContent("M");
  429. comboBoxList[10] = new GUIContent("W");
  430. listStyle.normal.textColor = Color.white;
  431. listStyle.normal.background = this.MakeTex(2, 2, new Color(0f, 0f, 0f, 0.5f));
  432. listStyle.onHover.background = (listStyle.hover.background = new Texture2D(2, 2));
  433. listStyle.padding.left = (listStyle.padding.right = (listStyle.padding.top = (listStyle.padding.bottom = 4)));
  434. listStyle.fontSize = this.GetPix(13);
  435. isYobidashi = true;
  436. bGui = true;
  437. isFadeOut = true;
  438. if (!isF7S)
  439. {
  440. maidArray[0] = GameMain.Instance.CharacterMgr.GetMaid(0);
  441. }
  442. List<Maid> stockMaidList = GameMain.Instance.CharacterMgr.GetStockMaidList();
  443. for (int i = 0; i < stockMaidList.Count; i++)
  444. {
  445. if (maidArray[0] == stockMaidList[i])
  446. {
  447. editMaid = i;
  448. }
  449. }
  450. selectList = new ArrayList();
  451. selectList.Add(editMaid);
  452. bgmCombo.selectedItemIndex = 2;
  453. try
  454. {
  455. shodaiFlg[(int) selectList[0]] = false;
  456. TMorph morph = maidArray[0].body0.Face.morph;
  457. float[] fieldValue = GetFieldValue<TMorph, float[]>(morph, "BlendValues");
  458. float num2 = fieldValue[(int) morph.hash["tangopen"]];
  459. }
  460. catch
  461. {
  462. shodaiFlg[(int) selectList[0]] = true;
  463. }
  464. if (!isVR)
  465. {
  466. eyeL[(int) selectList[0]] = maidArray[0].body0.quaDefEyeL.eulerAngles;
  467. eyeR[(int) selectList[0]] = maidArray[0].body0.quaDefEyeR.eulerAngles;
  468. }
  469. isF7 = true;
  470. }
  471. else
  472. {
  473. if (!isF7S)
  474. {
  475. this.init();
  476. maidArray[0] = GameMain.Instance.CharacterMgr.Activate(0, editMaid, false, false);
  477. maidArray[0] = GameMain.Instance.CharacterMgr.CharaVisible(0, true, false);
  478. okFlg = false;
  479. }
  480. else
  481. {
  482. isF7SInit = true;
  483. }
  484. bGui = false;
  485. isF7 = false;
  486. }
  487. }
  488. if (sceneLevel == 5 && isF7S && isF7SInit)
  489. {
  490. isF7SInit = false;
  491. this.init2();
  492. okFlg = true;
  493. ikMaid = 0;
  494. ikBui = 5;
  495. ikMode[0] = 0;
  496. bgmCombo.selectedItemIndex = 2;
  497. maidArray[0] = GameMain.Instance.CharacterMgr.GetMaid(0);
  498. List<Maid> stockMaidList = GameMain.Instance.CharacterMgr.GetStockMaidList();
  499. for (int i = 0; i < stockMaidList.Count; i++)
  500. {
  501. if (maidArray[0] == stockMaidList[i])
  502. {
  503. editMaid = i;
  504. }
  505. }
  506. selectList = new ArrayList();
  507. selectList.Add(editMaid);
  508. listStyle.normal.textColor = Color.white;
  509. listStyle.normal.background = this.MakeTex(2, 2, new Color(0f, 0f, 0f, 0.5f));
  510. listStyle.onHover.background = (listStyle.hover.background = new Texture2D(2, 2));
  511. listStyle.padding.left = (listStyle.padding.right = (listStyle.padding.top = (listStyle.padding.bottom = 4)));
  512. listStyle.fontSize = this.GetPix(13);
  513. try
  514. {
  515. shodaiFlg[(int) selectList[0]] = false;
  516. TMorph morph = maidArray[0].body0.Face.morph;
  517. float[] fieldValue = GetFieldValue<TMorph, float[]>(morph, "BlendValues");
  518. float num2 = fieldValue[(int) morph.hash["tangopen"]];
  519. }
  520. catch
  521. {
  522. shodaiFlg[(int) selectList[0]] = true;
  523. }
  524. if (!isVR)
  525. {
  526. eyeL[(int) selectList[0]] = maidArray[0].body0.quaDefEyeL.eulerAngles;
  527. eyeR[(int) selectList[0]] = maidArray[0].body0.quaDefEyeR.eulerAngles;
  528. }
  529. bGui = false;
  530. }
  531. if (sceneLevel == 3 && !isFadeOut && Input.GetKeyDown(KeyCode.F7))
  532. {
  533. GameObject gameObject = GameObject.Find("UI Root");
  534. GameObject gameObject2 = gameObject.transform.Find("DailyPanel").gameObject;
  535. if (!okFlg && !gameObject2.activeSelf)
  536. {
  537. return;
  538. }
  539. bool flag2 = GameMain.Instance.CharacterMgr.status.GetFlag("時間帯") == 3;
  540. CharacterMgr characterMgr = GameMain.Instance.CharacterMgr;
  541. for (int k = 0; k < characterMgr.GetStockMaidCount(); k++)
  542. {
  543. characterMgr.GetStockMaidList()[k].Visible = false;
  544. }
  545. if (isPanel)
  546. {
  547. this.init();
  548. okFlg = true;
  549. isF7 = true;
  550. isPanel = false;
  551. isGuiInit = true;
  552. comboBoxControl.selectedItemIndex = 0;
  553. comboBoxList = new GUIContent[11];
  554. comboBoxList[0] = new GUIContent("通常");
  555. comboBoxList[1] = new GUIContent("横一列");
  556. comboBoxList[2] = new GUIContent("縦一列");
  557. comboBoxList[3] = new GUIContent("斜め");
  558. comboBoxList[4] = new GUIContent("円(外向き)");
  559. comboBoxList[5] = new GUIContent("円(内向き)");
  560. comboBoxList[6] = new GUIContent("扇");
  561. comboBoxList[7] = new GUIContent("V");
  562. comboBoxList[8] = new GUIContent("^");
  563. comboBoxList[9] = new GUIContent("M");
  564. comboBoxList[10] = new GUIContent("W");
  565. listStyle.normal.textColor = Color.white;
  566. listStyle.normal.background = this.MakeTex(2, 2, new Color(0f, 0f, 0f, 0.5f));
  567. listStyle.onHover.background = (listStyle.hover.background = new Texture2D(2, 2));
  568. listStyle.padding.left = (listStyle.padding.right = (listStyle.padding.top = (listStyle.padding.bottom = 4)));
  569. listStyle.fontSize = this.GetPix(13);
  570. GameMain.Instance.BgMgr.ChangeBg("Theater");
  571. if (!isVR)
  572. {
  573. GameMain.Instance.MainCamera.Reset(CameraMain.CameraType.Target, true);
  574. CameraMain cameraMain = GameMain.Instance.MainCamera;
  575. cameraMain.SetTargetPos(new Vector3(0f, 0.9f, 0f), true);
  576. cameraMain.SetDistance(3f, true);
  577. }
  578. isYobidashi = true;
  579. bGui = false;
  580. isFadeOut = true;
  581. GameMain.Instance.MainCamera.FadeOut(0f, false, null, true, default(Color));
  582. selectList = new ArrayList();
  583. selectList.Add(0);
  584. GameMain.Instance.SoundMgr.PlayBGM("BGM008.ogg", 0f, true);
  585. bgmCombo.selectedItemIndex = 0;
  586. }
  587. else
  588. {
  589. this.init();
  590. isPanel = true;
  591. isF7 = false;
  592. bGui = false;
  593. GameMain.Instance.SoundMgr.PlayBGM("BGM009.ogg", 1f, true);
  594. if (flag2)
  595. {
  596. GameMain.Instance.BgMgr.ChangeBg("ShinShitsumu_ChairRot_Night");
  597. }
  598. else
  599. {
  600. GameMain.Instance.BgMgr.ChangeBg("ShinShitsumu_ChairRot");
  601. }
  602. if (!isVR)
  603. {
  604. GameMain.Instance.MainCamera.Reset(CameraMain.CameraType.Target, true);
  605. GameMain.Instance.MainCamera.SetTargetPos(new Vector3(0.5609447f, 1.380762f, -1.382336f), true);
  606. GameMain.Instance.MainCamera.SetDistance(1.6f, true);
  607. GameMain.Instance.MainCamera.SetAroundAngle(new Vector2(245.5691f, 6.273283f), true);
  608. }
  609. }
  610. gameObject2.SetActive(isPanel);
  611. }
  612. if (!okFlg)
  613. {
  614. if (maidArray[0] && maidArray[0].Visible)
  615. {
  616. int num3 = (int) maidArray[0].transform.position.y;
  617. if (num3 == 100)
  618. {
  619. okFlg = true;
  620. Vector3 vector = Vector3.zero;
  621. maidArray[0].SetPos(vector);
  622. isScript = true;
  623. }
  624. }
  625. else if (maidArray[0] && !maidArray[0].Visible)
  626. {
  627. maidArray[0] = GameMain.Instance.CharacterMgr.GetMaid(0);
  628. }
  629. else if (!maidArray[0])
  630. {
  631. maidArray[0] = GameMain.Instance.CharacterMgr.GetMaid(0);
  632. }
  633. }
  634. if (okFlg)
  635. {
  636. hFlg = false;
  637. mFlg = false;
  638. fFlg = false;
  639. sFlg = false;
  640. atFlg = false;
  641. yFlg = false;
  642. escFlg = false;
  643. maidCnt = 0;
  644. if (!cameraObj && !isVR)
  645. {
  646. cameraObj = new GameObject("subCamera");
  647. subcamera = cameraObj.AddComponent<Camera>();
  648. subcamera.CopyFrom(Camera.main);
  649. cameraObj.SetActive(true);
  650. subcamera.clearFlags = CameraClearFlags.Depth;
  651. subcamera.cullingMask = 256;
  652. subcamera.depth = 1f;
  653. subcamera.transform.parent = mainCamera.transform;
  654. float num2 = 2f;
  655. if (Application.unityVersion.StartsWith("4"))
  656. {
  657. num2 = 1f;
  658. }
  659. GameObject gameObject3 = new GameObject("Light");
  660. gameObject3.AddComponent<Light>();
  661. lightList.Add(gameObject3);
  662. lightColorR.Add(1f);
  663. lightColorG.Add(1f);
  664. lightColorB.Add(1f);
  665. lightIndex.Add(0);
  666. lightX.Add(40f);
  667. lightY.Add(180f);
  668. lightAkarusa.Add(num2);
  669. lightKage.Add(0.098f);
  670. lightRange.Add(50f);
  671. gameObject3.transform.position = GameMain.Instance.MainLight.transform.position;
  672. gameObject3.GetComponent<Light>().intensity = num2;
  673. gameObject3.GetComponent<Light>().spotAngle = 50f;
  674. gameObject3.GetComponent<Light>().range = 10f;
  675. gameObject3.GetComponent<Light>().type = LightType.Directional;
  676. gameObject3.GetComponent<Light>().color = new Color(0.5f, 1f, 0f);
  677. gameObject3.GetComponent<Light>().cullingMask = 256;
  678. }
  679. if (this.getModKeyPressing(modKey.Shift) && !this.getModKeyPressing(modKey.Ctrl) && !this.getModKeyPressing(modKey.Alt)
  680. && !Input.GetKey(KeyCode.Space) && !Input.GetKey(KeyCode.Z) && !Input.GetKey(KeyCode.X) && !Input.GetKey(KeyCode.W)
  681. && !Input.GetKey(KeyCode.Q) && !Input.GetKey(KeyCode.R) && !Input.GetKey(KeyCode.E) && !Input.GetKey(KeyCode.Y)
  682. && !Input.GetKey(KeyCode.V) && !Input.GetKey(KeyCode.C) && !Input.GetKey(KeyCode.D) && !Input.GetKey(KeyCode.S))
  683. {
  684. float axis = Input.GetAxis("Mouse ScrollWheel");
  685. if (axis > 0f)
  686. {
  687. mainCamera.SetDistance(mainCamera.GetDistance() - 0.5f, true);
  688. if (mainCamera.GetDistance() < 0.1f)
  689. {
  690. mainCamera.SetDistance(0.1f, true);
  691. }
  692. }
  693. else if (axis < 0f)
  694. {
  695. mainCamera.SetDistance(mainCamera.GetDistance() + 0.5f, true);
  696. if (mainCamera.GetDistance() > 25f)
  697. {
  698. mainCamera.SetDistance(25f, true);
  699. }
  700. }
  701. }
  702. for (int j = 0; j < maxMaidCnt; j++)
  703. {
  704. if (maidArray[j] && maidArray[j].Visible)
  705. {
  706. maidCnt++;
  707. }
  708. }
  709. if (maidArray[0] != null && maidArray[0].Visible)
  710. {
  711. if (this.getModKeyPressing(modKey.Shift))
  712. {
  713. speed = 5f * Time.deltaTime * 60f;
  714. }
  715. else
  716. {
  717. speed = 1f * Time.deltaTime * 60f;
  718. }
  719. Vector3 vector2 = mainCameraTransform.TransformDirection(Vector3.forward);
  720. Vector3 vector3 = mainCameraTransform.TransformDirection(Vector3.right);
  721. Vector3 vector4 = mainCameraTransform.TransformDirection(Vector3.up);
  722. if (!isVR || isVR2)
  723. {
  724. if (!isVR)
  725. {
  726. if (isBloom)
  727. {
  728. Bloom fieldValue2 = GetFieldValue<CameraMain, Bloom>(mainCamera, "m_gcBloom");
  729. fieldValue2.enabled = true;
  730. fieldValue2.bloomIntensity = bloom1;
  731. fieldValue2.bloomBlurIterations = (int) bloom2;
  732. fieldValue2.bloomThreshholdColor = new Color(1f - bloom3, 1f - bloom4, 1f - bloom5);
  733. if (isBloomA)
  734. {
  735. fieldValue2.hdr = Bloom.HDRBloomMode.On;
  736. }
  737. else
  738. {
  739. fieldValue2.hdr = Bloom.HDRBloomMode.Auto;
  740. }
  741. isBloom2 = true;
  742. }
  743. else if (isBloom2)
  744. {
  745. isBloom2 = false;
  746. Bloom fieldValue2 = GetFieldValue<CameraMain, Bloom>(mainCamera, "m_gcBloom");
  747. fieldValue2.enabled = true;
  748. fieldValue2.bloomIntensity = 2.85f;
  749. fieldValue2.hdr = Bloom.HDRBloomMode.Auto;
  750. fieldValue2.bloomThreshholdColor = new Color(1f, 1f, 1f);
  751. fieldValue2.bloomBlurIterations = 3;
  752. }
  753. if (isDepth)
  754. {
  755. depth_field_.enabled = true;
  756. depth_field_.focalLength = depth1;
  757. depth_field_.focalSize = depth2;
  758. depth_field_.aperture = depth3;
  759. depth_field_.maxBlurSize = depth4;
  760. if (isDepthA)
  761. {
  762. depth_field_.visualizeFocus = true;
  763. }
  764. else
  765. {
  766. depth_field_.visualizeFocus = false;
  767. }
  768. }
  769. else
  770. {
  771. if (depth_field_ == null)
  772. {
  773. depth_field_ = GameMain.Instance.MainCamera.gameObject.AddComponent<DepthOfFieldScatter>();
  774. if (depth_field_.dofHdrShader == null)
  775. {
  776. depth_field_.dofHdrShader = Shader.Find("Hidden/Dof/DepthOfFieldHdr");
  777. }
  778. if (depth_field_.dx11BokehShader == null)
  779. {
  780. depth_field_.dx11BokehShader = Shader.Find("Hidden/Dof/DX11Dof");
  781. }
  782. if (depth_field_.dx11BokehTexture == null)
  783. {
  784. depth_field_.dx11BokehTexture = (Resources.Load("Textures/hexShape") as Texture2D);
  785. }
  786. }
  787. depth_field_.enabled = false;
  788. }
  789. if (isFog)
  790. {
  791. if (fog_.fogShader == null)
  792. {
  793. fog_.fogShader = Shader.Find("Hidden/GlobalFog");
  794. }
  795. fog_.enabled = true;
  796. fog_.startDistance = fog1;
  797. fog_.globalDensity = fog2;
  798. fog_.heightScale = fog3;
  799. fog_.height = fog4;
  800. fog_.globalFogColor.r = fog5;
  801. fog_.globalFogColor.g = fog6;
  802. fog_.globalFogColor.b = fog7;
  803. }
  804. else
  805. {
  806. if (fog_ == null)
  807. {
  808. fog_ = GameMain.Instance.MainCamera.gameObject.AddComponent<GlobalFog>();
  809. }
  810. fog_.enabled = false;
  811. }
  812. if (isSepia != isSepian)
  813. {
  814. isSepia = isSepian;
  815. if (isSepia)
  816. {
  817. if (sepia_tone_.shader == null)
  818. {
  819. sepia_tone_.shader = Shader.Find("Hidden/Sepiatone Effect");
  820. }
  821. sepia_tone_.enabled = true;
  822. }
  823. else
  824. {
  825. if (sepia_tone_ == null)
  826. {
  827. sepia_tone_ = GameMain.Instance.MainCamera.gameObject.AddComponent<SepiaToneEffect>();
  828. }
  829. sepia_tone_.enabled = false;
  830. }
  831. }
  832. if (bokashi > 0f)
  833. {
  834. Blur component = GameMain.Instance.MainCamera.gameObject.GetComponent<Blur>();
  835. component.enabled = true;
  836. component.blurSize = bokashi / 10f;
  837. component.blurIterations = 0;
  838. component.downsample = 0;
  839. if (bokashi > 3f)
  840. {
  841. component.blurSize -= 0.3f;
  842. component.blurIterations = 1;
  843. component.downsample = 1;
  844. }
  845. }
  846. else
  847. {
  848. Blur component = GameMain.Instance.MainCamera.gameObject.GetComponent<Blur>();
  849. component.enabled = false;
  850. }
  851. if (kamiyure > 0f)
  852. {
  853. for (int j = 0; j < maidCnt; j++)
  854. {
  855. Maid maid = maidArray[j];
  856. for (int l = 0; l < maid.body0.goSlot.Count; l++)
  857. {
  858. if (maid.body0.goSlot[l].obj != null)
  859. {
  860. DynamicBone component2 = maid.body0.goSlot[l].obj.GetComponent<DynamicBone>();
  861. if (component2 != null && component2.enabled)
  862. {
  863. component2.m_Gravity = new Vector3(softG.x * 5f, softG.y * 5f + kamiyure, softG.z * 5f);
  864. }
  865. }
  866. List<THair1> fieldValue3 =
  867. GetFieldValue<TBoneHair_, List<THair1>>(maid.body0.goSlot[l].bonehair, "hair1list");
  868. for (int k = 0; k < fieldValue3.Count; k++)
  869. {
  870. fieldValue3[k].SoftG = new Vector3(softG.x, softG.y + kamiyure, softG.z);
  871. }
  872. }
  873. }
  874. }
  875. if (isBlur)
  876. {
  877. Vignetting component3 = GameMain.Instance.MainCamera.gameObject.GetComponent<Vignetting>();
  878. component3.mode = Vignetting.AberrationMode.Simple;
  879. component3.intensity = blur1;
  880. component3.chromaticAberration = blur4;
  881. component3.blur = blur2;
  882. component3.blurSpread = blur3;
  883. component3.enabled = true;
  884. isBlur2 = true;
  885. }
  886. else if (isBlur2)
  887. {
  888. isBlur2 = false;
  889. Vignetting component3 = GameMain.Instance.MainCamera.gameObject.GetComponent<Vignetting>();
  890. component3.mode = Vignetting.AberrationMode.Simple;
  891. component3.intensity = -3.98f;
  892. component3.chromaticAberration = -0.75f;
  893. component3.axialAberration = 1.18f;
  894. component3.blurSpread = 4.19f;
  895. component3.luminanceDependency = 0.494f;
  896. component3.blurDistance = 1.71f;
  897. component3.enabled = false;
  898. }
  899. }
  900. if (Input.GetKey(KeyCode.R) && Input.GetKey(KeyCode.I))
  901. {
  902. GameMain.Instance.MainLight.transform.eulerAngles -= Vector3.right / 2f;
  903. lightX[0] = GameMain.Instance.MainLight.transform.eulerAngles.x;
  904. }
  905. else if (Input.GetKey(KeyCode.R) && Input.GetKey(KeyCode.K))
  906. {
  907. if (GameMain.Instance.MainLight.transform.eulerAngles.x < 85f)
  908. {
  909. GameMain.Instance.MainLight.transform.eulerAngles += Vector3.right / 2f;
  910. lightX[0] = GameMain.Instance.MainLight.transform.eulerAngles.x;
  911. }
  912. }
  913. else if (Input.GetKey(KeyCode.R) && Input.GetKey(KeyCode.J))
  914. {
  915. GameMain.Instance.MainLight.transform.eulerAngles -= Vector3.up / 1.5f;
  916. lightY[0] = GameMain.Instance.MainLight.transform.eulerAngles.y;
  917. }
  918. else if (Input.GetKey(KeyCode.R) && Input.GetKey(KeyCode.L))
  919. {
  920. GameMain.Instance.MainLight.transform.eulerAngles += Vector3.up / 1.5f;
  921. lightY[0] = GameMain.Instance.MainLight.transform.eulerAngles.y;
  922. }
  923. else if (Input.GetKey(KeyCode.R) && Input.GetKey(KeyCode.BackQuote))
  924. {
  925. GameMain.Instance.MainLight.Reset();
  926. GameMain.Instance.MainLight.SetIntensity(0.95f);
  927. GameMain.Instance.MainLight.GetComponent<Light>().type = LightType.Directional;
  928. lightIndex[0] = 0;
  929. lightColorR[0] = 1f;
  930. lightColorG[0] = 1f;
  931. lightColorB[0] = 1f;
  932. lightX[0] = 40f;
  933. lightY[0] = 180f;
  934. lightAkarusa[0] = 0.95f;
  935. lightKage[0] = 0.098f;
  936. lightRange[0] = 50f;
  937. bgObject.SetActive(true);
  938. mainCamera.GetComponent<Camera>().backgroundColor = new Color(0f, 0f, 0f);
  939. isIdx1 = false;
  940. isIdx2 = false;
  941. isIdx3 = false;
  942. isIdx4 = false;
  943. }
  944. else if (Input.GetKey(KeyCode.R) && Input.GetKey(KeyCode.Minus) && this.getModKeyPressing(modKey.Shift))
  945. {
  946. List<float> list;
  947. (list = lightColorR)[0] = list[0] + 0.01f;
  948. if (lightColorR[0] > 1f)
  949. {
  950. lightColorR[0] = 1f;
  951. }
  952. if (lightIndex[0] != 3)
  953. {
  954. GameMain.Instance.MainLight.GetComponent<Light>().color =
  955. new Color(lightColorR[0], lightColorG[0], lightColorB[0]);
  956. }
  957. else
  958. {
  959. mainCamera.GetComponent<Camera>().backgroundColor =
  960. new Color(lightColorR[0], lightColorG[0], lightColorB[0]);
  961. }
  962. }
  963. else if (Input.GetKey(KeyCode.R) && Input.GetKey(KeyCode.Quote) && this.getModKeyPressing(modKey.Shift))
  964. {
  965. List<float> list;
  966. (list = lightColorG)[0] = list[0] + 0.01f;
  967. if (lightColorG[0] > 1f)
  968. {
  969. lightColorG[0] = 1f;
  970. }
  971. if (lightIndex[0] != 3)
  972. {
  973. GameMain.Instance.MainLight.GetComponent<Light>().color =
  974. new Color(lightColorR[0], lightColorG[0], lightColorB[0]);
  975. }
  976. else
  977. {
  978. mainCamera.GetComponent<Camera>().backgroundColor =
  979. new Color(lightColorR[0], lightColorG[0], lightColorB[0]);
  980. }
  981. }
  982. else if (Input.GetKey(KeyCode.R) && Input.GetKey(KeyCode.LeftBracket) && this.getModKeyPressing(modKey.Shift))
  983. {
  984. List<float> list;
  985. (list = lightColorB)[0] = list[0] + 0.01f;
  986. if (lightColorB[0] > 1f)
  987. {
  988. lightColorB[0] = 1f;
  989. }
  990. if (lightIndex[0] != 3)
  991. {
  992. GameMain.Instance.MainLight.GetComponent<Light>().color =
  993. new Color(lightColorR[0], lightColorG[0], lightColorB[0]);
  994. }
  995. else
  996. {
  997. mainCamera.GetComponent<Camera>().backgroundColor =
  998. new Color(lightColorR[0], lightColorG[0], lightColorB[0]);
  999. }
  1000. }
  1001. else if (Input.GetKey(KeyCode.R) && Input.GetKey(KeyCode.Minus))
  1002. {
  1003. List<float> list;
  1004. (list = lightColorR)[0] = list[0] - 0.01f;
  1005. if (lightColorR[0] < 0f)
  1006. {
  1007. lightColorR[0] = 0f;
  1008. }
  1009. if (lightIndex[0] != 3)
  1010. {
  1011. GameMain.Instance.MainLight.GetComponent<Light>().color =
  1012. new Color(lightColorR[0], lightColorG[0], lightColorB[0]);
  1013. }
  1014. else
  1015. {
  1016. mainCamera.GetComponent<Camera>().backgroundColor =
  1017. new Color(lightColorR[0], lightColorG[0], lightColorB[0]);
  1018. }
  1019. }
  1020. else if (Input.GetKey(KeyCode.R) && Input.GetKey(KeyCode.Quote))
  1021. {
  1022. List<float> list;
  1023. (list = lightColorG)[0] = list[0] - 0.01f;
  1024. if (lightColorG[0] < 0f)
  1025. {
  1026. lightColorG[0] = 0f;
  1027. }
  1028. if (lightIndex[0] != 3)
  1029. {
  1030. GameMain.Instance.MainLight.GetComponent<Light>().color =
  1031. new Color(lightColorR[0], lightColorG[0], lightColorB[0]);
  1032. }
  1033. else
  1034. {
  1035. mainCamera.GetComponent<Camera>().backgroundColor =
  1036. new Color(lightColorR[0], lightColorG[0], lightColorB[0]);
  1037. }
  1038. }
  1039. else if (Input.GetKey(KeyCode.R) && Input.GetKey(KeyCode.LeftBracket))
  1040. {
  1041. List<float> list;
  1042. (list = lightColorB)[0] = list[0] - 0.01f;
  1043. if (lightColorB[0] < 0f)
  1044. {
  1045. lightColorB[0] = 0f;
  1046. }
  1047. if (lightIndex[0] != 3)
  1048. {
  1049. GameMain.Instance.MainLight.GetComponent<Light>().color =
  1050. new Color(lightColorR[0], lightColorG[0], lightColorB[0]);
  1051. }
  1052. else
  1053. {
  1054. mainCamera.GetComponent<Camera>().backgroundColor =
  1055. new Color(lightColorR[0], lightColorG[0], lightColorB[0]);
  1056. }
  1057. }
  1058. else if (Input.GetKey(KeyCode.R) && Input.GetKey(KeyCode.Alpha0))
  1059. {
  1060. GameMain.Instance.MainLight.GetComponent<Light>().intensity += 0.12f * Time.deltaTime;
  1061. lightAkarusa[0] = GameMain.Instance.MainLight.GetComponent<Light>().intensity;
  1062. }
  1063. else if (Input.GetKey(KeyCode.R) && Input.GetKey(KeyCode.P))
  1064. {
  1065. GameMain.Instance.MainLight.GetComponent<Light>().intensity -= 0.12f * Time.deltaTime;
  1066. lightAkarusa[0] = GameMain.Instance.MainLight.GetComponent<Light>().intensity;
  1067. }
  1068. else if (Input.GetKey(KeyCode.R) && Input.GetKey(KeyCode.Alpha9))
  1069. {
  1070. GameMain.Instance.MainLight.GetComponent<Light>().spotAngle += 0.2f;
  1071. GameMain.Instance.MainLight.GetComponent<Light>().range += 0.2f;
  1072. lightRange[0] = GameMain.Instance.MainLight.GetComponent<Light>().spotAngle;
  1073. }
  1074. else if (Input.GetKey(KeyCode.R) && Input.GetKey(KeyCode.O))
  1075. {
  1076. GameMain.Instance.MainLight.GetComponent<Light>().spotAngle -= 0.2f;
  1077. GameMain.Instance.MainLight.GetComponent<Light>().range -= 0.2f;
  1078. lightRange[0] = GameMain.Instance.MainLight.GetComponent<Light>().spotAngle;
  1079. }
  1080. else if (Input.GetKey(KeyCode.R) && Input.GetKeyDown(KeyCode.U))
  1081. {
  1082. List<int> list2;
  1083. (list2 = lightIndex)[0] = list2[0] + 1;
  1084. if (lightIndex[0] == 4)
  1085. {
  1086. lightIndex[0] = 0;
  1087. }
  1088. lightColorR[0] = 1f;
  1089. lightColorG[0] = 1f;
  1090. lightColorB[0] = 1f;
  1091. lightX[0] = 40f;
  1092. lightY[0] = 180f;
  1093. lightAkarusa[0] = 0.95f;
  1094. lightKage[0] = 0.098f;
  1095. lightRange[0] = 50f;
  1096. GameMain.Instance.MainLight.Reset();
  1097. GameMain.Instance.MainLight.SetIntensity(0.95f);
  1098. GameMain.Instance.MainLight.GetComponent<Light>().spotAngle = 50f;
  1099. GameMain.Instance.MainLight.GetComponent<Light>().range = 10f;
  1100. GameMain.Instance.MainLight.gameObject.transform.position = new Vector3(0f, 2f, 0f);
  1101. if (lightIndex[0] == 0)
  1102. {
  1103. GameMain.Instance.MainLight.GetComponent<Light>().type = LightType.Directional;
  1104. bgObject.SetActive(true);
  1105. mainCamera.GetComponent<Camera>().backgroundColor = new Color(0f, 0f, 0f);
  1106. }
  1107. else if (lightIndex[0] == 1)
  1108. {
  1109. GameMain.Instance.MainLight.transform.eulerAngles += Vector3.right * 40f;
  1110. lightX[0] = GameMain.Instance.MainLight.transform.eulerAngles.x;
  1111. GameMain.Instance.MainLight.GetComponent<Light>().type = LightType.Spot;
  1112. }
  1113. else if (lightIndex[0] == 2)
  1114. {
  1115. GameMain.Instance.MainLight.GetComponent<Light>().type = LightType.Point;
  1116. }
  1117. else if (lightIndex[0] == 3)
  1118. {
  1119. GameMain.Instance.MainLight.GetComponent<Light>().type = LightType.Directional;
  1120. mainCamera.GetComponent<Camera>().backgroundColor =
  1121. new Color(lightColorR[0], lightColorG[0], lightColorB[0]);
  1122. bgObject.SetActive(false);
  1123. }
  1124. isIdx1 = false;
  1125. isIdx2 = false;
  1126. isIdx3 = false;
  1127. isIdx4 = false;
  1128. }
  1129. }
  1130. else if (Input.GetKey(KeyCode.R) && Input.GetKey(KeyCode.Insert))
  1131. {
  1132. GameMain.Instance.MainLight.transform.eulerAngles -= Vector3.right / 2f;
  1133. }
  1134. else if (Input.GetKey(KeyCode.R) && Input.GetKey(KeyCode.Delete))
  1135. {
  1136. if (GameMain.Instance.MainLight.transform.eulerAngles.x < 85f)
  1137. {
  1138. GameMain.Instance.MainLight.transform.eulerAngles += Vector3.right / 2f;
  1139. }
  1140. }
  1141. else if (Input.GetKey(KeyCode.R) && Input.GetKey(KeyCode.Home))
  1142. {
  1143. GameMain.Instance.MainLight.transform.eulerAngles -= Vector3.up / 1.5f;
  1144. }
  1145. else if (Input.GetKey(KeyCode.R) && Input.GetKey(KeyCode.End))
  1146. {
  1147. GameMain.Instance.MainLight.transform.eulerAngles += Vector3.up / 1.5f;
  1148. }
  1149. else if (Input.GetKey(KeyCode.R) && Input.GetKey(KeyCode.BackQuote))
  1150. {
  1151. GameMain.Instance.MainLight.Reset();
  1152. GameMain.Instance.MainLight.SetIntensity(0.95f);
  1153. }
  1154. else if (Input.GetKey(KeyCode.R) && Input.GetKey(KeyCode.PageUp))
  1155. {
  1156. GameMain.Instance.MainLight.GetComponent<Light>().intensity += 0.1f * Time.deltaTime;
  1157. }
  1158. else if (Input.GetKey(KeyCode.R) && Input.GetKey(KeyCode.PageDown))
  1159. {
  1160. GameMain.Instance.MainLight.GetComponent<Light>().intensity -= 0.1f * Time.deltaTime;
  1161. }
  1162. else if (Input.GetKey(KeyCode.R) && Input.GetKey(KeyCode.Quote))
  1163. {
  1164. if (lightIndex[0] == 1)
  1165. {
  1166. GameMain.Instance.MainLight.GetComponent<Light>().spotAngle += 0.2f;
  1167. }
  1168. else
  1169. {
  1170. GameMain.Instance.MainLight.GetComponent<Light>().range += 0.2f;
  1171. }
  1172. }
  1173. else if (Input.GetKey(KeyCode.R) && Input.GetKey(KeyCode.LeftBracket))
  1174. {
  1175. if (lightIndex[0] == 1)
  1176. {
  1177. GameMain.Instance.MainLight.GetComponent<Light>().spotAngle -= 0.2f;
  1178. }
  1179. else
  1180. {
  1181. GameMain.Instance.MainLight.GetComponent<Light>().range -= 0.2f;
  1182. }
  1183. }
  1184. else if (Input.GetKey(KeyCode.R) && Input.GetKeyDown(KeyCode.Minus))
  1185. {
  1186. List<int> list2;
  1187. (list2 = lightIndex)[0] = list2[0] + 1;
  1188. if (lightIndex[0] == 3)
  1189. {
  1190. lightIndex[0] = 0;
  1191. }
  1192. GameMain.Instance.MainLight.Reset();
  1193. GameMain.Instance.MainLight.SetIntensity(0.95f);
  1194. GameMain.Instance.MainLight.GetComponent<Light>().spotAngle = 50f;
  1195. GameMain.Instance.MainLight.GetComponent<Light>().range = 10f;
  1196. GameMain.Instance.MainLight.gameObject.transform.position = new Vector3(0f, 2f, 0f);
  1197. if (lightIndex[0] == 0)
  1198. {
  1199. GameMain.Instance.MainLight.GetComponent<Light>().type = LightType.Directional;
  1200. }
  1201. else if (lightIndex[0] == 1)
  1202. {
  1203. GameMain.Instance.MainLight.transform.eulerAngles += Vector3.right * 40f;
  1204. GameMain.Instance.MainLight.GetComponent<Light>().type = LightType.Spot;
  1205. }
  1206. else if (lightIndex[0] == 2)
  1207. {
  1208. GameMain.Instance.MainLight.GetComponent<Light>().type = LightType.Point;
  1209. }
  1210. }
  1211. int i;
  1212. for (i = 0; i < lightList.Count; i++)
  1213. {
  1214. if (i > 0)
  1215. {
  1216. lightList[i].GetComponent<Light>().color = new Color(lightColorR[i], lightColorG[i], lightColorB[i]);
  1217. lightList[i].GetComponent<Light>().intensity = lightAkarusa[i];
  1218. lightList[i].GetComponent<Light>().spotAngle = lightRange[i];
  1219. lightList[i].GetComponent<Light>().range = lightRange[i] / 5f;
  1220. if (!Input.GetKey(KeyCode.X) && (!Input.GetKey(KeyCode.Z) || !this.getModKeyPressing(modKey.Shift)))
  1221. {
  1222. lightList[i].transform.eulerAngles = new Vector3(lightX[i], lightY[i], 18f);
  1223. }
  1224. }
  1225. else
  1226. {
  1227. GameMain.Instance.MainLight.SetIntensity(lightAkarusa[0]);
  1228. GameMain.Instance.MainLight.GetComponent<Light>().shadowStrength = lightKage[0];
  1229. if (!Input.GetKey(KeyCode.X) && (!Input.GetKey(KeyCode.Z) || !this.getModKeyPressing(modKey.Shift)))
  1230. {
  1231. GameMain.Instance.MainLight.SetRotation(new Vector3(lightX[0], lightY[0], 18f));
  1232. }
  1233. GameMain.Instance.MainLight.GetComponent<Light>().spotAngle = lightRange[i];
  1234. GameMain.Instance.MainLight.GetComponent<Light>().range = lightRange[i] / 5f;
  1235. if (lightIndex[i] != 3)
  1236. {
  1237. GameMain.Instance.MainLight.GetComponent<Light>().color =
  1238. new Color(lightColorR[0], lightColorG[0], lightColorB[0]);
  1239. }
  1240. else
  1241. {
  1242. mainCamera.GetComponent<Camera>().backgroundColor =
  1243. new Color(lightColorR[0], lightColorG[0], lightColorB[0]);
  1244. }
  1245. }
  1246. }
  1247. bool flag3 = false;
  1248. if (sceneLevel == 5 && (Input.GetKeyDown(KeyCode.F12)
  1249. || (Input.GetKey(KeyCode.Q) && this.getModKeyPressing(modKey.Shift))))
  1250. {
  1251. for (i = 0; i < maidCnt; i++)
  1252. {
  1253. if (goSlot[(int) selectList[i]] != null)
  1254. {
  1255. maidArray[i].body0.goSlot = new List<TBodySkin>(goSlot[(int) selectList[i]]);
  1256. for (int l = 0; l < bodyHit[(int) selectList[i]].Count; l++)
  1257. {
  1258. maidArray[i].body0.goSlot[l].bonehair.bodyhit = bodyHit[(int) selectList[i]][l];
  1259. }
  1260. }
  1261. }
  1262. }
  1263. for (int j = 0; j < maidCnt; j++)
  1264. {
  1265. if (!isVR && sceneLevel == 5 && j == isEditNo)
  1266. {
  1267. bool flag4 = shodaiFlg[(int) selectList[j]];
  1268. shodaiFlg[(int) selectList[j]] = false;
  1269. try
  1270. {
  1271. TMorph morph = maidArray[j].body0.Face.morph;
  1272. float[] fieldValue = GetFieldValue<TMorph, float[]>(morph, "BlendValues");
  1273. float num2 = fieldValue[(int) morph.hash["tangopen"]];
  1274. }
  1275. catch
  1276. {
  1277. shodaiFlg[(int) selectList[j]] = true;
  1278. }
  1279. if (shodaiFlg[(int) selectList[j]] != flag4)
  1280. {
  1281. if (!isVR)
  1282. {
  1283. eyeL[(int) selectList[j]] = maidArray[j].body0.quaDefEyeL.eulerAngles;
  1284. eyeR[(int) selectList[j]] = maidArray[j].body0.quaDefEyeR.eulerAngles;
  1285. }
  1286. }
  1287. }
  1288. if (maidArray[j] && maidArray[j].Visible && isStop[j])
  1289. {
  1290. maidArray[j].body0.m_Bones.GetComponent<Animation>().Stop();
  1291. }
  1292. if (sceneLevel == 5)
  1293. {
  1294. if (editSelectMaid == maidArray[j])
  1295. {
  1296. flag3 = true;
  1297. }
  1298. }
  1299. Maid maid = maidArray[j];
  1300. }
  1301. if (sceneLevel == 5 && !flag3 && maidCnt > 0)
  1302. {
  1303. isEditNo = 0;
  1304. SceneEdit component4 = GameObject.Find("__SceneEdit__").GetComponent<SceneEdit>();
  1305. SetFieldValue<SceneEdit, Maid>(component4, "m_maid", maidArray[0]);
  1306. }
  1307. i = 0;
  1308. while (i < maidCnt)
  1309. {
  1310. Transform transform = maidArray[i].transform;
  1311. Maid maid = maidArray[i];
  1312. if (cafeFlg[i])
  1313. {
  1314. cafeCount[i]++;
  1315. if (cafeCount[i] > 1)
  1316. {
  1317. maid.DelProp(MPN.handitem, true);
  1318. maid.SetProp("handitem", "HandItemR_Etoile_Teacup_I_.menu", 0, true, false);
  1319. maid.AllProcPropSeqStart();
  1320. cafeFlg[i] = false;
  1321. cafeCount[i] = 0;
  1322. }
  1323. }
  1324. KeyCode key;
  1325. if (i >= 14)
  1326. {
  1327. bool flag5 = false;
  1328. bool flag6 = false;
  1329. for (int k = 0; k < keyArray.Length; k++)
  1330. {
  1331. if (Input.GetKey(keyArray[k]))
  1332. {
  1333. flag5 = true;
  1334. break;
  1335. }
  1336. if (Input.GetKeyUp(keyArray[k]))
  1337. {
  1338. flag6 = true;
  1339. break;
  1340. }
  1341. }
  1342. key = keyArray[6];
  1343. if (!flag5 || this.getModKeyPressing(modKey.Ctrl))
  1344. {
  1345. if (!flag6 || this.getModKeyPressing(modKey.Ctrl))
  1346. {
  1347. goto IL_49FE;
  1348. }
  1349. idoFlg[i - 7] = false;
  1350. }
  1351. }
  1352. else if (i >= 7)
  1353. {
  1354. bool flag5 = false;
  1355. bool flag6 = false;
  1356. for (int k = 0; k < keyArray.Length; k++)
  1357. {
  1358. if (Input.GetKey(keyArray[k]))
  1359. {
  1360. flag5 = true;
  1361. break;
  1362. }
  1363. if (Input.GetKeyUp(keyArray[k]))
  1364. {
  1365. flag6 = true;
  1366. break;
  1367. }
  1368. }
  1369. key = keyArray[i - 7];
  1370. if (!flag5 || this.getModKeyPressing(modKey.Ctrl))
  1371. {
  1372. if (!flag6 || this.getModKeyPressing(modKey.Ctrl))
  1373. {
  1374. goto IL_49FE;
  1375. }
  1376. idoFlg[i - 7] = false;
  1377. }
  1378. }
  1379. else
  1380. {
  1381. bool flag5 = false;
  1382. for (int k = 0; k < keyArray.Length; k++)
  1383. {
  1384. if (Input.GetKey(keyArray[k]))
  1385. {
  1386. flag5 = true;
  1387. break;
  1388. }
  1389. }
  1390. if (!flag5 || !this.getModKeyPressing(modKey.Ctrl))
  1391. {
  1392. key = keyArray[i];
  1393. goto IL_49FE;
  1394. }
  1395. }
  1396. IL_1688E:
  1397. i++;
  1398. continue;
  1399. IL_49FE:
  1400. if (xFlg[i])
  1401. {
  1402. if (!maid.AudioMan.audiosource.isPlaying)
  1403. {
  1404. if (maid.status.personal.uniqueName == "Pride")
  1405. {
  1406. string text = "s0_";
  1407. Random random = new Random();
  1408. int num4 = random.Next(10000);
  1409. bool flag7 = false;
  1410. for (int k = 0; k < tunArray.Length; k++)
  1411. {
  1412. if (tunArray[k] == num4)
  1413. {
  1414. flag7 = true;
  1415. break;
  1416. }
  1417. }
  1418. if (!flag7)
  1419. {
  1420. text = text + "0" + num4.ToString() + ".ogg";
  1421. if (GameUty.FileSystem.IsExistentFile(text))
  1422. {
  1423. maid.AudioMan.LoadPlay(text, 0f, false, false);
  1424. }
  1425. }
  1426. }
  1427. if (maid.status.personal.uniqueName == "Cool")
  1428. {
  1429. string text = "s1_";
  1430. Random random = new Random();
  1431. int num4 = random.Next(10000);
  1432. bool flag7 = false;
  1433. for (int k = 0; k < coolArray.Length; k++)
  1434. {
  1435. if (coolArray[k] == num4)
  1436. {
  1437. flag7 = true;
  1438. break;
  1439. }
  1440. }
  1441. if (!flag7)
  1442. {
  1443. text = text + "0" + num4.ToString() + ".ogg";
  1444. if (GameUty.FileSystem.IsExistentFile(text))
  1445. {
  1446. maid.AudioMan.LoadPlay(text, 0f, false, false);
  1447. }
  1448. }
  1449. }
  1450. if (maid.status.personal.uniqueName == "Pure")
  1451. {
  1452. string text = "s2_";
  1453. Random random = new Random();
  1454. int num4 = random.Next(10000);
  1455. bool flag7 = false;
  1456. for (int k = 0; k < pureArray.Length; k++)
  1457. {
  1458. if (pureArray[k] == num4)
  1459. {
  1460. flag7 = true;
  1461. break;
  1462. }
  1463. }
  1464. if (!flag7)
  1465. {
  1466. text = text + "0" + num4.ToString() + ".ogg";
  1467. if (GameUty.FileSystem.IsExistentFile(text))
  1468. {
  1469. maid.AudioMan.LoadPlay(text, 0f, false, false);
  1470. }
  1471. }
  1472. }
  1473. if (maid.status.personal.uniqueName == "Yandere")
  1474. {
  1475. string text = "s3_";
  1476. Random random = new Random();
  1477. int num4 = random.Next(10000);
  1478. bool flag7 = false;
  1479. for (int k = 0; k < yanArray.Length; k++)
  1480. {
  1481. if (yanArray[k] == num4)
  1482. {
  1483. flag7 = true;
  1484. break;
  1485. }
  1486. }
  1487. if (!flag7)
  1488. {
  1489. text = text + string.Format("{0:00000}", num4) + ".ogg";
  1490. if (GameUty.FileSystem.IsExistentFile(text))
  1491. {
  1492. maid.AudioMan.LoadPlay(text, 0f, false, false);
  1493. }
  1494. }
  1495. }
  1496. if (maid.status.personal.uniqueName == "Muku")
  1497. {
  1498. string text = "h0_";
  1499. Random random = new Random();
  1500. int num4 = random.Next(10000);
  1501. bool flag7 = false;
  1502. for (int k = 0; k < h0Array.Length; k++)
  1503. {
  1504. if (h0Array[k] == num4)
  1505. {
  1506. flag7 = true;
  1507. break;
  1508. }
  1509. }
  1510. if (flag7)
  1511. {
  1512. text = text + string.Format("{0:00000}", num4) + ".ogg";
  1513. if (GameUty.FileSystem.IsExistentFile(text))
  1514. {
  1515. maid.AudioMan.LoadPlay(text, 0f, false, false);
  1516. }
  1517. }
  1518. }
  1519. if (maid.status.personal.uniqueName == "Majime")
  1520. {
  1521. string text = "h1_";
  1522. Random random = new Random();
  1523. int num4 = random.Next(10000);
  1524. bool flag7 = false;
  1525. for (int k = 0; k < h1Array.Length; k++)
  1526. {
  1527. if (h1Array[k] == num4)
  1528. {
  1529. flag7 = true;
  1530. break;
  1531. }
  1532. }
  1533. if (flag7)
  1534. {
  1535. text = text + string.Format("{0:00000}", num4) + ".ogg";
  1536. if (GameUty.FileSystem.IsExistentFile(text))
  1537. {
  1538. maid.AudioMan.LoadPlay(text, 0f, false, false);
  1539. }
  1540. }
  1541. }
  1542. if (maid.status.personal.uniqueName == "Rindere")
  1543. {
  1544. string text = "h2_";
  1545. Random random = new Random();
  1546. int num4 = random.Next(10000);
  1547. bool flag7 = false;
  1548. for (int k = 0; k < h2Array.Length; k++)
  1549. {
  1550. if (h2Array[k] == num4)
  1551. {
  1552. flag7 = true;
  1553. break;
  1554. }
  1555. }
  1556. if (flag7)
  1557. {
  1558. text = text + string.Format("{0:00000}", num4) + ".ogg";
  1559. if (GameUty.FileSystem.IsExistentFile(text))
  1560. {
  1561. maid.AudioMan.LoadPlay(text, 0f, false, false);
  1562. }
  1563. }
  1564. }
  1565. }
  1566. }
  1567. if (zFlg[i])
  1568. {
  1569. if (!maid.AudioMan.audiosource.isPlaying)
  1570. {
  1571. string text = "";
  1572. if (maid.status.personal.uniqueName == "Pride")
  1573. {
  1574. text = "s0_";
  1575. Random random = new Random();
  1576. int num4 = random.Next(tunArray.Length);
  1577. object obj = text;
  1578. text = string.Concat(new object[] {obj, "0", tunArray[num4], ".ogg"});
  1579. }
  1580. if (maid.status.personal.uniqueName == "Cool")
  1581. {
  1582. text = "s1_";
  1583. Random random = new Random();
  1584. int num4 = random.Next(coolArray.Length);
  1585. object obj = text;
  1586. text = string.Concat(new object[] {obj, "0", coolArray[num4], ".ogg"});
  1587. }
  1588. if (maid.status.personal.uniqueName == "Pure")
  1589. {
  1590. text = "s2_";
  1591. Random random = new Random();
  1592. int num4 = random.Next(pureArray.Length);
  1593. object obj = text;
  1594. text = string.Concat(new object[] {obj, "0", pureArray[num4], ".ogg"});
  1595. }
  1596. if (maid.status.personal.uniqueName == "Yandere")
  1597. {
  1598. text = "s3_";
  1599. Random random = new Random();
  1600. int num4 = random.Next(yanArray.Length);
  1601. text = text + string.Format("{0:00000}", yanArray[num4]) + ".ogg";
  1602. }
  1603. if (maid.status.personal.uniqueName == "Muku")
  1604. {
  1605. text = "h0_";
  1606. Random random = new Random();
  1607. int num4 = random.Next(h0tArray.Length);
  1608. text = text + string.Format("{0:00000}", h0tArray[num4]) + ".ogg";
  1609. }
  1610. if (maid.status.personal.uniqueName == "Majime")
  1611. {
  1612. text = "h1_";
  1613. Random random = new Random();
  1614. int num4 = random.Next(h1tArray.Length);
  1615. text = text + string.Format("{0:00000}", h1tArray[num4]) + ".ogg";
  1616. }
  1617. if (maid.status.personal.uniqueName == "Rindere")
  1618. {
  1619. text = "h2_";
  1620. Random random = new Random();
  1621. int num4 = random.Next(h2tArray.Length);
  1622. text = text + string.Format("{0:00000}", h2tArray[num4]) + ".ogg";
  1623. }
  1624. maid.AudioMan.LoadPlay(text, 0f, false, false);
  1625. }
  1626. }
  1627. if (!isVR || isVR2)
  1628. {
  1629. if (Input.GetKey(key) && Input.GetKeyDown(KeyCode.Q))
  1630. {
  1631. ikMaid = i;
  1632. isIK[i] = true;
  1633. ikBui = 1;
  1634. ikMode[i] = 0;
  1635. this.SetIK(maid, i);
  1636. HandL = CMT.SearchObjName(maid.body0.m_Bones.transform, "Bip01 R Hand", true);
  1637. UpperArmL = CMT.SearchObjName(maid.body0.m_Bones.transform, "Bip01 R UpperArm", true);
  1638. ForearmL = CMT.SearchObjName(maid.body0.m_Bones.transform, "Bip01 R Forearm", true);
  1639. Clavicle = CMT.SearchObjName(maid.body0.m_Bones.transform, "Bip01 R Clavicle", true);
  1640. IK_hand = CMT.SearchObjName(maid.body0.m_Bones.transform, "_IK_handR", true);
  1641. idoFlg[i] = true;
  1642. if (i >= 7)
  1643. {
  1644. idoFlg[i - 7] = true;
  1645. }
  1646. qFlg = true;
  1647. }
  1648. else if (Input.GetKey(key) && Input.GetKeyDown(KeyCode.W))
  1649. {
  1650. ikMaid = i;
  1651. isIK[i] = true;
  1652. ikBui = 2;
  1653. ikMode[i] = 0;
  1654. this.SetIK(maid, i);
  1655. HandL = CMT.SearchObjName(maid.body0.m_Bones.transform, "Bip01 L Hand", true);
  1656. UpperArmL = CMT.SearchObjName(maid.body0.m_Bones.transform, "Bip01 L UpperArm", true);
  1657. ForearmL = CMT.SearchObjName(maid.body0.m_Bones.transform, "Bip01 L Forearm", true);
  1658. Clavicle = CMT.SearchObjName(maid.body0.m_Bones.transform, "Bip01 L Clavicle", true);
  1659. IK_hand = CMT.SearchObjName(maid.body0.m_Bones.transform, "_IK_handL", true);
  1660. idoFlg[i] = true;
  1661. if (i >= 7)
  1662. {
  1663. idoFlg[i - 7] = true;
  1664. }
  1665. }
  1666. else if (Input.GetKey(key) && Input.GetKeyDown(KeyCode.A))
  1667. {
  1668. ikMaid = i;
  1669. isIK[i] = true;
  1670. ikBui = 3;
  1671. ikMode[i] = 0;
  1672. this.SetIK(maid, i);
  1673. HandL = CMT.SearchObjName(maid.body0.m_Bones.transform, "Bip01 R Foot", true);
  1674. UpperArmL = CMT.SearchObjName(maid.body0.m_Bones.transform, "Bip01 R Thigh", true);
  1675. ForearmL = CMT.SearchObjName(maid.body0.m_Bones.transform, "Bip01 R Calf", true);
  1676. Clavicle = CMT.SearchObjName(maid.body0.m_Bones.transform, "Hip_L", true);
  1677. idoFlg[i] = true;
  1678. if (i >= 7)
  1679. {
  1680. idoFlg[i - 7] = true;
  1681. }
  1682. }
  1683. else if (Input.GetKey(key) && Input.GetKeyDown(KeyCode.S))
  1684. {
  1685. ikMaid = i;
  1686. isIK[i] = true;
  1687. ikBui = 4;
  1688. ikMode[i] = 0;
  1689. this.SetIK(maid, i);
  1690. HandL = CMT.SearchObjName(maid.body0.m_Bones.transform, "Bip01 L Foot", true);
  1691. UpperArmL = CMT.SearchObjName(maid.body0.m_Bones.transform, "Bip01 L Thigh", true);
  1692. ForearmL = CMT.SearchObjName(maid.body0.m_Bones.transform, "Bip01 L Calf", true);
  1693. Clavicle = CMT.SearchObjName(maid.body0.m_Bones.transform, "Hip_L", true);
  1694. idoFlg[i] = true;
  1695. if (i >= 7)
  1696. {
  1697. idoFlg[i - 7] = true;
  1698. }
  1699. sFlg = true;
  1700. }
  1701. else if (Input.GetKey(key) && Input.GetKey(KeyCode.U))
  1702. {
  1703. maid.body0.transform.localRotation =
  1704. Quaternion.Euler(maid.body0.transform.localEulerAngles) * Quaternion.AngleAxis(-1.5f, Vector3.up);
  1705. if (i >= 7)
  1706. {
  1707. idoFlg[i - 7] = true;
  1708. }
  1709. idoFlg[i] = true;
  1710. }
  1711. else if (Input.GetKey(key) && Input.GetKey(KeyCode.O))
  1712. {
  1713. maid.body0.transform.localRotation =
  1714. Quaternion.Euler(maid.body0.transform.localEulerAngles) * Quaternion.AngleAxis(1.5f, Vector3.up);
  1715. if (i >= 7)
  1716. {
  1717. idoFlg[i - 7] = true;
  1718. }
  1719. idoFlg[i] = true;
  1720. }
  1721. else if (Input.GetKey(key) && Input.GetKey(KeyCode.F))
  1722. {
  1723. bGui = true;
  1724. isPoseInit = true;
  1725. isGuiInit = true;
  1726. poseFlg = true;
  1727. faceFlg = false;
  1728. sceneFlg = false;
  1729. kankyoFlg = false;
  1730. kankyo2Flg = false;
  1731. fFlg = true;
  1732. for (int k = 0; k < maidCnt; k++)
  1733. {
  1734. if (maid == maidArray[k])
  1735. {
  1736. selectMaidIndex = k;
  1737. }
  1738. }
  1739. copyIndex = 0;
  1740. if (i >= 7)
  1741. {
  1742. idoFlg[i - 7] = true;
  1743. }
  1744. idoFlg[i] = true;
  1745. }
  1746. else if (Input.GetKey(key) && Input.GetKey(KeyCode.V))
  1747. {
  1748. bGui = true;
  1749. isFaceInit = true;
  1750. isGuiInit = true;
  1751. faceFlg = true;
  1752. poseFlg = false;
  1753. sceneFlg = false;
  1754. kankyoFlg = false;
  1755. kankyo2Flg = false;
  1756. maid.boMabataki = false;
  1757. for (int k = 0; k < maidCnt; k++)
  1758. {
  1759. if (maid == maidArray[k])
  1760. {
  1761. selectMaidIndex = k;
  1762. }
  1763. }
  1764. faceCombo.selectedItemIndex = faceIndex[selectMaidIndex];
  1765. if (i >= 7)
  1766. {
  1767. idoFlg[i - 7] = true;
  1768. }
  1769. idoFlg[i] = true;
  1770. }
  1771. else if (Input.GetKey(key) && this.getModKeyPressing(modKey.Shift)
  1772. && (Input.GetKeyDown(KeyCode.X) || (isVR && Input.GetKeyDown(KeyCode.UpArrow))))
  1773. {
  1774. if (!xFlg[i])
  1775. {
  1776. xFlg[i] = true;
  1777. zFlg[i] = false;
  1778. if (maid.status.personal.uniqueName == "Pride")
  1779. {
  1780. string text = "s0_";
  1781. Random random = new Random();
  1782. int num4 = random.Next(10000);
  1783. bool flag7 = false;
  1784. for (int k = 0; k < tunArray.Length; k++)
  1785. {
  1786. if (tunArray[k] == num4)
  1787. {
  1788. flag7 = true;
  1789. break;
  1790. }
  1791. }
  1792. if (!flag7)
  1793. {
  1794. text = text + "0" + num4.ToString() + ".ogg";
  1795. if (GameUty.FileSystem.IsExistentFile(text))
  1796. {
  1797. maid.AudioMan.LoadPlay(text, 0f, false, false);
  1798. }
  1799. }
  1800. }
  1801. if (maid.status.personal.uniqueName == "Cool")
  1802. {
  1803. string text = "s1_";
  1804. Random random = new Random();
  1805. int num4 = random.Next(10000);
  1806. bool flag7 = false;
  1807. for (int k = 0; k < coolArray.Length; k++)
  1808. {
  1809. if (coolArray[k] == num4)
  1810. {
  1811. flag7 = true;
  1812. break;
  1813. }
  1814. }
  1815. if (!flag7)
  1816. {
  1817. text = text + "0" + num4.ToString() + ".ogg";
  1818. if (GameUty.FileSystem.IsExistentFile(text))
  1819. {
  1820. maid.AudioMan.LoadPlay(text, 0f, false, false);
  1821. }
  1822. }
  1823. }
  1824. if (maid.status.personal.uniqueName == "Pure")
  1825. {
  1826. string text = "s2_";
  1827. Random random = new Random();
  1828. int num4 = random.Next(10000);
  1829. bool flag7 = false;
  1830. for (int k = 0; k < pureArray.Length; k++)
  1831. {
  1832. if (pureArray[k] == num4)
  1833. {
  1834. flag7 = true;
  1835. break;
  1836. }
  1837. }
  1838. if (!flag7)
  1839. {
  1840. text = text + "0" + num4.ToString() + ".ogg";
  1841. if (GameUty.FileSystem.IsExistentFile(text))
  1842. {
  1843. maid.AudioMan.LoadPlay(text, 0f, false, false);
  1844. }
  1845. }
  1846. }
  1847. if (maid.status.personal.uniqueName == "Yandere")
  1848. {
  1849. string text = "s3_";
  1850. Random random = new Random();
  1851. int num4 = random.Next(10000);
  1852. bool flag7 = false;
  1853. for (int k = 0; k < yanArray.Length; k++)
  1854. {
  1855. if (yanArray[k] == num4)
  1856. {
  1857. flag7 = true;
  1858. break;
  1859. }
  1860. }
  1861. if (!flag7)
  1862. {
  1863. text = text + string.Format("{0:00000}", num4) + ".ogg";
  1864. if (GameUty.FileSystem.IsExistentFile(text))
  1865. {
  1866. maid.AudioMan.LoadPlay(text, 0f, false, false);
  1867. }
  1868. }
  1869. }
  1870. if (maid.status.personal.uniqueName == "Muku")
  1871. {
  1872. string text = "h0_";
  1873. Random random = new Random();
  1874. int num4 = random.Next(10000);
  1875. bool flag7 = false;
  1876. for (int k = 0; k < h0Array.Length; k++)
  1877. {
  1878. if (h0Array[k] == num4)
  1879. {
  1880. flag7 = true;
  1881. break;
  1882. }
  1883. }
  1884. if (flag7)
  1885. {
  1886. text = text + string.Format("{0:00000}", num4) + ".ogg";
  1887. if (GameUty.FileSystem.IsExistentFile(text))
  1888. {
  1889. maid.AudioMan.LoadPlay(text, 0f, false, false);
  1890. }
  1891. }
  1892. }
  1893. if (maid.status.personal.uniqueName == "Majime")
  1894. {
  1895. string text = "h1_";
  1896. Random random = new Random();
  1897. int num4 = random.Next(10000);
  1898. bool flag7 = false;
  1899. for (int k = 0; k < h1Array.Length; k++)
  1900. {
  1901. if (h1Array[k] == num4)
  1902. {
  1903. flag7 = true;
  1904. break;
  1905. }
  1906. }
  1907. if (flag7)
  1908. {
  1909. text = text + string.Format("{0:00000}", num4) + ".ogg";
  1910. if (GameUty.FileSystem.IsExistentFile(text))
  1911. {
  1912. maid.AudioMan.LoadPlay(text, 0f, false, false);
  1913. }
  1914. }
  1915. }
  1916. if (maid.status.personal.uniqueName == "Rindere")
  1917. {
  1918. string text = "h2_";
  1919. Random random = new Random();
  1920. int num4 = random.Next(10000);
  1921. bool flag7 = false;
  1922. for (int k = 0; k < h2Array.Length; k++)
  1923. {
  1924. if (h2Array[k] == num4)
  1925. {
  1926. flag7 = true;
  1927. break;
  1928. }
  1929. }
  1930. if (flag7)
  1931. {
  1932. text = text + string.Format("{0:00000}", num4) + ".ogg";
  1933. if (GameUty.FileSystem.IsExistentFile(text))
  1934. {
  1935. maid.AudioMan.LoadPlay(text, 0f, false, false);
  1936. }
  1937. }
  1938. }
  1939. }
  1940. else
  1941. {
  1942. xFlg[i] = false;
  1943. maid.AudioMan.Clear();
  1944. }
  1945. idoFlg[i] = true;
  1946. if (i >= 7)
  1947. {
  1948. idoFlg[i - 7] = true;
  1949. }
  1950. }
  1951. else if (Input.GetKey(key) && this.getModKeyPressing(modKey.Shift)
  1952. && (Input.GetKeyDown(KeyCode.Z) || (isVR && Input.GetKeyDown(KeyCode.DownArrow))))
  1953. {
  1954. if (!zFlg[i])
  1955. {
  1956. zFlg[i] = true;
  1957. xFlg[i] = false;
  1958. string text = "";
  1959. if (maid.status.personal.uniqueName == "Pride")
  1960. {
  1961. text = "s0_";
  1962. Random random = new Random();
  1963. int num4 = random.Next(tunArray.Length);
  1964. object obj = text;
  1965. text = string.Concat(new object[] {obj, "0", tunArray[num4], ".ogg"});
  1966. }
  1967. if (maid.status.personal.uniqueName == "Cool")
  1968. {
  1969. text = "s1_";
  1970. Random random = new Random();
  1971. int num4 = random.Next(coolArray.Length);
  1972. object obj = text;
  1973. text = string.Concat(new object[] {obj, "0", coolArray[num4], ".ogg"});
  1974. }
  1975. if (maid.status.personal.uniqueName == "Pure")
  1976. {
  1977. text = "s2_";
  1978. Random random = new Random();
  1979. int num4 = random.Next(pureArray.Length);
  1980. object obj = text;
  1981. text = string.Concat(new object[] {obj, "0", pureArray[num4], ".ogg"});
  1982. }
  1983. if (maid.status.personal.uniqueName == "Yandere")
  1984. {
  1985. text = "s3_";
  1986. Random random = new Random();
  1987. int num4 = random.Next(yanArray.Length);
  1988. text = text + string.Format("{0:00000}", yanArray[num4]) + ".ogg";
  1989. }
  1990. if (maid.status.personal.uniqueName == "Muku")
  1991. {
  1992. text = "h0_";
  1993. Random random = new Random();
  1994. int num4 = random.Next(h0tArray.Length);
  1995. text = text + string.Format("{0:00000}", h0tArray[num4]) + ".ogg";
  1996. }
  1997. if (maid.status.personal.uniqueName == "Majime")
  1998. {
  1999. text = "h1_";
  2000. Random random = new Random();
  2001. int num4 = random.Next(h1tArray.Length);
  2002. text = text + string.Format("{0:00000}", h1tArray[num4]) + ".ogg";
  2003. }
  2004. if (maid.status.personal.uniqueName == "Rindere")
  2005. {
  2006. text = "h2_";
  2007. Random random = new Random();
  2008. int num4 = random.Next(h2tArray.Length);
  2009. text = text + string.Format("{0:00000}", h2tArray[num4]) + ".ogg";
  2010. }
  2011. maid.AudioMan.LoadPlay(text, 0f, false, false);
  2012. }
  2013. else
  2014. {
  2015. zFlg[i] = false;
  2016. maid.AudioMan.Clear();
  2017. }
  2018. idoFlg[i] = true;
  2019. if (i >= 7)
  2020. {
  2021. idoFlg[i - 7] = true;
  2022. }
  2023. }
  2024. else if (Input.GetKey(key) && (Input.GetKeyDown(KeyCode.Z) || (isVR && Input.GetKeyDown(KeyCode.DownArrow))))
  2025. {
  2026. string text = "";
  2027. if (maid.status.personal.uniqueName == "Pride")
  2028. {
  2029. text = "s0_";
  2030. Random random = new Random();
  2031. int num4 = random.Next(tunArray.Length);
  2032. object obj = text;
  2033. text = string.Concat(new object[] {obj, "0", tunArray[num4], ".ogg"});
  2034. }
  2035. if (maid.status.personal.uniqueName == "Cool")
  2036. {
  2037. text = "s1_";
  2038. Random random = new Random();
  2039. int num4 = random.Next(coolArray.Length);
  2040. object obj = text;
  2041. text = string.Concat(new object[] {obj, "0", coolArray[num4], ".ogg"});
  2042. }
  2043. if (maid.status.personal.uniqueName == "Pure")
  2044. {
  2045. text = "s2_";
  2046. Random random = new Random();
  2047. int num4 = random.Next(pureArray.Length);
  2048. object obj = text;
  2049. text = string.Concat(new object[] {obj, "0", pureArray[num4], ".ogg"});
  2050. }
  2051. if (maid.status.personal.uniqueName == "Yandere")
  2052. {
  2053. text = "s3_";
  2054. Random random = new Random();
  2055. int num4 = random.Next(yanArray.Length);
  2056. text = text + string.Format("{0:00000}", yanArray[num4]) + ".ogg";
  2057. }
  2058. if (maid.status.personal.uniqueName == "Muku")
  2059. {
  2060. text = "h0_";
  2061. Random random = new Random();
  2062. int num4 = random.Next(h0tArray.Length);
  2063. text = text + string.Format("{0:00000}", h0tArray[num4]) + ".ogg";
  2064. }
  2065. if (maid.status.personal.uniqueName == "Majime")
  2066. {
  2067. text = "h1_";
  2068. Random random = new Random();
  2069. int num4 = random.Next(h1tArray.Length);
  2070. text = text + string.Format("{0:00000}", h1tArray[num4]) + ".ogg";
  2071. }
  2072. if (maid.status.personal.uniqueName == "Rindere")
  2073. {
  2074. text = "h2_";
  2075. Random random = new Random();
  2076. int num4 = random.Next(h2tArray.Length);
  2077. text = text + string.Format("{0:00000}", h2tArray[num4]) + ".ogg";
  2078. }
  2079. maid.AudioMan.LoadPlay(text, 0f, false, false);
  2080. idoFlg[i] = true;
  2081. if (i >= 7)
  2082. {
  2083. idoFlg[i - 7] = true;
  2084. }
  2085. }
  2086. else if (Input.GetKey(key) && (Input.GetKeyDown(KeyCode.X) || (isVR && Input.GetKeyDown(KeyCode.UpArrow))))
  2087. {
  2088. if (maid.status.personal.uniqueName == "Pride")
  2089. {
  2090. string text = "s0_";
  2091. Random random = new Random();
  2092. int num4 = random.Next(10000);
  2093. bool flag7 = false;
  2094. for (int k = 0; k < tunArray.Length; k++)
  2095. {
  2096. if (tunArray[k] == num4)
  2097. {
  2098. flag7 = true;
  2099. break;
  2100. }
  2101. }
  2102. if (!flag7)
  2103. {
  2104. text = text + "0" + num4.ToString() + ".ogg";
  2105. if (GameUty.FileSystem.IsExistentFile(text))
  2106. {
  2107. maid.AudioMan.LoadPlay(text, 0f, false, false);
  2108. }
  2109. }
  2110. }
  2111. if (maid.status.personal.uniqueName == "Cool")
  2112. {
  2113. string text = "s1_";
  2114. Random random = new Random();
  2115. int num4 = random.Next(10000);
  2116. bool flag7 = false;
  2117. for (int k = 0; k < coolArray.Length; k++)
  2118. {
  2119. if (coolArray[k] == num4)
  2120. {
  2121. flag7 = true;
  2122. break;
  2123. }
  2124. }
  2125. if (!flag7)
  2126. {
  2127. text = text + "0" + num4.ToString() + ".ogg";
  2128. if (GameUty.FileSystem.IsExistentFile(text))
  2129. {
  2130. maid.AudioMan.LoadPlay(text, 0f, false, false);
  2131. }
  2132. }
  2133. }
  2134. if (maid.status.personal.uniqueName == "Pure")
  2135. {
  2136. string text = "s2_";
  2137. Random random = new Random();
  2138. int num4 = random.Next(10000);
  2139. bool flag7 = false;
  2140. for (int k = 0; k < pureArray.Length; k++)
  2141. {
  2142. if (pureArray[k] == num4)
  2143. {
  2144. flag7 = true;
  2145. break;
  2146. }
  2147. }
  2148. if (!flag7)
  2149. {
  2150. text = text + "0" + num4.ToString() + ".ogg";
  2151. if (GameUty.FileSystem.IsExistentFile(text))
  2152. {
  2153. maid.AudioMan.LoadPlay(text, 0f, false, false);
  2154. }
  2155. }
  2156. }
  2157. if (maid.status.personal.uniqueName == "Yandere")
  2158. {
  2159. string text = "s3_";
  2160. Random random = new Random();
  2161. int num4 = random.Next(10000);
  2162. bool flag7 = false;
  2163. for (int k = 0; k < yanArray.Length; k++)
  2164. {
  2165. if (yanArray[k] == num4)
  2166. {
  2167. flag7 = true;
  2168. break;
  2169. }
  2170. }
  2171. if (!flag7)
  2172. {
  2173. text = text + string.Format("{0:00000}", num4) + ".ogg";
  2174. if (GameUty.FileSystem.IsExistentFile(text))
  2175. {
  2176. maid.AudioMan.LoadPlay(text, 0f, false, false);
  2177. }
  2178. }
  2179. }
  2180. if (maid.status.personal.uniqueName == "Muku")
  2181. {
  2182. string text = "h0_";
  2183. Random random = new Random();
  2184. int num4 = random.Next(10000);
  2185. bool flag7 = false;
  2186. for (int k = 0; k < h0Array.Length; k++)
  2187. {
  2188. if (h0Array[k] == num4)
  2189. {
  2190. flag7 = true;
  2191. break;
  2192. }
  2193. }
  2194. if (flag7)
  2195. {
  2196. text = text + string.Format("{0:00000}", num4) + ".ogg";
  2197. if (GameUty.FileSystem.IsExistentFile(text))
  2198. {
  2199. maid.AudioMan.LoadPlay(text, 0f, false, false);
  2200. }
  2201. }
  2202. }
  2203. if (maid.status.personal.uniqueName == "Majime")
  2204. {
  2205. string text = "h1_";
  2206. Random random = new Random();
  2207. int num4 = random.Next(10000);
  2208. bool flag7 = false;
  2209. for (int k = 0; k < h1Array.Length; k++)
  2210. {
  2211. if (h1Array[k] == num4)
  2212. {
  2213. flag7 = true;
  2214. break;
  2215. }
  2216. }
  2217. if (flag7)
  2218. {
  2219. text = text + string.Format("{0:00000}", num4) + ".ogg";
  2220. if (GameUty.FileSystem.IsExistentFile(text))
  2221. {
  2222. maid.AudioMan.LoadPlay(text, 0f, false, false);
  2223. }
  2224. }
  2225. }
  2226. if (maid.status.personal.uniqueName == "Rindere")
  2227. {
  2228. string text = "h2_";
  2229. Random random = new Random();
  2230. int num4 = random.Next(10000);
  2231. bool flag7 = false;
  2232. for (int k = 0; k < h2Array.Length; k++)
  2233. {
  2234. if (h2Array[k] == num4)
  2235. {
  2236. flag7 = true;
  2237. break;
  2238. }
  2239. }
  2240. if (flag7)
  2241. {
  2242. text = text + string.Format("{0:00000}", num4) + ".ogg";
  2243. if (GameUty.FileSystem.IsExistentFile(text))
  2244. {
  2245. maid.AudioMan.LoadPlay(text, 0f, false, false);
  2246. }
  2247. }
  2248. }
  2249. idoFlg[i] = true;
  2250. if (i >= 7)
  2251. {
  2252. idoFlg[i - 7] = true;
  2253. }
  2254. }
  2255. else if (Input.GetKey(key) && Input.GetKeyDown(KeyCode.M))
  2256. {
  2257. delCount[i] = 20;
  2258. if (goSlot[(int) selectList[i]] != null)
  2259. {
  2260. maidArray[i].body0.goSlot = new List<TBodySkin>(goSlot[(int) selectList[i]]);
  2261. for (int l = 0; l < bodyHit[(int) selectList[i]].Count; l++)
  2262. {
  2263. maidArray[i].body0.goSlot[l].bonehair.bodyhit = bodyHit[(int) selectList[i]][l];
  2264. }
  2265. }
  2266. itemIndex[i]++;
  2267. if (itemIndex[i] == itemArray.Length - 1)
  2268. {
  2269. itemIndex[i] = 0;
  2270. }
  2271. string[] array = new string[2];
  2272. array = itemArray[itemIndex[i]].Split(new char[] {','});
  2273. if (itemIndex[i] > 13)
  2274. {
  2275. array = itemArray[itemIndex[i] + 1].Split(new char[] {','});
  2276. }
  2277. maid.DelProp(MPN.handitem, true);
  2278. maid.DelProp(MPN.accvag, true);
  2279. maid.DelProp(MPN.accanl, true);
  2280. bool flag8 = false;
  2281. if (itemIndex[i] == 12 || itemIndex[i] == 13)
  2282. {
  2283. flag8 = true;
  2284. }
  2285. if (!flag8)
  2286. {
  2287. maid.DelProp(MPN.kousoku_upper, true);
  2288. maid.DelProp(MPN.kousoku_lower, true);
  2289. }
  2290. if (array[0] != "")
  2291. {
  2292. maid.SetProp(array[0], array[1], 0, true, false);
  2293. }
  2294. if (itemIndex[i] == 13)
  2295. {
  2296. array = itemArray[itemIndex[i] + 1].Split(new char[] {','});
  2297. maid.SetProp(array[0], array[1], 0, true, false);
  2298. }
  2299. if (itemIndex[i] == 23)
  2300. {
  2301. array = itemArray[itemIndex[i]].Split(new char[] {','});
  2302. maid.SetProp(array[0], array[1], 0, true, false);
  2303. cafeFlg[i] = true;
  2304. }
  2305. maid.AllProcPropSeqStart();
  2306. idoFlg[i] = true;
  2307. if (i >= 7)
  2308. {
  2309. idoFlg[i - 7] = true;
  2310. }
  2311. mFlg = true;
  2312. }
  2313. else if (Input.GetKey(key) && (Input.GetKeyDown(KeyCode.LeftBracket)
  2314. || (Input.GetKeyDown(KeyCode.BackQuote) && this.getModKeyPressing(modKey.Alt))))
  2315. {
  2316. for (int k = 0; k < 10; k++)
  2317. {
  2318. maid.transform.RotateAround(maid.transform.position,
  2319. Vector3.right,
  2320. -maid.transform.rotation.eulerAngles.x);
  2321. maid.transform.RotateAround(maid.transform.position,
  2322. Vector3.forward,
  2323. -maid.transform.rotation.eulerAngles.z);
  2324. }
  2325. idoFlg[i] = true;
  2326. atFlg = true;
  2327. if (i >= 7)
  2328. {
  2329. idoFlg[i - 7] = true;
  2330. }
  2331. }
  2332. else if (Input.GetKey(key) && ((Input.GetKey(KeyCode.Minus) && this.getModKeyPressing(modKey.Shift))
  2333. || (Input.GetKey(KeyCode.I) && this.getModKeyPressing(modKey.Alt))))
  2334. {
  2335. maid.transform.RotateAround(maid.transform.position, new Vector3(vector3.x, 0f, vector3.z), 0.4f);
  2336. idoFlg[i] = true;
  2337. if (i >= 7)
  2338. {
  2339. idoFlg[i - 7] = true;
  2340. }
  2341. }
  2342. else if (Input.GetKey(key) && ((Input.GetKey(KeyCode.Quote) && this.getModKeyPressing(modKey.Shift))
  2343. || (Input.GetKey(KeyCode.K) && this.getModKeyPressing(modKey.Alt))))
  2344. {
  2345. maid.transform.RotateAround(maid.transform.position, new Vector3(vector3.x, 0f, vector3.z), -0.4f);
  2346. idoFlg[i] = true;
  2347. if (i >= 7)
  2348. {
  2349. idoFlg[i - 7] = true;
  2350. }
  2351. }
  2352. else if (Input.GetKey(key) && (Input.GetKey(KeyCode.Minus)
  2353. || (Input.GetKey(KeyCode.J) && this.getModKeyPressing(modKey.Alt))))
  2354. {
  2355. maid.transform.RotateAround(maid.transform.position, new Vector3(vector2.x, 0f, vector2.z), 0.4f);
  2356. idoFlg[i] = true;
  2357. if (i >= 7)
  2358. {
  2359. idoFlg[i - 7] = true;
  2360. }
  2361. }
  2362. else if (Input.GetKey(key) && (Input.GetKey(KeyCode.Quote)
  2363. || (Input.GetKey(KeyCode.L) && this.getModKeyPressing(modKey.Alt))))
  2364. {
  2365. maid.transform.RotateAround(maid.transform.position, new Vector3(vector2.x, 0f, vector2.z), -0.4f);
  2366. idoFlg[i] = true;
  2367. if (i >= 7)
  2368. {
  2369. idoFlg[i - 7] = true;
  2370. }
  2371. }
  2372. else if (Input.GetKey(key) && Input.GetKey(KeyCode.I) && Input.GetKey(KeyCode.J))
  2373. {
  2374. Vector3 vector = maid.transform.position;
  2375. vector += new Vector3(vector2.x, 0f, vector2.z) * 0.0075f * speed;
  2376. vector += new Vector3(vector3.x, 0f, vector3.z) * -0.0075f * speed;
  2377. maid.SetPos(vector);
  2378. idoFlg[i] = true;
  2379. if (i >= 7)
  2380. {
  2381. idoFlg[i - 7] = true;
  2382. }
  2383. }
  2384. else if (Input.GetKey(key) && Input.GetKey(KeyCode.I) && Input.GetKey(KeyCode.L))
  2385. {
  2386. Vector3 vector = maid.transform.position;
  2387. vector += new Vector3(vector2.x, 0f, vector2.z) * 0.0075f * speed;
  2388. vector += new Vector3(vector3.x, 0f, vector3.z) * 0.0075f * speed;
  2389. maid.SetPos(vector);
  2390. idoFlg[i] = true;
  2391. if (i >= 7)
  2392. {
  2393. idoFlg[i - 7] = true;
  2394. }
  2395. }
  2396. else if (Input.GetKey(key) && Input.GetKey(KeyCode.K) && Input.GetKey(KeyCode.J))
  2397. {
  2398. Vector3 vector = maid.transform.position;
  2399. vector += new Vector3(vector2.x, 0f, vector2.z) * -0.0075f * speed;
  2400. vector += new Vector3(vector3.x, 0f, vector3.z) * -0.0075f * speed;
  2401. maid.SetPos(vector);
  2402. idoFlg[i] = true;
  2403. if (i >= 7)
  2404. {
  2405. idoFlg[i - 7] = true;
  2406. }
  2407. }
  2408. else if (Input.GetKey(key) && Input.GetKey(KeyCode.K) && Input.GetKey(KeyCode.L))
  2409. {
  2410. Vector3 vector = maid.transform.position;
  2411. vector += new Vector3(vector2.x, 0f, vector2.z) * -0.0075f * speed;
  2412. vector += new Vector3(vector3.x, 0f, vector3.z) * 0.0075f * speed;
  2413. maid.SetPos(vector);
  2414. idoFlg[i] = true;
  2415. if (i >= 7)
  2416. {
  2417. idoFlg[i - 7] = true;
  2418. }
  2419. }
  2420. else if (Input.GetKey(key) && Input.GetKey(KeyCode.I))
  2421. {
  2422. Vector3 vector = maid.transform.position;
  2423. vector += new Vector3(vector2.x, 0f, vector2.z) * 0.0075f * speed;
  2424. maid.SetPos(vector);
  2425. idoFlg[i] = true;
  2426. if (i >= 7)
  2427. {
  2428. idoFlg[i - 7] = true;
  2429. }
  2430. }
  2431. else if (Input.GetKey(key) && Input.GetKey(KeyCode.K))
  2432. {
  2433. Vector3 vector = maid.transform.position;
  2434. vector += new Vector3(vector2.x, 0f, vector2.z) * -0.0075f * speed;
  2435. maid.SetPos(vector);
  2436. idoFlg[i] = true;
  2437. if (i >= 7)
  2438. {
  2439. idoFlg[i - 7] = true;
  2440. }
  2441. }
  2442. else if (Input.GetKey(key) && Input.GetKey(KeyCode.J))
  2443. {
  2444. Vector3 vector = maid.transform.position;
  2445. vector += new Vector3(vector3.x, 0f, vector3.z) * -0.0075f * speed;
  2446. maid.SetPos(vector);
  2447. idoFlg[i] = true;
  2448. if (i >= 7)
  2449. {
  2450. idoFlg[i - 7] = true;
  2451. }
  2452. }
  2453. else if (Input.GetKey(key) && Input.GetKey(KeyCode.L))
  2454. {
  2455. Vector3 vector = maid.transform.position;
  2456. vector += new Vector3(vector3.x, 0f, vector3.z) * 0.0075f * speed;
  2457. maid.SetPos(vector);
  2458. idoFlg[i] = true;
  2459. if (i >= 7)
  2460. {
  2461. idoFlg[i - 7] = true;
  2462. }
  2463. }
  2464. else if (Input.GetKey(key) && Input.GetKey(KeyCode.Alpha0))
  2465. {
  2466. Vector3 vector = maid.transform.position;
  2467. vector.y += 0.0075f * speed;
  2468. maid.SetPos(vector);
  2469. idoFlg[i] = true;
  2470. if (i >= 7)
  2471. {
  2472. idoFlg[i - 7] = true;
  2473. }
  2474. }
  2475. else if (Input.GetKey(key) && Input.GetKey(KeyCode.P))
  2476. {
  2477. Vector3 vector = maid.transform.position;
  2478. vector.y -= 0.0075f * speed;
  2479. maid.SetPos(vector);
  2480. idoFlg[i] = true;
  2481. if (i >= 7)
  2482. {
  2483. idoFlg[i - 7] = true;
  2484. }
  2485. }
  2486. else if (maid.boMabataki && Input.GetKey(key) && Input.GetKeyDown(KeyCode.Alpha8)
  2487. && this.getModKeyPressing(modKey.Shift))
  2488. {
  2489. faceIndex[i]--;
  2490. if (faceIndex[i] <= -1)
  2491. {
  2492. faceIndex[i] = faceArray.Length - 1;
  2493. }
  2494. maid.FaceAnime(faceArray[faceIndex[i]], 1f, 0);
  2495. idoFlg[i] = true;
  2496. if (i >= 7)
  2497. {
  2498. idoFlg[i - 7] = true;
  2499. }
  2500. }
  2501. else if (maid.boMabataki && Input.GetKey(key) && Input.GetKeyDown(KeyCode.Alpha8))
  2502. {
  2503. faceIndex[i]++;
  2504. if (faceIndex[i] == faceArray.Length)
  2505. {
  2506. faceIndex[i] = 0;
  2507. }
  2508. maid.FaceAnime(faceArray[faceIndex[i]], 1f, 0);
  2509. idoFlg[i] = true;
  2510. if (i >= 7)
  2511. {
  2512. idoFlg[i - 7] = true;
  2513. }
  2514. }
  2515. else if (Input.GetKey(key) && Input.GetKeyDown(KeyCode.Alpha9))
  2516. {
  2517. faceBlendIndex[i]++;
  2518. if (faceBlendIndex[i] == faceBlendArray.Length)
  2519. {
  2520. faceBlendIndex[i] = 0;
  2521. }
  2522. maid.FaceBlend(faceBlendArray[faceBlendIndex[i]]);
  2523. idoFlg[i] = true;
  2524. if (i >= 7)
  2525. {
  2526. idoFlg[i - 7] = true;
  2527. }
  2528. }
  2529. else if (Input.GetKey(key) && Input.GetKeyDown(KeyCode.Space))
  2530. {
  2531. string[] array = poseArray[poseIndex[i]].Split(new char[] {','});
  2532. isStop[i] = false;
  2533. poseCount[i] = 20;
  2534. if (array[0].Contains("_momi") || array[0].Contains("paizuri_"))
  2535. {
  2536. maid.body0.MuneYureL(0f);
  2537. maid.body0.MuneYureR(0f);
  2538. }
  2539. else
  2540. {
  2541. maid.body0.MuneYureL(1f);
  2542. maid.body0.MuneYureR(1f);
  2543. }
  2544. int num6;
  2545. if (array[0].Contains("MultipleMaidsPose"))
  2546. {
  2547. string path = array[0].Split(new char[] {'/'})[1];
  2548. byte[] array2 = new byte[0];
  2549. try
  2550. {
  2551. using (FileStream fileStream = new FileStream(path, FileMode.Open, FileAccess.Read))
  2552. {
  2553. array2 = new byte[fileStream.Length];
  2554. fileStream.Read(array2, 0, array2.Length);
  2555. }
  2556. }
  2557. catch { }
  2558. if (0 < array2.Length)
  2559. {
  2560. string text = Path.GetFileName(path);
  2561. long num5 = (long) text.GetHashCode();
  2562. maid.body0.CrossFade(num5.ToString(), array2, false, false, false, 0f, 1f);
  2563. Maid.AutoTwist[] array3 = new Maid.AutoTwist[]
  2564. {
  2565. Maid.AutoTwist.ShoulderL, Maid.AutoTwist.ShoulderR, Maid.AutoTwist.WristL,
  2566. Maid.AutoTwist.WristR, Maid.AutoTwist.ThighL, Maid.AutoTwist.ThighR
  2567. };
  2568. for (int m = 0; m < array3.Length; m++)
  2569. {
  2570. maid.SetAutoTwist(array3[m], true);
  2571. }
  2572. }
  2573. }
  2574. else if (array[0].StartsWith("p") && int.TryParse(array[0].Substring(1), out num6))
  2575. {
  2576. loadPose[i] = array[0];
  2577. }
  2578. else if (!array[0].StartsWith("dance_"))
  2579. {
  2580. maidArray[i].CrossFade(array[0] + ".anm", false, true, false, 0f, 1f);
  2581. }
  2582. else
  2583. {
  2584. if (!maidArray[i].body0.m_Bones.GetComponent<Animation>().GetClip(array[0] + ".anm"))
  2585. {
  2586. maidArray[i].body0.LoadAnime(array[0] + ".anm",
  2587. GameUty.FileSystem,
  2588. array[0] + ".anm",
  2589. false,
  2590. false);
  2591. }
  2592. maidArray[i].body0.m_Bones.GetComponent<Animation>().Play(array[0] + ".anm");
  2593. }
  2594. if (array.Length > 1)
  2595. {
  2596. maidArray[i].body0.m_Bones.GetComponent<Animation>()[array[0] + ".anm"].time = float.Parse(array[1]);
  2597. isStop[i] = true;
  2598. if (array.Length > 2)
  2599. {
  2600. Transform transform2 = CMT.SearchObjName(maidArray[i].body0.m_Bones.transform, "Bip01", true);
  2601. isPoseIti[i] = true;
  2602. poseIti[i] = maidArray[i].transform.position;
  2603. maidArray[i].transform.position = new Vector3(100f, 100f, 100f);
  2604. }
  2605. }
  2606. isLock[i] = false;
  2607. idoFlg[i] = true;
  2608. mHandL[i].initFlg = false;
  2609. mHandR[i].initFlg = false;
  2610. mFootL[i].initFlg = false;
  2611. mFootR[i].initFlg = false;
  2612. pHandL[i] = 0;
  2613. pHandR[i] = 0;
  2614. muneIKL[i] = false;
  2615. muneIKR[i] = false;
  2616. if (!isVR)
  2617. {
  2618. maidArray[i].body0.quaDefEyeL.eulerAngles = eyeL[(int) selectList[i]];
  2619. maidArray[i].body0.quaDefEyeR.eulerAngles = eyeR[(int) selectList[i]];
  2620. }
  2621. if (i >= 7)
  2622. {
  2623. idoFlg[i - 7] = true;
  2624. }
  2625. }
  2626. else if (maid.body0.isLoadedBody)
  2627. {
  2628. if (muneIKL[i] && vIKMuneL[i].x != 0f)
  2629. {
  2630. IKMuneLSub[i].localEulerAngles = vIKMuneLSub[i];
  2631. IKMuneL[i].localEulerAngles = vIKMuneL[i];
  2632. }
  2633. if (muneIKR[i] && vIKMuneR[i].x != 0f)
  2634. {
  2635. IKMuneRSub[i].localEulerAngles = vIKMuneRSub[i];
  2636. IKMuneR[i].localEulerAngles = vIKMuneR[i];
  2637. }
  2638. if (!HandL1[i])
  2639. {
  2640. this.SetIKInit(i);
  2641. this.SetIK(maid, i);
  2642. ikBui = 5;
  2643. }
  2644. else
  2645. {
  2646. bool flag5 = false;
  2647. for (int k = 0; k < keyArray.Length; k++)
  2648. {
  2649. if (Input.GetKey(keyArray[k]))
  2650. {
  2651. flag5 = true;
  2652. break;
  2653. }
  2654. }
  2655. if ((!Input.GetKey(KeyCode.Space) && Input.GetKey(KeyCode.W)) || Input.GetKey(KeyCode.R)
  2656. || Input.GetKey(KeyCode.Y))
  2657. {
  2658. flag5 = true;
  2659. }
  2660. if (!flag5)
  2661. {
  2662. if (this.getModKeyPressing(modKey.Ctrl) && this.getModKeyPressing(modKey.Alt)
  2663. && this.getModKeyPressing(modKey.Shift))
  2664. {
  2665. ikMode[i] = 15;
  2666. }
  2667. else if (this.getModKeyPressing(modKey.Shift) && this.getModKeyPressing(modKey.Alt))
  2668. {
  2669. ikMode[i] = 5;
  2670. }
  2671. else if (this.getModKeyPressing(modKey.Shift) && Input.GetKey(KeyCode.Space))
  2672. {
  2673. ikMode[i] = 6;
  2674. }
  2675. else if (this.getModKeyPressing(modKey.Ctrl) && Input.GetKey(KeyCode.Space))
  2676. {
  2677. ikMode[i] = 7;
  2678. }
  2679. else if (Input.GetKey(KeyCode.Z) && this.getModKeyPressing(modKey.Shift))
  2680. {
  2681. ikMode[i] = 11;
  2682. }
  2683. else if (Input.GetKey(KeyCode.Z) && this.getModKeyPressing(modKey.Ctrl))
  2684. {
  2685. ikMode[i] = 12;
  2686. }
  2687. else if (Input.GetKey(KeyCode.X) && this.getModKeyPressing(modKey.Shift))
  2688. {
  2689. ikMode[i] = 14;
  2690. }
  2691. else if (this.getModKeyPressing(modKey.Shift))
  2692. {
  2693. ikMode[i] = 1;
  2694. }
  2695. else if (this.getModKeyPressing(modKey.Ctrl) && this.getModKeyPressing(modKey.Alt))
  2696. {
  2697. ikMode[i] = 8;
  2698. }
  2699. else if (this.getModKeyPressing(modKey.Ctrl))
  2700. {
  2701. ikMode[i] = 2;
  2702. }
  2703. else if (this.getModKeyPressing(modKey.Alt))
  2704. {
  2705. ikMode[i] = 3;
  2706. }
  2707. else if (Input.GetKey(KeyCode.Space))
  2708. {
  2709. ikMode[i] = 4;
  2710. }
  2711. else if (Input.GetKey(KeyCode.X))
  2712. {
  2713. ikMode[i] = 9;
  2714. }
  2715. else if (Input.GetKey(KeyCode.Z))
  2716. {
  2717. ikMode[i] = 10;
  2718. }
  2719. else if (Input.GetKey(KeyCode.C))
  2720. {
  2721. ikMode[i] = 13;
  2722. }
  2723. else if (Input.GetKey(KeyCode.A))
  2724. {
  2725. ikMode[i] = 16;
  2726. }
  2727. else
  2728. {
  2729. ikMode[i] = 0;
  2730. }
  2731. if (!isIK[i])
  2732. {
  2733. if (ikMode[i] < 9)
  2734. {
  2735. ikMode[i] = 0;
  2736. }
  2737. }
  2738. bool flag9 = false;
  2739. bool flag10 = false;
  2740. bool flag11 = false;
  2741. bool flag12 = false;
  2742. if (gFinger[i, 0])
  2743. {
  2744. for (int j = 0; j < 15; j++)
  2745. {
  2746. if (mFinger[i, j].isStop)
  2747. {
  2748. flag9 = true;
  2749. }
  2750. }
  2751. for (int j = 15; j < 30; j++)
  2752. {
  2753. if (mFinger[i, j].isStop)
  2754. {
  2755. flag10 = true;
  2756. }
  2757. }
  2758. for (int j = 0; j < 6; j++)
  2759. {
  2760. if (mFinger2[i, j].isStop)
  2761. {
  2762. flag11 = true;
  2763. }
  2764. }
  2765. for (int j = 6; j < 12; j++)
  2766. {
  2767. if (mFinger2[i, j].isStop)
  2768. {
  2769. flag12 = true;
  2770. }
  2771. }
  2772. }
  2773. if (gMaid[i] != null)
  2774. {
  2775. if (ikMode[i] >= 9 && ikMode[i] <= 14)
  2776. {
  2777. gMaid[i].SetActive(true);
  2778. if (isCube)
  2779. {
  2780. gMaidC[i].SetActive(true);
  2781. }
  2782. }
  2783. else
  2784. {
  2785. gMaid[i].SetActive(false);
  2786. gMaidC[i].SetActive(false);
  2787. }
  2788. }
  2789. if (flag10 || mHandR[i].isSelect || mArmR[i].isSelect || mClavicleR[i].isSelect
  2790. || (ikMode[i] == 4 && Input.GetKeyDown(KeyCode.Q)))
  2791. {
  2792. ikBui = 1;
  2793. if (ikMode[i] != 4 || !Input.GetKeyDown(KeyCode.Q))
  2794. {
  2795. ikMaid = i;
  2796. }
  2797. if (ikMaid == i)
  2798. {
  2799. this.SetIK(maid, i);
  2800. HandL = CMT.SearchObjName(maid.body0.m_Bones.transform, "Bip01 R Hand", true);
  2801. UpperArmL = CMT.SearchObjName(maid.body0.m_Bones.transform, "Bip01 R UpperArm", true);
  2802. ForearmL = CMT.SearchObjName(maid.body0.m_Bones.transform, "Bip01 R Forearm", true);
  2803. Clavicle = CMT.SearchObjName(maid.body0.m_Bones.transform, "Bip01 R Clavicle", true);
  2804. IK_hand = CMT.SearchObjName(maid.body0.m_Bones.transform, "_IK_handR", true);
  2805. }
  2806. if (Input.GetKeyDown(KeyCode.Q))
  2807. {
  2808. qFlg = true;
  2809. }
  2810. }
  2811. else if (flag9 || mHandL[i].isSelect || mArmL[i].isSelect || mClavicleL[i].isSelect
  2812. || (ikMode[i] == 4 && Input.GetKeyDown(KeyCode.W)))
  2813. {
  2814. ikBui = 2;
  2815. if (ikMode[i] != 4 || !Input.GetKeyDown(KeyCode.W))
  2816. {
  2817. ikMaid = i;
  2818. }
  2819. if (ikMaid == i)
  2820. {
  2821. this.SetIK(maid, i);
  2822. HandL = CMT.SearchObjName(maid.body0.m_Bones.transform, "Bip01 L Hand", true);
  2823. UpperArmL = CMT.SearchObjName(maid.body0.m_Bones.transform, "Bip01 L UpperArm", true);
  2824. ForearmL = CMT.SearchObjName(maid.body0.m_Bones.transform, "Bip01 L Forearm", true);
  2825. Clavicle = CMT.SearchObjName(maid.body0.m_Bones.transform, "Bip01 L Clavicle", true);
  2826. IK_hand = CMT.SearchObjName(maid.body0.m_Bones.transform, "_IK_handL", true);
  2827. }
  2828. if (Input.GetKeyDown(KeyCode.W))
  2829. {
  2830. wFlg = true;
  2831. }
  2832. }
  2833. else if (flag12 || mFootR[i].isSelect || mHizaR[i].isSelect
  2834. || (ikMode[i] == 4 && Input.GetKeyDown(KeyCode.A)))
  2835. {
  2836. ikBui = 3;
  2837. if (ikMode[i] != 4 || !Input.GetKeyDown(KeyCode.A))
  2838. {
  2839. ikMaid = i;
  2840. }
  2841. if (ikMaid == i)
  2842. {
  2843. this.SetIK(maid, i);
  2844. HandL = CMT.SearchObjName(maid.body0.m_Bones.transform, "Bip01 R Foot", true);
  2845. UpperArmL = CMT.SearchObjName(maid.body0.m_Bones.transform, "Bip01 R Thigh", true);
  2846. ForearmL = CMT.SearchObjName(maid.body0.m_Bones.transform, "Bip01 R Calf", true);
  2847. Clavicle = CMT.SearchObjName(maid.body0.m_Bones.transform, "Hip_L", true);
  2848. }
  2849. }
  2850. else if (flag11 || mFootL[i].isSelect || mHizaL[i].isSelect
  2851. || (ikMode[i] == 4 && Input.GetKeyDown(KeyCode.S)))
  2852. {
  2853. ikBui = 4;
  2854. if (ikMode[i] != 4 || !Input.GetKeyDown(KeyCode.S))
  2855. {
  2856. ikMaid = i;
  2857. }
  2858. if (ikMaid == i)
  2859. {
  2860. this.SetIK(maid, i);
  2861. HandL = CMT.SearchObjName(maid.body0.m_Bones.transform, "Bip01 L Foot", true);
  2862. UpperArmL = CMT.SearchObjName(maid.body0.m_Bones.transform, "Bip01 L Thigh", true);
  2863. ForearmL = CMT.SearchObjName(maid.body0.m_Bones.transform, "Bip01 L Calf", true);
  2864. Clavicle = CMT.SearchObjName(maid.body0.m_Bones.transform, "Hip_L", true);
  2865. }
  2866. if (Input.GetKeyDown(KeyCode.S))
  2867. {
  2868. sFlg = true;
  2869. }
  2870. }
  2871. mHandR[i].isSelect = false;
  2872. mArmR[i].isSelect = false;
  2873. mHandL[i].isSelect = false;
  2874. mArmL[i].isSelect = false;
  2875. mFootR[i].isSelect = false;
  2876. mHizaR[i].isSelect = false;
  2877. mFootL[i].isSelect = false;
  2878. mHizaL[i].isSelect = false;
  2879. mClavicleL[i].isSelect = false;
  2880. mClavicleR[i].isSelect = false;
  2881. if (ikMode[i] == 16)
  2882. {
  2883. if (!gHead2[i])
  2884. {
  2885. this.SetIKInit6(i);
  2886. }
  2887. if (mHead2[i].isClick)
  2888. {
  2889. mHead2[i].isClick = false;
  2890. bGui = true;
  2891. isFaceInit = true;
  2892. isGuiInit = true;
  2893. faceFlg = true;
  2894. poseFlg = false;
  2895. sceneFlg = false;
  2896. kankyoFlg = false;
  2897. kankyo2Flg = false;
  2898. maid.boMabataki = false;
  2899. selectMaidIndex = mHead2[i].no;
  2900. faceCombo.selectedItemIndex = faceIndex[selectMaidIndex];
  2901. }
  2902. if (mMaid2[i].isClick)
  2903. {
  2904. mMaid2[i].isClick = false;
  2905. bGui = true;
  2906. isPoseInit = true;
  2907. isGuiInit = true;
  2908. poseFlg = true;
  2909. faceFlg = false;
  2910. sceneFlg = false;
  2911. kankyoFlg = false;
  2912. kankyo2Flg = false;
  2913. selectMaidIndex = mMaid2[i].no;
  2914. copyIndex = 0;
  2915. }
  2916. gHead2[i].transform.position =
  2917. new Vector3(Head2[i].position.x,
  2918. (Head2[i].position.y * 1.2f + Head3[i].position.y * 0.8f) / 2f,
  2919. Head2[i].position.z);
  2920. gHead2[i].transform.eulerAngles =
  2921. new Vector3(Head2[i].transform.eulerAngles.x,
  2922. Head2[i].transform.eulerAngles.y,
  2923. Head2[i].transform.eulerAngles.z + 90f);
  2924. mHead2[i].no = i;
  2925. mHead2[i].maid = maid;
  2926. mHead2[i].ido = 1;
  2927. gMaid2[i].transform.position =
  2928. new Vector3((Pelvis2[i].position.x + Spine0a2[i].position.x) / 2f,
  2929. (Spine12[i].position.y + Spine0a2[i].position.y) / 2f,
  2930. (Spine0a2[i].position.z + Pelvis2[i].position.z) / 2f);
  2931. gMaid2[i].transform.eulerAngles =
  2932. new Vector3(Spine0a2[i].transform.eulerAngles.x,
  2933. Spine0a2[i].transform.eulerAngles.y,
  2934. Spine0a2[i].transform.eulerAngles.z + 90f);
  2935. mMaid2[i].no = i;
  2936. mMaid2[i].maid = maid;
  2937. mMaid2[i].ido = 2;
  2938. gArmL[i].SetActive(false);
  2939. gFootL[i].SetActive(false);
  2940. gHizaL[i].SetActive(false);
  2941. gHandR[i].SetActive(false);
  2942. gArmR[i].SetActive(false);
  2943. gFootR[i].SetActive(false);
  2944. gHizaR[i].SetActive(false);
  2945. gClavicleL[i].SetActive(false);
  2946. gClavicleR[i].SetActive(false);
  2947. gNeck[i].SetActive(false);
  2948. gSpine[i].SetActive(false);
  2949. gSpine0a[i].SetActive(false);
  2950. gSpine1a[i].SetActive(false);
  2951. gSpine1[i].SetActive(false);
  2952. gPelvis[i].SetActive(false);
  2953. }
  2954. else if (ikMode[i] == 8)
  2955. {
  2956. if (ikModeOld[i] == 15 && gIKHandL[i])
  2957. {
  2958. mIKHandL[i].ido = 1;
  2959. mIKHandL[i].reset = true;
  2960. mIKHandR[i].ido = 1;
  2961. mIKHandR[i].reset = true;
  2962. }
  2963. else if (ikModeOld[i] == 3 && gHead[i])
  2964. {
  2965. mHead[i].ido = 7;
  2966. mHead[i].reset = true;
  2967. }
  2968. else
  2969. {
  2970. if (!gIKHandL[i])
  2971. {
  2972. this.SetIKInit5(i);
  2973. }
  2974. gIKHandL[i].transform.position = IKHandL[i].position;
  2975. gIKHandL[i].transform.eulerAngles = IKHandL[i].eulerAngles;
  2976. mIKHandL[i].maid = maid;
  2977. mIKHandL[i].HandL = IKHandL[i];
  2978. mIKHandL[i].ido = 1;
  2979. gIKHandR[i].transform.position = IKHandR[i].position;
  2980. gIKHandR[i].transform.eulerAngles = IKHandR[i].eulerAngles;
  2981. mIKHandR[i].maid = maid;
  2982. mIKHandR[i].HandL = IKHandR[i];
  2983. mIKHandR[i].ido = 1;
  2984. if (!gIKMuneL[i])
  2985. {
  2986. this.SetIKInit7(i);
  2987. }
  2988. if (!gHead[i])
  2989. {
  2990. this.SetIKInit4(i);
  2991. }
  2992. mIKMuneL[i].maid = maid;
  2993. mIKMuneL[i].HandL = IKMuneLSub[i];
  2994. mIKMuneL[i].UpperArmL = IKMuneL[i];
  2995. mIKMuneL[i].ForearmL = IKMuneL[i];
  2996. gIKMuneL[i].transform.position = (IKMuneL[i].position + IKMuneLSub[i].position) / 2f;
  2997. mIKMuneR[i].maid = maid;
  2998. mIKMuneR[i].HandL = IKMuneRSub[i];
  2999. mIKMuneR[i].UpperArmL = IKMuneR[i];
  3000. mIKMuneR[i].ForearmL = IKMuneR[i];
  3001. gIKMuneR[i].transform.position = (IKMuneR[i].position + IKMuneRSub[i].position) / 2f;
  3002. gHead[i].transform.position =
  3003. new Vector3(Head2[i].position.x,
  3004. (Head2[i].position.y * 1.2f + Head3[i].position.y * 0.8f) / 2f,
  3005. Head2[i].position.z);
  3006. gHead[i].transform.eulerAngles =
  3007. new Vector3(Head2[i].transform.eulerAngles.x,
  3008. Head2[i].transform.eulerAngles.y,
  3009. Head2[i].transform.eulerAngles.z + 90f);
  3010. mHead[i].head = Head1[i];
  3011. mHead[i].maid = maid;
  3012. mHead[i].ido = 7;
  3013. mHead[i].shodaiFlg = shodaiFlg[(int) selectList[i]];
  3014. gHead[i].SetActive(true);
  3015. if (mHead[i].isClick)
  3016. {
  3017. mHead[i].isClick = false;
  3018. mHead[i].isClick2 = false;
  3019. maid.body0.quaDefEyeL.eulerAngles = eyeL[(int) selectList[i]];
  3020. maid.body0.quaDefEyeR.eulerAngles = eyeR[(int) selectList[i]];
  3021. }
  3022. if (mIKMuneL[i].isMouseUp && mIKMuneL[i].isMouseDrag)
  3023. {
  3024. IKMuneLSub[i].localEulerAngles = mIKMuneL[i].HandLangles;
  3025. IKMuneL[i].localEulerAngles = mIKMuneL[i].UpperArmLangles;
  3026. vIKMuneLSub[i] = new Vector3(IKMuneLSub[i].localEulerAngles.x,
  3027. IKMuneLSub[i].localEulerAngles.y,
  3028. IKMuneLSub[i].localEulerAngles.z);
  3029. vIKMuneL[i] = new Vector3(IKMuneL[i].localEulerAngles.x,
  3030. IKMuneL[i].localEulerAngles.y,
  3031. IKMuneL[i].localEulerAngles.z);
  3032. muneIKL[i] = true;
  3033. isStop[i] = true;
  3034. isLock[i] = true;
  3035. mIKMuneL[i].isMouseDrag = false;
  3036. }
  3037. if (mIKMuneL[i].isMouseDown)
  3038. {
  3039. maid.body0.MuneYureL(0f);
  3040. maid.body0.MuneYureR(0f);
  3041. muneIKL[i] = false;
  3042. mIKMuneL[i].isMouseUp = false;
  3043. }
  3044. if (mIKMuneR[i].isMouseUp && mIKMuneR[i].isMouseDrag)
  3045. {
  3046. IKMuneRSub[i].localEulerAngles = mIKMuneR[i].HandLangles;
  3047. IKMuneR[i].localEulerAngles = mIKMuneR[i].UpperArmLangles;
  3048. vIKMuneRSub[i] = new Vector3(IKMuneRSub[i].localEulerAngles.x,
  3049. IKMuneRSub[i].localEulerAngles.y,
  3050. IKMuneRSub[i].localEulerAngles.z);
  3051. vIKMuneR[i] = new Vector3(IKMuneR[i].localEulerAngles.x,
  3052. IKMuneR[i].localEulerAngles.y,
  3053. IKMuneR[i].localEulerAngles.z);
  3054. muneIKR[i] = true;
  3055. isStop[i] = true;
  3056. isLock[i] = true;
  3057. mIKMuneR[i].isMouseDrag = false;
  3058. }
  3059. if (mIKMuneR[i].isMouseDown)
  3060. {
  3061. maid.body0.MuneYureL(0f);
  3062. maid.body0.MuneYureR(0f);
  3063. muneIKR[i] = false;
  3064. mIKMuneL[i].isMouseUp = false;
  3065. }
  3066. if (mHead[i].isStop)
  3067. {
  3068. isStop[i] = true;
  3069. isLock[i] = true;
  3070. mHead[i].isStop = false;
  3071. }
  3072. gJotai[i].SetActive(false);
  3073. gKahuku[i].SetActive(false);
  3074. gHandL[i].SetActive(false);
  3075. gArmL[i].SetActive(false);
  3076. gFootL[i].SetActive(false);
  3077. gHizaL[i].SetActive(false);
  3078. gHandR[i].SetActive(false);
  3079. gArmR[i].SetActive(false);
  3080. gFootR[i].SetActive(false);
  3081. gHizaR[i].SetActive(false);
  3082. gClavicleL[i].SetActive(false);
  3083. gClavicleR[i].SetActive(false);
  3084. gNeck[i].SetActive(false);
  3085. gSpine[i].SetActive(false);
  3086. gSpine0a[i].SetActive(false);
  3087. gSpine1a[i].SetActive(false);
  3088. gSpine1[i].SetActive(false);
  3089. gPelvis[i].SetActive(false);
  3090. }
  3091. }
  3092. else if (ikMode[i] == 15)
  3093. {
  3094. if (ikModeOld[i] == 8 && gIKHandL[i])
  3095. {
  3096. mIKHandL[i].ido = 2;
  3097. mIKHandL[i].reset = true;
  3098. mIKHandR[i].ido = 2;
  3099. mIKHandR[i].reset = true;
  3100. }
  3101. else
  3102. {
  3103. if (!gIKHandL[i])
  3104. {
  3105. this.SetIKInit5(i);
  3106. }
  3107. gIKHandL[i].transform.position = IKHandL[i].position;
  3108. gIKHandL[i].transform.eulerAngles = IKHandL[i].eulerAngles;
  3109. mIKHandL[i].maid = maid;
  3110. mIKHandL[i].HandL = IKHandL[i];
  3111. mIKHandL[i].ido = 2;
  3112. gIKHandR[i].transform.position = IKHandR[i].position;
  3113. gIKHandR[i].transform.eulerAngles = IKHandR[i].eulerAngles;
  3114. mIKHandR[i].maid = maid;
  3115. mIKHandR[i].HandL = IKHandR[i];
  3116. mIKHandR[i].ido = 2;
  3117. Destroy(gHead[i]);
  3118. Destroy(gJotai[i]);
  3119. Destroy(gKahuku[i]);
  3120. gHandL[i].SetActive(false);
  3121. gArmL[i].SetActive(false);
  3122. gFootL[i].SetActive(false);
  3123. gHizaL[i].SetActive(false);
  3124. gHandR[i].SetActive(false);
  3125. gArmR[i].SetActive(false);
  3126. gFootR[i].SetActive(false);
  3127. gHizaR[i].SetActive(false);
  3128. gClavicleL[i].SetActive(false);
  3129. gClavicleR[i].SetActive(false);
  3130. gNeck[i].SetActive(false);
  3131. gSpine[i].SetActive(false);
  3132. gSpine0a[i].SetActive(false);
  3133. gSpine1a[i].SetActive(false);
  3134. gSpine1[i].SetActive(false);
  3135. gPelvis[i].SetActive(false);
  3136. }
  3137. }
  3138. else if (ikMode[i] == 1)
  3139. {
  3140. mHandL[i].ido = 10;
  3141. mHandR[i].ido = 10;
  3142. mFootL[i].ido = 10;
  3143. mFootR[i].ido = 10;
  3144. if (ikModeOld[i] == 0 && gNeck[i])
  3145. {
  3146. if (isBone[i])
  3147. {
  3148. mNeck[i].ido = 4;
  3149. mNeck[i].reset = true;
  3150. mSpine[i].ido = 4;
  3151. mSpine[i].reset = true;
  3152. mSpine0a[i].ido = 4;
  3153. mSpine0a[i].reset = true;
  3154. mSpine1a[i].ido = 4;
  3155. mSpine1a[i].reset = true;
  3156. mSpine1[i].ido = 4;
  3157. mSpine1[i].reset = true;
  3158. mPelvis[i].ido = 4;
  3159. mPelvis[i].reset = true;
  3160. mHizaL[i].ido = 5;
  3161. mHizaL[i].reset = true;
  3162. mHizaR[i].ido = 5;
  3163. mHizaR[i].reset = true;
  3164. }
  3165. }
  3166. else
  3167. {
  3168. gArmL[i].SetActive(false);
  3169. gArmR[i].SetActive(false);
  3170. if (!isBone[i])
  3171. {
  3172. gHizaL[i].SetActive(false);
  3173. gHizaR[i].SetActive(false);
  3174. }
  3175. gClavicleL[i].SetActive(false);
  3176. gClavicleR[i].SetActive(false);
  3177. if (isBone[i])
  3178. {
  3179. mNeck[i].maid = maid;
  3180. mNeck[i].head = Neck[i];
  3181. mNeck[i].no = i;
  3182. mNeck[i].ido = 4;
  3183. gNeck[i].transform.position = Neck[i].position;
  3184. gNeck[i].transform.localEulerAngles = Neck[i].localEulerAngles;
  3185. if (mNeck[i].isHead)
  3186. {
  3187. mNeck[i].isHead = false;
  3188. isLookn[i] = isLook[i];
  3189. isLook[i] = !isLook[i];
  3190. }
  3191. mSpine[i].maid = maid;
  3192. mSpine[i].head = Spine2[i];
  3193. mSpine[i].no = i;
  3194. mSpine[i].ido = 4;
  3195. gSpine[i].transform.position = Spine2[i].position;
  3196. gSpine[i].transform.localEulerAngles = Spine2[i].localEulerAngles;
  3197. mSpine0a[i].maid = maid;
  3198. mSpine0a[i].head = Spine0a2[i];
  3199. mSpine0a[i].no = i;
  3200. mSpine0a[i].ido = 4;
  3201. gSpine0a[i].transform.position = Spine0a2[i].position;
  3202. gSpine0a[i].transform.localEulerAngles = Spine0a2[i].localEulerAngles;
  3203. mSpine1a[i].maid = maid;
  3204. mSpine1a[i].head = Spine1a2[i];
  3205. mSpine1a[i].no = i;
  3206. mSpine1a[i].ido = 4;
  3207. gSpine1a[i].transform.position = Spine1a2[i].position;
  3208. gSpine1a[i].transform.localEulerAngles = Spine1a2[i].localEulerAngles;
  3209. mSpine1[i].maid = maid;
  3210. mSpine1[i].head = Spine12[i];
  3211. mSpine1[i].no = i;
  3212. mSpine1[i].ido = 4;
  3213. gSpine1[i].transform.position = Spine12[i].position;
  3214. gSpine1[i].transform.localEulerAngles = Spine12[i].localEulerAngles;
  3215. mPelvis[i].maid = maid;
  3216. mPelvis[i].head = Pelvis2[i];
  3217. mPelvis[i].no = i;
  3218. mPelvis[i].ido = 8;
  3219. gPelvis[i].transform.position = Pelvis2[i].position;
  3220. gPelvis[i].transform.localEulerAngles = Pelvis2[i].localEulerAngles;
  3221. mHizaL[i].ido = 5;
  3222. mHizaR[i].ido = 5;
  3223. }
  3224. }
  3225. }
  3226. else if (ikMode[i] == 2)
  3227. {
  3228. if (ikModeOld[i] == 0 && gPelvis[i])
  3229. {
  3230. mPelvis[i].ido = 9;
  3231. mPelvis[i].reset = true;
  3232. }
  3233. else
  3234. {
  3235. gArmL[i].SetActive(false);
  3236. gHizaL[i].SetActive(false);
  3237. gArmR[i].SetActive(false);
  3238. gHizaR[i].SetActive(false);
  3239. gClavicleL[i].SetActive(false);
  3240. gClavicleR[i].SetActive(false);
  3241. gNeck[i].SetActive(false);
  3242. gSpine[i].SetActive(false);
  3243. gSpine0a[i].SetActive(false);
  3244. gSpine1a[i].SetActive(false);
  3245. gSpine1[i].SetActive(false);
  3246. mPelvis[i].maid = maid;
  3247. mPelvis[i].head = Pelvis2[i];
  3248. mPelvis[i].no = i;
  3249. mPelvis[i].ido = 9;
  3250. gPelvis[i].transform.position = Pelvis2[i].position;
  3251. gPelvis[i].transform.localEulerAngles = Pelvis2[i].localEulerAngles;
  3252. }
  3253. }
  3254. else if (ikMode[i] == 3)
  3255. {
  3256. if ((ikModeOld[i] == 5 || ikModeOld[i] == 8) && gHead[i])
  3257. {
  3258. mHead[i].ido = 1;
  3259. mHead[i].reset = true;
  3260. mJotai[i].ido = 2;
  3261. mJotai[i].reset = true;
  3262. mKahuku[i].ido = 3;
  3263. mKahuku[i].reset = true;
  3264. mHandL[i].ido = 1;
  3265. mHandR[i].ido = 1;
  3266. mFootL[i].ido = 3;
  3267. mFootR[i].ido = 3;
  3268. mHizaL[i].ido = 5;
  3269. mHizaR[i].ido = 5;
  3270. mHandL[i].reset = true;
  3271. mHandR[i].reset = true;
  3272. mFootL[i].reset = true;
  3273. mFootR[i].reset = true;
  3274. mHizaL[i].reset = true;
  3275. mHizaR[i].reset = true;
  3276. }
  3277. else if (ikModeOld[i] == 0)
  3278. {
  3279. mHandL[i].ido = 1;
  3280. mHandR[i].ido = 1;
  3281. mFootL[i].ido = 3;
  3282. mFootR[i].ido = 3;
  3283. mHizaL[i].ido = 5;
  3284. mHizaR[i].ido = 5;
  3285. mHandL[i].reset = true;
  3286. mHandR[i].reset = true;
  3287. mFootL[i].reset = true;
  3288. mFootR[i].reset = true;
  3289. mHizaL[i].reset = true;
  3290. mHizaR[i].reset = true;
  3291. }
  3292. else
  3293. {
  3294. if (!gHead[i])
  3295. {
  3296. this.SetIKInit4(i);
  3297. }
  3298. if (mHead[i].isHead)
  3299. {
  3300. mHead[i].isHead = false;
  3301. isLookn[i] = isLook[i];
  3302. isLook[i] = !isLook[i];
  3303. }
  3304. gHead[i].transform.position =
  3305. new Vector3(Head2[i].position.x,
  3306. (Head2[i].position.y * 1.2f + Head3[i].position.y * 0.8f) / 2f,
  3307. Head2[i].position.z);
  3308. gHead[i].transform.eulerAngles =
  3309. new Vector3(Head2[i].transform.eulerAngles.x,
  3310. Head2[i].transform.eulerAngles.y,
  3311. Head2[i].transform.eulerAngles.z + 90f);
  3312. mHead[i].head = Head1[i];
  3313. mHead[i].maid = maid;
  3314. mHead[i].no = i;
  3315. mHead[i].ido = 1;
  3316. Transform spine0a = CMT.SearchObjName(maid.body0.m_Bones.transform, "Bip01 Spine0a", true);
  3317. Transform transform3 =
  3318. CMT.SearchObjName(maid.body0.m_Bones.transform, "Bip01 Spine1", true);
  3319. Transform transform4 =
  3320. CMT.SearchObjName(maid.body0.m_Bones.transform, "Bip01 Spine1a", true);
  3321. Transform transform5 = CMT.SearchObjName(maid.body0.m_Bones.transform, "Bip01 Spine", true);
  3322. Transform transform6 =
  3323. CMT.SearchObjName(maid.body0.m_Bones.transform, "Bip01 Pelvis", true);
  3324. gJotai[i].transform.position =
  3325. new Vector3(transform3.position.x,
  3326. (transform3.position.y * 0f + transform4.position.y * 2f) / 2f,
  3327. transform3.position.z);
  3328. gJotai[i].transform.eulerAngles =
  3329. new Vector3(transform3.transform.eulerAngles.x,
  3330. transform3.transform.eulerAngles.y,
  3331. transform3.transform.eulerAngles.z + 90f);
  3332. mJotai[i].Spine0a = spine0a;
  3333. mJotai[i].Spine1 = transform3;
  3334. mJotai[i].Spine1a = transform4;
  3335. mJotai[i].Spine = transform5;
  3336. mJotai[i].maid = maid;
  3337. mJotai[i].ido = 2;
  3338. gKahuku[i].transform.position =
  3339. new Vector3(transform6.position.x,
  3340. (transform6.position.y + transform5.position.y) / 2f,
  3341. transform6.position.z);
  3342. gKahuku[i].transform.eulerAngles =
  3343. new Vector3(transform6.transform.eulerAngles.x + 90f,
  3344. transform6.transform.eulerAngles.y + 90f,
  3345. transform6.transform.eulerAngles.z);
  3346. mKahuku[i].Pelvis = transform6;
  3347. mKahuku[i].maid = maid;
  3348. mKahuku[i].ido = 3;
  3349. mHandL[i].ido = 1;
  3350. mHandR[i].ido = 1;
  3351. mFootL[i].ido = 3;
  3352. mFootR[i].ido = 3;
  3353. mHizaL[i].ido = 5;
  3354. mHizaR[i].ido = 5;
  3355. gJotai[i].SetActive(true);
  3356. gKahuku[i].SetActive(true);
  3357. gHandL[i].SetActive(true);
  3358. gArmL[i].SetActive(false);
  3359. gFootL[i].SetActive(true);
  3360. gHizaL[i].SetActive(true);
  3361. gHandR[i].SetActive(true);
  3362. gArmR[i].SetActive(false);
  3363. gFootR[i].SetActive(true);
  3364. gHizaR[i].SetActive(true);
  3365. Destroy(gIKHandL[i]);
  3366. Destroy(gIKHandR[i]);
  3367. Destroy(gIKMuneL[i]);
  3368. Destroy(gIKMuneR[i]);
  3369. if (isBone[i])
  3370. {
  3371. gHizaL[i].SetActive(false);
  3372. gHizaR[i].SetActive(false);
  3373. gHead[i].SetActive(false);
  3374. gJotai[i].SetActive(false);
  3375. gKahuku[i].SetActive(false);
  3376. }
  3377. else
  3378. {
  3379. gHizaL[i].SetActive(true);
  3380. gHizaR[i].SetActive(true);
  3381. gHead[i].SetActive(true);
  3382. gJotai[i].SetActive(true);
  3383. gKahuku[i].SetActive(true);
  3384. }
  3385. gClavicleL[i].SetActive(false);
  3386. gClavicleR[i].SetActive(false);
  3387. gNeck[i].SetActive(false);
  3388. gSpine[i].SetActive(false);
  3389. gSpine0a[i].SetActive(false);
  3390. gSpine1a[i].SetActive(false);
  3391. gSpine1[i].SetActive(false);
  3392. gPelvis[i].SetActive(false);
  3393. if (mHead[i].isStop)
  3394. {
  3395. isStop[i] = true;
  3396. isLock[i] = true;
  3397. mHead[i].isStop = false;
  3398. }
  3399. if (mJotai[i].isStop)
  3400. {
  3401. isStop[i] = true;
  3402. isLock[i] = true;
  3403. mJotai[i].isStop = false;
  3404. }
  3405. if (mKahuku[i].isStop)
  3406. {
  3407. isStop[i] = true;
  3408. isLock[i] = true;
  3409. mKahuku[i].isStop = false;
  3410. }
  3411. if (mKahuku[i].isSelect)
  3412. {
  3413. mKahuku[i].isSelect = false;
  3414. if (ikMaid != i)
  3415. {
  3416. ikMaid = i;
  3417. ikBui = 5;
  3418. this.SetIK(maid, i);
  3419. }
  3420. }
  3421. if (mJotai[i].isSelect)
  3422. {
  3423. mJotai[i].isSelect = false;
  3424. if (ikMaid != i)
  3425. {
  3426. ikMaid = i;
  3427. ikBui = 5;
  3428. this.SetIK(maid, i);
  3429. }
  3430. }
  3431. if (mKahuku[i].isSelect)
  3432. {
  3433. mKahuku[i].isSelect = false;
  3434. if (ikMaid != i)
  3435. {
  3436. ikMaid = i;
  3437. ikBui = 5;
  3438. this.SetIK(maid, i);
  3439. }
  3440. }
  3441. }
  3442. }
  3443. else if (ikMode[i] == 5)
  3444. {
  3445. if (ikModeOld[i] == 3 && gHead[i])
  3446. {
  3447. mHead[i].ido = 4;
  3448. mHead[i].reset = true;
  3449. mJotai[i].ido = 5;
  3450. mJotai[i].reset = true;
  3451. mKahuku[i].ido = 6;
  3452. mKahuku[i].reset = true;
  3453. mHandL[i].ido = 2;
  3454. mHandR[i].ido = 2;
  3455. mFootL[i].ido = 4;
  3456. mFootR[i].ido = 4;
  3457. mHizaL[i].ido = 5;
  3458. mHizaR[i].ido = 5;
  3459. mHandL[i].reset = true;
  3460. mHandR[i].reset = true;
  3461. mFootL[i].reset = true;
  3462. mFootR[i].reset = true;
  3463. mHizaL[i].reset = true;
  3464. mHizaR[i].reset = true;
  3465. }
  3466. else if (ikModeOld[i] == 0)
  3467. {
  3468. mHandL[i].ido = 2;
  3469. mHandR[i].ido = 2;
  3470. mFootL[i].ido = 4;
  3471. mFootR[i].ido = 4;
  3472. mHizaL[i].ido = 5;
  3473. mHizaR[i].ido = 5;
  3474. mHandL[i].reset = true;
  3475. mHandR[i].reset = true;
  3476. mFootL[i].reset = true;
  3477. mFootR[i].reset = true;
  3478. mHizaL[i].reset = true;
  3479. mHizaR[i].reset = true;
  3480. }
  3481. else
  3482. {
  3483. if (!gHead[i])
  3484. {
  3485. this.SetIKInit4(i);
  3486. }
  3487. if (mHead[i].isHead)
  3488. {
  3489. mHead[i].isHead = false;
  3490. isLookn[i] = isLook[i];
  3491. isLook[i] = !isLook[i];
  3492. }
  3493. gHead[i].transform.position =
  3494. new Vector3(Head2[i].position.x,
  3495. (Head2[i].position.y * 1.2f + Head3[i].position.y * 0.8f) / 2f,
  3496. Head2[i].position.z);
  3497. gHead[i].transform.eulerAngles =
  3498. new Vector3(Head2[i].transform.eulerAngles.x,
  3499. Head2[i].transform.eulerAngles.y,
  3500. Head2[i].transform.eulerAngles.z + 90f);
  3501. mHead[i].head = Head1[i];
  3502. mHead[i].maid = maid;
  3503. mHead[i].ido = 4;
  3504. Transform spine0a = CMT.SearchObjName(maid.body0.m_Bones.transform, "Bip01 Spine0a", true);
  3505. Transform transform3 =
  3506. CMT.SearchObjName(maid.body0.m_Bones.transform, "Bip01 Spine1", true);
  3507. Transform transform4 =
  3508. CMT.SearchObjName(maid.body0.m_Bones.transform, "Bip01 Spine1a", true);
  3509. Transform transform5 = CMT.SearchObjName(maid.body0.m_Bones.transform, "Bip01 Spine", true);
  3510. Transform transform6 =
  3511. CMT.SearchObjName(maid.body0.m_Bones.transform, "Bip01 Pelvis", true);
  3512. gJotai[i].transform.position =
  3513. new Vector3(transform3.position.x,
  3514. (transform3.position.y * 0f + transform4.position.y * 2f) / 2f,
  3515. transform3.position.z);
  3516. gJotai[i].transform.eulerAngles =
  3517. new Vector3(transform3.transform.eulerAngles.x,
  3518. transform3.transform.eulerAngles.y,
  3519. transform3.transform.eulerAngles.z + 90f);
  3520. mJotai[i].Spine0a = spine0a;
  3521. mJotai[i].Spine1 = transform3;
  3522. mJotai[i].Spine1a = transform4;
  3523. mJotai[i].Spine = transform5;
  3524. mJotai[i].maid = maid;
  3525. mJotai[i].ido = 5;
  3526. gKahuku[i].transform.position =
  3527. new Vector3(transform6.position.x,
  3528. (transform6.position.y + transform5.position.y) / 2f,
  3529. transform6.position.z);
  3530. gKahuku[i].transform.eulerAngles =
  3531. new Vector3(transform6.transform.eulerAngles.x + 90f,
  3532. transform6.transform.eulerAngles.y + 90f,
  3533. transform6.transform.eulerAngles.z);
  3534. mKahuku[i].Pelvis = transform6;
  3535. mKahuku[i].maid = maid;
  3536. mKahuku[i].ido = 6;
  3537. mHandL[i].ido = 2;
  3538. mHandR[i].ido = 2;
  3539. mFootL[i].ido = 4;
  3540. mFootR[i].ido = 4;
  3541. mHizaL[i].ido = 5;
  3542. mHizaR[i].ido = 5;
  3543. gArmL[i].SetActive(false);
  3544. gArmR[i].SetActive(false);
  3545. gClavicleL[i].SetActive(false);
  3546. gClavicleR[i].SetActive(false);
  3547. gNeck[i].SetActive(false);
  3548. gSpine[i].SetActive(false);
  3549. gSpine0a[i].SetActive(false);
  3550. gSpine1a[i].SetActive(false);
  3551. gSpine1[i].SetActive(false);
  3552. gPelvis[i].SetActive(false);
  3553. if (isBone[i])
  3554. {
  3555. gHizaL[i].SetActive(false);
  3556. gHizaR[i].SetActive(false);
  3557. gHead[i].SetActive(false);
  3558. gJotai[i].SetActive(false);
  3559. gKahuku[i].SetActive(false);
  3560. }
  3561. else
  3562. {
  3563. gHizaL[i].SetActive(true);
  3564. gHizaR[i].SetActive(true);
  3565. gHead[i].SetActive(true);
  3566. gJotai[i].SetActive(true);
  3567. gKahuku[i].SetActive(true);
  3568. }
  3569. if (mHead[i].isStop)
  3570. {
  3571. isStop[i] = true;
  3572. isLock[i] = true;
  3573. mHead[i].isStop = false;
  3574. }
  3575. if (mJotai[i].isStop)
  3576. {
  3577. isStop[i] = true;
  3578. isLock[i] = true;
  3579. mJotai[i].isStop = false;
  3580. }
  3581. if (mKahuku[i].isStop)
  3582. {
  3583. isStop[i] = true;
  3584. isLock[i] = true;
  3585. mKahuku[i].isStop = false;
  3586. }
  3587. if (mHead[i].isSelect)
  3588. {
  3589. mHead[i].isSelect = false;
  3590. if (ikMaid != i)
  3591. {
  3592. ikMaid = i;
  3593. ikBui = 5;
  3594. this.SetIK(maid, i);
  3595. }
  3596. }
  3597. if (mJotai[i].isSelect)
  3598. {
  3599. mJotai[i].isSelect = false;
  3600. if (ikMaid != i)
  3601. {
  3602. ikMaid = i;
  3603. ikBui = 5;
  3604. this.SetIK(maid, i);
  3605. }
  3606. }
  3607. if (mKahuku[i].isSelect)
  3608. {
  3609. mKahuku[i].isSelect = false;
  3610. if (ikMaid != i)
  3611. {
  3612. ikMaid = i;
  3613. ikBui = 5;
  3614. this.SetIK(maid, i);
  3615. }
  3616. }
  3617. }
  3618. }
  3619. else if (ikMode[i] == 13)
  3620. {
  3621. if ((ikModeOld[i] == 0 || ikModeOld[i] >= 9) && ikModeOld[i] != 13 && gMaid[i])
  3622. {
  3623. mMaid[i].ido = 5;
  3624. mMaid[i].reset = true;
  3625. mMaidC[i].ido = 5;
  3626. mMaidC[i].reset = true;
  3627. gMaidC[i].GetComponent<Renderer>().material.color = new Color(0.7f, 0.7f, 0.3f);
  3628. }
  3629. else
  3630. {
  3631. if (!gMaid[i])
  3632. {
  3633. this.SetIKInit3(i);
  3634. }
  3635. gMaid[i].transform.position =
  3636. new Vector3((Pelvis2[i].position.x + Spine0a2[i].position.x) / 2f,
  3637. (Spine12[i].position.y + Spine0a2[i].position.y) / 2f,
  3638. (Spine0a2[i].position.z + Pelvis2[i].position.z) / 2f);
  3639. gMaid[i].transform.eulerAngles =
  3640. new Vector3(Spine0a2[i].transform.eulerAngles.x,
  3641. Spine0a2[i].transform.eulerAngles.y,
  3642. Spine0a2[i].transform.eulerAngles.z + 90f);
  3643. mMaid[i].maid = maid;
  3644. mMaid[i].ido = 5;
  3645. gMaidC[i].transform.position = maid.transform.position;
  3646. gMaidC[i].transform.eulerAngles = maid.transform.eulerAngles;
  3647. mMaidC[i].maid = maid;
  3648. mMaidC[i].ido = 5;
  3649. if (isCube)
  3650. {
  3651. gMaidC[i].GetComponent<Renderer>().material.color = new Color(0.7f, 0.7f, 0.3f);
  3652. gMaidC[i].SetActive(true);
  3653. }
  3654. else
  3655. {
  3656. gMaidC[i].SetActive(false);
  3657. }
  3658. gHandL[i].SetActive(false);
  3659. gArmL[i].SetActive(false);
  3660. gFootL[i].SetActive(false);
  3661. gHizaL[i].SetActive(false);
  3662. gHandR[i].SetActive(false);
  3663. gArmR[i].SetActive(false);
  3664. gFootR[i].SetActive(false);
  3665. gHizaR[i].SetActive(false);
  3666. gClavicleL[i].SetActive(false);
  3667. gClavicleR[i].SetActive(false);
  3668. gNeck[i].SetActive(false);
  3669. gSpine[i].SetActive(false);
  3670. gSpine0a[i].SetActive(false);
  3671. gSpine1a[i].SetActive(false);
  3672. gSpine1[i].SetActive(false);
  3673. gPelvis[i].SetActive(false);
  3674. }
  3675. if (mMaid[i].isSelect)
  3676. {
  3677. mMaid[i].isSelect = false;
  3678. if (ikMaid != i)
  3679. {
  3680. ikMaid = i;
  3681. ikBui = 5;
  3682. this.SetIK(maid, i);
  3683. }
  3684. }
  3685. }
  3686. else if (ikMode[i] == 11)
  3687. {
  3688. if ((ikModeOld[i] == 0 || ikModeOld[i] >= 9) && ikModeOld[i] != 11 && gMaid[i])
  3689. {
  3690. mMaid[i].ido = 3;
  3691. mMaid[i].reset = true;
  3692. mMaidC[i].ido = 3;
  3693. mMaidC[i].reset = true;
  3694. gMaidC[i].GetComponent<Renderer>().material.color = new Color(0.4f, 0.4f, 1f, 0.5f);
  3695. }
  3696. else
  3697. {
  3698. if (!gMaid[i])
  3699. {
  3700. this.SetIKInit3(i);
  3701. }
  3702. gMaid[i].transform.position =
  3703. new Vector3((Pelvis2[i].position.x + Spine0a2[i].position.x) / 2f,
  3704. (Spine12[i].position.y + Spine0a2[i].position.y) / 2f,
  3705. (Spine0a2[i].position.z + Pelvis2[i].position.z) / 2f);
  3706. gMaid[i].transform.eulerAngles =
  3707. new Vector3(Spine0a2[i].transform.eulerAngles.x,
  3708. Spine0a2[i].transform.eulerAngles.y,
  3709. Spine0a2[i].transform.eulerAngles.z + 90f);
  3710. mMaid[i].maid = maid;
  3711. mMaid[i].ido = 3;
  3712. gMaidC[i].transform.position = maid.transform.position;
  3713. gMaidC[i].transform.eulerAngles = maid.transform.eulerAngles;
  3714. mMaidC[i].maid = maid;
  3715. mMaidC[i].ido = 3;
  3716. if (isCube)
  3717. {
  3718. gMaidC[i].GetComponent<Renderer>().material.color = new Color(0.4f, 0.4f, 1f, 0.5f);
  3719. gMaidC[i].SetActive(true);
  3720. }
  3721. else
  3722. {
  3723. gMaidC[i].SetActive(false);
  3724. }
  3725. gHandL[i].SetActive(false);
  3726. gArmL[i].SetActive(false);
  3727. gFootL[i].SetActive(false);
  3728. gHizaL[i].SetActive(false);
  3729. gHandR[i].SetActive(false);
  3730. gArmR[i].SetActive(false);
  3731. gFootR[i].SetActive(false);
  3732. gHizaR[i].SetActive(false);
  3733. gClavicleL[i].SetActive(false);
  3734. gClavicleR[i].SetActive(false);
  3735. gNeck[i].SetActive(false);
  3736. gSpine[i].SetActive(false);
  3737. gSpine0a[i].SetActive(false);
  3738. gSpine1a[i].SetActive(false);
  3739. gSpine1[i].SetActive(false);
  3740. gPelvis[i].SetActive(false);
  3741. }
  3742. if (mMaid[i].isSelect)
  3743. {
  3744. mMaid[i].isSelect = false;
  3745. if (ikMaid != i)
  3746. {
  3747. ikMaid = i;
  3748. ikBui = 5;
  3749. this.SetIK(maid, i);
  3750. }
  3751. }
  3752. }
  3753. else if (ikMode[i] == 12)
  3754. {
  3755. if ((ikModeOld[i] == 0 || ikModeOld[i] >= 9) && ikModeOld[i] != 12 && gMaid[i])
  3756. {
  3757. mMaid[i].ido = 2;
  3758. mMaid[i].reset = true;
  3759. mMaidC[i].ido = 2;
  3760. mMaidC[i].reset = true;
  3761. gMaidC[i].GetComponent<Renderer>().material.color = new Color(0.4f, 0.4f, 1f, 0.5f);
  3762. }
  3763. else
  3764. {
  3765. if (!gMaid[i])
  3766. {
  3767. this.SetIKInit3(i);
  3768. }
  3769. gMaid[i].transform.position =
  3770. new Vector3((Pelvis2[i].position.x + Spine0a2[i].position.x) / 2f,
  3771. (Spine12[i].position.y + Spine0a2[i].position.y) / 2f,
  3772. (Spine0a2[i].position.z + Pelvis2[i].position.z) / 2f);
  3773. gMaid[i].transform.eulerAngles =
  3774. new Vector3(Spine0a2[i].transform.eulerAngles.x,
  3775. Spine0a2[i].transform.eulerAngles.y,
  3776. Spine0a2[i].transform.eulerAngles.z + 90f);
  3777. mMaid[i].maid = maid;
  3778. mMaid[i].ido = 2;
  3779. gMaidC[i].transform.position = maid.transform.position;
  3780. gMaidC[i].transform.eulerAngles = maid.transform.eulerAngles;
  3781. mMaidC[i].maid = maid;
  3782. mMaidC[i].ido = 2;
  3783. if (isCube)
  3784. {
  3785. gMaidC[i].GetComponent<Renderer>().material.color = new Color(0.4f, 0.4f, 1f, 0.5f);
  3786. gMaidC[i].SetActive(true);
  3787. }
  3788. else
  3789. {
  3790. gMaidC[i].SetActive(false);
  3791. }
  3792. gHandL[i].SetActive(false);
  3793. gArmL[i].SetActive(false);
  3794. gFootL[i].SetActive(false);
  3795. gHizaL[i].SetActive(false);
  3796. gHandR[i].SetActive(false);
  3797. gArmR[i].SetActive(false);
  3798. gFootR[i].SetActive(false);
  3799. gHizaR[i].SetActive(false);
  3800. gClavicleL[i].SetActive(false);
  3801. gClavicleR[i].SetActive(false);
  3802. gNeck[i].SetActive(false);
  3803. gSpine[i].SetActive(false);
  3804. gSpine0a[i].SetActive(false);
  3805. gSpine1a[i].SetActive(false);
  3806. gSpine1[i].SetActive(false);
  3807. gPelvis[i].SetActive(false);
  3808. }
  3809. if (mMaid[i].isSelect)
  3810. {
  3811. mMaid[i].isSelect = false;
  3812. if (ikMaid != i)
  3813. {
  3814. ikMaid = i;
  3815. ikBui = 5;
  3816. this.SetIK(maid, i);
  3817. }
  3818. }
  3819. }
  3820. else if (ikMode[i] == 10)
  3821. {
  3822. if ((ikModeOld[i] == 0 || ikModeOld[i] >= 9) && ikModeOld[i] != 10 && gMaid[i])
  3823. {
  3824. mMaid[i].ido = 1;
  3825. mMaid[i].reset = true;
  3826. mMaidC[i].ido = 1;
  3827. mMaidC[i].reset = true;
  3828. gMaidC[i].GetComponent<Renderer>().material.color = new Color(0.4f, 0.4f, 1f, 0.5f);
  3829. }
  3830. else
  3831. {
  3832. if (!gMaid[i])
  3833. {
  3834. this.SetIKInit3(i);
  3835. }
  3836. gMaid[i].transform.position =
  3837. new Vector3((Pelvis2[i].position.x + Spine0a2[i].position.x) / 2f,
  3838. (Spine12[i].position.y + Spine0a2[i].position.y) / 2f,
  3839. (Spine0a2[i].position.z + Pelvis2[i].position.z) / 2f);
  3840. gMaid[i].transform.eulerAngles =
  3841. new Vector3(Spine0a2[i].transform.eulerAngles.x,
  3842. Spine0a2[i].transform.eulerAngles.y,
  3843. Spine0a2[i].transform.eulerAngles.z + 90f);
  3844. mMaid[i].maid = maid;
  3845. mMaid[i].ido = 1;
  3846. gMaidC[i].transform.position = maid.transform.position;
  3847. gMaidC[i].transform.eulerAngles = maid.transform.eulerAngles;
  3848. mMaidC[i].maid = maid;
  3849. mMaidC[i].ido = 1;
  3850. if (isCube)
  3851. {
  3852. gMaidC[i].GetComponent<Renderer>().material.color = new Color(0.4f, 0.4f, 1f, 0.5f);
  3853. gMaidC[i].SetActive(true);
  3854. }
  3855. else
  3856. {
  3857. gMaidC[i].SetActive(false);
  3858. }
  3859. gHandL[i].SetActive(false);
  3860. gArmL[i].SetActive(false);
  3861. gFootL[i].SetActive(false);
  3862. gHizaL[i].SetActive(false);
  3863. gHandR[i].SetActive(false);
  3864. gArmR[i].SetActive(false);
  3865. gFootR[i].SetActive(false);
  3866. gHizaR[i].SetActive(false);
  3867. gClavicleL[i].SetActive(false);
  3868. gClavicleR[i].SetActive(false);
  3869. gNeck[i].SetActive(false);
  3870. gSpine[i].SetActive(false);
  3871. gSpine0a[i].SetActive(false);
  3872. gSpine1a[i].SetActive(false);
  3873. gSpine1[i].SetActive(false);
  3874. gPelvis[i].SetActive(false);
  3875. }
  3876. if (mMaid[i].isSelect)
  3877. {
  3878. mMaid[i].isSelect = false;
  3879. if (ikMaid != i)
  3880. {
  3881. ikMaid = i;
  3882. ikBui = 5;
  3883. this.SetIK(maid, i);
  3884. }
  3885. }
  3886. }
  3887. else if (ikMode[i] == 9)
  3888. {
  3889. if ((ikModeOld[i] == 0 || ikModeOld[i] >= 9) && ikModeOld[i] != 9 && gMaid[i])
  3890. {
  3891. mMaid[i].ido = 4;
  3892. mMaid[i].reset = true;
  3893. mMaidC[i].ido = 4;
  3894. mMaidC[i].reset = true;
  3895. gMaidC[i].GetComponent<Renderer>().material.color = new Color(0.3f, 0.7f, 0.3f);
  3896. }
  3897. else
  3898. {
  3899. if (!gMaid[i])
  3900. {
  3901. this.SetIKInit3(i);
  3902. }
  3903. gMaid[i].transform.position =
  3904. new Vector3((Pelvis2[i].position.x + Spine0a2[i].position.x) / 2f,
  3905. (Spine12[i].position.y + Spine0a2[i].position.y) / 2f,
  3906. (Spine0a2[i].position.z + Pelvis2[i].position.z) / 2f);
  3907. gMaid[i].transform.eulerAngles =
  3908. new Vector3(Spine0a2[i].transform.eulerAngles.x,
  3909. Spine0a2[i].transform.eulerAngles.y,
  3910. Spine0a2[i].transform.eulerAngles.z + 90f);
  3911. mMaid[i].maid = maid;
  3912. mMaid[i].ido = 4;
  3913. gMaidC[i].transform.position = maid.transform.position;
  3914. gMaidC[i].transform.eulerAngles = maid.transform.eulerAngles;
  3915. mMaidC[i].maid = maid;
  3916. mMaidC[i].ido = 4;
  3917. if (isCube)
  3918. {
  3919. gMaidC[i].GetComponent<Renderer>().material.color = new Color(0.3f, 0.7f, 0.3f);
  3920. gMaidC[i].SetActive(true);
  3921. }
  3922. else
  3923. {
  3924. gMaidC[i].SetActive(false);
  3925. }
  3926. gHandL[i].SetActive(false);
  3927. gArmL[i].SetActive(false);
  3928. gFootL[i].SetActive(false);
  3929. gHizaL[i].SetActive(false);
  3930. gHandR[i].SetActive(false);
  3931. gArmR[i].SetActive(false);
  3932. gFootR[i].SetActive(false);
  3933. gHizaR[i].SetActive(false);
  3934. gClavicleL[i].SetActive(false);
  3935. gClavicleR[i].SetActive(false);
  3936. gNeck[i].SetActive(false);
  3937. gSpine[i].SetActive(false);
  3938. gSpine0a[i].SetActive(false);
  3939. gSpine1a[i].SetActive(false);
  3940. gSpine1[i].SetActive(false);
  3941. gPelvis[i].SetActive(false);
  3942. }
  3943. if (mMaid[i].isSelect)
  3944. {
  3945. mMaid[i].isSelect = false;
  3946. if (ikMaid != i)
  3947. {
  3948. ikMaid = i;
  3949. ikBui = 5;
  3950. this.SetIK(maid, i);
  3951. }
  3952. }
  3953. }
  3954. else if (ikMode[i] == 14)
  3955. {
  3956. if ((ikModeOld[i] == 0 || ikModeOld[i] >= 9) && ikModeOld[i] != 14 && gMaid[i])
  3957. {
  3958. mMaid[i].ido = 6;
  3959. mMaid[i].reset = true;
  3960. mMaidC[i].ido = 6;
  3961. mMaidC[i].reset = true;
  3962. gMaidC[i].GetComponent<Renderer>().material.color = new Color(0.3f, 0.7f, 0.3f);
  3963. }
  3964. else
  3965. {
  3966. if (!gMaid[i])
  3967. {
  3968. this.SetIKInit3(i);
  3969. }
  3970. gMaid[i].transform.position =
  3971. new Vector3((Pelvis2[i].position.x + Spine0a2[i].position.x) / 2f,
  3972. (Spine12[i].position.y + Spine0a2[i].position.y) / 2f,
  3973. (Spine0a2[i].position.z + Pelvis2[i].position.z) / 2f);
  3974. gMaid[i].transform.eulerAngles =
  3975. new Vector3(Spine0a2[i].transform.eulerAngles.x,
  3976. Spine0a2[i].transform.eulerAngles.y,
  3977. Spine0a2[i].transform.eulerAngles.z + 90f);
  3978. mMaid[i].maid = maid;
  3979. mMaid[i].ido = 6;
  3980. gMaidC[i].transform.position = maid.transform.position;
  3981. gMaidC[i].transform.eulerAngles = maid.transform.eulerAngles;
  3982. mMaidC[i].maid = maid;
  3983. mMaidC[i].ido = 6;
  3984. if (isCube)
  3985. {
  3986. gMaidC[i].GetComponent<Renderer>().material.color = new Color(0.3f, 0.7f, 0.3f);
  3987. gMaidC[i].SetActive(true);
  3988. }
  3989. else
  3990. {
  3991. gMaidC[i].SetActive(false);
  3992. }
  3993. gHandL[i].SetActive(false);
  3994. gArmL[i].SetActive(false);
  3995. gFootL[i].SetActive(false);
  3996. gHizaL[i].SetActive(false);
  3997. gHandR[i].SetActive(false);
  3998. gArmR[i].SetActive(false);
  3999. gFootR[i].SetActive(false);
  4000. gHizaR[i].SetActive(false);
  4001. gClavicleL[i].SetActive(false);
  4002. gClavicleR[i].SetActive(false);
  4003. gNeck[i].SetActive(false);
  4004. gSpine[i].SetActive(false);
  4005. gSpine0a[i].SetActive(false);
  4006. gSpine1a[i].SetActive(false);
  4007. gSpine1[i].SetActive(false);
  4008. gPelvis[i].SetActive(false);
  4009. }
  4010. if (mMaid[i].isSelect)
  4011. {
  4012. mMaid[i].isSelect = false;
  4013. if (ikMaid != i)
  4014. {
  4015. ikMaid = i;
  4016. ikBui = 5;
  4017. this.SetIK(maid, i);
  4018. }
  4019. }
  4020. }
  4021. else if (ikMode[i] == 6)
  4022. {
  4023. if (!gFinger[i, 0])
  4024. {
  4025. this.SetIKInit2(i);
  4026. }
  4027. Destroy(gMaid[i]);
  4028. Destroy(gMaidC[i]);
  4029. Destroy(gHead[i]);
  4030. Destroy(gJotai[i]);
  4031. Destroy(gKahuku[i]);
  4032. gHandL[i].SetActive(false);
  4033. gArmL[i].SetActive(false);
  4034. gFootL[i].SetActive(false);
  4035. gHizaL[i].SetActive(false);
  4036. gHandR[i].SetActive(false);
  4037. gArmR[i].SetActive(false);
  4038. gFootR[i].SetActive(false);
  4039. gHizaR[i].SetActive(false);
  4040. gClavicleL[i].SetActive(false);
  4041. gClavicleR[i].SetActive(false);
  4042. gNeck[i].SetActive(false);
  4043. gSpine[i].SetActive(false);
  4044. gSpine0a[i].SetActive(false);
  4045. gSpine1a[i].SetActive(false);
  4046. gSpine1[i].SetActive(false);
  4047. gPelvis[i].SetActive(false);
  4048. for (int j = 0; j < 10; j++)
  4049. {
  4050. mFinger[i, j * 3 + 2].maid = maid;
  4051. mFinger[i, j * 3 + 2].HandL = Finger[i, j * 4 + 3];
  4052. mFinger[i, j * 3 + 2].UpperArmL = Finger[i, j * 4 + 2];
  4053. mFinger[i, j * 3 + 2].ForearmL = Finger[i, j * 4 + 2];
  4054. mFinger[i, j * 3 + 2].ido = 12;
  4055. if (j == 0 || j == 5)
  4056. {
  4057. mFinger[i, j * 3 + 2].ido = 15;
  4058. }
  4059. mFinger[i, j * 3 + 1].maid = maid;
  4060. mFinger[i, j * 3 + 1].HandL = Finger[i, j * 4 + 2];
  4061. mFinger[i, j * 3 + 1].UpperArmL = Finger[i, j * 4 + 1];
  4062. mFinger[i, j * 3 + 1].ForearmL = Finger[i, j * 4 + 1];
  4063. mFinger[i, j * 3 + 1].ido = 11;
  4064. if (j == 0 || j == 5)
  4065. {
  4066. mFinger[i, j * 3 + 1].ido = 14;
  4067. }
  4068. mFinger[i, j * 3].maid = maid;
  4069. mFinger[i, j * 3].HandL = Finger[i, j * 4 + 1];
  4070. mFinger[i, j * 3].UpperArmL = Finger[i, j * 4];
  4071. mFinger[i, j * 3].ForearmL = Finger[i, j * 4];
  4072. mFinger[i, j * 3].ido = 13;
  4073. if (j == 0 || j == 5)
  4074. {
  4075. mFinger[i, j * 3].ido = 0;
  4076. }
  4077. gFinger[i, j * 3 + 2].SetActive(false);
  4078. gFinger[i, j * 3 + 1].SetActive(false);
  4079. gFinger[i, j * 3].SetActive(true);
  4080. gFinger[i, j * 3].SetActive(true);
  4081. mFinger[i, j * 3].ido = 16;
  4082. if (ikModeOld[i] != 6)
  4083. {
  4084. mFinger[i, j * 3].reset = true;
  4085. }
  4086. gFinger[i, j * 3 + 2].transform.position =
  4087. (Finger[i, j * 4 + 3].position + Finger[i, j * 4 + 3].position
  4088. + Finger[i, j * 4 + 2].position) / 3f;
  4089. gFinger[i, j * 3 + 1].transform.position = Finger[i, j * 4 + 2].position;
  4090. gFinger[i, j * 3].transform.position = Finger[i, j * 4 + 1].position;
  4091. if (mFinger[i, j * 3 + 2].isStop)
  4092. {
  4093. isStop[i] = true;
  4094. isLock[i] = true;
  4095. mFinger[i, j * 3 + 2].isStop = false;
  4096. }
  4097. if (mFinger[i, j * 3 + 1].isStop)
  4098. {
  4099. isStop[i] = true;
  4100. isLock[i] = true;
  4101. mFinger[i, j * 3 + 1].isStop = false;
  4102. }
  4103. if (mFinger[i, j * 3].isStop)
  4104. {
  4105. isStop[i] = true;
  4106. isLock[i] = true;
  4107. mFinger[i, j * 3].isStop = false;
  4108. }
  4109. }
  4110. for (int j = 0; j < 6; j++)
  4111. {
  4112. mFinger2[i, j * 2 + 1].maid = maid;
  4113. mFinger2[i, j * 2 + 1].HandL = Finger2[i, j * 3 + 2];
  4114. mFinger2[i, j * 2 + 1].UpperArmL = Finger2[i, j * 3 + 1];
  4115. mFinger2[i, j * 2 + 1].ForearmL = Finger2[i, j * 3 + 1];
  4116. mFinger2[i, j * 2 + 1].ido = 0;
  4117. mFinger2[i, j * 2].maid = maid;
  4118. mFinger2[i, j * 2].HandL = Finger2[i, j * 3 + 1];
  4119. mFinger2[i, j * 2].UpperArmL = Finger2[i, j * 3];
  4120. mFinger2[i, j * 2].ForearmL = Finger2[i, j * 3];
  4121. mFinger2[i, j * 2].ido = 0;
  4122. gFinger2[i, j * 2 + 1].SetActive(false);
  4123. gFinger2[i, j * 2].SetActive(false);
  4124. gFinger2[i, j * 2 + 1].transform.position = Finger2[i, j * 3 + 2].position;
  4125. gFinger2[i, j * 2].transform.position = Finger2[i, j * 3 + 1].position;
  4126. if (mFinger2[i, j * 2 + 1].isStop)
  4127. {
  4128. isStop[i] = true;
  4129. isLock[i] = true;
  4130. mFinger2[i, j * 2 + 1].isStop = false;
  4131. }
  4132. if (mFinger2[i, j * 2].isStop)
  4133. {
  4134. isStop[i] = true;
  4135. isLock[i] = true;
  4136. mFinger2[i, j * 2].isStop = false;
  4137. }
  4138. }
  4139. }
  4140. else if (ikMode[i] == 4)
  4141. {
  4142. if (!gFinger[i, 0])
  4143. {
  4144. this.SetIKInit2(i);
  4145. }
  4146. Destroy(gMaid[i]);
  4147. Destroy(gMaidC[i]);
  4148. Destroy(gHead[i]);
  4149. Destroy(gJotai[i]);
  4150. Destroy(gKahuku[i]);
  4151. gHandL[i].SetActive(false);
  4152. gArmL[i].SetActive(false);
  4153. gFootL[i].SetActive(false);
  4154. gHizaL[i].SetActive(false);
  4155. gHandR[i].SetActive(false);
  4156. gArmR[i].SetActive(false);
  4157. gFootR[i].SetActive(false);
  4158. gHizaR[i].SetActive(false);
  4159. gClavicleL[i].SetActive(false);
  4160. gClavicleR[i].SetActive(false);
  4161. gNeck[i].SetActive(false);
  4162. gSpine[i].SetActive(false);
  4163. gSpine0a[i].SetActive(false);
  4164. gSpine1a[i].SetActive(false);
  4165. gSpine1[i].SetActive(false);
  4166. gPelvis[i].SetActive(false);
  4167. for (int j = 0; j < 10; j++)
  4168. {
  4169. mFinger[i, j * 3 + 2].maid = maid;
  4170. mFinger[i, j * 3 + 2].HandL = Finger[i, j * 4 + 3];
  4171. mFinger[i, j * 3 + 2].UpperArmL = Finger[i, j * 4 + 2];
  4172. mFinger[i, j * 3 + 2].ForearmL = Finger[i, j * 4 + 2];
  4173. mFinger[i, j * 3 + 2].ido = 12;
  4174. mFinger[i, j * 3 + 2].onFlg = true;
  4175. if (j == 0 || j == 5)
  4176. {
  4177. mFinger[i, j * 3 + 2].ido = 15;
  4178. }
  4179. mFinger[i, j * 3 + 1].maid = maid;
  4180. mFinger[i, j * 3 + 1].HandL = Finger[i, j * 4 + 2];
  4181. mFinger[i, j * 3 + 1].UpperArmL = Finger[i, j * 4 + 1];
  4182. mFinger[i, j * 3 + 1].ForearmL = Finger[i, j * 4 + 1];
  4183. mFinger[i, j * 3 + 1].ido = 11;
  4184. mFinger[i, j * 3 + 1].onFlg = true;
  4185. if (j == 0 || j == 5)
  4186. {
  4187. mFinger[i, j * 3 + 1].ido = 14;
  4188. }
  4189. mFinger[i, j * 3].maid = maid;
  4190. mFinger[i, j * 3].HandL = Finger[i, j * 4 + 1];
  4191. mFinger[i, j * 3].UpperArmL = Finger[i, j * 4];
  4192. mFinger[i, j * 3].ForearmL = Finger[i, j * 4];
  4193. mFinger[i, j * 3].ido = 13;
  4194. mFinger[i, j * 3].onFlg = true;
  4195. if (j == 0 || j == 5)
  4196. {
  4197. mFinger[i, j * 3].ido = 0;
  4198. }
  4199. if (ikModeOld[i] != 4)
  4200. {
  4201. mFinger[i, j * 3].reset = true;
  4202. }
  4203. gFinger[i, j * 3 + 2].SetActive(true);
  4204. gFinger[i, j * 3 + 1].SetActive(true);
  4205. gFinger[i, j * 3].SetActive(true);
  4206. gFinger[i, j * 3 + 2].transform.position =
  4207. (Finger[i, j * 4 + 3].position + Finger[i, j * 4 + 3].position
  4208. + Finger[i, j * 4 + 2].position) / 3f;
  4209. gFinger[i, j * 3 + 1].transform.position = Finger[i, j * 4 + 2].position;
  4210. gFinger[i, j * 3].transform.position = Finger[i, j * 4 + 1].position;
  4211. if (mFinger[i, j * 3 + 2].isStop)
  4212. {
  4213. isStop[i] = true;
  4214. isLock[i] = true;
  4215. mFinger[i, j * 3 + 2].isStop = false;
  4216. }
  4217. if (mFinger[i, j * 3 + 1].isStop)
  4218. {
  4219. isStop[i] = true;
  4220. isLock[i] = true;
  4221. mFinger[i, j * 3 + 1].isStop = false;
  4222. }
  4223. if (mFinger[i, j * 3].isStop)
  4224. {
  4225. isStop[i] = true;
  4226. isLock[i] = true;
  4227. mFinger[i, j * 3].isStop = false;
  4228. }
  4229. }
  4230. for (int j = 0; j < 6; j++)
  4231. {
  4232. mFinger2[i, j * 2 + 1].maid = maid;
  4233. mFinger2[i, j * 2 + 1].HandL = Finger2[i, j * 3 + 2];
  4234. mFinger2[i, j * 2 + 1].UpperArmL = Finger2[i, j * 3 + 1];
  4235. mFinger2[i, j * 2 + 1].ForearmL = Finger2[i, j * 3 + 1];
  4236. mFinger2[i, j * 2 + 1].ido = 17;
  4237. mFinger2[i, j * 2].maid = maid;
  4238. mFinger2[i, j * 2].HandL = Finger2[i, j * 3 + 1];
  4239. mFinger2[i, j * 2].UpperArmL = Finger2[i, j * 3];
  4240. mFinger2[i, j * 2].ForearmL = Finger2[i, j * 3];
  4241. mFinger2[i, j * 2].ido = 0;
  4242. gFinger2[i, j * 2 + 1].SetActive(true);
  4243. gFinger2[i, j * 2].SetActive(true);
  4244. gFinger2[i, j * 2 + 1].transform.position = Finger2[i, j * 3 + 2].position;
  4245. gFinger2[i, j * 2].transform.position = Finger2[i, j * 3 + 1].position;
  4246. if (mFinger2[i, j * 2 + 1].isStop)
  4247. {
  4248. isStop[i] = true;
  4249. isLock[i] = true;
  4250. mFinger2[i, j * 2 + 1].isStop = false;
  4251. }
  4252. if (mFinger2[i, j * 2].isStop)
  4253. {
  4254. isStop[i] = true;
  4255. isLock[i] = true;
  4256. mFinger2[i, j * 2].isStop = false;
  4257. }
  4258. }
  4259. }
  4260. else if (ikModeOld[i] == 1 || ikModeOld[i] == 3 || ikModeOld[i] == 5 || ikModeOld[i] == 8)
  4261. {
  4262. mHandL[i].ido = 0;
  4263. mHandR[i].ido = 0;
  4264. mFootL[i].ido = 0;
  4265. mFootR[i].ido = 0;
  4266. mHizaL[i].ido = 0;
  4267. mHizaR[i].ido = 0;
  4268. mHandL[i].reset = true;
  4269. mHandR[i].reset = true;
  4270. mFootL[i].reset = true;
  4271. mFootR[i].reset = true;
  4272. mHizaL[i].reset = true;
  4273. mHizaR[i].reset = true;
  4274. }
  4275. else
  4276. {
  4277. if (gFinger[i, 0])
  4278. {
  4279. for (int j = 0; j < 30; j++)
  4280. {
  4281. gFinger[i, j].SetActive(false);
  4282. }
  4283. for (int j = 0; j < 12; j++)
  4284. {
  4285. gFinger2[i, j].SetActive(false);
  4286. }
  4287. }
  4288. Destroy(gHead[i]);
  4289. Destroy(gJotai[i]);
  4290. Destroy(gKahuku[i]);
  4291. Destroy(gIKHandL[i]);
  4292. Destroy(gIKHandR[i]);
  4293. Destroy(gIKMuneL[i]);
  4294. Destroy(gIKMuneR[i]);
  4295. Destroy(gHead2[i]);
  4296. Destroy(gMaid2[i]);
  4297. gHandL[i].SetActive(true);
  4298. gArmL[i].SetActive(true);
  4299. gFootL[i].SetActive(true);
  4300. gHizaL[i].SetActive(true);
  4301. gHandR[i].SetActive(true);
  4302. gArmR[i].SetActive(true);
  4303. gFootR[i].SetActive(true);
  4304. gHizaR[i].SetActive(true);
  4305. mHandL[i].ido = 0;
  4306. mHandR[i].ido = 0;
  4307. mFootL[i].ido = 0;
  4308. mFootR[i].ido = 0;
  4309. gClavicleL[i].SetActive(true);
  4310. gClavicleR[i].SetActive(true);
  4311. }
  4312. if (!isIK[i])
  4313. {
  4314. gHandL[i].SetActive(false);
  4315. gArmL[i].SetActive(false);
  4316. gFootL[i].SetActive(false);
  4317. gHizaL[i].SetActive(false);
  4318. gHandR[i].SetActive(false);
  4319. gArmR[i].SetActive(false);
  4320. gFootR[i].SetActive(false);
  4321. gHizaR[i].SetActive(false);
  4322. gClavicleL[i].SetActive(false);
  4323. gClavicleR[i].SetActive(false);
  4324. gNeck[i].SetActive(false);
  4325. gSpine[i].SetActive(false);
  4326. gSpine0a[i].SetActive(false);
  4327. gSpine1a[i].SetActive(false);
  4328. gSpine1[i].SetActive(false);
  4329. gPelvis[i].SetActive(false);
  4330. }
  4331. if (isIK[i])
  4332. {
  4333. mHandL[i].maid = maid;
  4334. mHandL[i].HandL = HandL1[i];
  4335. if (ikMode[i] == 2)
  4336. {
  4337. mHandL[i].UpperArmL = ForearmL1[i];
  4338. }
  4339. else
  4340. {
  4341. mHandL[i].UpperArmL = UpperArmL1[i];
  4342. if (ikModeOld[i] == 2 && isLock[i])
  4343. {
  4344. mHandL[i].OnMouseDown();
  4345. mHandL[i].isSelect = false;
  4346. }
  4347. }
  4348. mHandL[i].ForearmL = ForearmL1[i];
  4349. mArmL[i].maid = maid;
  4350. mArmL[i].HandL = ForearmL1[i];
  4351. mArmL[i].UpperArmL = UpperArmL1[i];
  4352. mArmL[i].ForearmL = UpperArmL1[i];
  4353. mArmL[i].onFlg = true;
  4354. if (mArmL[i].onFlg2)
  4355. {
  4356. mArmL[i].onFlg2 = false;
  4357. mHandL[i].initFlg = false;
  4358. }
  4359. if (ikMode[i] == 2)
  4360. {
  4361. mHandL[i].initFlg = false;
  4362. mHandR[i].initFlg = false;
  4363. mFootL[i].initFlg = false;
  4364. mFootR[i].initFlg = false;
  4365. mHandL[i].onFlg = true;
  4366. mHandR[i].onFlg = true;
  4367. mFootL[i].onFlg = true;
  4368. mFootR[i].onFlg = true;
  4369. }
  4370. else
  4371. {
  4372. mHandL[i].onFlg = false;
  4373. mHandR[i].onFlg = false;
  4374. mFootL[i].onFlg = false;
  4375. mFootR[i].onFlg = false;
  4376. }
  4377. gHandL[i].transform.position = HandL1[i].position;
  4378. gArmL[i].transform.position = ForearmL1[i].position;
  4379. mClavicleL[i].maid = maid;
  4380. mClavicleL[i].HandL = UpperArmL1[i];
  4381. mClavicleL[i].UpperArmL = ClavicleL1[i];
  4382. mClavicleL[i].ForearmL = ClavicleL1[i];
  4383. gClavicleL[i].transform.position = UpperArmL1[i].position;
  4384. if (mHandL[i].isStop)
  4385. {
  4386. isStop[i] = true;
  4387. isLock[i] = true;
  4388. mHandL[i].isStop = false;
  4389. }
  4390. if (mArmL[i].isStop)
  4391. {
  4392. isStop[i] = true;
  4393. isLock[i] = true;
  4394. mArmL[i].isStop = false;
  4395. }
  4396. if (mClavicleL[i].isStop)
  4397. {
  4398. isStop[i] = true;
  4399. isLock[i] = true;
  4400. mClavicleL[i].isStop = false;
  4401. }
  4402. mHandR[i].maid = maid;
  4403. mHandR[i].HandL = HandR1[i];
  4404. if (ikMode[i] == 2)
  4405. {
  4406. mHandR[i].UpperArmL = ForearmR1[i];
  4407. }
  4408. else
  4409. {
  4410. mHandR[i].UpperArmL = UpperArmR1[i];
  4411. if (ikModeOld[i] == 2 && isLock[i])
  4412. {
  4413. mHandR[i].OnMouseDown();
  4414. mHandR[i].isSelect = false;
  4415. }
  4416. }
  4417. mHandR[i].ForearmL = ForearmR1[i];
  4418. mArmR[i].maid = maid;
  4419. mArmR[i].HandL = ForearmR1[i];
  4420. mArmR[i].UpperArmL = UpperArmR1[i];
  4421. mArmR[i].ForearmL = UpperArmR1[i];
  4422. mArmR[i].onFlg = true;
  4423. if (mArmR[i].onFlg2)
  4424. {
  4425. mArmR[i].onFlg2 = false;
  4426. mHandR[i].initFlg = false;
  4427. }
  4428. gHandR[i].transform.position = HandR1[i].position;
  4429. gArmR[i].transform.position = ForearmR1[i].position;
  4430. mClavicleR[i].maid = maid;
  4431. mClavicleR[i].HandL = UpperArmR1[i];
  4432. mClavicleR[i].UpperArmL = ClavicleR1[i];
  4433. mClavicleR[i].ForearmL = ClavicleR1[i];
  4434. gClavicleR[i].transform.position = UpperArmR1[i].position;
  4435. if (mHandR[i].isStop)
  4436. {
  4437. isStop[i] = true;
  4438. isLock[i] = true;
  4439. mHandR[i].isStop = false;
  4440. }
  4441. if (mArmR[i].isStop)
  4442. {
  4443. isStop[i] = true;
  4444. isLock[i] = true;
  4445. mArmR[i].isStop = false;
  4446. }
  4447. if (mClavicleL[i].isStop)
  4448. {
  4449. isStop[i] = true;
  4450. isLock[i] = true;
  4451. mClavicleL[i].isStop = false;
  4452. }
  4453. mFootL[i].maid = maid;
  4454. mFootL[i].HandL = HandL2[i];
  4455. if (ikMode[i] == 2)
  4456. {
  4457. mFootL[i].UpperArmL = ForearmL2[i];
  4458. }
  4459. else
  4460. {
  4461. mFootL[i].UpperArmL = UpperArmL2[i];
  4462. if (ikModeOld[i] == 2 && isLock[i])
  4463. {
  4464. mFootL[i].OnMouseDown();
  4465. mFootL[i].isSelect = false;
  4466. }
  4467. }
  4468. mFootL[i].ForearmL = ForearmL2[i];
  4469. mHizaL[i].maid = maid;
  4470. mHizaL[i].HandL = ForearmL2[i];
  4471. mHizaL[i].UpperArmL = UpperArmL2[i];
  4472. mHizaL[i].ForearmL = UpperArmL2[i];
  4473. mHizaL[i].onFlg = true;
  4474. if (mHizaL[i].onFlg2)
  4475. {
  4476. mHizaL[i].onFlg2 = false;
  4477. mFootL[i].initFlg = false;
  4478. }
  4479. gFootL[i].transform.position = HandL2[i].position;
  4480. gHizaL[i].transform.position = ForearmL2[i].position;
  4481. if (mFootL[i].isStop)
  4482. {
  4483. isStop[i] = true;
  4484. isLock[i] = true;
  4485. mFootL[i].isStop = false;
  4486. }
  4487. if (mHizaL[i].isStop)
  4488. {
  4489. isStop[i] = true;
  4490. isLock[i] = true;
  4491. mHizaL[i].isStop = false;
  4492. }
  4493. mFootR[i].maid = maid;
  4494. mFootR[i].HandL = HandR2[i];
  4495. if (ikMode[i] == 2)
  4496. {
  4497. mFootR[i].UpperArmL = ForearmR2[i];
  4498. }
  4499. else
  4500. {
  4501. mFootR[i].UpperArmL = UpperArmR2[i];
  4502. if (ikModeOld[i] == 2 && isLock[i])
  4503. {
  4504. mFootR[i].OnMouseDown();
  4505. mFootR[i].isSelect = false;
  4506. }
  4507. }
  4508. mFootR[i].ForearmL = ForearmR2[i];
  4509. mHizaR[i].maid = maid;
  4510. mHizaR[i].HandL = ForearmR2[i];
  4511. mHizaR[i].UpperArmL = UpperArmR2[i];
  4512. mHizaR[i].ForearmL = UpperArmR2[i];
  4513. mHizaR[i].onFlg = true;
  4514. if (mHizaR[i].onFlg2)
  4515. {
  4516. mHizaR[i].onFlg2 = false;
  4517. mFootR[i].initFlg = false;
  4518. }
  4519. gFootR[i].transform.position = HandR2[i].position;
  4520. gHizaR[i].transform.position = ForearmR2[i].position;
  4521. if (mFootR[i].isStop)
  4522. {
  4523. isStop[i] = true;
  4524. isLock[i] = true;
  4525. mFootR[i].isStop = false;
  4526. }
  4527. if (mHizaR[i].isStop)
  4528. {
  4529. isStop[i] = true;
  4530. isLock[i] = true;
  4531. mHizaR[i].isStop = false;
  4532. }
  4533. bool flag13 = false;
  4534. if (ikModeOld[i] == 9 || ikModeOld[i] == 10 || ikModeOld[i] == 11 || ikModeOld[i] == 12
  4535. || ikModeOld[i] == 14)
  4536. {
  4537. flag13 = true;
  4538. }
  4539. if (isBone[i])
  4540. {
  4541. if ((ikMode[i] != 3 && ikMode[i] != 5 && ikMode[i] != 8) || ikMode[i] != ikModeOld[i]
  4542. || isChange[i])
  4543. {
  4544. gizmoFootL[i].Visible = false;
  4545. gizmoHandR[i].Visible = false;
  4546. gizmoHandL[i].Visible = false;
  4547. gizmoFootR[i].Visible = false;
  4548. }
  4549. else
  4550. {
  4551. bool fieldValue4 = GetFieldValue<GizmoRender, bool>(gizmoHandL[i], "is_drag_");
  4552. bool fieldValue5 = GetFieldValue<GizmoRender, bool>(gizmoHandR[i], "is_drag_");
  4553. bool fieldValue6 = GetFieldValue<GizmoRender, bool>(gizmoFootL[i], "is_drag_");
  4554. bool fieldValue7 = GetFieldValue<GizmoRender, bool>(gizmoFootR[i], "is_drag_");
  4555. if (ikMode[i] == 3)
  4556. {
  4557. gizmoHandL[i].transform.position = HandL1[i].transform.position;
  4558. gizmoHandR[i].transform.position = HandR1[i].transform.position;
  4559. gizmoFootL[i].transform.position = HandL2[i].transform.position;
  4560. gizmoFootR[i].transform.position = HandR2[i].transform.position;
  4561. if (fieldValue4 || fieldValue5 || fieldValue6 || fieldValue7)
  4562. {
  4563. HandL1[i].transform.rotation = gizmoHandL[i].transform.rotation;
  4564. HandR1[i].transform.rotation = gizmoHandR[i].transform.rotation;
  4565. HandL2[i].transform.rotation = gizmoFootL[i].transform.rotation;
  4566. HandR2[i].transform.rotation = gizmoFootR[i].transform.rotation;
  4567. }
  4568. else
  4569. {
  4570. gizmoHandL[i].transform.rotation = HandL1[i].transform.rotation;
  4571. gizmoHandR[i].transform.rotation = HandR1[i].transform.rotation;
  4572. gizmoFootL[i].transform.rotation = HandL2[i].transform.rotation;
  4573. gizmoFootR[i].transform.rotation = HandR2[i].transform.rotation;
  4574. }
  4575. }
  4576. else if (ikMode[i] == 5)
  4577. {
  4578. gizmoHandL[i].transform.position = UpperArmL1[i].transform.position;
  4579. gizmoHandR[i].transform.position = UpperArmR1[i].transform.position;
  4580. gizmoFootL[i].transform.position = UpperArmL2[i].transform.position;
  4581. gizmoFootR[i].transform.position = UpperArmR2[i].transform.position;
  4582. if (fieldValue4 || fieldValue5 || fieldValue6 || fieldValue7)
  4583. {
  4584. UpperArmL1[i].transform.rotation = gizmoHandL[i].transform.rotation;
  4585. UpperArmR1[i].transform.rotation = gizmoHandR[i].transform.rotation;
  4586. UpperArmL2[i].transform.rotation = gizmoFootL[i].transform.rotation;
  4587. UpperArmR2[i].transform.rotation = gizmoFootR[i].transform.rotation;
  4588. flag13 = true;
  4589. }
  4590. else
  4591. {
  4592. gizmoHandL[i].transform.rotation = UpperArmL1[i].transform.rotation;
  4593. gizmoHandR[i].transform.rotation = UpperArmR1[i].transform.rotation;
  4594. gizmoFootL[i].transform.rotation = UpperArmL2[i].transform.rotation;
  4595. gizmoFootR[i].transform.rotation = UpperArmR2[i].transform.rotation;
  4596. }
  4597. }
  4598. else if (ikMode[i] == 8)
  4599. {
  4600. gizmoHandL[i].transform.position = ForearmL1[i].transform.position;
  4601. gizmoHandR[i].transform.position = ForearmR1[i].transform.position;
  4602. gizmoFootL[i].transform.position = ForearmL2[i].transform.position;
  4603. gizmoFootR[i].transform.position = ForearmR2[i].transform.position;
  4604. if (fieldValue4 || fieldValue5 || fieldValue6 || fieldValue7)
  4605. {
  4606. ForearmL1[i].transform.rotation = gizmoHandL[i].transform.rotation;
  4607. ForearmR1[i].transform.rotation = gizmoHandR[i].transform.rotation;
  4608. ForearmL2[i].transform.rotation = gizmoFootL[i].transform.rotation;
  4609. ForearmR2[i].transform.rotation = gizmoFootR[i].transform.rotation;
  4610. flag13 = true;
  4611. }
  4612. else
  4613. {
  4614. gizmoHandL[i].transform.rotation = ForearmL1[i].transform.rotation;
  4615. gizmoHandR[i].transform.rotation = ForearmR1[i].transform.rotation;
  4616. gizmoFootL[i].transform.rotation = ForearmL2[i].transform.rotation;
  4617. gizmoFootR[i].transform.rotation = ForearmR2[i].transform.rotation;
  4618. }
  4619. }
  4620. gizmoHandL[i].Visible = true;
  4621. gizmoHandR[i].Visible = true;
  4622. gizmoFootL[i].Visible = true;
  4623. gizmoFootR[i].Visible = true;
  4624. gHandL[i].SetActive(false);
  4625. gFootL[i].SetActive(false);
  4626. gHandR[i].SetActive(false);
  4627. gFootR[i].SetActive(false);
  4628. if (!isLock[i])
  4629. {
  4630. if (fieldValue4 || fieldValue5 || fieldValue6 || fieldValue7)
  4631. {
  4632. isStop[i] = true;
  4633. isLock[i] = true;
  4634. }
  4635. }
  4636. }
  4637. if (isChange[i])
  4638. {
  4639. isChange[i] = false;
  4640. gHandL[i].transform.localScale = new Vector3(0.07f, 0.07f, 0.07f);
  4641. gHandR[i].transform.localScale = new Vector3(0.07f, 0.07f, 0.07f);
  4642. gArmL[i].transform.localScale = new Vector3(0.07f, 0.07f, 0.07f);
  4643. gArmR[i].transform.localScale = new Vector3(0.07f, 0.07f, 0.07f);
  4644. gFootL[i].transform.localScale = new Vector3(0.07f, 0.07f, 0.07f);
  4645. gFootR[i].transform.localScale = new Vector3(0.07f, 0.07f, 0.07f);
  4646. gHizaL[i].transform.localScale = new Vector3(0.07f, 0.07f, 0.07f);
  4647. gHizaR[i].transform.localScale = new Vector3(0.07f, 0.07f, 0.07f);
  4648. gClavicleL[i].transform.localScale = new Vector3(0.07f, 0.07f, 0.07f);
  4649. gClavicleR[i].transform.localScale = new Vector3(0.07f, 0.07f, 0.07f);
  4650. gHandL[i].GetComponent<Renderer>().enabled = true;
  4651. gHandR[i].GetComponent<Renderer>().enabled = true;
  4652. gArmL[i].GetComponent<Renderer>().enabled = true;
  4653. gArmR[i].GetComponent<Renderer>().enabled = true;
  4654. gFootL[i].GetComponent<Renderer>().enabled = true;
  4655. gFootR[i].GetComponent<Renderer>().enabled = true;
  4656. gHizaL[i].GetComponent<Renderer>().enabled = true;
  4657. gHizaR[i].GetComponent<Renderer>().enabled = true;
  4658. gClavicleL[i].GetComponent<Renderer>().enabled = true;
  4659. gClavicleR[i].GetComponent<Renderer>().enabled = true;
  4660. gHandL[i].GetComponent<Renderer>().material = m_material2;
  4661. gHandR[i].GetComponent<Renderer>().material = m_material2;
  4662. gArmL[i].GetComponent<Renderer>().material = m_material2;
  4663. gArmR[i].GetComponent<Renderer>().material = m_material2;
  4664. gFootL[i].GetComponent<Renderer>().material = m_material2;
  4665. gFootR[i].GetComponent<Renderer>().material = m_material2;
  4666. gHizaL[i].GetComponent<Renderer>().material = m_material2;
  4667. gHizaR[i].GetComponent<Renderer>().material = m_material2;
  4668. gClavicleL[i].GetComponent<Renderer>().material = m_material2;
  4669. gClavicleR[i].GetComponent<Renderer>().material = m_material2;
  4670. }
  4671. if (ikMode[i] == 0 && (ikModeOld[i] == 1 || ikModeOld[i] == 2) && gNeck[i])
  4672. {
  4673. mNeck[i].ido = 1;
  4674. mNeck[i].reset = true;
  4675. mSpine[i].ido = 1;
  4676. mSpine[i].reset = true;
  4677. mSpine0a[i].ido = 1;
  4678. mSpine0a[i].reset = true;
  4679. mSpine1a[i].ido = 1;
  4680. mSpine1a[i].reset = true;
  4681. mSpine1[i].ido = 1;
  4682. mSpine1[i].reset = true;
  4683. mPelvis[i].ido = 1;
  4684. mPelvis[i].reset = true;
  4685. }
  4686. else if (ikMode[i] == 0)
  4687. {
  4688. gNeck[i].SetActive(true);
  4689. gSpine[i].SetActive(true);
  4690. gSpine0a[i].SetActive(true);
  4691. gSpine1a[i].SetActive(true);
  4692. gSpine1[i].SetActive(true);
  4693. gPelvis[i].SetActive(true);
  4694. if (mNeck[i].isHead)
  4695. {
  4696. mNeck[i].isHead = false;
  4697. isLookn[i] = isLook[i];
  4698. isLook[i] = !isLook[i];
  4699. }
  4700. mNeck[i].maid = maid;
  4701. mNeck[i].head = Neck[i];
  4702. mNeck[i].no = i;
  4703. mNeck[i].ido = 1;
  4704. gNeck[i].transform.position = Neck[i].position;
  4705. gNeck[i].transform.localEulerAngles = Neck[i].localEulerAngles;
  4706. mSpine[i].maid = maid;
  4707. mSpine[i].head = Spine2[i];
  4708. mSpine[i].no = i;
  4709. mSpine[i].ido = 1;
  4710. gSpine[i].transform.position = Spine2[i].position;
  4711. gSpine[i].transform.eulerAngles =
  4712. new Vector3(Spine2[i].localEulerAngles.z,
  4713. Spine2[i].localEulerAngles.y,
  4714. Spine2[i].localEulerAngles.x);
  4715. mSpine0a[i].maid = maid;
  4716. mSpine0a[i].head = Spine0a2[i];
  4717. mSpine0a[i].no = i;
  4718. mSpine0a[i].ido = 1;
  4719. gSpine0a[i].transform.position = Spine0a2[i].position;
  4720. gSpine0a[i].transform.eulerAngles =
  4721. new Vector3(-Spine0a2[i].localEulerAngles.z,
  4722. Spine0a2[i].localEulerAngles.x,
  4723. Spine0a2[i].localEulerAngles.y);
  4724. mSpine1a[i].maid = maid;
  4725. mSpine1a[i].head = Spine1a2[i];
  4726. mSpine1a[i].no = i;
  4727. mSpine1a[i].ido = 1;
  4728. gSpine1a[i].transform.position = Spine1a2[i].position;
  4729. gSpine1a[i].transform.localEulerAngles =
  4730. new Vector3(-Spine1a2[i].localEulerAngles.z,
  4731. Spine1a2[i].localEulerAngles.x,
  4732. Spine1a2[i].localEulerAngles.y);
  4733. mSpine1[i].maid = maid;
  4734. mSpine1[i].head = Spine12[i];
  4735. mSpine1[i].no = i;
  4736. mSpine1[i].ido = 1;
  4737. gSpine1[i].transform.position = Spine12[i].position;
  4738. gSpine1[i].transform.localEulerAngles =
  4739. new Vector3(-Spine12[i].localEulerAngles.z,
  4740. Spine12[i].localEulerAngles.x,
  4741. Spine12[i].localEulerAngles.y);
  4742. mPelvis[i].maid = maid;
  4743. mPelvis[i].head = Pelvis2[i];
  4744. mPelvis[i].no = i;
  4745. mPelvis[i].ido = 1;
  4746. gPelvis[i].transform.position = Pelvis2[i].position;
  4747. gPelvis[i].transform.localEulerAngles = Pelvis2[i].localEulerAngles;
  4748. if (mNeck[i].isIdo)
  4749. {
  4750. mNeck[i].isIdo = false;
  4751. isLock[i] = true;
  4752. }
  4753. if (mSpine[i].isIdo)
  4754. {
  4755. mSpine[i].isIdo = false;
  4756. flag13 = true;
  4757. isLock[i] = true;
  4758. }
  4759. if (mSpine0a[i].isIdo)
  4760. {
  4761. mSpine0a[i].isIdo = false;
  4762. flag13 = true;
  4763. isLock[i] = true;
  4764. }
  4765. if (mSpine1a[i].isIdo)
  4766. {
  4767. mSpine1a[i].isIdo = false;
  4768. flag13 = true;
  4769. isLock[i] = true;
  4770. }
  4771. if (mSpine1[i].isIdo)
  4772. {
  4773. mSpine1[i].isIdo = false;
  4774. flag13 = true;
  4775. isLock[i] = true;
  4776. }
  4777. if (mPelvis[i].isIdo)
  4778. {
  4779. mPelvis[i].isIdo = false;
  4780. flag13 = true;
  4781. isLock[i] = true;
  4782. }
  4783. if (mClavicleL[i].isIdo)
  4784. {
  4785. mClavicleL[i].isIdo = false;
  4786. flag13 = true;
  4787. isLock[i] = true;
  4788. }
  4789. if (mClavicleR[i].isIdo)
  4790. {
  4791. mClavicleR[i].isIdo = false;
  4792. flag13 = true;
  4793. isLock[i] = true;
  4794. }
  4795. }
  4796. }
  4797. else if (isChange[i])
  4798. {
  4799. isChange[i] = false;
  4800. gHandL[i].GetComponent<Renderer>().enabled = false;
  4801. gArmL[i].GetComponent<Renderer>().enabled = false;
  4802. gFootL[i].GetComponent<Renderer>().enabled = false;
  4803. gHizaL[i].GetComponent<Renderer>().enabled = false;
  4804. gHandR[i].GetComponent<Renderer>().enabled = false;
  4805. gArmR[i].GetComponent<Renderer>().enabled = false;
  4806. gFootR[i].GetComponent<Renderer>().enabled = false;
  4807. gHizaR[i].GetComponent<Renderer>().enabled = false;
  4808. gClavicleL[i].GetComponent<Renderer>().enabled = false;
  4809. gClavicleR[i].GetComponent<Renderer>().enabled = false;
  4810. gHandL[i].transform.localScale = new Vector3(0.12f, 0.12f, 0.12f);
  4811. gHandR[i].transform.localScale = new Vector3(0.12f, 0.12f, 0.12f);
  4812. gArmL[i].transform.localScale = new Vector3(0.12f, 0.12f, 0.12f);
  4813. gArmR[i].transform.localScale = new Vector3(0.12f, 0.12f, 0.12f);
  4814. gFootL[i].transform.localScale = new Vector3(0.15f, 0.15f, 0.15f);
  4815. gFootR[i].transform.localScale = new Vector3(0.15f, 0.15f, 0.15f);
  4816. gHizaL[i].transform.localScale = new Vector3(0.15f, 0.15f, 0.15f);
  4817. gHizaR[i].transform.localScale = new Vector3(0.15f, 0.15f, 0.15f);
  4818. gClavicleL[i].transform.localScale = new Vector3(0.13f, 0.13f, 0.13f);
  4819. mClavicleR[i].transform.localScale = new Vector3(0.13f, 0.13f, 0.13f);
  4820. gNeck[i].SetActive(false);
  4821. gSpine[i].SetActive(false);
  4822. gSpine0a[i].SetActive(false);
  4823. gSpine1a[i].SetActive(false);
  4824. gSpine1[i].SetActive(false);
  4825. gPelvis[i].SetActive(false);
  4826. gizmoHandL[i].Visible = false;
  4827. gizmoHandR[i].Visible = false;
  4828. gizmoFootL[i].Visible = false;
  4829. gizmoFootR[i].Visible = false;
  4830. }
  4831. if (flag13)
  4832. {
  4833. mHandL[i].initFlg = false;
  4834. mHandR[i].initFlg = false;
  4835. mFootL[i].initFlg = false;
  4836. mFootR[i].initFlg = false;
  4837. }
  4838. }
  4839. ikModeOld[i] = ikMode[i];
  4840. bool flag14 = false;
  4841. if (!Input.GetKey(KeyCode.A) && !Input.GetKey(KeyCode.Q) && i == ikMaid)
  4842. {
  4843. if (Input.GetKey(KeyCode.X) && Input.GetKey(KeyCode.BackQuote))
  4844. {
  4845. for (int k = 0; k < 10; k++)
  4846. {
  4847. maid.transform.RotateAround(maid.transform.position,
  4848. Vector3.right,
  4849. -maid.transform.rotation.eulerAngles.x);
  4850. maid.transform.RotateAround(maid.transform.position,
  4851. Vector3.forward,
  4852. -maid.transform.rotation.eulerAngles.z);
  4853. }
  4854. flag14 = true;
  4855. }
  4856. else if (Input.GetKey(KeyCode.X) && Input.GetKey(KeyCode.I) && Input.GetKey(KeyCode.J))
  4857. {
  4858. maid.transform.RotateAround(maid.transform.position,
  4859. new Vector3(vector3.x, 0f, vector3.z),
  4860. 0.3f);
  4861. maid.transform.RotateAround(maid.transform.position,
  4862. new Vector3(vector2.x, 0f, vector2.z),
  4863. 0.3f);
  4864. flag14 = true;
  4865. }
  4866. else if (Input.GetKey(KeyCode.X) && Input.GetKey(KeyCode.I) && Input.GetKey(KeyCode.L))
  4867. {
  4868. maid.transform.RotateAround(maid.transform.position,
  4869. new Vector3(vector3.x, 0f, vector3.z),
  4870. 0.3f);
  4871. maid.transform.RotateAround(maid.transform.position,
  4872. new Vector3(vector2.x, 0f, vector2.z),
  4873. -0.3f);
  4874. flag14 = true;
  4875. }
  4876. else if (Input.GetKey(KeyCode.X) && Input.GetKey(KeyCode.K) && Input.GetKey(KeyCode.J))
  4877. {
  4878. maid.transform.RotateAround(maid.transform.position,
  4879. new Vector3(vector3.x, 0f, vector3.z),
  4880. -0.3f);
  4881. maid.transform.RotateAround(maid.transform.position,
  4882. new Vector3(vector2.x, 0f, vector2.z),
  4883. 0.3f);
  4884. flag14 = true;
  4885. }
  4886. else if (Input.GetKey(KeyCode.X) && Input.GetKey(KeyCode.K) && Input.GetKey(KeyCode.L))
  4887. {
  4888. maid.transform.RotateAround(maid.transform.position,
  4889. new Vector3(vector3.x, 0f, vector3.z),
  4890. -0.3f);
  4891. maid.transform.RotateAround(maid.transform.position,
  4892. new Vector3(vector2.x, 0f, vector2.z),
  4893. -0.3f);
  4894. flag14 = true;
  4895. }
  4896. else if (Input.GetKey(KeyCode.X) && Input.GetKey(KeyCode.I))
  4897. {
  4898. maid.transform.RotateAround(maid.transform.position,
  4899. new Vector3(vector3.x, 0f, vector3.z),
  4900. 0.4f);
  4901. flag14 = true;
  4902. }
  4903. else if (Input.GetKey(KeyCode.X) && Input.GetKey(KeyCode.K))
  4904. {
  4905. maid.transform.RotateAround(maid.transform.position,
  4906. new Vector3(vector3.x, 0f, vector3.z),
  4907. -0.4f);
  4908. flag14 = true;
  4909. }
  4910. else if (Input.GetKey(KeyCode.X) && Input.GetKey(KeyCode.J))
  4911. {
  4912. maid.transform.RotateAround(maid.transform.position,
  4913. new Vector3(vector2.x, 0f, vector2.z),
  4914. 0.4f);
  4915. flag14 = true;
  4916. }
  4917. else if (Input.GetKey(KeyCode.X) && Input.GetKey(KeyCode.L))
  4918. {
  4919. maid.transform.RotateAround(maid.transform.position,
  4920. new Vector3(vector2.x, 0f, vector2.z),
  4921. -0.4f);
  4922. flag14 = true;
  4923. }
  4924. else if (Input.GetKey(KeyCode.X) && Input.GetKey(KeyCode.U))
  4925. {
  4926. maid.body0.transform.localRotation =
  4927. Quaternion.Euler(maid.body0.transform.localEulerAngles)
  4928. * Quaternion.AngleAxis(-1.5f, Vector3.up);
  4929. flag14 = true;
  4930. }
  4931. else if (Input.GetKey(KeyCode.X) && Input.GetKey(KeyCode.O))
  4932. {
  4933. maid.body0.transform.localRotation =
  4934. Quaternion.Euler(maid.body0.transform.localEulerAngles)
  4935. * Quaternion.AngleAxis(1.5f, Vector3.up);
  4936. flag14 = true;
  4937. }
  4938. else if (Input.GetKey(KeyCode.Z) && Input.GetKey(KeyCode.U))
  4939. {
  4940. maid.body0.transform.RotateAround(maid.transform.position, Vector3.up, -1.5f);
  4941. flag14 = true;
  4942. }
  4943. else if (Input.GetKey(KeyCode.Z) && Input.GetKey(KeyCode.O))
  4944. {
  4945. maid.body0.transform.RotateAround(maid.transform.position, Vector3.up, 1.5f);
  4946. flag14 = true;
  4947. }
  4948. else if (Input.GetKey(KeyCode.Z) && Input.GetKey(KeyCode.I) && Input.GetKey(KeyCode.J))
  4949. {
  4950. Vector3 vector = maid.transform.position;
  4951. vector += new Vector3(vector2.x, 0f, vector2.z) * 0.0075f * speed;
  4952. vector += new Vector3(vector3.x, 0f, vector3.z) * -0.0075f * speed;
  4953. maid.SetPos(vector);
  4954. flag14 = true;
  4955. }
  4956. else if (Input.GetKey(KeyCode.Z) && Input.GetKey(KeyCode.I) && Input.GetKey(KeyCode.L))
  4957. {
  4958. Vector3 vector = maid.transform.position;
  4959. vector += new Vector3(vector2.x, 0f, vector2.z) * 0.0075f * speed;
  4960. vector += new Vector3(vector3.x, 0f, vector3.z) * 0.0075f * speed;
  4961. maid.SetPos(vector);
  4962. flag14 = true;
  4963. }
  4964. else if (Input.GetKey(KeyCode.Z) && Input.GetKey(KeyCode.K) && Input.GetKey(KeyCode.J))
  4965. {
  4966. Vector3 vector = maid.transform.position;
  4967. vector += new Vector3(vector2.x, 0f, vector2.z) * -0.0075f * speed;
  4968. vector += new Vector3(vector3.x, 0f, vector3.z) * -0.0075f * speed;
  4969. maid.SetPos(vector);
  4970. flag14 = true;
  4971. }
  4972. else if (Input.GetKey(KeyCode.Z) && Input.GetKey(KeyCode.K) && Input.GetKey(KeyCode.L))
  4973. {
  4974. Vector3 vector = maid.transform.position;
  4975. vector += new Vector3(vector2.x, 0f, vector2.z) * -0.0075f * speed;
  4976. vector += new Vector3(vector3.x, 0f, vector3.z) * 0.0075f * speed;
  4977. maid.SetPos(vector);
  4978. flag14 = true;
  4979. }
  4980. else if (Input.GetKey(KeyCode.Z) && Input.GetKey(KeyCode.I))
  4981. {
  4982. Vector3 vector = maid.transform.position;
  4983. vector += new Vector3(vector2.x, 0f, vector2.z) * 0.0075f * speed;
  4984. maid.SetPos(vector);
  4985. flag14 = true;
  4986. }
  4987. else if (Input.GetKey(KeyCode.Z) && Input.GetKey(KeyCode.K))
  4988. {
  4989. Vector3 vector = maid.transform.position;
  4990. vector += new Vector3(vector2.x, 0f, vector2.z) * -0.0075f * speed;
  4991. maid.SetPos(vector);
  4992. flag14 = true;
  4993. }
  4994. else if (Input.GetKey(KeyCode.Z) && Input.GetKey(KeyCode.J))
  4995. {
  4996. Vector3 vector = maid.transform.position;
  4997. vector += new Vector3(vector3.x, 0f, vector3.z) * -0.0075f * speed;
  4998. maid.SetPos(vector);
  4999. flag14 = true;
  5000. }
  5001. else if (Input.GetKey(KeyCode.Z) && Input.GetKey(KeyCode.L))
  5002. {
  5003. Vector3 vector = maid.transform.position;
  5004. vector += new Vector3(vector3.x, 0f, vector3.z) * 0.0075f * speed;
  5005. maid.SetPos(vector);
  5006. flag14 = true;
  5007. }
  5008. else if ((Input.GetKey(KeyCode.Z) || Input.GetKey(KeyCode.X)) && Input.GetKey(KeyCode.Alpha0))
  5009. {
  5010. Vector3 vector = maid.transform.position;
  5011. vector.y += 0.0075f * speed;
  5012. maid.SetPos(vector);
  5013. flag14 = true;
  5014. }
  5015. else if ((Input.GetKey(KeyCode.Z) || Input.GetKey(KeyCode.X)) && Input.GetKey(KeyCode.P))
  5016. {
  5017. Vector3 vector = maid.transform.position;
  5018. vector.y -= 0.0075f * speed;
  5019. maid.SetPos(vector);
  5020. flag14 = true;
  5021. }
  5022. else if (Input.GetKey(KeyCode.C) && Input.GetKey(KeyCode.I))
  5023. {
  5024. maid.transform.localScale =
  5025. new Vector3(maid.transform.localScale.x * 1.005f,
  5026. maid.transform.localScale.y * 1.005f,
  5027. maid.transform.localScale.z * 1.005f);
  5028. flag14 = true;
  5029. }
  5030. else if (Input.GetKey(KeyCode.C) && Input.GetKey(KeyCode.K))
  5031. {
  5032. maid.transform.localScale =
  5033. new Vector3(maid.transform.localScale.x * 0.995f,
  5034. maid.transform.localScale.y * 0.995f,
  5035. maid.transform.localScale.z * 0.995f);
  5036. flag14 = true;
  5037. }
  5038. else if (Input.GetKey(KeyCode.C) && Input.GetKey(KeyCode.BackQuote))
  5039. {
  5040. maid.transform.localScale = new Vector3(1f, 1f, 1f);
  5041. flag14 = true;
  5042. }
  5043. }
  5044. if (!flag14 && (ikBui != 5 || (ikBui == 5 && (ikMode[i] == 4 || ikMode[i] == 6 || ikMode[i] == 7)))
  5045. && !Input.GetKey(KeyCode.V) && !Input.GetKey(KeyCode.A) && !Input.GetKey(KeyCode.Q)
  5046. && i == ikMaid)
  5047. {
  5048. if (Input.GetKey(KeyCode.I))
  5049. {
  5050. if (ikMode[i] == 0)
  5051. {
  5052. Vector3 vector5 = HandL.position;
  5053. vector5 += new Vector3(vector2.x, 0f, vector2.z) * 0.004f;
  5054. ikLeftArm.Init(UpperArmL, ForearmL, HandL, maidArray[i].body0);
  5055. ikLeftArm.Porc(UpperArmL, ForearmL, HandL, vector5, default(Vector3));
  5056. }
  5057. else if (ikMode[i] == 2)
  5058. {
  5059. Vector3 vector5 = HandL.position;
  5060. vector5 += new Vector3(vector2.x, 0f, vector2.z) * 0.004f;
  5061. ikLeftArm.Init(ForearmL, ForearmL, HandL, maidArray[i].body0);
  5062. ikLeftArm.Porc(ForearmL, ForearmL, HandL, vector5, default(Vector3));
  5063. }
  5064. else if (ikMode[i] == 3)
  5065. {
  5066. if (ikBui == 1 || ikBui == 2)
  5067. {
  5068. HandL.RotateAround(HandL.position, new Vector3(vector3.x, 0f, vector3.z), 0.8f);
  5069. }
  5070. else
  5071. {
  5072. HandL.RotateAround(HandL.position, new Vector3(vector3.x, 0f, vector3.z), -0.8f);
  5073. }
  5074. }
  5075. else if (ikMode[i] == 4)
  5076. {
  5077. Head.RotateAround(Head.position, new Vector3(vector3.x, 0f, vector3.z), 0.4f);
  5078. }
  5079. else if (ikMode[i] == 8)
  5080. {
  5081. IK_hand.RotateAround(IK_hand.position, new Vector3(vector3.x, 0f, vector3.z), 0.6f);
  5082. }
  5083. else if (ikMode[i] == 6)
  5084. {
  5085. Spine1a.RotateAround(Spine1a.position, new Vector3(vector3.x, 0f, vector3.z), 0.03f);
  5086. Spine1.RotateAround(Spine1.position, new Vector3(vector3.x, 0f, vector3.z), 0.1f);
  5087. Spine0a.RotateAround(Spine0a.position, new Vector3(vector3.x, 0f, vector3.z), 0.09f);
  5088. Spine.RotateAround(Spine.position, new Vector3(vector3.x, 0f, vector3.z), 0.07f);
  5089. }
  5090. else if (ikMode[i] == 7)
  5091. {
  5092. Pelvis.RotateAround(Pelvis.position, new Vector3(vector3.x, 0f, vector3.z), -0.2f);
  5093. }
  5094. else if (ikMode[i] == 5)
  5095. {
  5096. Vector3 vector5 = ForearmL.position;
  5097. vector5 += new Vector3(vector2.x, 0f, vector2.z) * 0.0035f;
  5098. ikLeftArm.Init(Clavicle, UpperArmL, ForearmL, maidArray[i].body0);
  5099. ikLeftArm.Porc(Clavicle, UpperArmL, ForearmL, vector5, default(Vector3));
  5100. }
  5101. else
  5102. {
  5103. Vector3 vector5 = ForearmL.position;
  5104. vector5 += new Vector3(vector2.x, 0f, vector2.z) * 0.0035f;
  5105. ikLeftArm.Init(UpperArmL, UpperArmL, ForearmL, maidArray[i].body0);
  5106. ikLeftArm.Porc(UpperArmL, UpperArmL, ForearmL, vector5, default(Vector3));
  5107. }
  5108. isStop[i] = true;
  5109. isLock[i] = true;
  5110. }
  5111. else if (Input.GetKey(KeyCode.K))
  5112. {
  5113. if (ikMode[i] == 0)
  5114. {
  5115. Vector3 vector5 = HandL.position;
  5116. vector5 += new Vector3(vector2.x, 0f, vector2.z) * -0.004f;
  5117. ikLeftArm.Init(UpperArmL, ForearmL, HandL, maidArray[i].body0);
  5118. ikLeftArm.Porc(UpperArmL, ForearmL, HandL, vector5, default(Vector3));
  5119. }
  5120. else if (ikMode[i] == 2)
  5121. {
  5122. Vector3 vector5 = HandL.position;
  5123. vector5 += new Vector3(vector2.x, 0f, vector2.z) * -0.004f;
  5124. ikLeftArm.Init(ForearmL, ForearmL, HandL, maidArray[i].body0);
  5125. ikLeftArm.Porc(ForearmL, ForearmL, HandL, vector5, default(Vector3));
  5126. }
  5127. else if (ikMode[i] == 3)
  5128. {
  5129. if (ikBui == 1 || ikBui == 2)
  5130. {
  5131. HandL.RotateAround(HandL.position, new Vector3(vector3.x, 0f, vector3.z), -0.8f);
  5132. }
  5133. else
  5134. {
  5135. HandL.RotateAround(HandL.position, new Vector3(vector3.x, 0f, vector3.z), 0.8f);
  5136. }
  5137. }
  5138. else if (ikMode[i] == 4)
  5139. {
  5140. Head.RotateAround(Head.position, new Vector3(vector3.x, 0f, vector3.z), -0.4f);
  5141. }
  5142. else if (ikMode[i] == 8)
  5143. {
  5144. IK_hand.RotateAround(IK_hand.position, new Vector3(vector3.x, 0f, vector3.z), -0.6f);
  5145. }
  5146. else if (ikMode[i] == 6)
  5147. {
  5148. Spine1a.RotateAround(Spine1a.position, new Vector3(vector3.x, 0f, vector3.z), -0.03f);
  5149. Spine1.RotateAround(Spine1.position, new Vector3(vector3.x, 0f, vector3.z), -0.1f);
  5150. Spine0a.RotateAround(Spine0a.position, new Vector3(vector3.x, 0f, vector3.z), -0.09f);
  5151. Spine.RotateAround(Spine.position, new Vector3(vector3.x, 0f, vector3.z), -0.07f);
  5152. }
  5153. else if (ikMode[i] == 7)
  5154. {
  5155. Pelvis.RotateAround(Pelvis.position, new Vector3(vector3.x, 0f, vector3.z), 0.2f);
  5156. }
  5157. else if (ikMode[i] == 5)
  5158. {
  5159. Vector3 vector5 = ForearmL.position;
  5160. vector5 += new Vector3(vector2.x, 0f, vector2.z) * -0.0035f;
  5161. ikLeftArm.Init(Clavicle, UpperArmL, ForearmL, maidArray[i].body0);
  5162. ikLeftArm.Porc(Clavicle, UpperArmL, ForearmL, vector5, default(Vector3));
  5163. }
  5164. else
  5165. {
  5166. Vector3 vector5 = ForearmL.position;
  5167. vector5 += new Vector3(vector2.x, 0f, vector2.z) * -0.0035f;
  5168. ikLeftArm.Init(UpperArmL, UpperArmL, ForearmL, maidArray[i].body0);
  5169. ikLeftArm.Porc(UpperArmL, UpperArmL, ForearmL, vector5, default(Vector3));
  5170. }
  5171. isStop[i] = true;
  5172. isLock[i] = true;
  5173. }
  5174. else if (Input.GetKey(KeyCode.J))
  5175. {
  5176. if (ikMode[i] == 0)
  5177. {
  5178. Vector3 vector5 = HandL.position;
  5179. vector5 += new Vector3(vector3.x, 0f, vector3.z) * -0.004f;
  5180. ikLeftArm.Init(UpperArmL, ForearmL, HandL, maidArray[i].body0);
  5181. ikLeftArm.Porc(UpperArmL, ForearmL, HandL, vector5, default(Vector3));
  5182. }
  5183. else if (ikMode[i] == 2)
  5184. {
  5185. Vector3 vector5 = HandL.position;
  5186. vector5 += new Vector3(vector3.x, 0f, vector3.z) * -0.004f;
  5187. ikLeftArm.Init(ForearmL, ForearmL, HandL, maidArray[i].body0);
  5188. ikLeftArm.Porc(ForearmL, ForearmL, HandL, vector5, default(Vector3));
  5189. }
  5190. else if (ikMode[i] == 3)
  5191. {
  5192. if (ikBui == 1 || ikBui == 2)
  5193. {
  5194. HandL.RotateAround(HandL.position, new Vector3(vector2.x, 0f, vector2.z), 0.8f);
  5195. }
  5196. else
  5197. {
  5198. HandL.RotateAround(HandL.position, new Vector3(vector2.x, 0f, vector2.z), -0.8f);
  5199. }
  5200. }
  5201. else if (ikMode[i] == 4)
  5202. {
  5203. Head.RotateAround(Head.position, new Vector3(vector2.x, 0f, vector2.z), 0.4f);
  5204. }
  5205. else if (ikMode[i] == 8)
  5206. {
  5207. IK_hand.RotateAround(IK_hand.position, new Vector3(vector2.x, 0f, vector2.z), 0.6f);
  5208. }
  5209. else if (ikMode[i] == 6)
  5210. {
  5211. Spine1a.RotateAround(Spine1a.position, new Vector3(vector2.x, 0f, vector2.z), 0.03f);
  5212. Spine1.RotateAround(Spine1.position, new Vector3(vector2.x, 0f, vector2.z), 0.1f);
  5213. Spine0a.RotateAround(Spine0a.position, new Vector3(vector2.x, 0f, vector2.z), 0.09f);
  5214. Spine.RotateAround(Spine.position, new Vector3(vector2.x, 0f, vector2.z), 0.07f);
  5215. }
  5216. else if (ikMode[i] == 7)
  5217. {
  5218. Pelvis.RotateAround(Pelvis.position, new Vector3(vector2.x, 0f, vector2.z), -0.2f);
  5219. }
  5220. else if (ikMode[i] == 5)
  5221. {
  5222. Vector3 vector5 = ForearmL.position;
  5223. vector5 += new Vector3(vector3.x, 0f, vector3.z) * -0.0035f;
  5224. ikLeftArm.Init(Clavicle, UpperArmL, ForearmL, maidArray[i].body0);
  5225. ikLeftArm.Porc(Clavicle, UpperArmL, ForearmL, vector5, default(Vector3));
  5226. }
  5227. else
  5228. {
  5229. Vector3 vector5 = ForearmL.position;
  5230. vector5 += new Vector3(vector3.x, 0f, vector3.z) * -0.0035f;
  5231. ikLeftArm.Init(UpperArmL, UpperArmL, ForearmL, maidArray[i].body0);
  5232. ikLeftArm.Porc(UpperArmL, UpperArmL, ForearmL, vector5, default(Vector3));
  5233. }
  5234. isStop[i] = true;
  5235. isLock[i] = true;
  5236. }
  5237. else if (Input.GetKey(KeyCode.L))
  5238. {
  5239. if (ikMode[i] == 0)
  5240. {
  5241. Vector3 vector5 = HandL.position;
  5242. vector5 += new Vector3(vector3.x, 0f, vector3.z) * 0.004f;
  5243. ikLeftArm.Init(UpperArmL, ForearmL, HandL, maidArray[i].body0);
  5244. ikLeftArm.Porc(UpperArmL, ForearmL, HandL, vector5, default(Vector3));
  5245. }
  5246. else if (ikMode[i] == 2)
  5247. {
  5248. Vector3 vector5 = HandL.position;
  5249. vector5 += new Vector3(vector3.x, 0f, vector3.z) * 0.004f;
  5250. ikLeftArm.Init(ForearmL, ForearmL, HandL, maidArray[i].body0);
  5251. ikLeftArm.Porc(ForearmL, ForearmL, HandL, vector5, default(Vector3));
  5252. }
  5253. else if (ikMode[i] == 3)
  5254. {
  5255. if (ikBui == 1 || ikBui == 2)
  5256. {
  5257. HandL.RotateAround(HandL.position, new Vector3(vector2.x, 0f, vector2.z), -0.8f);
  5258. }
  5259. else
  5260. {
  5261. HandL.RotateAround(HandL.position, new Vector3(vector2.x, 0f, vector2.z), 0.8f);
  5262. }
  5263. }
  5264. else if (ikMode[i] == 4)
  5265. {
  5266. Head.RotateAround(Head.position, new Vector3(vector2.x, 0f, vector2.z), -0.4f);
  5267. }
  5268. else if (ikMode[i] == 8)
  5269. {
  5270. IK_hand.RotateAround(IK_hand.position, new Vector3(vector2.x, 0f, vector2.z), -0.6f);
  5271. }
  5272. else if (ikMode[i] == 6)
  5273. {
  5274. Spine1a.RotateAround(Spine1a.position, new Vector3(vector2.x, 0f, vector2.z), -0.03f);
  5275. Spine1.RotateAround(Spine1.position, new Vector3(vector2.x, 0f, vector2.z), -0.1f);
  5276. Spine0a.RotateAround(Spine0a.position, new Vector3(vector2.x, 0f, vector2.z), -0.09f);
  5277. Spine.RotateAround(Spine.position, new Vector3(vector2.x, 0f, vector2.z), -0.07f);
  5278. }
  5279. else if (ikMode[i] == 7)
  5280. {
  5281. Pelvis.RotateAround(Pelvis.position, new Vector3(vector2.x, 0f, vector2.z), 0.2f);
  5282. }
  5283. else if (ikMode[i] == 5)
  5284. {
  5285. Vector3 vector5 = ForearmL.position;
  5286. vector5 += new Vector3(vector3.x, 0f, vector3.z) * 0.0035f;
  5287. ikLeftArm.Init(Clavicle, UpperArmL, ForearmL, maidArray[i].body0);
  5288. ikLeftArm.Porc(Clavicle, UpperArmL, ForearmL, vector5, default(Vector3));
  5289. }
  5290. else
  5291. {
  5292. Vector3 vector5 = ForearmL.position;
  5293. vector5 += new Vector3(vector3.x, 0f, vector3.z) * 0.0035f;
  5294. ikLeftArm.Init(UpperArmL, UpperArmL, ForearmL, maidArray[i].body0);
  5295. ikLeftArm.Porc(UpperArmL, UpperArmL, ForearmL, vector5, default(Vector3));
  5296. }
  5297. isStop[i] = true;
  5298. isLock[i] = true;
  5299. }
  5300. else if (Input.GetKey(KeyCode.U))
  5301. {
  5302. if (ikMode[i] == 3)
  5303. {
  5304. HandL.localRotation =
  5305. Quaternion.Euler(HandL.localEulerAngles)
  5306. * Quaternion.AngleAxis(1f, Vector3.right);
  5307. isStop[i] = true;
  5308. isLock[i] = true;
  5309. }
  5310. else if (ikMode[i] == 4)
  5311. {
  5312. Head.RotateAround(Head.position, Vector3.up, -0.7f);
  5313. isStop[i] = true;
  5314. isLock[i] = true;
  5315. }
  5316. else if (ikMode[i] == 8)
  5317. {
  5318. IK_hand.RotateAround(IK_hand.position, Vector3.up, -0.7f);
  5319. isStop[i] = true;
  5320. isLock[i] = true;
  5321. }
  5322. else if (ikMode[i] == 6)
  5323. {
  5324. Spine1a.RotateAround(Spine1a.position, Vector3.up, -0.084f);
  5325. Spine0a.RotateAround(Spine0a.position, Vector3.up, -0.156f);
  5326. Spine.RotateAround(Spine.position, Vector3.up, -0.156f);
  5327. isStop[i] = true;
  5328. isLock[i] = true;
  5329. }
  5330. else if (ikMode[i] == 7)
  5331. {
  5332. Pelvis.RotateAround(Pelvis.position, Vector3.up, 0.4f);
  5333. isStop[i] = true;
  5334. isLock[i] = true;
  5335. }
  5336. else if ((ikMode[i] == 0 || ikMode[i] == 1 || ikMode[i] == 2) && (ikBui == 3 || ikBui == 4))
  5337. {
  5338. UpperArmL.localRotation =
  5339. Quaternion.Euler(UpperArmL.localEulerAngles)
  5340. * Quaternion.AngleAxis(0.5f, Vector3.right);
  5341. isStop[i] = true;
  5342. isLock[i] = true;
  5343. }
  5344. else if ((ikMode[i] == 0 || ikMode[i] == 1 || ikMode[i] == 2) && (ikBui == 1 || ikBui == 2))
  5345. {
  5346. UpperArmL.RotateAround(UpperArmL.position, Vector3.right, 0.5f);
  5347. isStop[i] = true;
  5348. isLock[i] = true;
  5349. }
  5350. }
  5351. else if (Input.GetKey(KeyCode.O))
  5352. {
  5353. if (ikMode[i] == 3)
  5354. {
  5355. HandL.localRotation =
  5356. Quaternion.Euler(HandL.localEulerAngles)
  5357. * Quaternion.AngleAxis(-1f, Vector3.right);
  5358. isStop[i] = true;
  5359. isLock[i] = true;
  5360. }
  5361. else if (ikMode[i] == 4)
  5362. {
  5363. Head.RotateAround(Head.position, Vector3.up, 0.7f);
  5364. isStop[i] = true;
  5365. isLock[i] = true;
  5366. }
  5367. else if (ikMode[i] == 8)
  5368. {
  5369. IK_hand.RotateAround(IK_hand.position, Vector3.up, 0.7f);
  5370. isStop[i] = true;
  5371. isLock[i] = true;
  5372. }
  5373. else if (ikMode[i] == 6)
  5374. {
  5375. Spine1a.RotateAround(Spine1a.position, Vector3.up, 0.084f);
  5376. Spine0a.RotateAround(Spine0a.position, Vector3.up, 0.156f);
  5377. Spine.RotateAround(Spine.position, Vector3.up, 0.156f);
  5378. isStop[i] = true;
  5379. isLock[i] = true;
  5380. }
  5381. else if (ikMode[i] == 7)
  5382. {
  5383. Pelvis.RotateAround(Pelvis.position, Vector3.up, -0.4f);
  5384. isStop[i] = true;
  5385. isLock[i] = true;
  5386. }
  5387. else if ((ikMode[i] == 0 || ikMode[i] == 1 || ikMode[i] == 2) && (ikBui == 3 || ikBui == 4))
  5388. {
  5389. UpperArmL.localRotation =
  5390. Quaternion.Euler(UpperArmL.localEulerAngles)
  5391. * Quaternion.AngleAxis(-0.5f, Vector3.right);
  5392. isStop[i] = true;
  5393. isLock[i] = true;
  5394. }
  5395. else if ((ikMode[i] == 0 || ikMode[i] == 1 || ikMode[i] == 2) && (ikBui == 1 || ikBui == 2))
  5396. {
  5397. UpperArmL.RotateAround(UpperArmL.position, Vector3.right, -0.5f);
  5398. isStop[i] = true;
  5399. isLock[i] = true;
  5400. }
  5401. }
  5402. else if (Input.GetKey(KeyCode.Alpha0))
  5403. {
  5404. if (ikMode[i] == 0)
  5405. {
  5406. Vector3 vector5 = HandL.position;
  5407. vector5.y += 0.005f;
  5408. ikLeftArm.Init(UpperArmL, HandL, HandL, maidArray[i].body0);
  5409. ikLeftArm.Porc(UpperArmL, HandL, HandL, vector5, default(Vector3));
  5410. }
  5411. else if (ikMode[i] == 2)
  5412. {
  5413. Vector3 vector5 = HandL.position;
  5414. vector5.y += 0.005f;
  5415. ikLeftArm.Init(ForearmL, ForearmL, HandL, maidArray[i].body0);
  5416. ikLeftArm.Porc(ForearmL, ForearmL, HandL, vector5, default(Vector3));
  5417. }
  5418. else if (ikMode[i] == 5)
  5419. {
  5420. Vector3 vector5 = ForearmL.position;
  5421. vector5.y += 0.0035f;
  5422. ikLeftArm.Init(Clavicle, UpperArmL, ForearmL, maidArray[i].body0);
  5423. ikLeftArm.Porc(Clavicle, UpperArmL, ForearmL, vector5, default(Vector3));
  5424. }
  5425. else
  5426. {
  5427. Vector3 vector5 = ForearmL.position;
  5428. vector5.y += 0.0035f;
  5429. ikLeftArm.Init(UpperArmL, UpperArmL, ForearmL, maidArray[i].body0);
  5430. ikLeftArm.Porc(UpperArmL, UpperArmL, ForearmL, vector5, default(Vector3));
  5431. }
  5432. isStop[i] = true;
  5433. isLock[i] = true;
  5434. }
  5435. else if (Input.GetKey(KeyCode.P))
  5436. {
  5437. if (ikMode[i] == 0)
  5438. {
  5439. Vector3 vector5 = HandL.position;
  5440. vector5.y -= 0.005f;
  5441. ikLeftArm.Init(UpperArmL, HandL, HandL, maidArray[i].body0);
  5442. ikLeftArm.Porc(UpperArmL, HandL, HandL, vector5, default(Vector3));
  5443. }
  5444. else if (ikMode[i] == 2)
  5445. {
  5446. Vector3 vector5 = HandL.position;
  5447. vector5.y -= 0.005f;
  5448. ikLeftArm.Init(ForearmL, ForearmL, HandL, maidArray[i].body0);
  5449. ikLeftArm.Porc(ForearmL, ForearmL, HandL, vector5, default(Vector3));
  5450. }
  5451. else if (ikMode[i] == 5)
  5452. {
  5453. Vector3 vector5 = ForearmL.position;
  5454. vector5.y -= 0.0035f;
  5455. ikLeftArm.Init(Clavicle, UpperArmL, ForearmL, maidArray[i].body0);
  5456. ikLeftArm.Porc(Clavicle, UpperArmL, ForearmL, vector5, default(Vector3));
  5457. }
  5458. else
  5459. {
  5460. Vector3 vector5 = ForearmL.position;
  5461. vector5.y -= 0.0035f;
  5462. ikLeftArm.Init(UpperArmL, UpperArmL, ForearmL, maidArray[i].body0);
  5463. ikLeftArm.Porc(UpperArmL, UpperArmL, ForearmL, vector5, default(Vector3));
  5464. }
  5465. isStop[i] = true;
  5466. isLock[i] = true;
  5467. }
  5468. }
  5469. }
  5470. }
  5471. }
  5472. }
  5473. else if (Input.GetKey(key) && Input.GetKey(KeyCode.LeftBracket) && this.getModKeyPressing(modKey.Shift))
  5474. {
  5475. maid.transform.RotateAround(maid.transform.position, Vector3.up, -0.75f);
  5476. idoFlg[i] = true;
  5477. }
  5478. else if (Input.GetKey(key) && Input.GetKey(KeyCode.LeftBracket))
  5479. {
  5480. maid.transform.RotateAround(maid.transform.position, Vector3.up, 0.75f);
  5481. idoFlg[i] = true;
  5482. }
  5483. else if (Input.GetKey(key) && Input.GetKeyDown(KeyCode.DownArrow) && this.getModKeyPressing(modKey.Shift))
  5484. {
  5485. if (!xFlg[i])
  5486. {
  5487. xFlg[i] = true;
  5488. zFlg[i] = false;
  5489. if (maid.status.personal.uniqueName == "Pride")
  5490. {
  5491. string text = "s0_";
  5492. Random random = new Random();
  5493. int num4 = random.Next(10000);
  5494. bool flag7 = false;
  5495. for (int k = 0; k < tunArray.Length; k++)
  5496. {
  5497. if (tunArray[k] == num4)
  5498. {
  5499. flag7 = true;
  5500. break;
  5501. }
  5502. }
  5503. if (!flag7)
  5504. {
  5505. text = text + "0" + num4.ToString() + ".ogg";
  5506. if (GameUty.FileSystem.IsExistentFile(text))
  5507. {
  5508. maid.AudioMan.LoadPlay(text, 0f, false, false);
  5509. }
  5510. }
  5511. }
  5512. if (maid.status.personal.uniqueName == "Cool")
  5513. {
  5514. string text = "s1_";
  5515. Random random = new Random();
  5516. int num4 = random.Next(10000);
  5517. bool flag7 = false;
  5518. for (int k = 0; k < coolArray.Length; k++)
  5519. {
  5520. if (coolArray[k] == num4)
  5521. {
  5522. flag7 = true;
  5523. break;
  5524. }
  5525. }
  5526. if (!flag7)
  5527. {
  5528. text = text + "0" + num4.ToString() + ".ogg";
  5529. if (GameUty.FileSystem.IsExistentFile(text))
  5530. {
  5531. maid.AudioMan.LoadPlay(text, 0f, false, false);
  5532. }
  5533. }
  5534. }
  5535. if (maid.status.personal.uniqueName == "Pure")
  5536. {
  5537. string text = "s2_";
  5538. Random random = new Random();
  5539. int num4 = random.Next(10000);
  5540. bool flag7 = false;
  5541. for (int k = 0; k < pureArray.Length; k++)
  5542. {
  5543. if (pureArray[k] == num4)
  5544. {
  5545. flag7 = true;
  5546. break;
  5547. }
  5548. }
  5549. if (!flag7)
  5550. {
  5551. text = text + "0" + num4.ToString() + ".ogg";
  5552. if (GameUty.FileSystem.IsExistentFile(text))
  5553. {
  5554. maid.AudioMan.LoadPlay(text, 0f, false, false);
  5555. }
  5556. }
  5557. }
  5558. if (maid.status.personal.uniqueName == "Yandere")
  5559. {
  5560. string text = "s3_";
  5561. Random random = new Random();
  5562. int num4 = random.Next(10000);
  5563. bool flag7 = false;
  5564. for (int k = 0; k < yanArray.Length; k++)
  5565. {
  5566. if (yanArray[k] == num4)
  5567. {
  5568. flag7 = true;
  5569. break;
  5570. }
  5571. }
  5572. if (!flag7)
  5573. {
  5574. text = text + string.Format("{0:00000}", num4) + ".ogg";
  5575. if (GameUty.FileSystem.IsExistentFile(text))
  5576. {
  5577. maid.AudioMan.LoadPlay(text, 0f, false, false);
  5578. }
  5579. }
  5580. }
  5581. if (maid.status.personal.uniqueName == "Muku")
  5582. {
  5583. string text = "h0_";
  5584. Random random = new Random();
  5585. int num4 = random.Next(10000);
  5586. bool flag7 = false;
  5587. for (int k = 0; k < h0Array.Length; k++)
  5588. {
  5589. if (h0Array[k] == num4)
  5590. {
  5591. flag7 = true;
  5592. break;
  5593. }
  5594. }
  5595. if (flag7)
  5596. {
  5597. text = text + string.Format("{0:00000}", num4) + ".ogg";
  5598. if (GameUty.FileSystem.IsExistentFile(text))
  5599. {
  5600. maid.AudioMan.LoadPlay(text, 0f, false, false);
  5601. }
  5602. }
  5603. }
  5604. if (maid.status.personal.uniqueName == "Majime")
  5605. {
  5606. string text = "h1_";
  5607. Random random = new Random();
  5608. int num4 = random.Next(10000);
  5609. bool flag7 = false;
  5610. for (int k = 0; k < h1Array.Length; k++)
  5611. {
  5612. if (h1Array[k] == num4)
  5613. {
  5614. flag7 = true;
  5615. break;
  5616. }
  5617. }
  5618. if (flag7)
  5619. {
  5620. text = text + string.Format("{0:00000}", num4) + ".ogg";
  5621. if (GameUty.FileSystem.IsExistentFile(text))
  5622. {
  5623. maid.AudioMan.LoadPlay(text, 0f, false, false);
  5624. }
  5625. }
  5626. }
  5627. if (maid.status.personal.uniqueName == "Rindere")
  5628. {
  5629. string text = "h2_";
  5630. Random random = new Random();
  5631. int num4 = random.Next(10000);
  5632. bool flag7 = false;
  5633. for (int k = 0; k < h2Array.Length; k++)
  5634. {
  5635. if (h2Array[k] == num4)
  5636. {
  5637. flag7 = true;
  5638. break;
  5639. }
  5640. }
  5641. if (flag7)
  5642. {
  5643. text = text + string.Format("{0:00000}", num4) + ".ogg";
  5644. if (GameUty.FileSystem.IsExistentFile(text))
  5645. {
  5646. maid.AudioMan.LoadPlay(text, 0f, false, false);
  5647. }
  5648. }
  5649. }
  5650. }
  5651. else
  5652. {
  5653. xFlg[i] = false;
  5654. maid.AudioMan.Clear();
  5655. }
  5656. idoFlg[i] = true;
  5657. }
  5658. else if (Input.GetKey(key) && Input.GetKeyDown(KeyCode.UpArrow) && this.getModKeyPressing(modKey.Shift))
  5659. {
  5660. if (!zFlg[i])
  5661. {
  5662. zFlg[i] = true;
  5663. xFlg[i] = false;
  5664. string text = "";
  5665. if (maid.status.personal.uniqueName == "Pride")
  5666. {
  5667. text = "s0_";
  5668. Random random = new Random();
  5669. int num4 = random.Next(tunArray.Length);
  5670. object obj = text;
  5671. text = string.Concat(new object[] {obj, "0", tunArray[num4], ".ogg"});
  5672. }
  5673. if (maid.status.personal.uniqueName == "Cool")
  5674. {
  5675. text = "s1_";
  5676. Random random = new Random();
  5677. int num4 = random.Next(coolArray.Length);
  5678. object obj = text;
  5679. text = string.Concat(new object[] {obj, "0", coolArray[num4], ".ogg"});
  5680. }
  5681. if (maid.status.personal.uniqueName == "Pure")
  5682. {
  5683. text = "s2_";
  5684. Random random = new Random();
  5685. int num4 = random.Next(pureArray.Length);
  5686. object obj = text;
  5687. text = string.Concat(new object[] {obj, "0", pureArray[num4], ".ogg"});
  5688. }
  5689. if (maid.status.personal.uniqueName == "Yandere")
  5690. {
  5691. text = "s3_";
  5692. Random random = new Random();
  5693. int num4 = random.Next(yanArray.Length);
  5694. text = text + string.Format("{0:00000}", yanArray[num4]) + ".ogg";
  5695. }
  5696. if (maid.status.personal.uniqueName == "Muku")
  5697. {
  5698. text = "h0_";
  5699. Random random = new Random();
  5700. int num4 = random.Next(h0tArray.Length);
  5701. text = text + string.Format("{0:00000}", h0tArray[num4]) + ".ogg";
  5702. }
  5703. if (maid.status.personal.uniqueName == "Majime")
  5704. {
  5705. text = "h1_";
  5706. Random random = new Random();
  5707. int num4 = random.Next(h1tArray.Length);
  5708. text = text + string.Format("{0:00000}", h1tArray[num4]) + ".ogg";
  5709. }
  5710. if (maid.status.personal.uniqueName == "Rindere")
  5711. {
  5712. text = "h2_";
  5713. Random random = new Random();
  5714. int num4 = random.Next(h2tArray.Length);
  5715. text = text + string.Format("{0:00000}", h2tArray[num4]) + ".ogg";
  5716. }
  5717. maid.AudioMan.LoadPlay(text, 0f, false, false);
  5718. }
  5719. else
  5720. {
  5721. zFlg[i] = false;
  5722. maid.AudioMan.Clear();
  5723. }
  5724. idoFlg[i] = true;
  5725. }
  5726. else if (Input.GetKey(key) && Input.GetKeyDown(KeyCode.UpArrow))
  5727. {
  5728. string text = "";
  5729. if (maid.status.personal.uniqueName == "Pride")
  5730. {
  5731. text = "s0_";
  5732. Random random = new Random();
  5733. int num4 = random.Next(tunArray.Length);
  5734. object obj = text;
  5735. text = string.Concat(new object[] {obj, "0", tunArray[num4], ".ogg"});
  5736. }
  5737. if (maid.status.personal.uniqueName == "Cool")
  5738. {
  5739. text = "s1_";
  5740. Random random = new Random();
  5741. int num4 = random.Next(coolArray.Length);
  5742. object obj = text;
  5743. text = string.Concat(new object[] {obj, "0", coolArray[num4], ".ogg"});
  5744. }
  5745. if (maid.status.personal.uniqueName == "Pure")
  5746. {
  5747. text = "s2_";
  5748. Random random = new Random();
  5749. int num4 = random.Next(pureArray.Length);
  5750. object obj = text;
  5751. text = string.Concat(new object[] {obj, "0", pureArray[num4], ".ogg"});
  5752. }
  5753. if (maid.status.personal.uniqueName == "Yandere")
  5754. {
  5755. text = "s3_";
  5756. Random random = new Random();
  5757. int num4 = random.Next(yanArray.Length);
  5758. text = text + string.Format("{0:00000}", yanArray[num4]) + ".ogg";
  5759. }
  5760. if (maid.status.personal.uniqueName == "Muku")
  5761. {
  5762. text = "h0_";
  5763. Random random = new Random();
  5764. int num4 = random.Next(h0tArray.Length);
  5765. text = text + string.Format("{0:00000}", h0tArray[num4]) + ".ogg";
  5766. }
  5767. if (maid.status.personal.uniqueName == "Majime")
  5768. {
  5769. text = "h1_";
  5770. Random random = new Random();
  5771. int num4 = random.Next(h1tArray.Length);
  5772. text = text + string.Format("{0:00000}", h1tArray[num4]) + ".ogg";
  5773. }
  5774. if (maid.status.personal.uniqueName == "Rindere")
  5775. {
  5776. text = "h2_";
  5777. Random random = new Random();
  5778. int num4 = random.Next(h2tArray.Length);
  5779. text = text + string.Format("{0:00000}", h2tArray[num4]) + ".ogg";
  5780. }
  5781. maid.AudioMan.LoadPlay(text, 0f, false, false);
  5782. idoFlg[i] = true;
  5783. }
  5784. else if (Input.GetKey(key) && Input.GetKey(KeyCode.DownArrow))
  5785. {
  5786. if (maid.status.personal.uniqueName == "Pride")
  5787. {
  5788. string text = "s0_";
  5789. Random random = new Random();
  5790. int num4 = random.Next(10000);
  5791. bool flag7 = false;
  5792. for (int k = 0; k < tunArray.Length; k++)
  5793. {
  5794. if (tunArray[k] == num4)
  5795. {
  5796. flag7 = true;
  5797. break;
  5798. }
  5799. }
  5800. if (!flag7)
  5801. {
  5802. text = text + "0" + num4.ToString() + ".ogg";
  5803. if (GameUty.FileSystem.IsExistentFile(text))
  5804. {
  5805. maid.AudioMan.LoadPlay(text, 0f, false, false);
  5806. }
  5807. }
  5808. }
  5809. if (maid.status.personal.uniqueName == "Cool")
  5810. {
  5811. string text = "s1_";
  5812. Random random = new Random();
  5813. int num4 = random.Next(10000);
  5814. bool flag7 = false;
  5815. for (int k = 0; k < coolArray.Length; k++)
  5816. {
  5817. if (coolArray[k] == num4)
  5818. {
  5819. flag7 = true;
  5820. break;
  5821. }
  5822. }
  5823. if (!flag7)
  5824. {
  5825. text = text + "0" + num4.ToString() + ".ogg";
  5826. if (GameUty.FileSystem.IsExistentFile(text))
  5827. {
  5828. maid.AudioMan.LoadPlay(text, 0f, false, false);
  5829. }
  5830. }
  5831. }
  5832. if (maid.status.personal.uniqueName == "Pure")
  5833. {
  5834. string text = "s2_";
  5835. Random random = new Random();
  5836. int num4 = random.Next(10000);
  5837. bool flag7 = false;
  5838. for (int k = 0; k < pureArray.Length; k++)
  5839. {
  5840. if (pureArray[k] == num4)
  5841. {
  5842. flag7 = true;
  5843. break;
  5844. }
  5845. }
  5846. if (!flag7)
  5847. {
  5848. text = text + "0" + num4.ToString() + ".ogg";
  5849. if (GameUty.FileSystem.IsExistentFile(text))
  5850. {
  5851. maid.AudioMan.LoadPlay(text, 0f, false, false);
  5852. }
  5853. }
  5854. }
  5855. if (maid.status.personal.uniqueName == "Yandere")
  5856. {
  5857. string text = "s3_";
  5858. Random random = new Random();
  5859. int num4 = random.Next(10000);
  5860. bool flag7 = false;
  5861. for (int k = 0; k < yanArray.Length; k++)
  5862. {
  5863. if (yanArray[k] == num4)
  5864. {
  5865. flag7 = true;
  5866. break;
  5867. }
  5868. }
  5869. if (!flag7)
  5870. {
  5871. text = text + string.Format("{0:00000}", num4) + ".ogg";
  5872. if (GameUty.FileSystem.IsExistentFile(text))
  5873. {
  5874. maid.AudioMan.LoadPlay(text, 0f, false, false);
  5875. }
  5876. }
  5877. }
  5878. if (maid.status.personal.uniqueName == "Muku")
  5879. {
  5880. string text = "h0_";
  5881. Random random = new Random();
  5882. int num4 = random.Next(10000);
  5883. bool flag7 = false;
  5884. for (int k = 0; k < h0Array.Length; k++)
  5885. {
  5886. if (h0Array[k] == num4)
  5887. {
  5888. flag7 = true;
  5889. break;
  5890. }
  5891. }
  5892. if (flag7)
  5893. {
  5894. text = text + string.Format("{0:00000}", num4) + ".ogg";
  5895. if (GameUty.FileSystem.IsExistentFile(text))
  5896. {
  5897. maid.AudioMan.LoadPlay(text, 0f, false, false);
  5898. }
  5899. }
  5900. }
  5901. if (maid.status.personal.uniqueName == "Majime")
  5902. {
  5903. string text = "h1_";
  5904. Random random = new Random();
  5905. int num4 = random.Next(10000);
  5906. bool flag7 = false;
  5907. for (int k = 0; k < h1Array.Length; k++)
  5908. {
  5909. if (h1Array[k] == num4)
  5910. {
  5911. flag7 = true;
  5912. break;
  5913. }
  5914. }
  5915. if (flag7)
  5916. {
  5917. text = text + string.Format("{0:00000}", num4) + ".ogg";
  5918. if (GameUty.FileSystem.IsExistentFile(text))
  5919. {
  5920. maid.AudioMan.LoadPlay(text, 0f, false, false);
  5921. }
  5922. }
  5923. }
  5924. if (maid.status.personal.uniqueName == "Rindere")
  5925. {
  5926. string text = "h2_";
  5927. Random random = new Random();
  5928. int num4 = random.Next(10000);
  5929. bool flag7 = false;
  5930. for (int k = 0; k < h2Array.Length; k++)
  5931. {
  5932. if (h2Array[k] == num4)
  5933. {
  5934. flag7 = true;
  5935. break;
  5936. }
  5937. }
  5938. if (flag7)
  5939. {
  5940. text = text + string.Format("{0:00000}", num4) + ".ogg";
  5941. if (GameUty.FileSystem.IsExistentFile(text))
  5942. {
  5943. maid.AudioMan.LoadPlay(text, 0f, false, false);
  5944. }
  5945. }
  5946. }
  5947. idoFlg[i] = true;
  5948. }
  5949. else if (Input.GetKey(key) && Input.GetKey(KeyCode.Insert) && Input.GetKey(KeyCode.Home))
  5950. {
  5951. Vector3 vector = maid.transform.position;
  5952. vector += new Vector3(vector2.x, 0f, vector2.z) * 0.0075f * speed;
  5953. vector += new Vector3(vector3.x, 0f, vector3.z) * -0.0075f * speed;
  5954. maid.SetPos(vector);
  5955. idoFlg[i] = true;
  5956. }
  5957. else if (Input.GetKey(key) && Input.GetKey(KeyCode.Insert) && Input.GetKey(KeyCode.End))
  5958. {
  5959. Vector3 vector = maid.transform.position;
  5960. vector += new Vector3(vector2.x, 0f, vector2.z) * 0.0075f * speed;
  5961. vector += new Vector3(vector3.x, 0f, vector3.z) * 0.0075f * speed;
  5962. maid.SetPos(vector);
  5963. idoFlg[i] = true;
  5964. }
  5965. else if (Input.GetKey(key) && Input.GetKey(KeyCode.Delete) && Input.GetKey(KeyCode.Home))
  5966. {
  5967. Vector3 vector = maid.transform.position;
  5968. vector += new Vector3(vector2.x, 0f, vector2.z) * -0.0075f * speed;
  5969. vector += new Vector3(vector3.x, 0f, vector3.z) * -0.0075f * speed;
  5970. maid.SetPos(vector);
  5971. idoFlg[i] = true;
  5972. }
  5973. else if (Input.GetKey(key) && Input.GetKey(KeyCode.Delete) && Input.GetKey(KeyCode.End))
  5974. {
  5975. Vector3 vector = maid.transform.position;
  5976. vector += new Vector3(vector2.x, 0f, vector2.z) * -0.0075f * speed;
  5977. vector += new Vector3(vector3.x, 0f, vector3.z) * 0.0075f * speed;
  5978. maid.SetPos(vector);
  5979. idoFlg[i] = true;
  5980. }
  5981. else if (Input.GetKey(key) && Input.GetKey(KeyCode.Insert))
  5982. {
  5983. Vector3 vector = maid.transform.position;
  5984. vector += new Vector3(vector2.x, 0f, vector2.z) * 0.0075f * speed;
  5985. maid.SetPos(vector);
  5986. idoFlg[i] = true;
  5987. }
  5988. else if (Input.GetKey(key) && Input.GetKey(KeyCode.Delete))
  5989. {
  5990. Vector3 vector = maid.transform.position;
  5991. vector += new Vector3(vector2.x, 0f, vector2.z) * -0.0075f * speed;
  5992. maid.SetPos(vector);
  5993. idoFlg[i] = true;
  5994. }
  5995. else if (Input.GetKey(key) && Input.GetKey(KeyCode.Home))
  5996. {
  5997. Vector3 vector = maid.transform.position;
  5998. vector += new Vector3(vector3.x, 0f, vector3.z) * -0.0075f * speed;
  5999. maid.SetPos(vector);
  6000. idoFlg[i] = true;
  6001. }
  6002. else if (Input.GetKey(key) && Input.GetKey(KeyCode.End))
  6003. {
  6004. Vector3 vector = maid.transform.position;
  6005. vector += new Vector3(vector3.x, 0f, vector3.z) * 0.0075f * speed;
  6006. maid.SetPos(vector);
  6007. idoFlg[i] = true;
  6008. }
  6009. else if (Input.GetKey(key) && Input.GetKey(KeyCode.PageUp))
  6010. {
  6011. Vector3 vector = maid.transform.position;
  6012. vector.y += 0.0075f * speed;
  6013. maid.SetPos(vector);
  6014. idoFlg[i] = true;
  6015. }
  6016. else if (Input.GetKey(key) && Input.GetKey(KeyCode.PageDown))
  6017. {
  6018. Vector3 vector = maid.transform.position;
  6019. vector.y -= 0.0075f * speed;
  6020. maid.SetPos(vector);
  6021. idoFlg[i] = true;
  6022. }
  6023. else if (Input.GetKey(key) && Input.GetKeyDown(KeyCode.Minus) && this.getModKeyPressing(modKey.Shift))
  6024. {
  6025. faceIndex[i]--;
  6026. if (faceIndex[i] <= -1)
  6027. {
  6028. faceIndex[i] = faceArray.Length - 1;
  6029. }
  6030. maid.FaceAnime(faceArray[faceIndex[i]], 1f, 0);
  6031. idoFlg[i] = true;
  6032. }
  6033. else if (Input.GetKey(key) && Input.GetKeyDown(KeyCode.Minus))
  6034. {
  6035. faceIndex[i]++;
  6036. if (faceIndex[i] == faceArray.Length)
  6037. {
  6038. faceIndex[i] = 0;
  6039. }
  6040. maid.FaceAnime(faceArray[faceIndex[i]], 1f, 0);
  6041. idoFlg[i] = true;
  6042. }
  6043. else if (Input.GetKey(key) && Input.GetKeyDown(KeyCode.Quote))
  6044. {
  6045. faceBlendIndex[i]++;
  6046. if (faceBlendIndex[i] == faceBlendArray.Length)
  6047. {
  6048. faceBlendIndex[i] = 0;
  6049. }
  6050. maid.FaceBlend(faceBlendArray[faceBlendIndex[i]]);
  6051. idoFlg[i] = true;
  6052. }
  6053. if (Input.GetKey(key) && Input.GetKey(KeyCode.E))
  6054. {
  6055. idoFlg[i] = true;
  6056. if (i >= 7)
  6057. {
  6058. idoFlg[i - 7] = true;
  6059. }
  6060. maid.transform.localScale = new Vector3(maid.transform.localScale.x * 1.005f,
  6061. maid.transform.localScale.y * 1.005f,
  6062. maid.transform.localScale.z * 1.005f);
  6063. }
  6064. else if (Input.GetKey(key) && Input.GetKey(KeyCode.D))
  6065. {
  6066. idoFlg[i] = true;
  6067. if (i >= 7)
  6068. {
  6069. idoFlg[i - 7] = true;
  6070. }
  6071. maid.transform.localScale = new Vector3(maid.transform.localScale.x * 0.995f,
  6072. maid.transform.localScale.y * 0.995f,
  6073. maid.transform.localScale.z * 0.995f);
  6074. }
  6075. else if (Input.GetKey(key) && Input.GetKeyDown(KeyCode.C))
  6076. {
  6077. idoFlg[i] = true;
  6078. if (i >= 7)
  6079. {
  6080. idoFlg[i - 7] = true;
  6081. }
  6082. maid.transform.localScale = new Vector3(1f, 1f, 1f);
  6083. }
  6084. else if (Input.GetKey(key) && Input.GetKeyDown(KeyCode.H))
  6085. {
  6086. if (!isVR)
  6087. {
  6088. if (goSlot[(int) selectList[i]] != null)
  6089. {
  6090. maidArray[i].body0.goSlot = new List<TBodySkin>(goSlot[(int) selectList[i]]);
  6091. for (int l = 0; l < bodyHit[(int) selectList[i]].Count; l++)
  6092. {
  6093. maidArray[i].body0.goSlot[l].bonehair.bodyhit = bodyHit[(int) selectList[i]][l];
  6094. }
  6095. }
  6096. }
  6097. maid.body0.SetMask(TBody.SlotID.wear, true);
  6098. maid.body0.SetMask(TBody.SlotID.skirt, true);
  6099. maid.body0.SetMask(TBody.SlotID.bra, true);
  6100. maid.body0.SetMask(TBody.SlotID.panz, true);
  6101. maid.body0.SetMask(TBody.SlotID.mizugi, true);
  6102. maid.body0.SetMask(TBody.SlotID.onepiece, true);
  6103. isWear = true;
  6104. isSkirt = true;
  6105. isBra = true;
  6106. isPanz = true;
  6107. Random random = new Random();
  6108. int num4 = random.Next(2);
  6109. if (num4 == 1)
  6110. {
  6111. maid.body0.SetMask(TBody.SlotID.wear, false);
  6112. }
  6113. if (num4 == 1)
  6114. {
  6115. isWear = false;
  6116. }
  6117. num4 = random.Next(2);
  6118. if (num4 == 1)
  6119. {
  6120. maid.body0.SetMask(TBody.SlotID.skirt, false);
  6121. }
  6122. if (num4 == 1)
  6123. {
  6124. isSkirt = false;
  6125. }
  6126. num4 = random.Next(2);
  6127. if (num4 == 1)
  6128. {
  6129. maid.body0.SetMask(TBody.SlotID.bra, false);
  6130. }
  6131. if (num4 == 1)
  6132. {
  6133. isBra = false;
  6134. }
  6135. num4 = random.Next(2);
  6136. if (num4 == 1)
  6137. {
  6138. maid.body0.SetMask(TBody.SlotID.panz, false);
  6139. }
  6140. if (num4 == 1)
  6141. {
  6142. isPanz = false;
  6143. }
  6144. num4 = random.Next(2);
  6145. if (num4 == 1)
  6146. {
  6147. maid.body0.SetMask(TBody.SlotID.mizugi, false);
  6148. }
  6149. num4 = random.Next(2);
  6150. if (num4 == 1)
  6151. {
  6152. maid.body0.SetMask(TBody.SlotID.onepiece, false);
  6153. }
  6154. hFlg = true;
  6155. idoFlg[i] = true;
  6156. if (i >= 7)
  6157. {
  6158. idoFlg[i - 7] = true;
  6159. }
  6160. }
  6161. else if (Input.GetKeyDown(key) && Input.GetKey(KeyCode.LeftShift) && !isLock[i])
  6162. {
  6163. poseIndex[i]--;
  6164. if (poseIndex[i] <= -1)
  6165. {
  6166. poseIndex[i] = poseArray.Length - 1;
  6167. }
  6168. if (maid && maid.Visible)
  6169. {
  6170. string[] array = poseArray[poseIndex[i]].Split(new char[] {','});
  6171. isStop[i] = false;
  6172. poseCount[i] = 20;
  6173. if (array[0].Contains("_momi") || array[0].Contains("paizuri_"))
  6174. {
  6175. maid.body0.MuneYureL(0f);
  6176. maid.body0.MuneYureR(0f);
  6177. }
  6178. else
  6179. {
  6180. maid.body0.MuneYureL(1f);
  6181. maid.body0.MuneYureR(1f);
  6182. }
  6183. int num6;
  6184. if (array[0].Contains("MultipleMaidsPose"))
  6185. {
  6186. string path = array[0].Split(new char[] {'/'})[1];
  6187. byte[] array2 = new byte[0];
  6188. try
  6189. {
  6190. using (FileStream fileStream = new FileStream(path, FileMode.Open, FileAccess.Read))
  6191. {
  6192. array2 = new byte[fileStream.Length];
  6193. fileStream.Read(array2, 0, array2.Length);
  6194. }
  6195. }
  6196. catch { }
  6197. if (0 < array2.Length)
  6198. {
  6199. string text = Path.GetFileName(path);
  6200. long num5 = (long) text.GetHashCode();
  6201. maid.body0.CrossFade(num5.ToString(), array2, false, false, false, 0f, 1f);
  6202. Maid.AutoTwist[] array3 = new Maid.AutoTwist[]
  6203. {
  6204. Maid.AutoTwist.ShoulderL, Maid.AutoTwist.ShoulderR, Maid.AutoTwist.WristL,
  6205. Maid.AutoTwist.WristR, Maid.AutoTwist.ThighL, Maid.AutoTwist.ThighR
  6206. };
  6207. for (int m = 0; m < array3.Length; m++)
  6208. {
  6209. maid.SetAutoTwist(array3[m], true);
  6210. }
  6211. }
  6212. }
  6213. else if (array[0].StartsWith("p") && int.TryParse(array[0].Substring(1), out num6))
  6214. {
  6215. loadPose[i] = array[0];
  6216. }
  6217. else if (!array[0].StartsWith("dance_"))
  6218. {
  6219. maidArray[i].CrossFade(array[0] + ".anm", false, true, false, 0f, 1f);
  6220. }
  6221. else
  6222. {
  6223. if (!maid.body0.m_Bones.GetComponent<Animation>().GetClip(array[0] + ".anm"))
  6224. {
  6225. maid.body0.LoadAnime(array[0] + ".anm", GameUty.FileSystem, array[0] + ".anm", false, false);
  6226. }
  6227. maid.body0.m_Bones.GetComponent<Animation>().Play(array[0] + ".anm");
  6228. }
  6229. if (array.Length > 1)
  6230. {
  6231. maid.body0.m_Bones.GetComponent<Animation>()[array[0] + ".anm"].time = float.Parse(array[1]);
  6232. isStop[i] = true;
  6233. if (array.Length > 2)
  6234. {
  6235. Transform transform2 = CMT.SearchObjName(maidArray[i].body0.m_Bones.transform, "Bip01", true);
  6236. isPoseIti[i] = true;
  6237. poseIti[i] = maidArray[i].transform.position;
  6238. maidArray[i].transform.position = new Vector3(100f, 100f, 100f);
  6239. }
  6240. }
  6241. }
  6242. idoFlg[i] = true;
  6243. if (i >= 7)
  6244. {
  6245. idoFlg[i - 7] = true;
  6246. }
  6247. }
  6248. else if (Input.GetKeyDown(key) && Input.GetKey(KeyCode.RightAlt) && !isLock[i])
  6249. {
  6250. int num7 = poseIndex[i];
  6251. for (int k = 0; k < groupList.Count; k++)
  6252. {
  6253. if (poseIndex[i] < (int) groupList[k])
  6254. {
  6255. poseIndex[i] = (int) groupList[k];
  6256. break;
  6257. }
  6258. }
  6259. if (num7 == poseIndex[i] && poseIndex[i] >= (int) groupList[groupList.Count - 1])
  6260. {
  6261. poseIndex[i] = 0;
  6262. }
  6263. if (maid && maid.Visible)
  6264. {
  6265. string[] array = poseArray[poseIndex[i]].Split(new char[] {','});
  6266. isStop[i] = false;
  6267. poseCount[i] = 20;
  6268. if (array[0].Contains("_momi") || array[0].Contains("paizuri_"))
  6269. {
  6270. maid.body0.MuneYureL(0f);
  6271. maid.body0.MuneYureR(0f);
  6272. }
  6273. else
  6274. {
  6275. maid.body0.MuneYureL(1f);
  6276. maid.body0.MuneYureR(1f);
  6277. }
  6278. int num6;
  6279. if (array[0].Contains("MultipleMaidsPose"))
  6280. {
  6281. string path = array[0].Split(new char[] {'/'})[1];
  6282. byte[] array2 = new byte[0];
  6283. try
  6284. {
  6285. using (FileStream fileStream = new FileStream(path, FileMode.Open, FileAccess.Read))
  6286. {
  6287. array2 = new byte[fileStream.Length];
  6288. fileStream.Read(array2, 0, array2.Length);
  6289. }
  6290. }
  6291. catch { }
  6292. if (0 < array2.Length)
  6293. {
  6294. string text = Path.GetFileName(path);
  6295. long num5 = (long) text.GetHashCode();
  6296. maid.body0.CrossFade(num5.ToString(), array2, false, false, false, 0f, 1f);
  6297. Maid.AutoTwist[] array3 = new Maid.AutoTwist[]
  6298. {
  6299. Maid.AutoTwist.ShoulderL, Maid.AutoTwist.ShoulderR, Maid.AutoTwist.WristL,
  6300. Maid.AutoTwist.WristR, Maid.AutoTwist.ThighL, Maid.AutoTwist.ThighR
  6301. };
  6302. for (int m = 0; m < array3.Length; m++)
  6303. {
  6304. maid.SetAutoTwist(array3[m], true);
  6305. }
  6306. }
  6307. }
  6308. else if (array[0].StartsWith("p") && int.TryParse(array[0].Substring(1), out num6))
  6309. {
  6310. loadPose[i] = array[0];
  6311. }
  6312. else if (!array[0].StartsWith("dance_"))
  6313. {
  6314. maid.CrossFade(array[0] + ".anm", false, true, false, 0f, 1f);
  6315. }
  6316. else
  6317. {
  6318. if (!maid.body0.m_Bones.GetComponent<Animation>().GetClip(array[0] + ".anm"))
  6319. {
  6320. maid.body0.LoadAnime(array[0] + ".anm", GameUty.FileSystem, array[0] + ".anm", false, false);
  6321. }
  6322. maid.body0.m_Bones.GetComponent<Animation>().Play(array[0] + ".anm");
  6323. }
  6324. if (array.Length > 1)
  6325. {
  6326. maid.body0.m_Bones.GetComponent<Animation>()[array[0] + ".anm"].time = float.Parse(array[1]);
  6327. isStop[i] = true;
  6328. if (array.Length > 2)
  6329. {
  6330. Transform transform2 = CMT.SearchObjName(maidArray[i].body0.m_Bones.transform, "Bip01", true);
  6331. isPoseIti[i] = true;
  6332. poseIti[i] = maidArray[i].transform.position;
  6333. maidArray[i].transform.position = new Vector3(100f, 100f, 100f);
  6334. }
  6335. }
  6336. }
  6337. idoFlg[i] = true;
  6338. if (i >= 7)
  6339. {
  6340. idoFlg[i - 7] = true;
  6341. }
  6342. }
  6343. else if (Input.GetKeyDown(key) && Input.GetKey(KeyCode.LeftAlt) && !isLock[i])
  6344. {
  6345. for (int k = 0; k < groupList.Count; k++)
  6346. {
  6347. if (k == 0 && poseIndex[i] <= (int) groupList[k])
  6348. {
  6349. if (poseIndex[i] == 0)
  6350. {
  6351. poseIndex[i] = (int) groupList[groupList.Count - 1];
  6352. }
  6353. else
  6354. {
  6355. poseIndex[i] = 0;
  6356. }
  6357. break;
  6358. }
  6359. if (k > 0 && poseIndex[i] > (int) groupList[k - 1] && poseIndex[i] <= (int) groupList[k])
  6360. {
  6361. poseIndex[i] = (int) groupList[k - 1];
  6362. break;
  6363. }
  6364. }
  6365. if (poseIndex[i] > (int) groupList[groupList.Count - 1])
  6366. {
  6367. poseIndex[i] = (int) groupList[groupList.Count - 1];
  6368. }
  6369. if (maid && maid.Visible)
  6370. {
  6371. string[] array = poseArray[poseIndex[i]].Split(new char[] {','});
  6372. isStop[i] = false;
  6373. poseCount[i] = 20;
  6374. if (array[0].Contains("_momi") || array[0].Contains("paizuri_"))
  6375. {
  6376. maid.body0.MuneYureL(0f);
  6377. maid.body0.MuneYureR(0f);
  6378. }
  6379. else
  6380. {
  6381. maid.body0.MuneYureL(1f);
  6382. maid.body0.MuneYureR(1f);
  6383. }
  6384. int num6;
  6385. if (array[0].Contains("MultipleMaidsPose"))
  6386. {
  6387. string path = array[0].Split(new char[] {'/'})[1];
  6388. byte[] array2 = new byte[0];
  6389. try
  6390. {
  6391. using (FileStream fileStream = new FileStream(path, FileMode.Open, FileAccess.Read))
  6392. {
  6393. array2 = new byte[fileStream.Length];
  6394. fileStream.Read(array2, 0, array2.Length);
  6395. }
  6396. }
  6397. catch { }
  6398. if (0 < array2.Length)
  6399. {
  6400. string text = Path.GetFileName(path);
  6401. long num5 = (long) text.GetHashCode();
  6402. maid.body0.CrossFade(num5.ToString(), array2, false, false, false, 0f, 1f);
  6403. Maid.AutoTwist[] array3 = new Maid.AutoTwist[]
  6404. {
  6405. Maid.AutoTwist.ShoulderL, Maid.AutoTwist.ShoulderR, Maid.AutoTwist.WristL,
  6406. Maid.AutoTwist.WristR, Maid.AutoTwist.ThighL, Maid.AutoTwist.ThighR
  6407. };
  6408. for (int m = 0; m < array3.Length; m++)
  6409. {
  6410. maid.SetAutoTwist(array3[m], true);
  6411. }
  6412. }
  6413. }
  6414. else if (array[0].StartsWith("p") && int.TryParse(array[0].Substring(1), out num6))
  6415. {
  6416. loadPose[i] = array[0];
  6417. }
  6418. else if (!array[0].StartsWith("dance_"))
  6419. {
  6420. maid.CrossFade(array[0] + ".anm", false, true, false, 0f, 1f);
  6421. }
  6422. else
  6423. {
  6424. if (!maid.body0.m_Bones.GetComponent<Animation>().GetClip(array[0] + ".anm"))
  6425. {
  6426. maid.body0.LoadAnime(array[0] + ".anm", GameUty.FileSystem, array[0] + ".anm", false, false);
  6427. }
  6428. maid.body0.m_Bones.GetComponent<Animation>().Play(array[0] + ".anm");
  6429. }
  6430. if (array.Length > 1)
  6431. {
  6432. maid.body0.m_Bones.GetComponent<Animation>()[array[0] + ".anm"].time = float.Parse(array[1]);
  6433. isStop[i] = true;
  6434. if (array.Length > 2)
  6435. {
  6436. Transform transform2 = CMT.SearchObjName(maidArray[i].body0.m_Bones.transform, "Bip01", true);
  6437. isPoseIti[i] = true;
  6438. poseIti[i] = maidArray[i].transform.position;
  6439. maidArray[i].transform.position = new Vector3(100f, 100f, 100f);
  6440. }
  6441. }
  6442. }
  6443. idoFlg[i] = true;
  6444. if (i >= 7)
  6445. {
  6446. idoFlg[i - 7] = true;
  6447. }
  6448. }
  6449. else if (Input.GetKey(key) && Input.GetKeyDown(KeyCode.BackQuote) && !atFlg)
  6450. {
  6451. headEyeIndex[i]++;
  6452. if (headEyeIndex[i] == headEyeArray.Length)
  6453. {
  6454. headEyeIndex[i] = 0;
  6455. }
  6456. maid.body0.trsLookTarget = GameMain.Instance.MainCamera.transform;
  6457. maid.body0.boHeadToCam = true;
  6458. maid.body0.boEyeToCam = true;
  6459. if (headEyeIndex[i] == 0)
  6460. {
  6461. maid.body0.trsLookTarget = GameMain.Instance.MainCamera.transform;
  6462. maid.body0.boHeadToCam = true;
  6463. maid.body0.boEyeToCam = true;
  6464. }
  6465. else
  6466. {
  6467. maid.body0.trsLookTarget = null;
  6468. CameraMain cameraMain = GameMain.Instance.MainCamera;
  6469. if (headEyeIndex[i] == 1)
  6470. {
  6471. maid.body0.offsetLookTarget = new Vector3(-0.35f, 1f, -0.3f);
  6472. }
  6473. if (headEyeIndex[i] == 2)
  6474. {
  6475. maid.body0.offsetLookTarget = new Vector3(-0.4f, 1f, 0f);
  6476. }
  6477. if (headEyeIndex[i] == 3)
  6478. {
  6479. maid.body0.offsetLookTarget = new Vector3(-0.35f, 1f, 0.3f);
  6480. }
  6481. if (headEyeIndex[i] == 4)
  6482. {
  6483. maid.body0.offsetLookTarget = new Vector3(0f, 1f, -0.4f);
  6484. }
  6485. if (headEyeIndex[i] == 5)
  6486. {
  6487. maid.body0.offsetLookTarget = new Vector3(0f, 1f, 0f);
  6488. }
  6489. if (headEyeIndex[i] == 6)
  6490. {
  6491. maid.body0.offsetLookTarget = new Vector3(0f, 1f, 0.4f);
  6492. }
  6493. if (headEyeIndex[i] == 7)
  6494. {
  6495. maid.body0.offsetLookTarget = new Vector3(0.4f, 1f, -0.4f);
  6496. }
  6497. if (headEyeIndex[i] == 8)
  6498. {
  6499. maid.body0.offsetLookTarget = new Vector3(0.4f, 1f, 0f);
  6500. }
  6501. if (headEyeIndex[i] == 9)
  6502. {
  6503. maid.body0.offsetLookTarget = new Vector3(0.4f, 1f, 0.4f);
  6504. }
  6505. }
  6506. idoFlg[i] = true;
  6507. if (i >= 7)
  6508. {
  6509. idoFlg[i - 7] = true;
  6510. }
  6511. }
  6512. else if (Input.GetKey(key) && Input.GetKey(KeyCode.Return))
  6513. {
  6514. idoFlg[i] = true;
  6515. if (i >= 7)
  6516. {
  6517. idoFlg[i - 7] = true;
  6518. }
  6519. }
  6520. else if (Input.GetKeyUp(key))
  6521. {
  6522. if (idoFlg[i])
  6523. {
  6524. idoFlg[i] = false;
  6525. }
  6526. else if (!this.getModKeyPressing(modKey.Ctrl) || i >= 7)
  6527. {
  6528. if (!isLock[i])
  6529. {
  6530. poseIndex[i]++;
  6531. if (poseIndex[i] == poseArray.Length)
  6532. {
  6533. poseIndex[i] = 0;
  6534. }
  6535. if (maid && maid.Visible)
  6536. {
  6537. string[] array = poseArray[poseIndex[i]].Split(new char[] {','});
  6538. isStop[i] = false;
  6539. poseCount[i] = 20;
  6540. if (array[0].Contains("_momi") || array[0].Contains("paizuri_"))
  6541. {
  6542. maid.body0.MuneYureL(0f);
  6543. maid.body0.MuneYureR(0f);
  6544. }
  6545. else
  6546. {
  6547. maid.body0.MuneYureL(1f);
  6548. maid.body0.MuneYureR(1f);
  6549. }
  6550. int num6;
  6551. if (array[0].Contains("MultipleMaidsPose"))
  6552. {
  6553. string path = array[0].Split(new char[] {'/'})[1];
  6554. byte[] array2 = new byte[0];
  6555. try
  6556. {
  6557. using (FileStream fileStream = new FileStream(path, FileMode.Open, FileAccess.Read))
  6558. {
  6559. array2 = new byte[fileStream.Length];
  6560. fileStream.Read(array2, 0, array2.Length);
  6561. }
  6562. }
  6563. catch { }
  6564. if (0 < array2.Length)
  6565. {
  6566. string text = Path.GetFileName(path);
  6567. long num5 = (long) text.GetHashCode();
  6568. maid.body0.CrossFade(num5.ToString(), array2, false, false, false, 0f, 1f);
  6569. Maid.AutoTwist[] array3 = new Maid.AutoTwist[]
  6570. {
  6571. Maid.AutoTwist.ShoulderL, Maid.AutoTwist.ShoulderR, Maid.AutoTwist.WristL,
  6572. Maid.AutoTwist.WristR, Maid.AutoTwist.ThighL, Maid.AutoTwist.ThighR
  6573. };
  6574. for (int m = 0; m < array3.Length; m++)
  6575. {
  6576. maid.SetAutoTwist(array3[m], true);
  6577. }
  6578. }
  6579. }
  6580. else if (array[0].StartsWith("p") && int.TryParse(array[0].Substring(1), out num6))
  6581. {
  6582. loadPose[i] = array[0];
  6583. }
  6584. else if (!array[0].StartsWith("dance_"))
  6585. {
  6586. maidArray[i].CrossFade(array[0] + ".anm", false, true, false, 0f, 1f);
  6587. }
  6588. else
  6589. {
  6590. if (!maid.body0.m_Bones.GetComponent<Animation>().GetClip(array[0] + ".anm"))
  6591. {
  6592. maid.body0.LoadAnime(array[0] + ".anm",
  6593. GameUty.FileSystem,
  6594. array[0] + ".anm",
  6595. false,
  6596. false);
  6597. }
  6598. maid.body0.m_Bones.GetComponent<Animation>().Play(array[0] + ".anm");
  6599. }
  6600. if (array.Length > 1)
  6601. {
  6602. maid.body0.m_Bones.GetComponent<Animation>()[array[0] + ".anm"].time = float.Parse(array[1]);
  6603. isStop[i] = true;
  6604. if (array.Length > 2)
  6605. {
  6606. Transform transform2 =
  6607. CMT.SearchObjName(maidArray[i].body0.m_Bones.transform, "Bip01", true);
  6608. isPoseIti[i] = true;
  6609. poseIti[i] = maidArray[i].transform.position;
  6610. maidArray[i].transform.position = new Vector3(100f, 100f, 100f);
  6611. }
  6612. }
  6613. }
  6614. }
  6615. }
  6616. }
  6617. goto IL_1688E;
  6618. }
  6619. }
  6620. if (Input.GetKeyDown(KeyCode.E)) { }
  6621. if (!isVR && Input.GetKeyDown(KeyCode.F8) && sceneFlg && bGui)
  6622. {
  6623. bGui = false;
  6624. }
  6625. else if (!isVR && Input.GetKeyDown(KeyCode.F8))
  6626. {
  6627. sceneFlg = true;
  6628. faceFlg = false;
  6629. poseFlg = false;
  6630. kankyoFlg = false;
  6631. kankyo2Flg = false;
  6632. bGui = true;
  6633. int i = 0;
  6634. while (i < 10)
  6635. {
  6636. date[i] = "未保存";
  6637. ninzu[i] = "";
  6638. IniKey iniKey = base.Preferences["scene"]["s" + (page * 10 + i + 1)];
  6639. if (iniKey.Value != null && iniKey.Value.ToString() != "")
  6640. {
  6641. string[] array4 = iniKey.Value.Split(new char[] {'_'});
  6642. if (array4.Length >= 2)
  6643. {
  6644. string[] array5 = array4[0].Split(new char[] {','});
  6645. date[i] = array5[0];
  6646. ninzu[i] = array5[1] + "人";
  6647. }
  6648. }
  6649. IL_16A2F:
  6650. i++;
  6651. continue;
  6652. goto IL_16A2F;
  6653. }
  6654. }
  6655. if (Input.GetKeyDown(KeyCode.F) && this.getModKeyPressing(modKey.Shift) && !fFlg)
  6656. {
  6657. bgmIndex--;
  6658. if (bgmIndex <= -1)
  6659. {
  6660. bgmIndex = bgmArray.Length - 1;
  6661. }
  6662. GameMain.Instance.SoundMgr.PlayBGM(bgmArray[bgmIndex] + ".ogg", 0f, true);
  6663. bgmCombo.selectedItemIndex = bgmIndex;
  6664. }
  6665. else if (Input.GetKeyDown(KeyCode.F) && !fFlg)
  6666. {
  6667. bgmIndex++;
  6668. if (bgmIndex == bgmArray.Length)
  6669. {
  6670. bgmIndex = 0;
  6671. }
  6672. GameMain.Instance.SoundMgr.PlayBGM(bgmArray[bgmIndex] + ".ogg", 0f, true);
  6673. bgmCombo.selectedItemIndex = bgmIndex;
  6674. }
  6675. if (!isVR && Input.GetKeyDown(KeyCode.M) && !mFlg)
  6676. {
  6677. GameObject gameObject4 = GameObject.Find("__GameMain__/SystemUI Root");
  6678. GameObject gameObject5 = gameObject4.transform.Find("MessageWindowPanel").gameObject;
  6679. MessageWindowMgr messageWindowMgr = GameMain.Instance.ScriptMgr.adv_kag.MessageWindowMgr;
  6680. if (isMessage)
  6681. {
  6682. isMessage = false;
  6683. messageWindowMgr.CloseMessageWindowPanel();
  6684. }
  6685. else if (!bGuiMessage)
  6686. {
  6687. bGuiMessage = true;
  6688. }
  6689. else
  6690. {
  6691. bGuiMessage = false;
  6692. isMessage = false;
  6693. messageWindowMgr.CloseMessageWindowPanel();
  6694. }
  6695. }
  6696. if (isDanceChu && Input.GetKey(KeyCode.Return) && Input.GetKeyDown(KeyCode.Escape))
  6697. {
  6698. escFlg = true;
  6699. for (int j = 0; j < maidCnt; j++)
  6700. {
  6701. if (maidArray[j] && maidArray[j].Visible)
  6702. {
  6703. maidArray[j].StopKuchipakuPattern();
  6704. if (isDanceStart7V)
  6705. {
  6706. maidArray[j].SetPos(dancePos[j]);
  6707. maidArray[j].body0.transform.localRotation = danceRot[j];
  6708. }
  6709. if (isDanceStart8V)
  6710. {
  6711. maidArray[j].SetPos(dancePos[j]);
  6712. maidArray[j].body0.transform.localRotation = danceRot[j];
  6713. }
  6714. if (isDanceStart11V)
  6715. {
  6716. maidArray[j].SetPos(dancePos[j]);
  6717. maidArray[j].body0.transform.localRotation = danceRot[j];
  6718. }
  6719. if (isDanceStart1K || isDanceStart3K || isDanceStart4K || isDanceStart5K || isDanceStart6K || isDanceStart9K
  6720. || isDanceStart13K)
  6721. {
  6722. maidArray[j].SetPos(dancePos[j]);
  6723. maidArray[j].body0.transform.localRotation = danceRot[j];
  6724. int i = j;
  6725. if (!isVR)
  6726. {
  6727. delCount[i] = 20;
  6728. if (goSlot[(int) selectList[i]] != null)
  6729. {
  6730. maidArray[i].body0.goSlot = new List<TBodySkin>(goSlot[(int) selectList[i]]);
  6731. for (int l = 0; l < bodyHit[(int) selectList[i]].Count; l++)
  6732. {
  6733. maidArray[i].body0.goSlot[l].bonehair.bodyhit = bodyHit[(int) selectList[i]][l];
  6734. }
  6735. }
  6736. }
  6737. Maid maid = maidArray[j];
  6738. maid.DelProp(MPN.handitem, true);
  6739. maid.DelProp(MPN.accvag, true);
  6740. maid.DelProp(MPN.accanl, true);
  6741. maid.DelProp(MPN.kousoku_upper, true);
  6742. maid.DelProp(MPN.kousoku_lower, true);
  6743. maid.AllProcPropSeqStart();
  6744. }
  6745. if (isDanceStart14V)
  6746. {
  6747. maidArray[j].SetPos(dancePos[j]);
  6748. maidArray[j].body0.transform.localRotation = danceRot[j];
  6749. }
  6750. if (isDanceStart15V)
  6751. {
  6752. maidArray[j].SetPos(dancePos[j]);
  6753. maidArray[j].body0.transform.localRotation = danceRot[j];
  6754. }
  6755. }
  6756. }
  6757. isDanceStart1F = false;
  6758. isDanceStart1K = false;
  6759. isDanceStart2F = false;
  6760. isDanceStart3F = false;
  6761. isDanceStart3K = false;
  6762. isDanceStart4F = false;
  6763. isDanceStart4K = false;
  6764. isDanceStart5F = false;
  6765. isDanceStart5K = false;
  6766. isDanceStart6F = false;
  6767. isDanceStart6K = false;
  6768. isDanceStart7F = false;
  6769. isDanceStart7V = false;
  6770. isDanceStart8F = false;
  6771. isDanceStart8V = false;
  6772. isDanceStart8P = false;
  6773. isDanceStart9F = false;
  6774. isDanceStart9K = false;
  6775. isDanceStart10F = false;
  6776. isDanceStart11F = false;
  6777. isDanceStart11V = false;
  6778. isDanceStart12F = false;
  6779. isDanceStart13F = false;
  6780. isDanceStart13K = false;
  6781. isDanceStart14F = false;
  6782. isDanceStart14V = false;
  6783. isDanceStart15F = false;
  6784. isDanceStart15V = false;
  6785. for (int j = 0; j < maidCnt; j++)
  6786. {
  6787. danceFace[j] = 0f;
  6788. maidArray[j].CrossFade(poseArray[0] + ".anm", false, true, false, 0f, 1f);
  6789. maidArray[j].SetAutoTwistAll(true);
  6790. }
  6791. danceCheckIndex = 0;
  6792. for (int k = 0; k < danceCheck.Length; k++)
  6793. {
  6794. danceCheck[danceCheckIndex] = 1f;
  6795. }
  6796. isDance = false;
  6797. isDanceChu = false;
  6798. if (maidArray[1] && maidArray[1].Visible)
  6799. {
  6800. if (maidArray[0].transform.position == maidArray[1].transform.position)
  6801. {
  6802. Vector3 vector = Vector3.zero;
  6803. vector.x = 0.6f;
  6804. maidArray[1].SetPos(vector);
  6805. if (maidArray[2] && maidArray[2].Visible)
  6806. {
  6807. vector.x = -0.6f;
  6808. maidArray[2].SetPos(vector);
  6809. }
  6810. if (maidArray[3] && maidArray[3].Visible)
  6811. {
  6812. vector.x = 1.2f;
  6813. maidArray[3].SetPos(vector);
  6814. }
  6815. if (maidArray[4] && maidArray[4].Visible)
  6816. {
  6817. vector.x = -1.2f;
  6818. maidArray[4].SetPos(vector);
  6819. }
  6820. if (maidArray[5] && maidArray[5].Visible)
  6821. {
  6822. vector.x = 1.8f;
  6823. maidArray[5].SetPos(vector);
  6824. }
  6825. if (maidArray[6] && maidArray[6].Visible)
  6826. {
  6827. vector.x = -1.8f;
  6828. maidArray[6].SetPos(vector);
  6829. }
  6830. if (maidArray[7] && maidArray[7].Visible)
  6831. {
  6832. vector.x = 2.4f;
  6833. maidArray[7].SetPos(vector);
  6834. }
  6835. if (maidArray[8] && maidArray[8].Visible)
  6836. {
  6837. vector.x = -2.4f;
  6838. maidArray[8].SetPos(vector);
  6839. }
  6840. if (maidArray[9] && maidArray[9].Visible)
  6841. {
  6842. vector.x = 3f;
  6843. maidArray[9].SetPos(vector);
  6844. }
  6845. if (maidArray[10] && maidArray[10].Visible)
  6846. {
  6847. vector.x = -3f;
  6848. maidArray[10].SetPos(vector);
  6849. }
  6850. if (maidArray[11] && maidArray[11].Visible)
  6851. {
  6852. vector.x = 3.6f;
  6853. maidArray[11].SetPos(vector);
  6854. }
  6855. if (maidArray[12] && maidArray[12].Visible)
  6856. {
  6857. vector.x = -3.6f;
  6858. maidArray[12].SetPos(vector);
  6859. }
  6860. if (maidArray[13] && maidArray[13].Visible)
  6861. {
  6862. vector.x = 4.2f;
  6863. maidArray[13].SetPos(vector);
  6864. }
  6865. }
  6866. }
  6867. GameMain.Instance.SoundMgr.PlayBGM(bgmArray[bgmIndex] + ".ogg", 0f, true);
  6868. }
  6869. if (Input.GetKeyDown(KeyCode.Tab) || (!escFlg && Input.GetKeyDown(KeyCode.Escape)))
  6870. {
  6871. if (isScript)
  6872. {
  6873. GameObject gameObject4 = GameObject.Find("__GameMain__/SystemUI Root");
  6874. GameObject gameObject5 = gameObject4.transform.Find("MessageWindowPanel").gameObject;
  6875. if (isPanel)
  6876. {
  6877. isPanel = false;
  6878. }
  6879. else
  6880. {
  6881. isPanel = true;
  6882. }
  6883. gameObject5.SetActive(isPanel);
  6884. }
  6885. else
  6886. {
  6887. bGui = !bGui;
  6888. }
  6889. }
  6890. if (Input.GetKeyDown(KeyCode.Y) && this.getModKeyPressing(modKey.Shift))
  6891. {
  6892. keyFlg = true;
  6893. bgIndex--;
  6894. if (bgIndex <= -1)
  6895. {
  6896. bgIndex = bgArray.Length - 1;
  6897. }
  6898. if (!moveBg)
  6899. {
  6900. bg.localScale = new Vector3(1f, 1f, 1f);
  6901. if (bgArray[bgIndex].Length == 36)
  6902. {
  6903. GameMain.Instance.BgMgr.ChangeBgMyRoom(bgArray[bgIndex]);
  6904. }
  6905. else
  6906. {
  6907. GameMain.Instance.BgMgr.ChangeBg(bgArray[bgIndex]);
  6908. }
  6909. bgCombo.selectedItemIndex = bgIndex;
  6910. if (bgArray[bgIndex] == "karaokeroom")
  6911. {
  6912. bg.transform.position = bgObject.transform.position;
  6913. Vector3 vector = Vector3.zero;
  6914. Vector3 zero3 = Vector3.zero;
  6915. zero3.y = 90f;
  6916. vector.z = 4f;
  6917. vector.x = 1f;
  6918. bg.transform.localPosition = vector;
  6919. bg.transform.localRotation = Quaternion.Euler(zero3);
  6920. }
  6921. }
  6922. }
  6923. else if (Input.GetKey(KeyCode.Y) && Input.GetKey(KeyCode.E))
  6924. {
  6925. keyFlg = true;
  6926. bg.localScale = new Vector3(bg.localScale.x * 1.005f, bg.localScale.y * 1.005f, bg.localScale.z * 1.005f);
  6927. }
  6928. else if (Input.GetKey(KeyCode.Y) && Input.GetKey(KeyCode.D))
  6929. {
  6930. keyFlg = true;
  6931. bg.localScale = new Vector3(bg.localScale.x * 0.995f, bg.localScale.y * 0.995f, bg.localScale.z * 0.995f);
  6932. }
  6933. else if (Input.GetKey(KeyCode.Y) && Input.GetKeyDown(KeyCode.C))
  6934. {
  6935. keyFlg = true;
  6936. bg.localScale = new Vector3(1f, 1f, 1f);
  6937. }
  6938. else if ((Input.GetKey(KeyCode.Y) || Input.GetKey(KeyCode.V)) && Input.GetKey(KeyCode.I) && Input.GetKey(KeyCode.J))
  6939. {
  6940. Vector3 vector2 = mainCameraTransform.TransformDirection(Vector3.forward);
  6941. Vector3 vector3 = mainCameraTransform.TransformDirection(Vector3.right);
  6942. Vector3 vector4 = mainCameraTransform.TransformDirection(Vector3.up);
  6943. Vector3 vector = bg.position;
  6944. vector += new Vector3(vector2.x, 0f, vector2.z) * -0.025f * speed;
  6945. vector += new Vector3(vector3.x, 0f, vector3.z) * 0.025f * speed;
  6946. bg.localPosition = vector;
  6947. if (Input.GetKey(KeyCode.Y))
  6948. {
  6949. keyFlg = true;
  6950. }
  6951. }
  6952. else if ((Input.GetKey(KeyCode.Y) || Input.GetKey(KeyCode.V)) && Input.GetKey(KeyCode.I) && Input.GetKey(KeyCode.L))
  6953. {
  6954. Vector3 vector2 = mainCameraTransform.TransformDirection(Vector3.forward);
  6955. Vector3 vector3 = mainCameraTransform.TransformDirection(Vector3.right);
  6956. Vector3 vector4 = mainCameraTransform.TransformDirection(Vector3.up);
  6957. Vector3 vector = bg.position;
  6958. vector += new Vector3(vector2.x, 0f, vector2.z) * -0.025f * speed;
  6959. vector += new Vector3(vector3.x, 0f, vector3.z) * -0.025f * speed;
  6960. bg.localPosition = vector;
  6961. if (Input.GetKey(KeyCode.Y))
  6962. {
  6963. keyFlg = true;
  6964. }
  6965. }
  6966. else if ((Input.GetKey(KeyCode.Y) || Input.GetKey(KeyCode.V)) && Input.GetKey(KeyCode.K) && Input.GetKey(KeyCode.J))
  6967. {
  6968. Vector3 vector2 = mainCameraTransform.TransformDirection(Vector3.forward);
  6969. Vector3 vector3 = mainCameraTransform.TransformDirection(Vector3.right);
  6970. Vector3 vector4 = mainCameraTransform.TransformDirection(Vector3.up);
  6971. Vector3 vector = bg.position;
  6972. vector += new Vector3(vector2.x, 0f, vector2.z) * 0.025f * speed;
  6973. vector += new Vector3(vector3.x, 0f, vector3.z) * 0.025f * speed;
  6974. bg.localPosition = vector;
  6975. if (Input.GetKey(KeyCode.Y))
  6976. {
  6977. keyFlg = true;
  6978. }
  6979. }
  6980. else if ((Input.GetKey(KeyCode.Y) || Input.GetKey(KeyCode.V)) && Input.GetKey(KeyCode.K) && Input.GetKey(KeyCode.L))
  6981. {
  6982. Vector3 vector2 = mainCameraTransform.TransformDirection(Vector3.forward);
  6983. Vector3 vector3 = mainCameraTransform.TransformDirection(Vector3.right);
  6984. Vector3 vector4 = mainCameraTransform.TransformDirection(Vector3.up);
  6985. Vector3 vector = bg.position;
  6986. vector += new Vector3(vector2.x, 0f, vector2.z) * 0.025f * speed;
  6987. vector += new Vector3(vector3.x, 0f, vector3.z) * -0.025f * speed;
  6988. bg.localPosition = vector;
  6989. if (Input.GetKey(KeyCode.Y))
  6990. {
  6991. keyFlg = true;
  6992. }
  6993. }
  6994. else if ((Input.GetKey(KeyCode.Y) || Input.GetKey(KeyCode.V)) && Input.GetKey(KeyCode.I))
  6995. {
  6996. Vector3 vector2 = mainCameraTransform.TransformDirection(Vector3.forward);
  6997. Vector3 vector3 = mainCameraTransform.TransformDirection(Vector3.right);
  6998. Vector3 vector4 = mainCameraTransform.TransformDirection(Vector3.up);
  6999. Vector3 vector = bg.position;
  7000. vector += new Vector3(vector2.x, 0f, vector2.z) * -0.025f * speed;
  7001. bg.localPosition = vector;
  7002. if (Input.GetKey(KeyCode.Y))
  7003. {
  7004. keyFlg = true;
  7005. }
  7006. }
  7007. else if ((Input.GetKey(KeyCode.Y) || Input.GetKey(KeyCode.V)) && Input.GetKey(KeyCode.K))
  7008. {
  7009. Vector3 vector2 = mainCameraTransform.TransformDirection(Vector3.forward);
  7010. Vector3 vector3 = mainCameraTransform.TransformDirection(Vector3.right);
  7011. Vector3 vector4 = mainCameraTransform.TransformDirection(Vector3.up);
  7012. Vector3 vector = bg.position;
  7013. vector += new Vector3(vector2.x, 0f, vector2.z) * 0.025f * speed;
  7014. bg.localPosition = vector;
  7015. if (Input.GetKey(KeyCode.Y))
  7016. {
  7017. keyFlg = true;
  7018. }
  7019. }
  7020. else if ((Input.GetKey(KeyCode.Y) || Input.GetKey(KeyCode.V)) && Input.GetKey(KeyCode.J))
  7021. {
  7022. Vector3 vector2 = mainCameraTransform.TransformDirection(Vector3.forward);
  7023. Vector3 vector3 = mainCameraTransform.TransformDirection(Vector3.right);
  7024. Vector3 vector4 = mainCameraTransform.TransformDirection(Vector3.up);
  7025. Vector3 vector = bg.position;
  7026. vector += new Vector3(vector3.x, 0f, vector3.z) * 0.025f * speed;
  7027. bg.localPosition = vector;
  7028. if (Input.GetKey(KeyCode.Y))
  7029. {
  7030. keyFlg = true;
  7031. }
  7032. }
  7033. else if ((Input.GetKey(KeyCode.Y) || Input.GetKey(KeyCode.V)) && Input.GetKey(KeyCode.L))
  7034. {
  7035. Vector3 vector2 = mainCameraTransform.TransformDirection(Vector3.forward);
  7036. Vector3 vector3 = mainCameraTransform.TransformDirection(Vector3.right);
  7037. Vector3 vector4 = mainCameraTransform.TransformDirection(Vector3.up);
  7038. Vector3 vector = bg.position;
  7039. vector += new Vector3(vector3.x, 0f, vector3.z) * -0.025f * speed;
  7040. bg.localPosition = vector;
  7041. if (Input.GetKey(KeyCode.Y))
  7042. {
  7043. keyFlg = true;
  7044. }
  7045. }
  7046. else if ((Input.GetKey(KeyCode.Y) || Input.GetKey(KeyCode.V)) && Input.GetKey(KeyCode.Alpha0))
  7047. {
  7048. Vector3 vector = bg.position;
  7049. vector.y -= 0.015f * speed;
  7050. bg.localPosition = vector;
  7051. if (Input.GetKey(KeyCode.Y))
  7052. {
  7053. keyFlg = true;
  7054. }
  7055. }
  7056. else if ((Input.GetKey(KeyCode.Y) || Input.GetKey(KeyCode.V)) && Input.GetKey(KeyCode.P))
  7057. {
  7058. Vector3 vector = bg.position;
  7059. vector.y += 0.015f * speed;
  7060. bg.localPosition = vector;
  7061. if (Input.GetKey(KeyCode.Y))
  7062. {
  7063. keyFlg = true;
  7064. }
  7065. }
  7066. else if ((Input.GetKey(KeyCode.Y) || Input.GetKey(KeyCode.V)) && Input.GetKey(KeyCode.U))
  7067. {
  7068. bg.RotateAround(maidArray[0].transform.position, Vector3.up, 0.7f);
  7069. if (Input.GetKey(KeyCode.Y))
  7070. {
  7071. keyFlg = true;
  7072. }
  7073. }
  7074. else if ((Input.GetKey(KeyCode.Y) || Input.GetKey(KeyCode.V)) && Input.GetKey(KeyCode.O))
  7075. {
  7076. bg.RotateAround(maidArray[0].transform.position, Vector3.up, -0.7f);
  7077. if (Input.GetKey(KeyCode.Y))
  7078. {
  7079. keyFlg = true;
  7080. }
  7081. }
  7082. else if (Input.GetKeyDown(KeyCode.Y) && Input.GetKey(KeyCode.Return))
  7083. {
  7084. if (Input.GetKey(KeyCode.Y))
  7085. {
  7086. keyFlg = true;
  7087. }
  7088. }
  7089. else if (Input.GetKeyUp(KeyCode.Y) && !yFlg)
  7090. {
  7091. if (keyFlg)
  7092. {
  7093. keyFlg = false;
  7094. }
  7095. else
  7096. {
  7097. bgIndex++;
  7098. if (bgIndex == bgArray.Length)
  7099. {
  7100. bgIndex = 0;
  7101. }
  7102. if (!moveBg)
  7103. {
  7104. bg.localScale = new Vector3(1f, 1f, 1f);
  7105. if (bgArray[bgIndex].Length == 36)
  7106. {
  7107. GameMain.Instance.BgMgr.ChangeBgMyRoom(bgArray[bgIndex]);
  7108. }
  7109. else
  7110. {
  7111. GameMain.Instance.BgMgr.ChangeBg(bgArray[bgIndex]);
  7112. }
  7113. bgCombo.selectedItemIndex = bgIndex;
  7114. if (bgArray[bgIndex] == "karaokeroom")
  7115. {
  7116. bg.transform.position = bgObject.transform.position;
  7117. Vector3 vector = Vector3.zero;
  7118. Vector3 zero3 = Vector3.zero;
  7119. zero3.y = 90f;
  7120. vector.z = 4f;
  7121. vector.x = 1f;
  7122. bg.transform.localPosition = vector;
  7123. bg.transform.localRotation = Quaternion.Euler(zero3);
  7124. }
  7125. }
  7126. }
  7127. }
  7128. if (maidArray[0] != null && maidArray[0].Visible)
  7129. {
  7130. if (Input.GetKeyDown(KeyCode.Comma) && this.getModKeyPressing(modKey.Shift))
  7131. {
  7132. int[] array6 = new int[1];
  7133. int[] array7 = array6;
  7134. if (maidCnt == 2)
  7135. {
  7136. array7 = new int[] {0, 1};
  7137. }
  7138. if (maidCnt == 3)
  7139. {
  7140. array7 = new int[] {0, 1, 2};
  7141. }
  7142. if (maidCnt == 4)
  7143. {
  7144. array7 = new int[] {0, 1, 2, 3};
  7145. }
  7146. if (maidCnt == 5)
  7147. {
  7148. array7 = new int[] {0, 1, 2, 3, 4};
  7149. }
  7150. if (maidCnt == 6)
  7151. {
  7152. array7 = new int[] {0, 1, 2, 3, 4, 5};
  7153. }
  7154. if (maidCnt == 7)
  7155. {
  7156. array7 = new int[] {0, 1, 2, 3, 4, 5, 6};
  7157. }
  7158. if (maidCnt == 8)
  7159. {
  7160. array7 = new int[] {0, 1, 2, 3, 4, 5, 6, 7};
  7161. }
  7162. if (maidCnt == 9)
  7163. {
  7164. array7 = new int[] {0, 1, 2, 3, 4, 5, 6, 7, 8};
  7165. }
  7166. if (maidCnt == 10)
  7167. {
  7168. array7 = new int[] {0, 1, 2, 3, 4, 5, 6, 7, 8, 9};
  7169. }
  7170. if (maidCnt == 11)
  7171. {
  7172. array7 = new int[] {0, 1, 2, 3, 4, 5, 6, 7, 8, 9, 10};
  7173. }
  7174. if (maidCnt == 12)
  7175. {
  7176. array7 = new int[] {0, 1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11};
  7177. }
  7178. Random random = new Random();
  7179. int n = array7.Length;
  7180. while (n > 1)
  7181. {
  7182. n--;
  7183. int j = random.Next(n + 1);
  7184. int num8 = array7[j];
  7185. array7[j] = array7[n];
  7186. array7[n] = num8;
  7187. }
  7188. int[] array8 = new int[maidCnt];
  7189. Vector3[] array9 = new Vector3[maidCnt];
  7190. Vector3[] array10 = new Vector3[maidCnt];
  7191. int[] array11 = new int[maidCnt];
  7192. for (int i = 0; i < maidCnt; i++)
  7193. {
  7194. array8[array7[i]] = poseIndex[array7[i]];
  7195. array9[array7[i]] = maidArray[array7[i]].transform.localRotation.eulerAngles;
  7196. array10[array7[i]] = maidArray[array7[i]].transform.position;
  7197. array11[array7[i]] = headEyeIndex[array7[i]];
  7198. }
  7199. for (int i = 0; i < maidCnt; i++)
  7200. {
  7201. if (maidArray[i] && maidArray[i].Visible && !isLock[i])
  7202. {
  7203. string[] array12 = poseArray[array8[array7[i]]].Split(new char[] {','});
  7204. isStop[i] = false;
  7205. poseCount[i] = 20;
  7206. Maid maid = maidArray[i];
  7207. if (array12[0].Contains("_momi") || array12[0].Contains("paizuri_"))
  7208. {
  7209. maid.body0.MuneYureL(0f);
  7210. maid.body0.MuneYureR(0f);
  7211. }
  7212. else
  7213. {
  7214. maid.body0.MuneYureL(1f);
  7215. maid.body0.MuneYureR(1f);
  7216. }
  7217. int num6;
  7218. if (array12[0].Contains("MultipleMaidsPose"))
  7219. {
  7220. string path = array12[0].Split(new char[] {'/'})[1];
  7221. byte[] array2 = new byte[0];
  7222. try
  7223. {
  7224. using (FileStream fileStream = new FileStream(path, FileMode.Open, FileAccess.Read))
  7225. {
  7226. array2 = new byte[fileStream.Length];
  7227. fileStream.Read(array2, 0, array2.Length);
  7228. }
  7229. }
  7230. catch { }
  7231. if (0 < array2.Length)
  7232. {
  7233. string text = Path.GetFileName(path);
  7234. long num5 = (long) text.GetHashCode();
  7235. maid.body0.CrossFade(num5.ToString(), array2, false, false, false, 0f, 1f);
  7236. Maid.AutoTwist[] array3 = new Maid.AutoTwist[]
  7237. {
  7238. Maid.AutoTwist.ShoulderL, Maid.AutoTwist.ShoulderR, Maid.AutoTwist.WristL,
  7239. Maid.AutoTwist.WristR, Maid.AutoTwist.ThighL, Maid.AutoTwist.ThighR
  7240. };
  7241. for (int m = 0; m < array3.Length; m++)
  7242. {
  7243. maid.SetAutoTwist(array3[m], true);
  7244. }
  7245. }
  7246. }
  7247. else if (array12[0].StartsWith("p") && int.TryParse(array12[0].Substring(1), out num6))
  7248. {
  7249. loadPose[i] = array12[0];
  7250. }
  7251. else if (!array12[0].StartsWith("dance_"))
  7252. {
  7253. maidArray[i].CrossFade(array12[0] + ".anm", false, true, false, 0f, 1f);
  7254. }
  7255. else
  7256. {
  7257. if (!maidArray[i].body0.m_Bones.GetComponent<Animation>().GetClip(array12[0] + ".anm"))
  7258. {
  7259. maidArray[i].body0.LoadAnime(array12[0] + ".anm",
  7260. GameUty.FileSystem,
  7261. array12[0] + ".anm",
  7262. false,
  7263. false);
  7264. }
  7265. maidArray[i].body0.m_Bones.GetComponent<Animation>().Play(array12[0] + ".anm");
  7266. }
  7267. if (array12.Length > 1)
  7268. {
  7269. maidArray[i].body0.m_Bones.GetComponent<Animation>()[array12[0] + ".anm"].time =
  7270. float.Parse(array12[1]);
  7271. isStop[i] = true;
  7272. if (array12.Length > 2)
  7273. {
  7274. Transform transform2 = CMT.SearchObjName(maidArray[i].body0.m_Bones.transform, "Bip01", true);
  7275. isPoseIti[i] = true;
  7276. poseIti[i] = maidArray[i].transform.position;
  7277. maidArray[i].transform.position = new Vector3(100f, 100f, 100f);
  7278. }
  7279. }
  7280. }
  7281. poseIndex[i] = array8[array7[i]];
  7282. maidArray[i].SetRot(array9[array7[i]]);
  7283. maidArray[i].SetPos(array10[array7[i]]);
  7284. headEyeIndex[i] = array11[array7[i]];
  7285. maidArray[i].body0.trsLookTarget = GameMain.Instance.MainCamera.transform;
  7286. maidArray[i].body0.boHeadToCam = true;
  7287. maidArray[i].body0.boEyeToCam = true;
  7288. if (headEyeIndex[i] == 0)
  7289. {
  7290. maidArray[i].body0.trsLookTarget = GameMain.Instance.MainCamera.transform;
  7291. maidArray[i].body0.boHeadToCam = true;
  7292. maidArray[i].body0.boEyeToCam = true;
  7293. }
  7294. else
  7295. {
  7296. maidArray[i].body0.trsLookTarget = null;
  7297. if (headEyeIndex[i] == 1)
  7298. {
  7299. maidArray[i].body0.offsetLookTarget = new Vector3(-0.7f, 1f, -0.6f);
  7300. }
  7301. if (headEyeIndex[i] == 2)
  7302. {
  7303. maidArray[i].body0.offsetLookTarget = new Vector3(-0.6f, 1f, 0f);
  7304. }
  7305. if (headEyeIndex[i] == 3)
  7306. {
  7307. maidArray[i].body0.offsetLookTarget = new Vector3(-0.7f, 1f, 0.6f);
  7308. }
  7309. if (headEyeIndex[i] == 4)
  7310. {
  7311. maidArray[i].body0.offsetLookTarget = new Vector3(-0.1f, 1f, -0.4f);
  7312. }
  7313. if (headEyeIndex[i] == 5)
  7314. {
  7315. maidArray[i].body0.offsetLookTarget = new Vector3(0f, 1f, 0f);
  7316. }
  7317. if (headEyeIndex[i] == 6)
  7318. {
  7319. maidArray[i].body0.offsetLookTarget = new Vector3(-0.1f, 1f, 0.4f);
  7320. }
  7321. if (headEyeIndex[i] == 7)
  7322. {
  7323. maidArray[i].body0.offsetLookTarget = new Vector3(0.4f, 1f, -0.5f);
  7324. }
  7325. if (headEyeIndex[i] == 8)
  7326. {
  7327. maidArray[i].body0.offsetLookTarget = new Vector3(0.3f, 1f, 0f);
  7328. }
  7329. if (headEyeIndex[i] == 9)
  7330. {
  7331. maidArray[i].body0.offsetLookTarget = new Vector3(0.4f, 1f, 0.5f);
  7332. }
  7333. }
  7334. }
  7335. }
  7336. else if (Input.GetKeyDown(KeyCode.Comma))
  7337. {
  7338. int[] array8 = new int[maidCnt];
  7339. Vector3[] array9 = new Vector3[maidCnt];
  7340. Vector3[] array10 = new Vector3[maidCnt];
  7341. int[] array11 = new int[maidCnt];
  7342. for (int i = 0; i < maidCnt; i++)
  7343. {
  7344. array8[i] = poseIndex[i];
  7345. array9[i] = maidArray[i].transform.localRotation.eulerAngles;
  7346. array10[i] = maidArray[i].transform.position;
  7347. array11[i] = headEyeIndex[i];
  7348. }
  7349. for (int i = 0; i < maidCnt; i++)
  7350. {
  7351. if (i == 0)
  7352. {
  7353. if (!isLock[i])
  7354. {
  7355. if (maidArray[i] && maidArray[i].Visible)
  7356. {
  7357. string[] array12 = poseArray[array8[maidCnt - i - 1]].Split(new char[] {','});
  7358. isStop[i] = false;
  7359. poseCount[i] = 20;
  7360. Maid maid = maidArray[i];
  7361. if (array12[0].Contains("_momi") || array12[0].Contains("paizuri_"))
  7362. {
  7363. maid.body0.MuneYureL(0f);
  7364. maid.body0.MuneYureR(0f);
  7365. }
  7366. else
  7367. {
  7368. maid.body0.MuneYureL(1f);
  7369. maid.body0.MuneYureR(1f);
  7370. }
  7371. int num6;
  7372. if (array12[0].Contains("MultipleMaidsPose"))
  7373. {
  7374. string path = array12[0].Split(new char[] {'/'})[1];
  7375. byte[] array2 = new byte[0];
  7376. try
  7377. {
  7378. using (FileStream fileStream = new FileStream(path, FileMode.Open, FileAccess.Read))
  7379. {
  7380. array2 = new byte[fileStream.Length];
  7381. fileStream.Read(array2, 0, array2.Length);
  7382. }
  7383. }
  7384. catch { }
  7385. if (0 < array2.Length)
  7386. {
  7387. string text = Path.GetFileName(path);
  7388. long num5 = (long) text.GetHashCode();
  7389. maid.body0.CrossFade(num5.ToString(), array2, false, false, false, 0f, 1f);
  7390. Maid.AutoTwist[] array3 = new Maid.AutoTwist[]
  7391. {
  7392. Maid.AutoTwist.ShoulderL, Maid.AutoTwist.ShoulderR, Maid.AutoTwist.WristL,
  7393. Maid.AutoTwist.WristR, Maid.AutoTwist.ThighL, Maid.AutoTwist.ThighR
  7394. };
  7395. for (int m = 0; m < array3.Length; m++)
  7396. {
  7397. maid.SetAutoTwist(array3[m], true);
  7398. }
  7399. }
  7400. }
  7401. else if (array12[0].StartsWith("p") && int.TryParse(array12[0].Substring(1), out num6))
  7402. {
  7403. loadPose[i] = array12[0];
  7404. }
  7405. else if (!array12[0].StartsWith("dance_"))
  7406. {
  7407. maidArray[i].CrossFade(array12[0] + ".anm", false, true, false, 0f, 1f);
  7408. }
  7409. else
  7410. {
  7411. if (!maidArray[i].body0.m_Bones.GetComponent<Animation>().GetClip(array12[0] + ".anm"))
  7412. {
  7413. maidArray[i].body0.LoadAnime(array12[0] + ".anm",
  7414. GameUty.FileSystem,
  7415. array12[0] + ".anm",
  7416. false,
  7417. false);
  7418. }
  7419. maidArray[i].body0.m_Bones.GetComponent<Animation>().Play(array12[0] + ".anm");
  7420. }
  7421. if (array12.Length > 1)
  7422. {
  7423. maidArray[i].body0.m_Bones.GetComponent<Animation>()[array12[0] + ".anm"].time =
  7424. float.Parse(array12[1]);
  7425. isStop[i] = true;
  7426. if (array12.Length > 2)
  7427. {
  7428. Transform transform2 =
  7429. CMT.SearchObjName(maidArray[i].body0.m_Bones.transform, "Bip01", true);
  7430. isPoseIti[i] = true;
  7431. poseIti[i] = maidArray[i].transform.position;
  7432. maidArray[i].transform.position = new Vector3(100f, 100f, 100f);
  7433. }
  7434. }
  7435. }
  7436. }
  7437. poseIndex[i] = array8[maidCnt - i - 1];
  7438. headEyeIndex[i] = array11[maidCnt - i - 1];
  7439. }
  7440. else
  7441. {
  7442. if (!isLock[i])
  7443. {
  7444. if (maidArray[i] && maidArray[i].Visible)
  7445. {
  7446. string[] array12 = poseArray[array8[i - 1]].Split(new char[] {','});
  7447. isStop[i] = false;
  7448. poseCount[i] = 20;
  7449. Maid maid = maidArray[i];
  7450. if (array12[0].Contains("_momi") || array12[0].Contains("paizuri_"))
  7451. {
  7452. maid.body0.MuneYureL(0f);
  7453. maid.body0.MuneYureR(0f);
  7454. }
  7455. else
  7456. {
  7457. maid.body0.MuneYureL(1f);
  7458. maid.body0.MuneYureR(1f);
  7459. }
  7460. int num6;
  7461. if (array12[0].Contains("MultipleMaidsPose"))
  7462. {
  7463. string path = array12[0].Split(new char[] {'/'})[1];
  7464. byte[] array2 = new byte[0];
  7465. try
  7466. {
  7467. using (FileStream fileStream = new FileStream(path, FileMode.Open, FileAccess.Read))
  7468. {
  7469. array2 = new byte[fileStream.Length];
  7470. fileStream.Read(array2, 0, array2.Length);
  7471. }
  7472. }
  7473. catch { }
  7474. if (0 < array2.Length)
  7475. {
  7476. string text = Path.GetFileName(path);
  7477. long num5 = (long) text.GetHashCode();
  7478. maid.body0.CrossFade(num5.ToString(), array2, false, false, false, 0f, 1f);
  7479. Maid.AutoTwist[] array3 = new Maid.AutoTwist[]
  7480. {
  7481. Maid.AutoTwist.ShoulderL, Maid.AutoTwist.ShoulderR, Maid.AutoTwist.WristL,
  7482. Maid.AutoTwist.WristR, Maid.AutoTwist.ThighL, Maid.AutoTwist.ThighR
  7483. };
  7484. for (int m = 0; m < array3.Length; m++)
  7485. {
  7486. maid.SetAutoTwist(array3[m], true);
  7487. }
  7488. }
  7489. }
  7490. else if (array12[0].StartsWith("p") && int.TryParse(array12[0].Substring(1), out num6))
  7491. {
  7492. loadPose[i] = array12[0];
  7493. }
  7494. else if (!array12[0].StartsWith("dance_"))
  7495. {
  7496. maidArray[i].CrossFade(array12[0] + ".anm", false, true, false, 0f, 1f);
  7497. }
  7498. else
  7499. {
  7500. if (!maidArray[i].body0.m_Bones.GetComponent<Animation>().GetClip(array12[0] + ".anm"))
  7501. {
  7502. maidArray[i].body0.LoadAnime(array12[0] + ".anm",
  7503. GameUty.FileSystem,
  7504. array12[0] + ".anm",
  7505. false,
  7506. false);
  7507. }
  7508. maidArray[i].body0.m_Bones.GetComponent<Animation>().Play(array12[0] + ".anm");
  7509. }
  7510. if (array12.Length > 1)
  7511. {
  7512. maidArray[i].body0.m_Bones.GetComponent<Animation>()[array12[0] + ".anm"].time =
  7513. float.Parse(array12[1]);
  7514. isStop[i] = true;
  7515. if (array12.Length > 2)
  7516. {
  7517. Transform transform2 =
  7518. CMT.SearchObjName(maidArray[i].body0.m_Bones.transform, "Bip01", true);
  7519. isPoseIti[i] = true;
  7520. poseIti[i] = maidArray[i].transform.position;
  7521. maidArray[i].transform.position = new Vector3(100f, 100f, 100f);
  7522. }
  7523. }
  7524. }
  7525. }
  7526. poseIndex[i] = array8[i - 1];
  7527. headEyeIndex[i] = array11[i - 1];
  7528. }
  7529. maidArray[i].body0.trsLookTarget = GameMain.Instance.MainCamera.transform;
  7530. maidArray[i].body0.boHeadToCam = true;
  7531. maidArray[i].body0.boEyeToCam = true;
  7532. if (headEyeIndex[i] == 0)
  7533. {
  7534. maidArray[i].body0.trsLookTarget = GameMain.Instance.MainCamera.transform;
  7535. maidArray[i].body0.boHeadToCam = true;
  7536. maidArray[i].body0.boEyeToCam = true;
  7537. }
  7538. else
  7539. {
  7540. maidArray[i].body0.trsLookTarget = null;
  7541. if (headEyeIndex[i] == 1)
  7542. {
  7543. maidArray[i].body0.offsetLookTarget = new Vector3(-0.7f, 1f, -0.6f);
  7544. }
  7545. if (headEyeIndex[i] == 2)
  7546. {
  7547. maidArray[i].body0.offsetLookTarget = new Vector3(-0.6f, 1f, 0f);
  7548. }
  7549. if (headEyeIndex[i] == 3)
  7550. {
  7551. maidArray[i].body0.offsetLookTarget = new Vector3(-0.7f, 1f, 0.6f);
  7552. }
  7553. if (headEyeIndex[i] == 4)
  7554. {
  7555. maidArray[i].body0.offsetLookTarget = new Vector3(-0.1f, 1f, -0.4f);
  7556. }
  7557. if (headEyeIndex[i] == 5)
  7558. {
  7559. maidArray[i].body0.offsetLookTarget = new Vector3(0f, 1f, 0f);
  7560. }
  7561. if (headEyeIndex[i] == 6)
  7562. {
  7563. maidArray[i].body0.offsetLookTarget = new Vector3(-0.1f, 1f, 0.4f);
  7564. }
  7565. if (headEyeIndex[i] == 7)
  7566. {
  7567. maidArray[i].body0.offsetLookTarget = new Vector3(0.4f, 1f, -0.5f);
  7568. }
  7569. if (headEyeIndex[i] == 8)
  7570. {
  7571. maidArray[i].body0.offsetLookTarget = new Vector3(0.3f, 1f, 0f);
  7572. }
  7573. if (headEyeIndex[i] == 9)
  7574. {
  7575. maidArray[i].body0.offsetLookTarget = new Vector3(0.4f, 1f, 0.5f);
  7576. }
  7577. }
  7578. if (i == 0)
  7579. {
  7580. maidArray[i].SetRot(array9[maidCnt - i - 1]);
  7581. maidArray[i].SetPos(array10[maidCnt - i - 1]);
  7582. }
  7583. else
  7584. {
  7585. maidArray[i].SetRot(array9[i - 1]);
  7586. maidArray[i].SetPos(array10[i - 1]);
  7587. }
  7588. }
  7589. }
  7590. for (int i = 0; i < maidCnt; i++)
  7591. {
  7592. if (Input.GetKey(KeyCode.B) && this.getModKeyPressing(modKey.Shift))
  7593. {
  7594. if (maidArray[i] && maidArray[i].Visible)
  7595. {
  7596. maidArray[i].body0.transform.localRotation =
  7597. Quaternion.Euler(maidArray[i].body0.transform.localEulerAngles)
  7598. * Quaternion.AngleAxis(-1.5f, Vector3.up);
  7599. }
  7600. }
  7601. else if (Input.GetKey(KeyCode.B))
  7602. {
  7603. if (maidArray[i] && maidArray[i].Visible)
  7604. {
  7605. maidArray[i].body0.transform.localRotation =
  7606. Quaternion.Euler(maidArray[i].body0.transform.localEulerAngles)
  7607. * Quaternion.AngleAxis(1.5f, Vector3.up);
  7608. }
  7609. }
  7610. if (Input.GetKeyDown(KeyCode.N) && Input.GetKey(KeyCode.LeftAlt) && !isLock[i])
  7611. {
  7612. if (maidArray[1] && maidArray[1].Visible)
  7613. {
  7614. if (maidArray[0].transform.position == maidArray[1].transform.position
  7615. || (maidArray[2] && maidArray[0].transform.position == maidArray[2].transform.position))
  7616. {
  7617. Vector3 vector = Vector3.zero;
  7618. vector.x = 0.6f;
  7619. maidArray[1].SetPos(vector);
  7620. if (maidArray[2] && maidArray[2].Visible)
  7621. {
  7622. vector.x = -0.6f;
  7623. maidArray[2].SetPos(vector);
  7624. }
  7625. if (maidArray[3] && maidArray[3].Visible)
  7626. {
  7627. vector.x = 1.2f;
  7628. maidArray[3].SetPos(vector);
  7629. }
  7630. if (maidArray[4] && maidArray[4].Visible)
  7631. {
  7632. vector.x = -1.2f;
  7633. maidArray[4].SetPos(vector);
  7634. }
  7635. if (maidArray[5] && maidArray[5].Visible)
  7636. {
  7637. vector.x = 1.8f;
  7638. maidArray[5].SetPos(vector);
  7639. }
  7640. if (maidArray[6] && maidArray[6].Visible)
  7641. {
  7642. vector.x = -1.8f;
  7643. maidArray[6].SetPos(vector);
  7644. }
  7645. if (maidArray[7] && maidArray[7].Visible)
  7646. {
  7647. vector.x = 2.4f;
  7648. maidArray[7].SetPos(vector);
  7649. }
  7650. if (maidArray[8] && maidArray[8].Visible)
  7651. {
  7652. vector.x = -2.4f;
  7653. maidArray[8].SetPos(vector);
  7654. }
  7655. if (maidArray[9] && maidArray[9].Visible)
  7656. {
  7657. vector.x = 3f;
  7658. maidArray[9].SetPos(vector);
  7659. }
  7660. if (maidArray[10] && maidArray[10].Visible)
  7661. {
  7662. vector.x = -3f;
  7663. maidArray[10].SetPos(vector);
  7664. }
  7665. if (maidArray[11] && maidArray[11].Visible)
  7666. {
  7667. vector.x = 3.6f;
  7668. maidArray[11].SetPos(vector);
  7669. }
  7670. if (maidArray[12] && maidArray[12].Visible)
  7671. {
  7672. vector.x = -3.6f;
  7673. maidArray[12].SetPos(vector);
  7674. }
  7675. if (maidArray[13] && maidArray[13].Visible)
  7676. {
  7677. vector.x = 4.2f;
  7678. maidArray[13].SetPos(vector);
  7679. }
  7680. }
  7681. }
  7682. for (int k = 0; k < groupList.Count; k++)
  7683. {
  7684. if (k == 0 && poseIndex[i] <= (int) groupList[k])
  7685. {
  7686. if (poseIndex[i] == 0)
  7687. {
  7688. poseIndex[i] = (int) groupList[groupList.Count - 1];
  7689. }
  7690. else
  7691. {
  7692. poseIndex[i] = 0;
  7693. }
  7694. break;
  7695. }
  7696. if (k > 0 && poseIndex[i] > (int) groupList[k - 1] && poseIndex[i] <= (int) groupList[k])
  7697. {
  7698. poseIndex[i] = (int) groupList[k - 1];
  7699. break;
  7700. }
  7701. }
  7702. if (poseIndex[i] > (int) groupList[groupList.Count - 1])
  7703. {
  7704. poseIndex[i] = (int) groupList[groupList.Count - 1];
  7705. }
  7706. if (maidArray[i] && maidArray[i].Visible)
  7707. {
  7708. string[] array = poseArray[poseIndex[i]].Split(new char[] {','});
  7709. isStop[i] = false;
  7710. poseCount[i] = 20;
  7711. Maid maid = maidArray[i];
  7712. if (array[0].Contains("_momi") || array[0].Contains("paizuri_"))
  7713. {
  7714. maid.body0.MuneYureL(0f);
  7715. maid.body0.MuneYureR(0f);
  7716. }
  7717. else
  7718. {
  7719. maid.body0.MuneYureL(1f);
  7720. maid.body0.MuneYureR(1f);
  7721. }
  7722. int num6;
  7723. if (array[0].Contains("MultipleMaidsPose"))
  7724. {
  7725. string path = array[0].Split(new char[] {'/'})[1];
  7726. byte[] array2 = new byte[0];
  7727. try
  7728. {
  7729. using (FileStream fileStream = new FileStream(path, FileMode.Open, FileAccess.Read))
  7730. {
  7731. array2 = new byte[fileStream.Length];
  7732. fileStream.Read(array2, 0, array2.Length);
  7733. }
  7734. }
  7735. catch { }
  7736. if (0 < array2.Length)
  7737. {
  7738. string text = Path.GetFileName(path);
  7739. long num5 = (long) text.GetHashCode();
  7740. maid.body0.CrossFade(num5.ToString(), array2, false, false, false, 0f, 1f);
  7741. Maid.AutoTwist[] array3 = new Maid.AutoTwist[]
  7742. {
  7743. Maid.AutoTwist.ShoulderL, Maid.AutoTwist.ShoulderR, Maid.AutoTwist.WristL,
  7744. Maid.AutoTwist.WristR, Maid.AutoTwist.ThighL, Maid.AutoTwist.ThighR
  7745. };
  7746. for (int m = 0; m < array3.Length; m++)
  7747. {
  7748. maid.SetAutoTwist(array3[m], true);
  7749. }
  7750. }
  7751. }
  7752. else if (array[0].StartsWith("p") && int.TryParse(array[0].Substring(1), out num6))
  7753. {
  7754. loadPose[i] = array[0];
  7755. }
  7756. else if (!array[0].StartsWith("dance_"))
  7757. {
  7758. maidArray[i].CrossFade(array[0] + ".anm", false, true, false, 0f, 1f);
  7759. }
  7760. else
  7761. {
  7762. if (!maidArray[i].body0.m_Bones.GetComponent<Animation>().GetClip(array[0] + ".anm"))
  7763. {
  7764. maidArray[i].body0.LoadAnime(array[0] + ".anm",
  7765. GameUty.FileSystem,
  7766. array[0] + ".anm",
  7767. false,
  7768. false);
  7769. }
  7770. maidArray[i].body0.m_Bones.GetComponent<Animation>().Play(array[0] + ".anm");
  7771. }
  7772. if (array.Length > 1)
  7773. {
  7774. maidArray[i].body0.m_Bones.GetComponent<Animation>()[array[0] + ".anm"].time = float.Parse(array[1]);
  7775. isStop[i] = true;
  7776. if (array.Length > 2)
  7777. {
  7778. Transform transform2 = CMT.SearchObjName(maidArray[i].body0.m_Bones.transform, "Bip01", true);
  7779. isPoseIti[i] = true;
  7780. poseIti[i] = maidArray[i].transform.position;
  7781. maidArray[i].transform.position = new Vector3(100f, 100f, 100f);
  7782. }
  7783. }
  7784. }
  7785. }
  7786. else if (Input.GetKeyDown(KeyCode.N) && Input.GetKey(KeyCode.RightAlt) && !isLock[i])
  7787. {
  7788. if (maidArray[1] && maidArray[1].Visible)
  7789. {
  7790. if (maidArray[0].transform.position == maidArray[1].transform.position
  7791. || (maidArray[2] && maidArray[0].transform.position == maidArray[2].transform.position))
  7792. {
  7793. Vector3 vector = Vector3.zero;
  7794. vector.x = 0.6f;
  7795. maidArray[1].SetPos(vector);
  7796. if (maidArray[2] && maidArray[2].Visible)
  7797. {
  7798. vector.x = -0.6f;
  7799. maidArray[2].SetPos(vector);
  7800. }
  7801. if (maidArray[3] && maidArray[3].Visible)
  7802. {
  7803. vector.x = 1.2f;
  7804. maidArray[3].SetPos(vector);
  7805. }
  7806. if (maidArray[4] && maidArray[4].Visible)
  7807. {
  7808. vector.x = -1.2f;
  7809. maidArray[4].SetPos(vector);
  7810. }
  7811. if (maidArray[5] && maidArray[5].Visible)
  7812. {
  7813. vector.x = 1.8f;
  7814. maidArray[5].SetPos(vector);
  7815. }
  7816. if (maidArray[6] && maidArray[6].Visible)
  7817. {
  7818. vector.x = -1.8f;
  7819. maidArray[6].SetPos(vector);
  7820. }
  7821. if (maidArray[7] && maidArray[7].Visible)
  7822. {
  7823. vector.x = 2.4f;
  7824. maidArray[7].SetPos(vector);
  7825. }
  7826. if (maidArray[8] && maidArray[8].Visible)
  7827. {
  7828. vector.x = -2.4f;
  7829. maidArray[8].SetPos(vector);
  7830. }
  7831. if (maidArray[9] && maidArray[9].Visible)
  7832. {
  7833. vector.x = 3f;
  7834. maidArray[9].SetPos(vector);
  7835. }
  7836. if (maidArray[10] && maidArray[10].Visible)
  7837. {
  7838. vector.x = -3f;
  7839. maidArray[10].SetPos(vector);
  7840. }
  7841. if (maidArray[11] && maidArray[11].Visible)
  7842. {
  7843. vector.x = 3.6f;
  7844. maidArray[11].SetPos(vector);
  7845. }
  7846. if (maidArray[12] && maidArray[12].Visible)
  7847. {
  7848. vector.x = -3.6f;
  7849. maidArray[12].SetPos(vector);
  7850. }
  7851. if (maidArray[13] && maidArray[13].Visible)
  7852. {
  7853. vector.x = 4.2f;
  7854. maidArray[13].SetPos(vector);
  7855. }
  7856. }
  7857. }
  7858. int num7 = poseIndex[i];
  7859. for (int k = 0; k < groupList.Count; k++)
  7860. {
  7861. if (poseIndex[i] < (int) groupList[k])
  7862. {
  7863. poseIndex[i] = (int) groupList[k];
  7864. break;
  7865. }
  7866. }
  7867. if (num7 == poseIndex[i] && poseIndex[i] >= (int) groupList[groupList.Count - 1])
  7868. {
  7869. poseIndex[i] = 0;
  7870. }
  7871. if (maidArray[i] && maidArray[i].Visible)
  7872. {
  7873. string[] array = poseArray[poseIndex[i]].Split(new char[] {','});
  7874. isStop[i] = false;
  7875. poseCount[i] = 20;
  7876. Maid maid = maidArray[i];
  7877. if (array[0].Contains("_momi") || array[0].Contains("paizuri_"))
  7878. {
  7879. maid.body0.MuneYureL(0f);
  7880. maid.body0.MuneYureR(0f);
  7881. }
  7882. else
  7883. {
  7884. maid.body0.MuneYureL(1f);
  7885. maid.body0.MuneYureR(1f);
  7886. }
  7887. int num6;
  7888. if (array[0].Contains("MultipleMaidsPose"))
  7889. {
  7890. string path = array[0].Split(new char[] {'/'})[1];
  7891. byte[] array2 = new byte[0];
  7892. try
  7893. {
  7894. using (FileStream fileStream = new FileStream(path, FileMode.Open, FileAccess.Read))
  7895. {
  7896. array2 = new byte[fileStream.Length];
  7897. fileStream.Read(array2, 0, array2.Length);
  7898. }
  7899. }
  7900. catch { }
  7901. if (0 < array2.Length)
  7902. {
  7903. string text = Path.GetFileName(path);
  7904. long num5 = (long) text.GetHashCode();
  7905. maid.body0.CrossFade(num5.ToString(), array2, false, false, false, 0f, 1f);
  7906. Maid.AutoTwist[] array3 = new Maid.AutoTwist[]
  7907. {
  7908. Maid.AutoTwist.ShoulderL, Maid.AutoTwist.ShoulderR, Maid.AutoTwist.WristL,
  7909. Maid.AutoTwist.WristR, Maid.AutoTwist.ThighL, Maid.AutoTwist.ThighR
  7910. };
  7911. for (int m = 0; m < array3.Length; m++)
  7912. {
  7913. maid.SetAutoTwist(array3[m], true);
  7914. }
  7915. }
  7916. }
  7917. else if (array[0].StartsWith("p") && int.TryParse(array[0].Substring(1), out num6))
  7918. {
  7919. loadPose[i] = array[0];
  7920. }
  7921. else if (!array[0].StartsWith("dance_"))
  7922. {
  7923. maidArray[i].CrossFade(array[0] + ".anm", false, true, false, 0f, 1f);
  7924. }
  7925. else
  7926. {
  7927. if (!maidArray[i].body0.m_Bones.GetComponent<Animation>().GetClip(array[0] + ".anm"))
  7928. {
  7929. maidArray[i].body0.LoadAnime(array[0] + ".anm",
  7930. GameUty.FileSystem,
  7931. array[0] + ".anm",
  7932. false,
  7933. false);
  7934. }
  7935. maidArray[i].body0.m_Bones.GetComponent<Animation>().Play(array[0] + ".anm");
  7936. }
  7937. if (array.Length > 1)
  7938. {
  7939. maidArray[i].body0.m_Bones.GetComponent<Animation>()[array[0] + ".anm"].time = float.Parse(array[1]);
  7940. isStop[i] = true;
  7941. if (array.Length > 2)
  7942. {
  7943. Transform transform2 = CMT.SearchObjName(maidArray[i].body0.m_Bones.transform, "Bip01", true);
  7944. isPoseIti[i] = true;
  7945. poseIti[i] = maidArray[i].transform.position;
  7946. maidArray[i].transform.position = new Vector3(100f, 100f, 100f);
  7947. }
  7948. }
  7949. }
  7950. }
  7951. else if (Input.GetKeyDown(KeyCode.N) && this.getModKeyPressing(modKey.Shift) && !isLock[i])
  7952. {
  7953. if (maidArray[1] && maidArray[1].Visible)
  7954. {
  7955. if (maidArray[0].transform.position == maidArray[1].transform.position
  7956. || (maidArray[2] && maidArray[0].transform.position == maidArray[2].transform.position))
  7957. {
  7958. Vector3 vector = Vector3.zero;
  7959. vector.x = 0.6f;
  7960. maidArray[1].SetPos(vector);
  7961. if (maidArray[2] && maidArray[2].Visible)
  7962. {
  7963. vector.x = -0.6f;
  7964. maidArray[2].SetPos(vector);
  7965. }
  7966. if (maidArray[3] && maidArray[3].Visible)
  7967. {
  7968. vector.x = 1.2f;
  7969. maidArray[3].SetPos(vector);
  7970. }
  7971. if (maidArray[4] && maidArray[4].Visible)
  7972. {
  7973. vector.x = -1.2f;
  7974. maidArray[4].SetPos(vector);
  7975. }
  7976. if (maidArray[5] && maidArray[5].Visible)
  7977. {
  7978. vector.x = 1.8f;
  7979. maidArray[5].SetPos(vector);
  7980. }
  7981. if (maidArray[6] && maidArray[6].Visible)
  7982. {
  7983. vector.x = -1.8f;
  7984. maidArray[6].SetPos(vector);
  7985. }
  7986. if (maidArray[7] && maidArray[7].Visible)
  7987. {
  7988. vector.x = 2.4f;
  7989. maidArray[7].SetPos(vector);
  7990. }
  7991. if (maidArray[8] && maidArray[8].Visible)
  7992. {
  7993. vector.x = -2.4f;
  7994. maidArray[8].SetPos(vector);
  7995. }
  7996. if (maidArray[9] && maidArray[9].Visible)
  7997. {
  7998. vector.x = 3f;
  7999. maidArray[9].SetPos(vector);
  8000. }
  8001. if (maidArray[10] && maidArray[10].Visible)
  8002. {
  8003. vector.x = -3f;
  8004. maidArray[10].SetPos(vector);
  8005. }
  8006. if (maidArray[11] && maidArray[11].Visible)
  8007. {
  8008. vector.x = 3.6f;
  8009. maidArray[11].SetPos(vector);
  8010. }
  8011. if (maidArray[12] && maidArray[12].Visible)
  8012. {
  8013. vector.x = -3.6f;
  8014. maidArray[12].SetPos(vector);
  8015. }
  8016. if (maidArray[13] && maidArray[13].Visible)
  8017. {
  8018. vector.x = 4.2f;
  8019. maidArray[13].SetPos(vector);
  8020. }
  8021. }
  8022. }
  8023. poseIndex[i]--;
  8024. if (poseIndex[i] <= -1)
  8025. {
  8026. poseIndex[i] = poseArray.Length - 1;
  8027. }
  8028. if (maidArray[i] && maidArray[i].Visible)
  8029. {
  8030. string[] array = poseArray[poseIndex[i]].Split(new char[] {','});
  8031. isStop[i] = false;
  8032. poseCount[i] = 20;
  8033. Maid maid = maidArray[i];
  8034. if (array[0].Contains("_momi") || array[0].Contains("paizuri_"))
  8035. {
  8036. maid.body0.MuneYureL(0f);
  8037. maid.body0.MuneYureR(0f);
  8038. }
  8039. else
  8040. {
  8041. maid.body0.MuneYureL(1f);
  8042. maid.body0.MuneYureR(1f);
  8043. }
  8044. int num6;
  8045. if (array[0].Contains("MultipleMaidsPose"))
  8046. {
  8047. string path = array[0].Split(new char[] {'/'})[1];
  8048. byte[] array2 = new byte[0];
  8049. try
  8050. {
  8051. using (FileStream fileStream = new FileStream(path, FileMode.Open, FileAccess.Read))
  8052. {
  8053. array2 = new byte[fileStream.Length];
  8054. fileStream.Read(array2, 0, array2.Length);
  8055. }
  8056. }
  8057. catch { }
  8058. if (0 < array2.Length)
  8059. {
  8060. string text = Path.GetFileName(path);
  8061. long num5 = (long) text.GetHashCode();
  8062. maid.body0.CrossFade(num5.ToString(), array2, false, false, false, 0f, 1f);
  8063. Maid.AutoTwist[] array3 = new Maid.AutoTwist[]
  8064. {
  8065. Maid.AutoTwist.ShoulderL, Maid.AutoTwist.ShoulderR, Maid.AutoTwist.WristL,
  8066. Maid.AutoTwist.WristR, Maid.AutoTwist.ThighL, Maid.AutoTwist.ThighR
  8067. };
  8068. for (int m = 0; m < array3.Length; m++)
  8069. {
  8070. maid.SetAutoTwist(array3[m], true);
  8071. }
  8072. }
  8073. }
  8074. else if (array[0].StartsWith("p") && int.TryParse(array[0].Substring(1), out num6))
  8075. {
  8076. loadPose[i] = array[0];
  8077. }
  8078. else if (!array[0].StartsWith("dance_"))
  8079. {
  8080. maidArray[i].CrossFade(array[0] + ".anm", false, true, false, 0f, 1f);
  8081. }
  8082. else
  8083. {
  8084. if (!maidArray[i].body0.m_Bones.GetComponent<Animation>().GetClip(array[0] + ".anm"))
  8085. {
  8086. maidArray[i].body0.LoadAnime(array[0] + ".anm",
  8087. GameUty.FileSystem,
  8088. array[0] + ".anm",
  8089. false,
  8090. false);
  8091. }
  8092. maidArray[i].body0.m_Bones.GetComponent<Animation>().Play(array[0] + ".anm");
  8093. }
  8094. if (array.Length > 1)
  8095. {
  8096. maidArray[i].body0.m_Bones.GetComponent<Animation>()[array[0] + ".anm"].time = float.Parse(array[1]);
  8097. isStop[i] = true;
  8098. if (array.Length > 2)
  8099. {
  8100. Transform transform2 = CMT.SearchObjName(maidArray[i].body0.m_Bones.transform, "Bip01", true);
  8101. isPoseIti[i] = true;
  8102. poseIti[i] = maidArray[i].transform.position;
  8103. maidArray[i].transform.position = new Vector3(100f, 100f, 100f);
  8104. }
  8105. }
  8106. }
  8107. }
  8108. else if (Input.GetKeyDown(KeyCode.N) && !isLock[i])
  8109. {
  8110. if (maidArray[1] && maidArray[1].Visible)
  8111. {
  8112. if (maidArray[0].transform.position == maidArray[1].transform.position
  8113. || (maidArray[2] && maidArray[0].transform.position == maidArray[2].transform.position))
  8114. {
  8115. Vector3 vector = Vector3.zero;
  8116. vector.x = 0.6f;
  8117. maidArray[1].SetPos(vector);
  8118. if (maidArray[2] && maidArray[2].Visible)
  8119. {
  8120. vector.x = -0.6f;
  8121. maidArray[2].SetPos(vector);
  8122. }
  8123. if (maidArray[3] && maidArray[3].Visible)
  8124. {
  8125. vector.x = 1.2f;
  8126. maidArray[3].SetPos(vector);
  8127. }
  8128. if (maidArray[4] && maidArray[4].Visible)
  8129. {
  8130. vector.x = -1.2f;
  8131. maidArray[4].SetPos(vector);
  8132. }
  8133. if (maidArray[5] && maidArray[5].Visible)
  8134. {
  8135. vector.x = 1.8f;
  8136. maidArray[5].SetPos(vector);
  8137. }
  8138. if (maidArray[6] && maidArray[6].Visible)
  8139. {
  8140. vector.x = -1.8f;
  8141. maidArray[6].SetPos(vector);
  8142. }
  8143. if (maidArray[7] && maidArray[7].Visible)
  8144. {
  8145. vector.x = 2.4f;
  8146. maidArray[7].SetPos(vector);
  8147. }
  8148. if (maidArray[8] && maidArray[8].Visible)
  8149. {
  8150. vector.x = -2.4f;
  8151. maidArray[8].SetPos(vector);
  8152. }
  8153. if (maidArray[9] && maidArray[9].Visible)
  8154. {
  8155. vector.x = 3f;
  8156. maidArray[9].SetPos(vector);
  8157. }
  8158. if (maidArray[10] && maidArray[10].Visible)
  8159. {
  8160. vector.x = -3f;
  8161. maidArray[10].SetPos(vector);
  8162. }
  8163. if (maidArray[11] && maidArray[11].Visible)
  8164. {
  8165. vector.x = 3.6f;
  8166. maidArray[11].SetPos(vector);
  8167. }
  8168. if (maidArray[12] && maidArray[12].Visible)
  8169. {
  8170. vector.x = -3.6f;
  8171. maidArray[12].SetPos(vector);
  8172. }
  8173. if (maidArray[13] && maidArray[13].Visible)
  8174. {
  8175. vector.x = 4.2f;
  8176. maidArray[13].SetPos(vector);
  8177. }
  8178. }
  8179. }
  8180. poseIndex[i]++;
  8181. if (poseIndex[i] == poseArray.Length)
  8182. {
  8183. poseIndex[i] = 0;
  8184. }
  8185. if (maidArray[i] && maidArray[i].Visible)
  8186. {
  8187. string[] array = poseArray[poseIndex[i]].Split(new char[] {','});
  8188. isStop[i] = false;
  8189. poseCount[i] = 20;
  8190. Maid maid = maidArray[i];
  8191. if (array[0].Contains("_momi") || array[0].Contains("paizuri_"))
  8192. {
  8193. maid.body0.MuneYureL(0f);
  8194. maid.body0.MuneYureR(0f);
  8195. }
  8196. else
  8197. {
  8198. maid.body0.MuneYureL(1f);
  8199. maid.body0.MuneYureR(1f);
  8200. }
  8201. int num6;
  8202. if (array[0].Contains("MultipleMaidsPose"))
  8203. {
  8204. string path = array[0].Split(new char[] {'/'})[1];
  8205. byte[] array2 = new byte[0];
  8206. try
  8207. {
  8208. using (FileStream fileStream = new FileStream(path, FileMode.Open, FileAccess.Read))
  8209. {
  8210. array2 = new byte[fileStream.Length];
  8211. fileStream.Read(array2, 0, array2.Length);
  8212. }
  8213. }
  8214. catch { }
  8215. if (0 < array2.Length)
  8216. {
  8217. string text = Path.GetFileName(path);
  8218. long num5 = (long) text.GetHashCode();
  8219. maid.body0.CrossFade(num5.ToString(), array2, false, false, false, 0f, 1f);
  8220. Maid.AutoTwist[] array3 = new Maid.AutoTwist[]
  8221. {
  8222. Maid.AutoTwist.ShoulderL, Maid.AutoTwist.ShoulderR, Maid.AutoTwist.WristL,
  8223. Maid.AutoTwist.WristR, Maid.AutoTwist.ThighL, Maid.AutoTwist.ThighR
  8224. };
  8225. for (int m = 0; m < array3.Length; m++)
  8226. {
  8227. maid.SetAutoTwist(array3[m], true);
  8228. }
  8229. }
  8230. }
  8231. else if (array[0].StartsWith("p") && int.TryParse(array[0].Substring(1), out num6))
  8232. {
  8233. loadPose[i] = array[0];
  8234. }
  8235. else if (!array[0].StartsWith("dance_"))
  8236. {
  8237. maidArray[i].CrossFade(array[0] + ".anm", false, true, false, 0f, 1f);
  8238. }
  8239. else
  8240. {
  8241. if (!maidArray[i].body0.m_Bones.GetComponent<Animation>().GetClip(array[0] + ".anm"))
  8242. {
  8243. maidArray[i].body0.LoadAnime(array[0] + ".anm",
  8244. GameUty.FileSystem,
  8245. array[0] + ".anm",
  8246. false,
  8247. false);
  8248. }
  8249. maidArray[i].body0.m_Bones.GetComponent<Animation>().Play(array[0] + ".anm");
  8250. }
  8251. if (array.Length > 1)
  8252. {
  8253. maidArray[i].body0.m_Bones.GetComponent<Animation>()[array[0] + ".anm"].time = float.Parse(array[1]);
  8254. isStop[i] = true;
  8255. if (array.Length > 2)
  8256. {
  8257. Transform transform2 = CMT.SearchObjName(maidArray[i].body0.m_Bones.transform, "Bip01", true);
  8258. isPoseIti[i] = true;
  8259. poseIti[i] = maidArray[i].transform.position;
  8260. maidArray[i].transform.position = new Vector3(100f, 100f, 100f);
  8261. }
  8262. }
  8263. }
  8264. }
  8265. }
  8266. }
  8267. if (isDanceChu)
  8268. {
  8269. int j = 0;
  8270. while (j < maidCnt)
  8271. {
  8272. if (maidArray[j] && maidArray[j].Visible)
  8273. {
  8274. string text2 = danceName[j];
  8275. float num = 0f;
  8276. if (text2 == "dance_cmo_002_sd_f1.anm" || text2 == "dance_cmo_002_sd_f2.anm"
  8277. || text2 == "dance_cm3d_004_kano_f1.anm")
  8278. {
  8279. num = 0.166666f;
  8280. }
  8281. if (text2 == "dance_cm3d21_kara_001_nmf_f1.anm")
  8282. {
  8283. num = -0.35f;
  8284. }
  8285. if (text2 != null)
  8286. {
  8287. if (danceCount > 0)
  8288. {
  8289. danceCount--;
  8290. maidArray[j].body0.m_Bones.GetComponent<Animation>()[text2].time = audioSourceBgm.time - 0.03333f - num;
  8291. }
  8292. if (maidArray[j].body0.m_Bones.GetComponent<Animation>()[text2].time + num < audioSourceBgm.time - 0.1f)
  8293. {
  8294. danceCount = 20;
  8295. }
  8296. }
  8297. }
  8298. IL_1C205:
  8299. j++;
  8300. continue;
  8301. goto IL_1C205;
  8302. }
  8303. }
  8304. if (isDanceStart1)
  8305. {
  8306. for (int j = 0; j < maidCnt; j++)
  8307. {
  8308. if (maidArray[j] && maidArray[j].Visible)
  8309. {
  8310. maidArray[j].CrossFade(poseArray[0] + ".anm", false, true, false, 0f, 1f);
  8311. if (!isShift)
  8312. {
  8313. if (j == 0)
  8314. {
  8315. maidArray[j].body0.m_Bones.GetComponent<Animation>().Play("dance_cm3d2_001_f1.anm");
  8316. maidArray[j].body0.m_Bones.GetComponent<Animation>()["dance_cm3d2_001_f1.anm"].time = 0f;
  8317. danceName[j] = "dance_cm3d2_001_f1.anm";
  8318. }
  8319. else if (j == 1 || j == 3 || j == 5 || j == 7 || j == 9 || j == 11 || j == 13)
  8320. {
  8321. maidArray[j].body0.m_Bones.GetComponent<Animation>().Play("dance_cm3d2_001_f2.anm");
  8322. maidArray[j].body0.m_Bones.GetComponent<Animation>()["dance_cm3d2_001_f2.anm"].time = 0f;
  8323. danceName[j] = "dance_cm3d2_001_f2.anm";
  8324. }
  8325. else
  8326. {
  8327. maidArray[j].body0.m_Bones.GetComponent<Animation>().Play("dance_cm3d2_001_f3.anm");
  8328. maidArray[j].body0.m_Bones.GetComponent<Animation>()["dance_cm3d2_001_f3.anm"].time = 0f;
  8329. danceName[j] = "dance_cm3d2_001_f3.anm";
  8330. }
  8331. }
  8332. else
  8333. {
  8334. maidArray[j].body0.m_Bones.GetComponent<Animation>().Play("dance_cm3d2_kara_003_ddfl_f1.anm");
  8335. maidArray[j].body0.m_Bones.GetComponent<Animation>()["dance_cm3d2_kara_003_ddfl_f1.anm"].time = 0f;
  8336. danceName[j] = "dance_cm3d2_kara_003_ddfl_f1.anm";
  8337. }
  8338. }
  8339. }
  8340. isDanceStart1 = false;
  8341. isDanceStart1F = true;
  8342. isShift = false;
  8343. }
  8344. if (isDanceStart2)
  8345. {
  8346. for (int j = 0; j < maidCnt; j++)
  8347. {
  8348. if (maidArray[j] && maidArray[j].Visible)
  8349. {
  8350. maidArray[j].CrossFade(poseArray[0] + ".anm", false, true, false, 0f, 1f);
  8351. maidArray[j].body0.m_Bones.GetComponent<Animation>().Play("dance_cm3d_001_f1.anm");
  8352. maidArray[j].body0.m_Bones.GetComponent<Animation>()["dance_cm3d_001_f1.anm"].time = 0f;
  8353. danceName[j] = "dance_cm3d_001_f1.anm";
  8354. }
  8355. }
  8356. isDanceStart2 = false;
  8357. isDanceStart2F = true;
  8358. }
  8359. if (isDanceStart3)
  8360. {
  8361. for (int j = 0; j < maidCnt; j++)
  8362. {
  8363. if (maidArray[j] && maidArray[j].Visible)
  8364. {
  8365. maidArray[j].CrossFade(poseArray[0] + ".anm", false, true, false, 0f, 1f);
  8366. if (!isShift)
  8367. {
  8368. maidArray[j].body0.m_Bones.GetComponent<Animation>().Play("dance_cm3d_002_end_f1.anm");
  8369. maidArray[j].body0.m_Bones.GetComponent<Animation>()["dance_cm3d_002_end_f1.anm"].time = 0f;
  8370. danceName[j] = "dance_cm3d_002_end_f1.anm";
  8371. }
  8372. else
  8373. {
  8374. maidArray[j].body0.m_Bones.GetComponent<Animation>().Play("dance_cm3d2_kara_001_sl_f1.anm");
  8375. maidArray[j].body0.m_Bones.GetComponent<Animation>()["dance_cm3d2_kara_001_sl_f1.anm"].time = 0f;
  8376. danceName[j] = "dance_cm3d2_kara_001_sl_f1.anm";
  8377. }
  8378. }
  8379. }
  8380. isDanceStart3 = false;
  8381. isDanceStart3F = true;
  8382. isShift = false;
  8383. }
  8384. if (isDanceStart4)
  8385. {
  8386. for (int j = 0; j < maidCnt; j++)
  8387. {
  8388. if (maidArray[j] && maidArray[j].Visible)
  8389. {
  8390. maidArray[j].CrossFade(poseArray[0] + ".anm", false, true, false, 0f, 1f);
  8391. if (!isShift)
  8392. {
  8393. maidArray[j].body0.m_Bones.GetComponent<Animation>().Play("dance_cm3d2_002_smt_f.anm");
  8394. maidArray[j].body0.m_Bones.GetComponent<Animation>()["dance_cm3d2_002_smt_f.anm"].time = 0f;
  8395. danceName[j] = "dance_cm3d2_002_smt_f.anm";
  8396. }
  8397. else
  8398. {
  8399. maidArray[j].body0.m_Bones.GetComponent<Animation>().Play("dance_cm3d2_kara02_001_smt_f1.anm");
  8400. maidArray[j].body0.m_Bones.GetComponent<Animation>()["dance_cm3d2_kara02_001_smt_f1.anm"].time = 0f;
  8401. danceName[j] = "dance_cm3d2_kara02_001_smt_f1.anm";
  8402. }
  8403. }
  8404. }
  8405. isDanceStart4 = false;
  8406. isDanceStart4F = true;
  8407. isShift = false;
  8408. }
  8409. if (isDanceStart5)
  8410. {
  8411. for (int j = 0; j < maidCnt; j++)
  8412. {
  8413. if (maidArray[j] && maidArray[j].Visible)
  8414. {
  8415. maidArray[j].CrossFade(poseArray[0] + ".anm", false, true, false, 0f, 1f);
  8416. if (!isShift)
  8417. {
  8418. maidArray[j].body0.m_Bones.GetComponent<Animation>().Play("dance_cm3d_003_sp2_f1.anm");
  8419. maidArray[j].body0.m_Bones.GetComponent<Animation>()["dance_cm3d_003_sp2_f1.anm"].time = 0f;
  8420. danceName[j] = "dance_cm3d_003_sp2_f1.anm";
  8421. }
  8422. else
  8423. {
  8424. maidArray[j].body0.m_Bones.GetComponent<Animation>().Play("dance_cm3d2_kara02_002_rty_f1.anm");
  8425. maidArray[j].body0.m_Bones.GetComponent<Animation>()["dance_cm3d2_kara02_002_rty_f1.anm"].time = 0f;
  8426. danceName[j] = "dance_cm3d2_kara02_002_rty_f1.anm";
  8427. }
  8428. }
  8429. }
  8430. isDanceStart5 = false;
  8431. isDanceStart5F = true;
  8432. isShift = false;
  8433. }
  8434. if (isDanceStart6)
  8435. {
  8436. for (int j = 0; j < maidCnt; j++)
  8437. {
  8438. if (maidArray[j] && maidArray[j].Visible)
  8439. {
  8440. maidArray[j].CrossFade(poseArray[0] + ".anm", false, true, false, 0f, 1f);
  8441. if (!isShift)
  8442. {
  8443. maidArray[j].body0.m_Bones.GetComponent<Animation>().Play("dance_cm3d2_003_hs_f1.anm");
  8444. maidArray[j].body0.m_Bones.GetComponent<Animation>()["dance_cm3d2_003_hs_f1.anm"].time = 0f;
  8445. danceName[j] = "dance_cm3d2_003_hs_f1.anm";
  8446. }
  8447. else
  8448. {
  8449. maidArray[j].body0.m_Bones.GetComponent<Animation>().Play("dance_cm3d2_kara02_003_hs_f1.anm");
  8450. maidArray[j].body0.m_Bones.GetComponent<Animation>()["dance_cm3d2_kara02_003_hs_f1.anm"].time = 0f;
  8451. danceName[j] = "dance_cm3d2_kara02_003_hs_f1.anm";
  8452. }
  8453. }
  8454. }
  8455. isDanceStart6 = false;
  8456. isDanceStart6F = true;
  8457. isShift = false;
  8458. }
  8459. if (isDanceStart7)
  8460. {
  8461. for (int j = 0; j < maidCnt; j++)
  8462. {
  8463. if (maidArray[j] && maidArray[j].Visible)
  8464. {
  8465. maidArray[j].CrossFade(poseArray[0] + ".anm", false, true, false, 0f, 1f);
  8466. if (j == 1 || j == 3 || j == 5 || j == 7 || j == 9 || j == 11 || j == 13)
  8467. {
  8468. maidArray[j].body0.m_Bones.GetComponent<Animation>().Play("dance_cm3d2_003_hs_f2.anm");
  8469. maidArray[j].body0.m_Bones.GetComponent<Animation>()["dance_cm3d2_003_hs_f2.anm"].time = 0f;
  8470. danceName[j] = "dance_cm3d2_003_hs_f2.anm";
  8471. }
  8472. else
  8473. {
  8474. maidArray[j].body0.m_Bones.GetComponent<Animation>().Play("dance_cm3d2_003_hs_f1.anm");
  8475. maidArray[j].body0.m_Bones.GetComponent<Animation>()["dance_cm3d2_003_hs_f1.anm"].time = 0f;
  8476. danceName[j] = "dance_cm3d2_003_hs_f1.anm";
  8477. }
  8478. }
  8479. }
  8480. isDanceStart7 = false;
  8481. isDanceStart7V = true;
  8482. isDanceStart7F = true;
  8483. }
  8484. if (isDanceStart8)
  8485. {
  8486. for (int j = 0; j < maidCnt; j++)
  8487. {
  8488. if (maidArray[j] && maidArray[j].Visible)
  8489. {
  8490. maidArray[j].CrossFade(poseArray[0] + ".anm", false, true, false, 0f, 1f);
  8491. if (j == 0 || j == 4 || j == 8 || j == 12)
  8492. {
  8493. maidArray[j].body0.m_Bones.GetComponent<Animation>().Play("dance_cm3d2_003_hs_f1.anm");
  8494. maidArray[j].body0.m_Bones.GetComponent<Animation>()["dance_cm3d2_003_hs_f1.anm"].time = 0f;
  8495. danceName[j] = "dance_cm3d2_003_hs_f1.anm";
  8496. }
  8497. else if (j == 1 || j == 5 || j == 9 || j == 13)
  8498. {
  8499. maidArray[j].body0.m_Bones.GetComponent<Animation>().Play("dance_cm3d2_003_hs_f2.anm");
  8500. maidArray[j].body0.m_Bones.GetComponent<Animation>()["dance_cm3d2_003_hs_f2.anm"].time = 0f;
  8501. danceName[j] = "dance_cm3d2_003_hs_f2.anm";
  8502. }
  8503. else if (j == 2 || j == 6 || j == 10)
  8504. {
  8505. maidArray[j].body0.m_Bones.GetComponent<Animation>().Play("dance_cm3d2_003_hs_f3.anm");
  8506. maidArray[j].body0.m_Bones.GetComponent<Animation>()["dance_cm3d2_003_hs_f3.anm"].time = 0f;
  8507. danceName[j] = "dance_cm3d2_003_hs_f3.anm";
  8508. }
  8509. else
  8510. {
  8511. maidArray[j].body0.m_Bones.GetComponent<Animation>().Play("dance_cm3d2_003_hs_f4.anm");
  8512. maidArray[j].body0.m_Bones.GetComponent<Animation>()["dance_cm3d2_003_hs_f4.anm"].time = 0f;
  8513. danceName[j] = "dance_cm3d2_003_hs_f4.anm";
  8514. }
  8515. }
  8516. }
  8517. isDanceStart8 = false;
  8518. isDanceStart8V = true;
  8519. isDanceStart8F = true;
  8520. }
  8521. if (isDanceStart9)
  8522. {
  8523. isDanceStart9Count++;
  8524. if (isShift)
  8525. {
  8526. for (int j = 0; j < maidCnt; j++)
  8527. {
  8528. if (maidArray[j] && maidArray[j].Visible)
  8529. {
  8530. maidArray[j].CrossFade(poseArray[0] + ".anm", false, true, false, 0f, 1f);
  8531. maidArray[j].body0.m_Bones.GetComponent<Animation>().Play("dance_cm3d2_kara_002_cktc_f1.anm");
  8532. maidArray[j].body0.m_Bones.GetComponent<Animation>()["dance_cm3d2_kara_002_cktc_f1.anm"].time = 0f;
  8533. danceName[j] = "dance_cm3d2_kara_002_cktc_f1.anm";
  8534. }
  8535. }
  8536. isDanceStart9 = false;
  8537. isDanceStart9F = true;
  8538. isDanceStart9Count = 0;
  8539. isShift = false;
  8540. }
  8541. if (isDanceStart9Count == 10)
  8542. {
  8543. for (int j = 0; j < maidCnt; j++)
  8544. {
  8545. if (maidArray[j] && maidArray[j].Visible)
  8546. {
  8547. maidArray[j].CrossFade(poseArray[0] + ".anm", false, true, false, 0f, 1f);
  8548. maidArray[j].body0.m_Bones.GetComponent<Animation>().Play("dance_cm3d_004_kano_f1.anm");
  8549. maidArray[j].body0.m_Bones.GetComponent<Animation>()["dance_cm3d_004_kano_f1.anm"].time = 0f;
  8550. danceName[j] = "dance_cm3d_004_kano_f1.anm";
  8551. }
  8552. }
  8553. isDanceStart9 = false;
  8554. isDanceStart9F = true;
  8555. isDanceStart9Count = 0;
  8556. }
  8557. }
  8558. if (isDanceStart10)
  8559. {
  8560. for (int j = 0; j < maidCnt; j++)
  8561. {
  8562. if (maidArray[j] && maidArray[j].Visible)
  8563. {
  8564. maidArray[j].CrossFade(poseArray[0] + ".anm", false, true, false, 0f, 1f);
  8565. maidArray[j].body0.m_Bones.GetComponent<Animation>().Play("dance_cm3d2_004_sse_f1.anm");
  8566. maidArray[j].body0.m_Bones.GetComponent<Animation>()["dance_cm3d2_004_sse_f1.anm"].time = 0f;
  8567. danceName[j] = "dance_cm3d2_004_sse_f1.anm";
  8568. }
  8569. }
  8570. isDanceStart10 = false;
  8571. isDanceStart10F = true;
  8572. }
  8573. if (isDanceStart11)
  8574. {
  8575. for (int j = 0; j < maidCnt; j++)
  8576. {
  8577. if (maidArray[j] && maidArray[j].Visible)
  8578. {
  8579. maidArray[j].CrossFade(poseArray[0] + ".anm", false, true, false, 0f, 1f);
  8580. if (j == 1 || j == 4 || j == 7 || j == 10 || j == 13)
  8581. {
  8582. maidArray[j].body0.m_Bones.GetComponent<Animation>().Play(nameA + danceNo2 + ".anm");
  8583. maidArray[j].body0.m_Bones.GetComponent<Animation>()[nameA + danceNo2 + ".anm"].time = 0f;
  8584. danceName[j] = nameA + danceNo2 + ".anm";
  8585. }
  8586. else if (j == 2 || j == 5 || j == 8 || j == 11)
  8587. {
  8588. maidArray[j].body0.m_Bones.GetComponent<Animation>().Play(nameA + danceNo3 + ".anm");
  8589. maidArray[j].body0.m_Bones.GetComponent<Animation>()[nameA + danceNo3 + ".anm"].time = 0f;
  8590. danceName[j] = nameA + danceNo3 + ".anm";
  8591. }
  8592. else
  8593. {
  8594. maidArray[j].body0.m_Bones.GetComponent<Animation>().Play(nameA + danceNo1 + ".anm");
  8595. maidArray[j].body0.m_Bones.GetComponent<Animation>()[nameA + danceNo1 + ".anm"].time = 0f;
  8596. danceName[j] = nameA + danceNo1 + ".anm";
  8597. }
  8598. }
  8599. }
  8600. isDanceStart11 = false;
  8601. isDanceStart11V = true;
  8602. isDanceStart11F = true;
  8603. }
  8604. if (isDanceStart12)
  8605. {
  8606. for (int j = 0; j < maidCnt; j++)
  8607. {
  8608. if (maidArray[j] && maidArray[j].Visible)
  8609. {
  8610. maidArray[j].CrossFade(poseArray[0] + ".anm", false, true, false, 0f, 1f);
  8611. maidArray[j].body0.m_Bones.GetComponent<Animation>().Play("dance_cm3d2_005_khg_f.anm");
  8612. maidArray[j].body0.m_Bones.GetComponent<Animation>()["dance_cm3d2_005_khg_f.anm"].time = 0f;
  8613. danceName[j] = "dance_cm3d2_005_khg_f.anm";
  8614. }
  8615. }
  8616. isDanceStart12 = false;
  8617. isDanceStart12F = true;
  8618. }
  8619. if (isDanceStart13)
  8620. {
  8621. for (int j = 0; j < maidCnt; j++)
  8622. {
  8623. if (maidArray[j] && maidArray[j].Visible)
  8624. {
  8625. maidArray[j].CrossFade(poseArray[0] + ".anm", false, true, false, 0f, 1f);
  8626. if (!isShift)
  8627. {
  8628. maidArray[j].body0.m_Bones.GetComponent<Animation>().Play("dance_cm3d2_006_ssn_f1.anm");
  8629. maidArray[j].body0.m_Bones.GetComponent<Animation>()["dance_cm3d2_006_ssn_f1.anm"].time = 0f;
  8630. danceName[j] = "dance_cm3d2_006_ssn_f1.anm";
  8631. }
  8632. else
  8633. {
  8634. maidArray[j].body0.m_Bones.GetComponent<Animation>().Play("dance_cm3d21_kara_001_nmf_f1.anm");
  8635. maidArray[j].body0.m_Bones.GetComponent<Animation>()["dance_cm3d21_kara_001_nmf_f1.anm"].time = 0f;
  8636. danceName[j] = "dance_cm3d21_kara_001_nmf_f1.anm";
  8637. }
  8638. }
  8639. }
  8640. isDanceStart13 = false;
  8641. isDanceStart13F = true;
  8642. isShift = false;
  8643. }
  8644. if (isDanceStart14)
  8645. {
  8646. for (int j = 0; j < maidCnt; j++)
  8647. {
  8648. if (maidArray[j] && maidArray[j].Visible)
  8649. {
  8650. maidArray[j].CrossFade(poseArray[0] + ".anm", false, true, false, 0f, 1f);
  8651. if (j == 1 || j == 4 || j == 7 || j == 10 || j == 13)
  8652. {
  8653. maidArray[j].body0.m_Bones.GetComponent<Animation>().Play("dance_cm3d2_006_ssn_f2.anm");
  8654. maidArray[j].body0.m_Bones.GetComponent<Animation>()["dance_cm3d2_006_ssn_f2.anm"].time = 0f;
  8655. danceName[j] = "dance_cm3d2_006_ssn_f2.anm";
  8656. }
  8657. else if (j == 2 || j == 5 || j == 8 || j == 11)
  8658. {
  8659. maidArray[j].body0.m_Bones.GetComponent<Animation>().Play("dance_cm3d2_006_ssn_f3.anm");
  8660. maidArray[j].body0.m_Bones.GetComponent<Animation>()["dance_cm3d2_006_ssn_f3.anm"].time = 0f;
  8661. danceName[j] = "dance_cm3d2_006_ssn_f3.anm";
  8662. }
  8663. else
  8664. {
  8665. maidArray[j].body0.m_Bones.GetComponent<Animation>().Play("dance_cm3d2_006_ssn_f1.anm");
  8666. maidArray[j].body0.m_Bones.GetComponent<Animation>()["dance_cm3d2_006_ssn_f1.anm"].time = 0f;
  8667. danceName[j] = "dance_cm3d2_006_ssn_f1.anm";
  8668. }
  8669. }
  8670. }
  8671. isDanceStart14 = false;
  8672. isDanceStart14V = true;
  8673. isDanceStart14F = true;
  8674. }
  8675. if (isDanceStart15)
  8676. {
  8677. isDanceStart15Count++;
  8678. }
  8679. if (isDanceStart15Count == 10)
  8680. {
  8681. for (int j = 0; j < maidCnt; j++)
  8682. {
  8683. if (maidArray[j] && maidArray[j].Visible)
  8684. {
  8685. maidArray[j].CrossFade(poseArray[0] + ".anm", false, true, false, 0f, 1f);
  8686. if (j == 1 || j == 3 || j == 5 || j == 7 || j == 9 || j == 11 || j == 13)
  8687. {
  8688. maidArray[j].body0.m_Bones.GetComponent<Animation>().Play("dance_cmo_002_sd_f2.anm");
  8689. maidArray[j].body0.m_Bones.GetComponent<Animation>()["dance_cmo_002_sd_f2.anm"].time = 0f;
  8690. danceName[j] = "dance_cmo_002_sd_f2.anm";
  8691. }
  8692. else
  8693. {
  8694. maidArray[j].body0.m_Bones.GetComponent<Animation>().Play("dance_cmo_002_sd_f1.anm");
  8695. maidArray[j].body0.m_Bones.GetComponent<Animation>()["dance_cmo_002_sd_f1.anm"].time = 0f;
  8696. danceName[j] = "dance_cmo_002_sd_f1.anm";
  8697. }
  8698. }
  8699. }
  8700. isDanceStart15 = false;
  8701. isDanceStart15V = true;
  8702. isDanceStart15F = true;
  8703. isDanceStart15Count = 0;
  8704. }
  8705. if (isDance)
  8706. {
  8707. for (int j = 0; j < maidCnt; j++)
  8708. {
  8709. if (maidArray[j].Visible)
  8710. {
  8711. if (isDanceStart1F)
  8712. {
  8713. if (isDanceStart1K)
  8714. {
  8715. foreach (string text3 in dance1KArray)
  8716. {
  8717. string[] array = text3.Split(new char[] {','});
  8718. float num10 = float.Parse(array[0]);
  8719. if (danceFace[j] < num10 && num10 < audioSourceBgm.time)
  8720. {
  8721. danceFace[j] = num10;
  8722. FaceName[j] = FaceName2[j];
  8723. FaceName2[j] = array[1];
  8724. FaceName3[j] = array[2];
  8725. FaceTime[j] = 0.0166666675f;
  8726. break;
  8727. }
  8728. }
  8729. }
  8730. else if (j == 0)
  8731. {
  8732. foreach (string text3 in dance1Array)
  8733. {
  8734. string[] array = text3.Split(new char[] {','});
  8735. float num10 = float.Parse(array[0]);
  8736. if (danceFace[j] < num10 && num10 < audioSourceBgm.time)
  8737. {
  8738. danceFace[j] = num10;
  8739. FaceName[j] = FaceName2[j];
  8740. FaceName2[j] = array[1];
  8741. FaceName3[j] = array[2];
  8742. FaceTime[j] = 0.0166666675f;
  8743. break;
  8744. }
  8745. }
  8746. }
  8747. else if (j == 1 || j == 3 || j == 5 || j == 7 || j == 9 || j == 11 || j == 13)
  8748. {
  8749. foreach (string text3 in dance1BArray)
  8750. {
  8751. string[] array = text3.Split(new char[] {','});
  8752. float num10 = float.Parse(array[0]);
  8753. if (danceFace[j] < num10 && num10 < audioSourceBgm.time)
  8754. {
  8755. danceFace[j] = num10;
  8756. FaceName[j] = FaceName2[j];
  8757. FaceName2[j] = array[1];
  8758. FaceName3[j] = array[2];
  8759. FaceTime[j] = 0.0166666675f;
  8760. break;
  8761. }
  8762. }
  8763. }
  8764. else
  8765. {
  8766. foreach (string text3 in dance1CArray)
  8767. {
  8768. string[] array = text3.Split(new char[] {','});
  8769. float num10 = float.Parse(array[0]);
  8770. if (danceFace[j] < num10 && num10 < audioSourceBgm.time)
  8771. {
  8772. danceFace[j] = num10;
  8773. FaceName[j] = FaceName2[j];
  8774. FaceName2[j] = array[1];
  8775. FaceName3[j] = array[2];
  8776. FaceTime[j] = 0.0166666675f;
  8777. break;
  8778. }
  8779. }
  8780. }
  8781. }
  8782. if (isDanceStart2F)
  8783. {
  8784. foreach (string text3 in dance2Array)
  8785. {
  8786. string[] array = text3.Split(new char[] {','});
  8787. float num10 = float.Parse(array[0]);
  8788. if (danceFace[j] < num10 && num10 < audioSourceBgm.time)
  8789. {
  8790. danceFace[j] = num10;
  8791. FaceName[j] = FaceName2[j];
  8792. FaceName2[j] = array[1];
  8793. FaceName3[j] = array[2];
  8794. FaceTime[j] = 0.0166666675f;
  8795. break;
  8796. }
  8797. }
  8798. }
  8799. if (isDanceStart3F)
  8800. {
  8801. if (isDanceStart3K)
  8802. {
  8803. foreach (string text3 in dance3KArray)
  8804. {
  8805. string[] array = text3.Split(new char[] {','});
  8806. float num10 = float.Parse(array[0]);
  8807. if (danceFace[j] < num10 && num10 < audioSourceBgm.time)
  8808. {
  8809. danceFace[j] = num10;
  8810. FaceName[j] = FaceName2[j];
  8811. FaceName2[j] = array[1];
  8812. FaceName3[j] = array[2];
  8813. FaceTime[j] = 0.0166666675f;
  8814. break;
  8815. }
  8816. }
  8817. }
  8818. else
  8819. {
  8820. foreach (string text3 in dance3Array)
  8821. {
  8822. string[] array = text3.Split(new char[] {','});
  8823. float num10 = float.Parse(array[0]);
  8824. if (danceFace[j] < num10 && num10 < audioSourceBgm.time)
  8825. {
  8826. danceFace[j] = num10;
  8827. FaceName[j] = FaceName2[j];
  8828. FaceName2[j] = array[1];
  8829. FaceName3[j] = array[2];
  8830. FaceTime[j] = 0.0166666675f;
  8831. break;
  8832. }
  8833. }
  8834. }
  8835. }
  8836. if (isDanceStart4F)
  8837. {
  8838. if (isDanceStart4K)
  8839. {
  8840. foreach (string text3 in dance4KArray)
  8841. {
  8842. string[] array = text3.Split(new char[] {','});
  8843. float num10 = float.Parse(array[0]);
  8844. if (danceFace[j] < num10 && num10 < audioSourceBgm.time)
  8845. {
  8846. danceFace[j] = num10;
  8847. FaceName[j] = FaceName2[j];
  8848. FaceName2[j] = array[1];
  8849. FaceName3[j] = array[2];
  8850. FaceTime[j] = 0.0166666675f;
  8851. break;
  8852. }
  8853. }
  8854. }
  8855. else
  8856. {
  8857. foreach (string text3 in dance4Array)
  8858. {
  8859. string[] array = text3.Split(new char[] {','});
  8860. float num10 = float.Parse(array[0]);
  8861. if (danceFace[j] < num10 && num10 < audioSourceBgm.time)
  8862. {
  8863. danceFace[j] = num10;
  8864. FaceName[j] = FaceName2[j];
  8865. FaceName2[j] = array[1];
  8866. FaceName3[j] = array[2];
  8867. FaceTime[j] = 0.0166666675f;
  8868. break;
  8869. }
  8870. }
  8871. }
  8872. }
  8873. if (isDanceStart5F)
  8874. {
  8875. if (isDanceStart5K)
  8876. {
  8877. foreach (string text3 in dance5KArray)
  8878. {
  8879. string[] array = text3.Split(new char[] {','});
  8880. float num10 = float.Parse(array[0]);
  8881. if (danceFace[j] < num10 && num10 < audioSourceBgm.time)
  8882. {
  8883. danceFace[j] = num10;
  8884. FaceName[j] = FaceName2[j];
  8885. FaceName2[j] = array[1];
  8886. FaceName3[j] = array[2];
  8887. FaceTime[j] = 0.0166666675f;
  8888. break;
  8889. }
  8890. }
  8891. }
  8892. else
  8893. {
  8894. foreach (string text3 in dance5Array)
  8895. {
  8896. string[] array = text3.Split(new char[] {','});
  8897. float num10 = float.Parse(array[0]);
  8898. if (danceFace[j] < num10 && num10 < audioSourceBgm.time)
  8899. {
  8900. danceFace[j] = num10;
  8901. FaceName[j] = FaceName2[j];
  8902. FaceName2[j] = array[1];
  8903. FaceName3[j] = array[2];
  8904. FaceTime[j] = 0.0166666675f;
  8905. break;
  8906. }
  8907. }
  8908. }
  8909. }
  8910. if (isDanceStart6F)
  8911. {
  8912. if (isDanceStart6K)
  8913. {
  8914. foreach (string text3 in dance6KArray)
  8915. {
  8916. string[] array = text3.Split(new char[] {','});
  8917. float num10 = float.Parse(array[0]);
  8918. if (danceFace[j] < num10 && num10 < audioSourceBgm.time)
  8919. {
  8920. danceFace[j] = num10;
  8921. FaceName[j] = FaceName2[j];
  8922. FaceName2[j] = array[1];
  8923. FaceName3[j] = array[2];
  8924. FaceTime[j] = 0.0166666675f;
  8925. break;
  8926. }
  8927. }
  8928. }
  8929. else
  8930. {
  8931. foreach (string text3 in dance6Array)
  8932. {
  8933. string[] array = text3.Split(new char[] {','});
  8934. float num10 = float.Parse(array[0]);
  8935. if (danceFace[j] < num10 && num10 < audioSourceBgm.time)
  8936. {
  8937. danceFace[j] = num10;
  8938. FaceName[j] = FaceName2[j];
  8939. FaceName2[j] = array[1];
  8940. FaceName3[j] = array[2];
  8941. FaceTime[j] = 0.0166666675f;
  8942. break;
  8943. }
  8944. }
  8945. }
  8946. }
  8947. if (isDanceStart7F)
  8948. {
  8949. if (j == 1 || j == 3 || j == 5 || j == 7 || j == 9 || j == 11 || j == 13)
  8950. {
  8951. foreach (string text3 in dance6BArray)
  8952. {
  8953. string[] array = text3.Split(new char[] {','});
  8954. float num10 = float.Parse(array[0]);
  8955. if (danceFace[j] < num10 && num10 < audioSourceBgm.time)
  8956. {
  8957. danceFace[j] = num10;
  8958. FaceName[j] = FaceName2[j];
  8959. FaceName2[j] = array[1];
  8960. FaceName3[j] = array[2];
  8961. FaceTime[j] = 0.0166666675f;
  8962. break;
  8963. }
  8964. }
  8965. }
  8966. else
  8967. {
  8968. foreach (string text3 in dance6Array)
  8969. {
  8970. string[] array = text3.Split(new char[] {','});
  8971. float num10 = float.Parse(array[0]);
  8972. if (danceFace[j] < num10 && num10 < audioSourceBgm.time)
  8973. {
  8974. danceFace[j] = num10;
  8975. FaceName[j] = FaceName2[j];
  8976. FaceName2[j] = array[1];
  8977. FaceName3[j] = array[2];
  8978. FaceTime[j] = 0.0166666675f;
  8979. break;
  8980. }
  8981. }
  8982. }
  8983. }
  8984. if (isDanceStart7V && (j == 1 || j == 3 || j == 5 || j == 7 || j == 9 || j == 11 || j == 13))
  8985. {
  8986. if (audioSourceBgm.time > 42f && audioSourceBgm.time < 43f)
  8987. {
  8988. maidArray[j].SetPos(maidArray[j - 1].transform.position);
  8989. }
  8990. if (audioSourceBgm.time > 58.17f && audioSourceBgm.time < 60f)
  8991. {
  8992. maidArray[j].SetPos(new Vector3(maidArray[j - 1].transform.position.x,
  8993. 100f,
  8994. maidArray[j - 1].transform.position.z));
  8995. }
  8996. }
  8997. if (isDanceStart8F)
  8998. {
  8999. if (j == 1 || j == 5 || j == 9 || j == 13)
  9000. {
  9001. foreach (string text3 in dance6BArray)
  9002. {
  9003. string[] array = text3.Split(new char[] {','});
  9004. float num10 = float.Parse(array[0]);
  9005. if (danceFace[j] < num10 && num10 < audioSourceBgm.time)
  9006. {
  9007. danceFace[j] = num10;
  9008. FaceName[j] = FaceName2[j];
  9009. FaceName2[j] = array[1];
  9010. FaceName3[j] = array[2];
  9011. FaceTime[j] = 0.0166666675f;
  9012. break;
  9013. }
  9014. }
  9015. }
  9016. else if (j == 2 || j == 6 || j == 10)
  9017. {
  9018. foreach (string text3 in dance6CArray)
  9019. {
  9020. string[] array = text3.Split(new char[] {','});
  9021. float num10 = float.Parse(array[0]);
  9022. if (danceFace[j] < num10 && num10 < audioSourceBgm.time)
  9023. {
  9024. danceFace[j] = num10;
  9025. FaceName[j] = FaceName2[j];
  9026. FaceName2[j] = array[1];
  9027. FaceName3[j] = array[2];
  9028. FaceTime[j] = 0.0166666675f;
  9029. break;
  9030. }
  9031. }
  9032. }
  9033. else if (j == 3 || j == 9 || j == 11)
  9034. {
  9035. foreach (string text3 in dance6DArray)
  9036. {
  9037. string[] array = text3.Split(new char[] {','});
  9038. float num10 = float.Parse(array[0]);
  9039. if (danceFace[j] < num10 && num10 < audioSourceBgm.time)
  9040. {
  9041. danceFace[j] = num10;
  9042. FaceName[j] = FaceName2[j];
  9043. FaceName2[j] = array[1];
  9044. FaceName3[j] = array[2];
  9045. FaceTime[j] = 0.0166666675f;
  9046. break;
  9047. }
  9048. }
  9049. }
  9050. else
  9051. {
  9052. foreach (string text3 in dance6Array)
  9053. {
  9054. string[] array = text3.Split(new char[] {','});
  9055. float num10 = float.Parse(array[0]);
  9056. if (danceFace[j] < num10 && num10 < audioSourceBgm.time)
  9057. {
  9058. danceFace[j] = num10;
  9059. FaceName[j] = FaceName2[j];
  9060. FaceName2[j] = array[1];
  9061. FaceName3[j] = array[2];
  9062. FaceTime[j] = 0.0166666675f;
  9063. break;
  9064. }
  9065. }
  9066. }
  9067. }
  9068. if (isDanceStart8V && (j == 1 || j == 5 || j == 9 || j == 13))
  9069. {
  9070. if (audioSourceBgm.time > 42f && audioSourceBgm.time < 43f)
  9071. {
  9072. maidArray[j].SetPos(maidArray[j - 1].transform.position);
  9073. }
  9074. if (audioSourceBgm.time > 58.17f && audioSourceBgm.time < 60f)
  9075. {
  9076. maidArray[j].SetPos(new Vector3(maidArray[j - 1].transform.position.x,
  9077. 100f,
  9078. maidArray[j - 1].transform.position.z));
  9079. }
  9080. }
  9081. if (isDanceStart8V)
  9082. {
  9083. if (!isDanceStart8P && audioSourceBgm.time > 40f && audioSourceBgm.time < 41f)
  9084. {
  9085. isDanceStart8P = true;
  9086. for (int num11 = 0; num11 < maidCnt; num11++)
  9087. {
  9088. if (maidArray[num11].Visible)
  9089. {
  9090. if (num11 == 0 || num11 == 4 || num11 == 8 || num11 == 12)
  9091. {
  9092. Object @object = Resources.Load("Prefab/Particle/pHeart01");
  9093. GameObject gameObject6 = Instantiate(@object) as GameObject;
  9094. gameObject6.transform.position =
  9095. CMT.SearchObjName(maidArray[num11].body0.m_Bones.transform, "Bip01 Spine", true)
  9096. .position;
  9097. }
  9098. }
  9099. }
  9100. }
  9101. }
  9102. if (isDanceStart9F)
  9103. {
  9104. if (isDanceStart9K)
  9105. {
  9106. foreach (string text3 in dance9KArray)
  9107. {
  9108. string[] array = text3.Split(new char[] {','});
  9109. float num10 = float.Parse(array[0]);
  9110. if (danceFace[j] < num10 && num10 < audioSourceBgm.time)
  9111. {
  9112. danceFace[j] = num10;
  9113. FaceName[j] = FaceName2[j];
  9114. FaceName2[j] = array[1];
  9115. FaceName3[j] = array[2];
  9116. FaceTime[j] = 0.0166666675f;
  9117. break;
  9118. }
  9119. }
  9120. }
  9121. else
  9122. {
  9123. foreach (string text3 in dance7Array)
  9124. {
  9125. string[] array = text3.Split(new char[] {','});
  9126. float num10 = float.Parse(array[0]);
  9127. if (danceFace[j] < num10 && num10 < audioSourceBgm.time)
  9128. {
  9129. danceFace[j] = num10;
  9130. FaceName[j] = FaceName2[j];
  9131. FaceName2[j] = array[1];
  9132. FaceName3[j] = array[2];
  9133. FaceTime[j] = 0.0166666675f;
  9134. break;
  9135. }
  9136. }
  9137. }
  9138. }
  9139. if (isDanceStart10F)
  9140. {
  9141. foreach (string text3 in danceO1Array)
  9142. {
  9143. string[] array = text3.Split(new char[] {','});
  9144. float num10 = float.Parse(array[0]);
  9145. if (danceFace[j] < num10 && num10 < audioSourceBgm.time)
  9146. {
  9147. danceFace[j] = num10;
  9148. FaceName[j] = FaceName2[j];
  9149. FaceName2[j] = array[1];
  9150. FaceName3[j] = array[2];
  9151. FaceTime[j] = 0.0166666675f;
  9152. break;
  9153. }
  9154. }
  9155. }
  9156. if (isDanceStart11F)
  9157. {
  9158. string[] array14 = null;
  9159. string[] array12 = null;
  9160. string[] array15 = null;
  9161. if (isSS1)
  9162. {
  9163. array14 = danceO1Array;
  9164. array12 = danceO1CArray;
  9165. array15 = danceO1BArray;
  9166. }
  9167. if (isSS2)
  9168. {
  9169. array14 = danceO2Array;
  9170. array12 = danceO2BArray;
  9171. array15 = danceO2CArray;
  9172. }
  9173. if (isSS3)
  9174. {
  9175. array14 = danceO3CArray;
  9176. array12 = danceO3Array;
  9177. array15 = danceO3BArray;
  9178. }
  9179. if (isSS4)
  9180. {
  9181. array14 = danceO5BArray;
  9182. array12 = danceO5Array;
  9183. array15 = danceO5CArray;
  9184. }
  9185. if (isSS5)
  9186. {
  9187. array14 = danceO4Array;
  9188. array12 = danceO4BArray;
  9189. array15 = danceO4CArray;
  9190. }
  9191. if (j == 1 || j == 4 || j == 7 || j == 10 || j == 13)
  9192. {
  9193. foreach (string text3 in array12)
  9194. {
  9195. string[] array = text3.Split(new char[] {','});
  9196. float num10 = float.Parse(array[0]) - 0.03f;
  9197. if (danceFace[j] < num10 && num10 < audioSourceBgm.time)
  9198. {
  9199. danceFace[j] = num10;
  9200. FaceName[j] = FaceName2[j];
  9201. FaceName2[j] = array[1];
  9202. FaceName3[j] = array[2];
  9203. FaceTime[j] = 0.0166666675f;
  9204. break;
  9205. }
  9206. }
  9207. }
  9208. else if (j == 2 || j == 5 || j == 8 || j == 11)
  9209. {
  9210. foreach (string text3 in array15)
  9211. {
  9212. string[] array = text3.Split(new char[] {','});
  9213. float num10 = float.Parse(array[0]) - 0.03f;
  9214. if (danceFace[j] < num10 && num10 < audioSourceBgm.time)
  9215. {
  9216. danceFace[j] = num10;
  9217. FaceName[j] = FaceName2[j];
  9218. FaceName2[j] = array[1];
  9219. FaceName3[j] = array[2];
  9220. FaceTime[j] = 0.0166666675f;
  9221. break;
  9222. }
  9223. }
  9224. }
  9225. else
  9226. {
  9227. foreach (string text3 in array14)
  9228. {
  9229. string[] array = text3.Split(new char[] {','});
  9230. float num10 = float.Parse(array[0]) - 0.03f;
  9231. if (danceFace[j] < num10 && num10 < audioSourceBgm.time)
  9232. {
  9233. danceFace[j] = num10;
  9234. FaceName[j] = FaceName2[j];
  9235. FaceName2[j] = array[1];
  9236. FaceName3[j] = array[2];
  9237. FaceTime[j] = 0.0166666675f;
  9238. break;
  9239. }
  9240. }
  9241. }
  9242. }
  9243. if (isDanceStart12F)
  9244. {
  9245. foreach (string text3 in dance12Array)
  9246. {
  9247. string[] array = text3.Split(new char[] {','});
  9248. float num10 = float.Parse(array[0]);
  9249. if (danceFace[j] < num10 && num10 < audioSourceBgm.time)
  9250. {
  9251. danceFace[j] = num10;
  9252. FaceName[j] = FaceName2[j];
  9253. FaceName2[j] = array[1];
  9254. FaceName3[j] = array[2];
  9255. FaceTime[j] = 0.0166666675f;
  9256. break;
  9257. }
  9258. }
  9259. }
  9260. if (isDanceStart13F)
  9261. {
  9262. if (!isDanceStart13K)
  9263. {
  9264. foreach (string text3 in dance13Array)
  9265. {
  9266. string[] array = text3.Split(new char[] {','});
  9267. float num10 = float.Parse(array[0]);
  9268. if (danceFace[j] < num10 && num10 < audioSourceBgm.time)
  9269. {
  9270. danceFace[j] = num10;
  9271. FaceName[j] = FaceName2[j];
  9272. FaceName2[j] = array[1];
  9273. FaceName3[j] = array[2];
  9274. FaceTime[j] = 0.0166666675f;
  9275. break;
  9276. }
  9277. }
  9278. }
  9279. }
  9280. if (isDanceStart14F)
  9281. {
  9282. if (j == 1 || j == 4 || j == 7 || j == 10 || j == 13)
  9283. {
  9284. foreach (string text3 in dance13BArray)
  9285. {
  9286. string[] array = text3.Split(new char[] {','});
  9287. float num10 = float.Parse(array[0]);
  9288. if (danceFace[j] < num10 && num10 < audioSourceBgm.time)
  9289. {
  9290. danceFace[j] = num10;
  9291. FaceName[j] = FaceName2[j];
  9292. FaceName2[j] = array[1];
  9293. FaceName3[j] = array[2];
  9294. FaceTime[j] = 0.0166666675f;
  9295. break;
  9296. }
  9297. }
  9298. }
  9299. else if (j == 2 || j == 5 || j == 8 || j == 11)
  9300. {
  9301. foreach (string text3 in dance13CArray)
  9302. {
  9303. string[] array = text3.Split(new char[] {','});
  9304. float num10 = float.Parse(array[0]);
  9305. if (danceFace[j] < num10 && num10 < audioSourceBgm.time)
  9306. {
  9307. danceFace[j] = num10;
  9308. FaceName[j] = FaceName2[j];
  9309. FaceName2[j] = array[1];
  9310. FaceName3[j] = array[2];
  9311. FaceTime[j] = 0.0166666675f;
  9312. break;
  9313. }
  9314. }
  9315. }
  9316. else
  9317. {
  9318. foreach (string text3 in dance13Array)
  9319. {
  9320. string[] array = text3.Split(new char[] {','});
  9321. float num10 = float.Parse(array[0]);
  9322. if (danceFace[j] < num10 && num10 < audioSourceBgm.time)
  9323. {
  9324. danceFace[j] = num10;
  9325. FaceName[j] = FaceName2[j];
  9326. FaceName2[j] = array[1];
  9327. FaceName3[j] = array[2];
  9328. FaceTime[j] = 0.0166666675f;
  9329. break;
  9330. }
  9331. }
  9332. }
  9333. }
  9334. if (isDanceStart15F)
  9335. {
  9336. if (j == 1 || j == 3 || j == 5 || j == 7 || j == 9 || j == 11 || j == 13)
  9337. {
  9338. foreach (string text3 in dance15BArray)
  9339. {
  9340. string[] array = text3.Split(new char[] {','});
  9341. float num10 = float.Parse(array[0]);
  9342. if (danceFace[j] < num10 && num10 < audioSourceBgm.time)
  9343. {
  9344. danceFace[j] = num10;
  9345. FaceName[j] = FaceName2[j];
  9346. FaceName2[j] = array[1];
  9347. FaceName3[j] = array[2];
  9348. FaceTime[j] = 0.0166666675f;
  9349. break;
  9350. }
  9351. }
  9352. }
  9353. else
  9354. {
  9355. foreach (string text3 in dance15Array)
  9356. {
  9357. string[] array = text3.Split(new char[] {','});
  9358. float num10 = float.Parse(array[0]);
  9359. if (danceFace[j] < num10 && num10 < audioSourceBgm.time)
  9360. {
  9361. danceFace[j] = num10;
  9362. FaceName[j] = FaceName2[j];
  9363. FaceName2[j] = array[1];
  9364. FaceName3[j] = array[2];
  9365. FaceTime[j] = 0.0166666675f;
  9366. break;
  9367. }
  9368. }
  9369. }
  9370. }
  9371. if (!isFadeOut)
  9372. {
  9373. Maid maid = maidArray[j];
  9374. if (maid && maid.Visible)
  9375. {
  9376. if (maid.transform.position.y != 100f)
  9377. {
  9378. FaceTime[j] += Time.deltaTime;
  9379. if (FaceTime[j] < 1f)
  9380. {
  9381. TMorph morph = maid.body0.Face.morph;
  9382. maid.boMabataki = false;
  9383. maid.body0.Face.morph.EyeMabataki = 0f;
  9384. if (FaceName[j] != string.Empty)
  9385. {
  9386. maid.body0.Face.morph.MulBlendValues(FaceName[j], 1f);
  9387. }
  9388. if (FaceName2[j] != "")
  9389. {
  9390. maid.body0.Face.morph.MulBlendValues(FaceName2[j],
  9391. UTY.COSS2(Mathf.Pow(FaceTime[j], 0.4f), 4f));
  9392. }
  9393. if (FaceName3[j] != string.Empty)
  9394. {
  9395. maid.body0.Face.morph.AddBlendValues(FaceName3[j], 1f);
  9396. }
  9397. maid.body0.Face.morph.FixBlendValues_Face();
  9398. }
  9399. else
  9400. {
  9401. FaceName[j] = FaceName2[j];
  9402. }
  9403. if (isHenkou)
  9404. {
  9405. TMorph morph = maid.body0.Face.morph;
  9406. float[] fieldValue = GetFieldValue<TMorph, float[]>(morph, "BlendValues");
  9407. maid.boMabataki = false;
  9408. if (isNamidaH)
  9409. {
  9410. fieldValue[(int) morph.hash["namida"]] = 1f;
  9411. }
  9412. else
  9413. {
  9414. fieldValue[(int) morph.hash["namida"]] = 0f;
  9415. }
  9416. if (isSekimenH)
  9417. {
  9418. fieldValue[(int) morph.hash["hohol"]] = 1f;
  9419. }
  9420. else
  9421. {
  9422. fieldValue[(int) morph.hash["hohol"]] = 0f;
  9423. }
  9424. if (isHohoH)
  9425. {
  9426. fieldValue[(int) morph.hash["hoho2"]] = 1f;
  9427. }
  9428. else
  9429. {
  9430. fieldValue[(int) morph.hash["hoho2"]] = 0f;
  9431. }
  9432. maid.body0.Face.morph.FixBlendValues_Face();
  9433. }
  9434. }
  9435. }
  9436. }
  9437. this.FoceKuchipakuUpdate2(audioSourceBgm.time, maidArray[j], j);
  9438. }
  9439. }
  9440. if (Input.GetKey(KeyCode.H) || isVR)
  9441. {
  9442. if (Input.GetKeyDown(KeyCode.KeypadPeriod))
  9443. {
  9444. h2Flg = true;
  9445. isNamidaH = !isNamidaH;
  9446. isHenkou = true;
  9447. }
  9448. if (Input.GetKeyDown(KeyCode.KeypadPlus))
  9449. {
  9450. h2Flg = true;
  9451. isSekimenH = !isSekimenH;
  9452. isHenkou = true;
  9453. }
  9454. if (Input.GetKeyDown(KeyCode.KeypadEnter))
  9455. {
  9456. h2Flg = true;
  9457. isHohoH = !isHohoH;
  9458. isHenkou = true;
  9459. }
  9460. }
  9461. danceCheckIndex++;
  9462. if (danceCheckIndex == 10)
  9463. {
  9464. danceCheckIndex = 0;
  9465. }
  9466. danceCheck[danceCheckIndex] = audioSourceBgm.time;
  9467. isDanceChu = false;
  9468. for (int k = 0; k < danceCheck.Length; k++)
  9469. {
  9470. if (danceCheck[k] > 0f)
  9471. {
  9472. isDanceChu = true;
  9473. break;
  9474. }
  9475. }
  9476. if (!isDanceChu)
  9477. {
  9478. danceWait--;
  9479. if (danceWait > 0)
  9480. {
  9481. isDanceChu = true;
  9482. }
  9483. }
  9484. if (!isDanceChu)
  9485. {
  9486. for (int j = 0; j < maidCnt; j++)
  9487. {
  9488. if (maidArray[j] && maidArray[j].Visible)
  9489. {
  9490. maidArray[j].StopKuchipakuPattern();
  9491. if (isDanceStart7V)
  9492. {
  9493. maidArray[j].SetPos(dancePos[j]);
  9494. maidArray[j].body0.transform.localRotation = danceRot[j];
  9495. }
  9496. if (isDanceStart8V && (j == 1 || j == 5 || j == 9 || j == 13))
  9497. {
  9498. maidArray[j].SetPos(dancePos[j]);
  9499. maidArray[j].body0.transform.localRotation = danceRot[j];
  9500. }
  9501. if (isDanceStart11V)
  9502. {
  9503. maidArray[j].SetPos(dancePos[j]);
  9504. maidArray[j].body0.transform.localRotation = danceRot[j];
  9505. }
  9506. if (isDanceStart1K || isDanceStart3K || isDanceStart4K || isDanceStart5K || isDanceStart6K || isDanceStart9K
  9507. || isDanceStart13K)
  9508. {
  9509. maidArray[j].SetPos(dancePos[j]);
  9510. maidArray[j].body0.transform.localRotation = danceRot[j];
  9511. int i = j;
  9512. if (!isVR)
  9513. {
  9514. delCount[i] = 20;
  9515. if (goSlot[(int) selectList[i]] != null)
  9516. {
  9517. maidArray[i].body0.goSlot = new List<TBodySkin>(goSlot[(int) selectList[i]]);
  9518. for (int l = 0; l < bodyHit[(int) selectList[i]].Count; l++)
  9519. {
  9520. maidArray[i].body0.goSlot[l].bonehair.bodyhit = bodyHit[(int) selectList[i]][l];
  9521. }
  9522. }
  9523. }
  9524. Maid maid = maidArray[j];
  9525. maid.DelProp(MPN.handitem, true);
  9526. maid.DelProp(MPN.accvag, true);
  9527. maid.DelProp(MPN.accanl, true);
  9528. maid.DelProp(MPN.kousoku_upper, true);
  9529. maid.DelProp(MPN.kousoku_lower, true);
  9530. maid.AllProcPropSeqStart();
  9531. isStop[i] = true;
  9532. Transform transform2 = CMT.SearchObjName(maidArray[i].body0.m_Bones.transform, "Bip01", true);
  9533. isPoseIti[i] = true;
  9534. poseIti[i] = maidArray[i].transform.position;
  9535. maidArray[i].transform.position = new Vector3(100f, 100f, 100f);
  9536. }
  9537. if (isDanceStart14V)
  9538. {
  9539. maidArray[j].SetPos(dancePos[j]);
  9540. maidArray[j].body0.transform.localRotation = danceRot[j];
  9541. }
  9542. if (isDanceStart15V)
  9543. {
  9544. maidArray[j].SetPos(dancePos[j]);
  9545. maidArray[j].body0.transform.localRotation = danceRot[j];
  9546. }
  9547. }
  9548. }
  9549. isDanceStart1F = false;
  9550. isDanceStart1K = false;
  9551. isDanceStart2F = false;
  9552. isDanceStart3F = false;
  9553. isDanceStart3K = false;
  9554. isDanceStart4F = false;
  9555. isDanceStart4K = false;
  9556. isDanceStart5F = false;
  9557. isDanceStart5K = false;
  9558. isDanceStart6F = false;
  9559. isDanceStart6K = false;
  9560. isDanceStart7F = false;
  9561. isDanceStart7V = false;
  9562. isDanceStart8F = false;
  9563. isDanceStart8V = false;
  9564. isDanceStart8P = false;
  9565. isDanceStart9F = false;
  9566. isDanceStart9K = false;
  9567. isDanceStart10F = false;
  9568. isDanceStart11F = false;
  9569. isDanceStart11V = false;
  9570. isDanceStart12F = false;
  9571. isDanceStart13F = false;
  9572. isDanceStart13K = false;
  9573. isDanceStart14F = false;
  9574. isDanceStart14V = false;
  9575. isDanceStart15F = false;
  9576. isDanceStart15V = false;
  9577. for (int j = 0; j < maidCnt; j++)
  9578. {
  9579. danceFace[j] = 0f;
  9580. }
  9581. danceCheckIndex = 0;
  9582. for (int k = 0; k < danceCheck.Length; k++)
  9583. {
  9584. danceCheck[danceCheckIndex] = 1f;
  9585. }
  9586. isDance = false;
  9587. }
  9588. }
  9589. if ((Input.GetKey(KeyCode.Return) && Input.GetKeyDown(KeyCode.Alpha1))
  9590. || (Input.GetKey(KeyCode.KeypadEnter) && Input.GetKeyDown(KeyCode.Keypad1)))
  9591. {
  9592. if (this.getModKeyPressing(modKey.Shift))
  9593. {
  9594. isShift = true;
  9595. }
  9596. TextAsset textAsset = Resources.Load("SceneDance/dance_kp_m0") as TextAsset;
  9597. string text4 = Regex.Replace(textAsset.text, "(\\r|\\n| )", string.Empty);
  9598. audioSourceBgm = GameMain.Instance.SoundMgr.GetAudioSourceBgm();
  9599. GameMain.Instance.SoundMgr.PlayBGM("se002.ogg", 0f, false);
  9600. if (!isShift)
  9601. {
  9602. GameMain.Instance.CharacterMgr.ResetCharaPosAll();
  9603. }
  9604. for (int j = 0; j < maidCnt; j++)
  9605. {
  9606. string text5 = "dance_cm3d2_001_f1.anm";
  9607. switch (j)
  9608. {
  9609. case 1:
  9610. case 3:
  9611. case 5:
  9612. case 7:
  9613. case 9:
  9614. case 11:
  9615. case 13:
  9616. text5 = "dance_cm3d2_001_f2.anm";
  9617. break;
  9618. case 2:
  9619. case 4:
  9620. case 6:
  9621. case 8:
  9622. case 10:
  9623. case 12:
  9624. text5 = "dance_cm3d2_001_f3.anm";
  9625. break;
  9626. }
  9627. if (!isShift)
  9628. {
  9629. if (!maidArray[j].body0.m_Bones.GetComponent<Animation>().GetClip(text5))
  9630. {
  9631. maidArray[j].body0.LoadAnime(text5, GameUty.FileSystem, text5, false, false);
  9632. }
  9633. }
  9634. else
  9635. {
  9636. if (!maidArray[j].body0.m_Bones.GetComponent<Animation>().GetClip("dance_cm3d2_kara_003_ddfl_f1.anm"))
  9637. {
  9638. maidArray[j].body0.LoadAnime("dance_cm3d2_kara_003_ddfl_f1.anm",
  9639. GameUty.FileSystem,
  9640. "dance_cm3d2_kara_003_ddfl_f1.anm",
  9641. false,
  9642. false);
  9643. }
  9644. textAsset = (Resources.Load("SceneDance/DDF_kara_voice_2") as TextAsset);
  9645. text4 = textAsset.text;
  9646. text4 = Regex.Replace(text4, "(\\r|\\n| )", string.Empty);
  9647. if (!isDanceStart1K && !isDanceStart3K && !isDanceStart4K && !isDanceStart5K && !isDanceStart6K
  9648. && !isDanceStart9K && !isDanceStart13K)
  9649. {
  9650. dancePos[j] = maidArray[j].transform.position;
  9651. danceRot[j] = maidArray[j].transform.localRotation;
  9652. }
  9653. }
  9654. m_baKuchipakuPattern[j] = Convert.FromBase64String(text4);
  9655. }
  9656. if (!isShift)
  9657. {
  9658. GameMain.Instance.SoundMgr.PlayDanceBGM("dokidokifallinlove_short.ogg", 0f, false);
  9659. sw = new Stopwatch();
  9660. sw.Start();
  9661. }
  9662. else if (this.getModKeyPressing(modKey.Ctrl))
  9663. {
  9664. GameMain.Instance.SoundMgr.PlayDanceBGM("dokidokifallinlove_short_sasaki_kara.ogg", 0f, false);
  9665. }
  9666. else
  9667. {
  9668. GameMain.Instance.SoundMgr.PlayDanceBGM("dokidokifallinlove_short_nao_kara.ogg", 0f, false);
  9669. }
  9670. for (int j = 0; j < maidCnt; j++)
  9671. {
  9672. maidArray[j].StartKuchipakuPattern(0f, text4, true);
  9673. Vector3 vector = Vector3.zero;
  9674. switch (j)
  9675. {
  9676. case 3:
  9677. vector.x = 1f;
  9678. break;
  9679. case 4:
  9680. vector.x = -1f;
  9681. break;
  9682. case 5:
  9683. vector.x = 2f;
  9684. break;
  9685. case 6:
  9686. vector.x = -2f;
  9687. break;
  9688. case 7:
  9689. vector.x = 3f;
  9690. break;
  9691. case 8:
  9692. vector.x = -3f;
  9693. break;
  9694. case 9:
  9695. vector.x = 4f;
  9696. break;
  9697. case 10:
  9698. vector.x = -4f;
  9699. break;
  9700. case 11:
  9701. vector.x = 5f;
  9702. break;
  9703. case 12:
  9704. vector.x = -5f;
  9705. break;
  9706. case 13:
  9707. vector.x = 6f;
  9708. break;
  9709. }
  9710. if (!isShift)
  9711. {
  9712. maidArray[j].SetPos(vector);
  9713. }
  9714. isStop[j] = false;
  9715. isLock[j] = false;
  9716. pHandL[j] = 0;
  9717. pHandR[j] = 0;
  9718. muneIKL[j] = false;
  9719. muneIKR[j] = false;
  9720. if (!isVR)
  9721. {
  9722. maidArray[j].body0.quaDefEyeL.eulerAngles = eyeL[(int) selectList[j]];
  9723. maidArray[j].body0.quaDefEyeR.eulerAngles = eyeR[(int) selectList[j]];
  9724. }
  9725. }
  9726. ikBui = 5;
  9727. isDanceStart1F = false;
  9728. isDanceStart2F = false;
  9729. isDanceStart3F = false;
  9730. isDanceStart4F = false;
  9731. isDanceStart5F = false;
  9732. isDanceStart6F = false;
  9733. isDanceStart7F = false;
  9734. isDanceStart8F = false;
  9735. isDanceStart9F = false;
  9736. isDanceStart10F = false;
  9737. isDanceStart11F = false;
  9738. isDanceStart12F = false;
  9739. isDanceStart13F = false;
  9740. isDanceStart14F = false;
  9741. isDanceStart15F = false;
  9742. for (int j = 0; j < maidCnt; j++)
  9743. {
  9744. danceFace[j] = 0f;
  9745. }
  9746. if (isDanceStart7V)
  9747. {
  9748. for (int j = 0; j < maidCnt; j++)
  9749. {
  9750. if (maidArray[j] && maidArray[j].Visible)
  9751. {
  9752. if (isDanceStart7V)
  9753. {
  9754. maidArray[j].SetPos(dancePos[j]);
  9755. maidArray[j].body0.transform.localRotation = danceRot[j];
  9756. }
  9757. }
  9758. }
  9759. isDanceStart7V = false;
  9760. }
  9761. if (isDanceStart8V)
  9762. {
  9763. for (int j = 0; j < maidCnt; j++)
  9764. {
  9765. if (maidArray[j] && maidArray[j].Visible)
  9766. {
  9767. if (isDanceStart8V)
  9768. {
  9769. maidArray[j].SetPos(dancePos[j]);
  9770. maidArray[j].body0.transform.localRotation = danceRot[j];
  9771. }
  9772. }
  9773. }
  9774. isDanceStart8V = false;
  9775. isDanceStart8P = false;
  9776. }
  9777. if (isDanceStart11V)
  9778. {
  9779. for (int j = 0; j < maidCnt; j++)
  9780. {
  9781. if (maidArray[j] && maidArray[j].Visible)
  9782. {
  9783. if (isDanceStart11V)
  9784. {
  9785. maidArray[j].SetPos(dancePos[j]);
  9786. maidArray[j].body0.transform.localRotation = danceRot[j];
  9787. }
  9788. }
  9789. }
  9790. isDanceStart11V = false;
  9791. }
  9792. if (isDanceStart1K || isDanceStart3K || isDanceStart4K || isDanceStart5K || isDanceStart6K || isDanceStart9K
  9793. || isDanceStart13K)
  9794. {
  9795. for (int j = 0; j < maidCnt; j++)
  9796. {
  9797. if (maidArray[j] && maidArray[j].Visible)
  9798. {
  9799. if (isDanceStart1K || isDanceStart3K || isDanceStart4K || isDanceStart5K || isDanceStart6K || isDanceStart9K
  9800. || isDanceStart13K)
  9801. {
  9802. maidArray[j].SetPos(dancePos[j]);
  9803. maidArray[j].body0.transform.localRotation = danceRot[j];
  9804. int i = j;
  9805. if (!isVR)
  9806. {
  9807. delCount[i] = 20;
  9808. if (goSlot[(int) selectList[i]] != null)
  9809. {
  9810. maidArray[i].body0.goSlot = new List<TBodySkin>(goSlot[(int) selectList[i]]);
  9811. for (int l = 0; l < bodyHit[(int) selectList[i]].Count; l++)
  9812. {
  9813. maidArray[i].body0.goSlot[l].bonehair.bodyhit = bodyHit[(int) selectList[i]][l];
  9814. }
  9815. }
  9816. }
  9817. Maid maid = maidArray[j];
  9818. maid.DelProp(MPN.handitem, true);
  9819. maid.DelProp(MPN.accvag, true);
  9820. maid.DelProp(MPN.accanl, true);
  9821. maid.DelProp(MPN.kousoku_upper, true);
  9822. maid.DelProp(MPN.kousoku_lower, true);
  9823. maid.AllProcPropSeqStart();
  9824. }
  9825. }
  9826. }
  9827. isDanceStart1K = false;
  9828. isDanceStart3K = false;
  9829. isDanceStart4K = false;
  9830. isDanceStart5K = false;
  9831. isDanceStart6K = false;
  9832. isDanceStart9K = false;
  9833. isDanceStart13K = false;
  9834. }
  9835. if (isDanceStart14V)
  9836. {
  9837. for (int j = 0; j < maidCnt; j++)
  9838. {
  9839. if (maidArray[j] && maidArray[j].Visible)
  9840. {
  9841. if (isDanceStart14V)
  9842. {
  9843. maidArray[j].SetPos(dancePos[j]);
  9844. maidArray[j].body0.transform.localRotation = danceRot[j];
  9845. }
  9846. }
  9847. }
  9848. isDanceStart14V = false;
  9849. }
  9850. if (isDanceStart15V)
  9851. {
  9852. for (int j = 0; j < maidCnt; j++)
  9853. {
  9854. if (maidArray[j] && maidArray[j].Visible)
  9855. {
  9856. if (isDanceStart15V)
  9857. {
  9858. maidArray[j].SetPos(dancePos[j]);
  9859. maidArray[j].body0.transform.localRotation = danceRot[j];
  9860. }
  9861. }
  9862. }
  9863. isDanceStart15V = false;
  9864. }
  9865. if (isShift)
  9866. {
  9867. if (maidArray[1] && maidArray[1].Visible)
  9868. {
  9869. if (maidArray[0].transform.position == maidArray[1].transform.position)
  9870. {
  9871. Vector3 vector = Vector3.zero;
  9872. vector.x = 0.6f;
  9873. maidArray[1].SetPos(vector);
  9874. if (maidArray[2] && maidArray[2].Visible)
  9875. {
  9876. vector.x = -0.6f;
  9877. maidArray[2].SetPos(vector);
  9878. }
  9879. if (maidArray[3] && maidArray[3].Visible)
  9880. {
  9881. vector.x = 1.2f;
  9882. maidArray[3].SetPos(vector);
  9883. }
  9884. if (maidArray[4] && maidArray[4].Visible)
  9885. {
  9886. vector.x = -1.2f;
  9887. maidArray[4].SetPos(vector);
  9888. }
  9889. if (maidArray[5] && maidArray[5].Visible)
  9890. {
  9891. vector.x = 1.8f;
  9892. maidArray[5].SetPos(vector);
  9893. }
  9894. if (maidArray[6] && maidArray[6].Visible)
  9895. {
  9896. vector.x = -1.8f;
  9897. maidArray[6].SetPos(vector);
  9898. }
  9899. if (maidArray[7] && maidArray[7].Visible)
  9900. {
  9901. vector.x = 2.4f;
  9902. maidArray[7].SetPos(vector);
  9903. }
  9904. if (maidArray[8] && maidArray[8].Visible)
  9905. {
  9906. vector.x = -2.4f;
  9907. maidArray[8].SetPos(vector);
  9908. }
  9909. if (maidArray[9] && maidArray[9].Visible)
  9910. {
  9911. vector.x = 3f;
  9912. maidArray[9].SetPos(vector);
  9913. }
  9914. if (maidArray[10] && maidArray[10].Visible)
  9915. {
  9916. vector.x = -3f;
  9917. maidArray[10].SetPos(vector);
  9918. }
  9919. if (maidArray[11] && maidArray[11].Visible)
  9920. {
  9921. vector.x = 3.6f;
  9922. maidArray[11].SetPos(vector);
  9923. }
  9924. if (maidArray[12] && maidArray[12].Visible)
  9925. {
  9926. vector.x = -3.6f;
  9927. maidArray[12].SetPos(vector);
  9928. }
  9929. if (maidArray[13] && maidArray[13].Visible)
  9930. {
  9931. vector.x = 4.2f;
  9932. maidArray[13].SetPos(vector);
  9933. }
  9934. }
  9935. }
  9936. isDanceStart1K = true;
  9937. for (int j = 0; j < maidCnt; j++)
  9938. {
  9939. maidArray[j].SetRot(new Vector3(maidArray[j].body0.transform.localRotation.x,
  9940. maidArray[j].body0.transform.localRotation.y + 90f,
  9941. maidArray[j].body0.transform.localRotation.z));
  9942. maidArray[j].SetPos(new Vector3(maidArray[j].body0.transform.position.x + 1f,
  9943. maidArray[j].body0.transform.position.y,
  9944. maidArray[j].body0.transform.position.z + 4f));
  9945. string text2 = "handitem,HanditemL_Karaoke_Mike_I_.menu";
  9946. int i = j;
  9947. Maid maid = maidArray[j];
  9948. if (!isVR)
  9949. {
  9950. delCount[i] = 20;
  9951. if (goSlot[(int) selectList[i]] != null)
  9952. {
  9953. maidArray[i].body0.goSlot = new List<TBodySkin>(goSlot[(int) selectList[i]]);
  9954. for (int l = 0; l < bodyHit[(int) selectList[i]].Count; l++)
  9955. {
  9956. maidArray[i].body0.goSlot[l].bonehair.bodyhit = bodyHit[(int) selectList[i]][l];
  9957. }
  9958. }
  9959. }
  9960. string[] array = new string[2];
  9961. array = text2.Split(new char[] {','});
  9962. maid.DelProp(MPN.handitem, true);
  9963. maid.DelProp(MPN.accvag, true);
  9964. maid.DelProp(MPN.accanl, true);
  9965. maid.DelProp(MPN.kousoku_upper, true);
  9966. maid.DelProp(MPN.kousoku_lower, true);
  9967. if (array[0] != "")
  9968. {
  9969. maid.SetProp(array[0], array[1], 0, true, false);
  9970. }
  9971. maid.AllProcPropSeqStart();
  9972. }
  9973. }
  9974. isDance = true;
  9975. isDanceStart1 = true;
  9976. }
  9977. if (isF2)
  9978. {
  9979. TextAsset textAsset = Resources.Load("SceneDance/dance_EtY_m0") as TextAsset;
  9980. string text4 = textAsset.text;
  9981. text4 = Regex.Replace(text4, "(\\r|\\n| )", string.Empty);
  9982. audioSourceBgm = GameMain.Instance.SoundMgr.GetAudioSourceBgm();
  9983. GameMain.Instance.SoundMgr.PlayBGM("se002.ogg", 0f, false);
  9984. for (int j = 0; j < maidCnt; j++)
  9985. {
  9986. if (!maidArray[j].body0.m_Bones.GetComponent<Animation>().GetClip("dance_cm3d_001_f1.anm"))
  9987. {
  9988. maidArray[j].body0.LoadAnime("dance_cm3d_001_f1.anm",
  9989. GameUty.FileSystem,
  9990. "dance_cm3d_001_f1.anm",
  9991. false,
  9992. false);
  9993. }
  9994. m_baKuchipakuPattern[j] = Convert.FromBase64String(text4);
  9995. }
  9996. GameMain.Instance.SoundMgr.PlayDanceBGM("entrancetoyou_short.ogg", 0f, false);
  9997. for (int j = 0; j < maidCnt; j++)
  9998. {
  9999. maidArray[j].StartKuchipakuPattern(0f, text4, true);
  10000. isStop[j] = false;
  10001. isLock[j] = false;
  10002. pHandL[j] = 0;
  10003. pHandR[j] = 0;
  10004. muneIKL[j] = false;
  10005. muneIKR[j] = false;
  10006. if (!isVR)
  10007. {
  10008. maidArray[j].body0.quaDefEyeL.eulerAngles = eyeL[(int) selectList[j]];
  10009. maidArray[j].body0.quaDefEyeR.eulerAngles = eyeR[(int) selectList[j]];
  10010. }
  10011. }
  10012. ikBui = 5;
  10013. isDanceStart1F = false;
  10014. isDanceStart2F = false;
  10015. isDanceStart3F = false;
  10016. isDanceStart4F = false;
  10017. isDanceStart5F = false;
  10018. isDanceStart6F = false;
  10019. isDanceStart7F = false;
  10020. isDanceStart8F = false;
  10021. isDanceStart9F = false;
  10022. isDanceStart10F = false;
  10023. isDanceStart11F = false;
  10024. isDanceStart12F = false;
  10025. isDanceStart13F = false;
  10026. isDanceStart14F = false;
  10027. isDanceStart15F = false;
  10028. for (int j = 0; j < maidCnt; j++)
  10029. {
  10030. danceFace[j] = 0f;
  10031. }
  10032. if (isDanceStart7V)
  10033. {
  10034. for (int j = 0; j < maidCnt; j++)
  10035. {
  10036. if (maidArray[j] && maidArray[j].Visible)
  10037. {
  10038. if (isDanceStart7V)
  10039. {
  10040. maidArray[j].SetPos(dancePos[j]);
  10041. maidArray[j].body0.transform.localRotation = danceRot[j];
  10042. }
  10043. }
  10044. }
  10045. isDanceStart7V = false;
  10046. }
  10047. if (isDanceStart8V)
  10048. {
  10049. for (int j = 0; j < maidCnt; j++)
  10050. {
  10051. if (maidArray[j] && maidArray[j].Visible)
  10052. {
  10053. if (isDanceStart8V)
  10054. {
  10055. maidArray[j].SetPos(dancePos[j]);
  10056. maidArray[j].body0.transform.localRotation = danceRot[j];
  10057. }
  10058. }
  10059. }
  10060. isDanceStart8V = false;
  10061. isDanceStart8P = false;
  10062. }
  10063. if (isDanceStart11V)
  10064. {
  10065. for (int j = 0; j < maidCnt; j++)
  10066. {
  10067. if (maidArray[j] && maidArray[j].Visible)
  10068. {
  10069. if (isDanceStart11V)
  10070. {
  10071. maidArray[j].SetPos(dancePos[j]);
  10072. maidArray[j].body0.transform.localRotation = danceRot[j];
  10073. }
  10074. }
  10075. }
  10076. isDanceStart11V = false;
  10077. }
  10078. if (isDanceStart1K || isDanceStart3K || isDanceStart4K || isDanceStart5K || isDanceStart6K || isDanceStart9K
  10079. || isDanceStart13K)
  10080. {
  10081. for (int j = 0; j < maidCnt; j++)
  10082. {
  10083. if (maidArray[j] && maidArray[j].Visible)
  10084. {
  10085. if (isDanceStart1K || isDanceStart3K || isDanceStart4K || isDanceStart5K || isDanceStart6K || isDanceStart9K
  10086. || isDanceStart13K)
  10087. {
  10088. maidArray[j].SetPos(dancePos[j]);
  10089. maidArray[j].body0.transform.localRotation = danceRot[j];
  10090. int i = j;
  10091. if (!isVR)
  10092. {
  10093. delCount[i] = 20;
  10094. if (goSlot[(int) selectList[i]] != null)
  10095. {
  10096. maidArray[i].body0.goSlot = new List<TBodySkin>(goSlot[(int) selectList[i]]);
  10097. for (int l = 0; l < bodyHit[(int) selectList[i]].Count; l++)
  10098. {
  10099. maidArray[i].body0.goSlot[l].bonehair.bodyhit = bodyHit[(int) selectList[i]][l];
  10100. }
  10101. }
  10102. }
  10103. Maid maid = maidArray[j];
  10104. maid.DelProp(MPN.handitem, true);
  10105. maid.DelProp(MPN.accvag, true);
  10106. maid.DelProp(MPN.accanl, true);
  10107. maid.DelProp(MPN.kousoku_upper, true);
  10108. maid.DelProp(MPN.kousoku_lower, true);
  10109. maid.AllProcPropSeqStart();
  10110. }
  10111. }
  10112. }
  10113. isDanceStart1K = false;
  10114. isDanceStart3K = false;
  10115. isDanceStart4K = false;
  10116. isDanceStart5K = false;
  10117. isDanceStart6K = false;
  10118. isDanceStart9K = false;
  10119. isDanceStart13K = false;
  10120. }
  10121. if (isDanceStart14V)
  10122. {
  10123. for (int j = 0; j < maidCnt; j++)
  10124. {
  10125. if (maidArray[j] && maidArray[j].Visible)
  10126. {
  10127. if (isDanceStart14V)
  10128. {
  10129. maidArray[j].SetPos(dancePos[j]);
  10130. maidArray[j].body0.transform.localRotation = danceRot[j];
  10131. }
  10132. }
  10133. }
  10134. isDanceStart14V = false;
  10135. }
  10136. if (isDanceStart15V)
  10137. {
  10138. for (int j = 0; j < maidCnt; j++)
  10139. {
  10140. if (maidArray[j] && maidArray[j].Visible)
  10141. {
  10142. if (isDanceStart15V)
  10143. {
  10144. maidArray[j].SetPos(dancePos[j]);
  10145. maidArray[j].body0.transform.localRotation = danceRot[j];
  10146. }
  10147. }
  10148. }
  10149. isDanceStart15V = false;
  10150. }
  10151. if (maidArray[1] && maidArray[1].Visible)
  10152. {
  10153. if (maidArray[0].transform.position == maidArray[1].transform.position)
  10154. {
  10155. Vector3 vector = Vector3.zero;
  10156. vector.x = 0.6f;
  10157. maidArray[1].SetPos(vector);
  10158. if (maidArray[2] && maidArray[2].Visible)
  10159. {
  10160. vector.x = -0.6f;
  10161. maidArray[2].SetPos(vector);
  10162. }
  10163. if (maidArray[3] && maidArray[3].Visible)
  10164. {
  10165. vector.x = 1.2f;
  10166. maidArray[3].SetPos(vector);
  10167. }
  10168. if (maidArray[4] && maidArray[4].Visible)
  10169. {
  10170. vector.x = -1.2f;
  10171. maidArray[4].SetPos(vector);
  10172. }
  10173. if (maidArray[5] && maidArray[5].Visible)
  10174. {
  10175. vector.x = 1.8f;
  10176. maidArray[5].SetPos(vector);
  10177. }
  10178. if (maidArray[6] && maidArray[6].Visible)
  10179. {
  10180. vector.x = -1.8f;
  10181. maidArray[6].SetPos(vector);
  10182. }
  10183. if (maidArray[7] && maidArray[7].Visible)
  10184. {
  10185. vector.x = 2.4f;
  10186. maidArray[7].SetPos(vector);
  10187. }
  10188. if (maidArray[8] && maidArray[8].Visible)
  10189. {
  10190. vector.x = -2.4f;
  10191. maidArray[8].SetPos(vector);
  10192. }
  10193. if (maidArray[9] && maidArray[9].Visible)
  10194. {
  10195. vector.x = 3f;
  10196. maidArray[9].SetPos(vector);
  10197. }
  10198. if (maidArray[10] && maidArray[10].Visible)
  10199. {
  10200. vector.x = -3f;
  10201. maidArray[10].SetPos(vector);
  10202. }
  10203. if (maidArray[11] && maidArray[11].Visible)
  10204. {
  10205. vector.x = 3.6f;
  10206. maidArray[11].SetPos(vector);
  10207. }
  10208. if (maidArray[12] && maidArray[12].Visible)
  10209. {
  10210. vector.x = -3.6f;
  10211. maidArray[12].SetPos(vector);
  10212. }
  10213. if (maidArray[13] && maidArray[13].Visible)
  10214. {
  10215. vector.x = 4.2f;
  10216. maidArray[13].SetPos(vector);
  10217. }
  10218. }
  10219. }
  10220. isDance = true;
  10221. isDanceStart2 = true;
  10222. isF2 = false;
  10223. }
  10224. if ((Input.GetKey(KeyCode.Return) && Input.GetKeyDown(KeyCode.Alpha2))
  10225. || (Input.GetKey(KeyCode.KeypadEnter) && Input.GetKeyDown(KeyCode.Keypad2)))
  10226. {
  10227. GameMain.Instance.SoundMgr.StopBGM(0f);
  10228. isF2 = true;
  10229. }
  10230. if (isF3)
  10231. {
  10232. TextAsset textAsset = Resources.Load("SceneDance/dance_Scl_m0") as TextAsset;
  10233. string text4 = textAsset.text;
  10234. text4 = Regex.Replace(text4, "(\\r|\\n| )", string.Empty);
  10235. audioSourceBgm = GameMain.Instance.SoundMgr.GetAudioSourceBgm();
  10236. GameMain.Instance.SoundMgr.PlayBGM("se002.ogg", 0f, false);
  10237. for (int j = 0; j < maidCnt; j++)
  10238. {
  10239. if (!isShift)
  10240. {
  10241. if (!maidArray[j].body0.m_Bones.GetComponent<Animation>().GetClip("dance_cm3d_002_end_f1.anm"))
  10242. {
  10243. maidArray[j].body0.LoadAnime("dance_cm3d_002_end_f1.anm",
  10244. GameUty.FileSystem,
  10245. "dance_cm3d_002_end_f1.anm",
  10246. false,
  10247. false);
  10248. }
  10249. }
  10250. else
  10251. {
  10252. if (!maidArray[j].body0.m_Bones.GetComponent<Animation>().GetClip("dance_cm3d2_kara_001_sl_f1.anm"))
  10253. {
  10254. maidArray[j].body0.LoadAnime("dance_cm3d2_kara_001_sl_f1.anm",
  10255. GameUty.FileSystem,
  10256. "dance_cm3d2_kara_001_sl_f1.anm",
  10257. false,
  10258. false);
  10259. }
  10260. textAsset = (Resources.Load("SceneDance/scaret_kara_voice_2") as TextAsset);
  10261. text4 = textAsset.text;
  10262. text4 = Regex.Replace(text4, "(\\r|\\n| )", string.Empty);
  10263. if (!isDanceStart1K && !isDanceStart3K && !isDanceStart4K && !isDanceStart5K && !isDanceStart6K
  10264. && !isDanceStart9K && !isDanceStart13K)
  10265. {
  10266. dancePos[j] = maidArray[j].transform.position;
  10267. danceRot[j] = maidArray[j].transform.localRotation;
  10268. }
  10269. }
  10270. m_baKuchipakuPattern[j] = Convert.FromBase64String(text4);
  10271. }
  10272. if (!isShift)
  10273. {
  10274. GameMain.Instance.SoundMgr.PlayDanceBGM("scarlet leap_short.ogg", 0f, false);
  10275. }
  10276. else
  10277. {
  10278. GameMain.Instance.SoundMgr.PlayDanceBGM("scarlet leap_short_kara_1.ogg", 0f, false);
  10279. }
  10280. for (int j = 0; j < maidCnt; j++)
  10281. {
  10282. maidArray[j].StartKuchipakuPattern(0f, text4, true);
  10283. isStop[j] = false;
  10284. isLock[j] = false;
  10285. pHandL[j] = 0;
  10286. pHandR[j] = 0;
  10287. muneIKL[j] = false;
  10288. muneIKR[j] = false;
  10289. if (!isVR)
  10290. {
  10291. maidArray[j].body0.quaDefEyeL.eulerAngles = eyeL[(int) selectList[j]];
  10292. maidArray[j].body0.quaDefEyeR.eulerAngles = eyeR[(int) selectList[j]];
  10293. }
  10294. }
  10295. ikBui = 5;
  10296. isDanceStart1F = false;
  10297. isDanceStart2F = false;
  10298. isDanceStart3F = false;
  10299. isDanceStart4F = false;
  10300. isDanceStart5F = false;
  10301. isDanceStart6F = false;
  10302. isDanceStart7F = false;
  10303. isDanceStart8F = false;
  10304. isDanceStart9F = false;
  10305. isDanceStart10F = false;
  10306. isDanceStart11F = false;
  10307. isDanceStart12F = false;
  10308. isDanceStart13F = false;
  10309. isDanceStart14F = false;
  10310. isDanceStart15F = false;
  10311. for (int j = 0; j < maidCnt; j++)
  10312. {
  10313. danceFace[j] = 0f;
  10314. }
  10315. if (isDanceStart7V)
  10316. {
  10317. for (int j = 0; j < maidCnt; j++)
  10318. {
  10319. if (maidArray[j] && maidArray[j].Visible)
  10320. {
  10321. if (isDanceStart7V)
  10322. {
  10323. maidArray[j].SetPos(dancePos[j]);
  10324. maidArray[j].body0.transform.localRotation = danceRot[j];
  10325. }
  10326. }
  10327. }
  10328. isDanceStart7V = false;
  10329. }
  10330. if (isDanceStart8V)
  10331. {
  10332. for (int j = 0; j < maidCnt; j++)
  10333. {
  10334. if (maidArray[j] && maidArray[j].Visible)
  10335. {
  10336. if (isDanceStart8V)
  10337. {
  10338. maidArray[j].SetPos(dancePos[j]);
  10339. maidArray[j].body0.transform.localRotation = danceRot[j];
  10340. }
  10341. }
  10342. }
  10343. isDanceStart8V = false;
  10344. isDanceStart8P = false;
  10345. }
  10346. if (isDanceStart11V)
  10347. {
  10348. for (int j = 0; j < maidCnt; j++)
  10349. {
  10350. if (maidArray[j] && maidArray[j].Visible)
  10351. {
  10352. if (isDanceStart11V)
  10353. {
  10354. maidArray[j].SetPos(dancePos[j]);
  10355. maidArray[j].body0.transform.localRotation = danceRot[j];
  10356. }
  10357. }
  10358. }
  10359. isDanceStart11V = false;
  10360. }
  10361. if (isDanceStart1K || isDanceStart3K || isDanceStart4K || isDanceStart5K || isDanceStart6K || isDanceStart9K
  10362. || isDanceStart13K)
  10363. {
  10364. for (int j = 0; j < maidCnt; j++)
  10365. {
  10366. if (maidArray[j] && maidArray[j].Visible)
  10367. {
  10368. if (isDanceStart1K || isDanceStart3K || isDanceStart4K || isDanceStart5K || isDanceStart6K || isDanceStart9K
  10369. || isDanceStart13K)
  10370. {
  10371. maidArray[j].SetPos(dancePos[j]);
  10372. maidArray[j].body0.transform.localRotation = danceRot[j];
  10373. int i = j;
  10374. if (!isVR)
  10375. {
  10376. delCount[i] = 20;
  10377. if (goSlot[(int) selectList[i]] != null)
  10378. {
  10379. maidArray[i].body0.goSlot = new List<TBodySkin>(goSlot[(int) selectList[i]]);
  10380. for (int l = 0; l < bodyHit[(int) selectList[i]].Count; l++)
  10381. {
  10382. maidArray[i].body0.goSlot[l].bonehair.bodyhit = bodyHit[(int) selectList[i]][l];
  10383. }
  10384. }
  10385. }
  10386. Maid maid = maidArray[j];
  10387. maid.DelProp(MPN.handitem, true);
  10388. maid.DelProp(MPN.accvag, true);
  10389. maid.DelProp(MPN.accanl, true);
  10390. maid.DelProp(MPN.kousoku_upper, true);
  10391. maid.DelProp(MPN.kousoku_lower, true);
  10392. maid.AllProcPropSeqStart();
  10393. }
  10394. }
  10395. }
  10396. isDanceStart1K = false;
  10397. isDanceStart3K = false;
  10398. isDanceStart4K = false;
  10399. isDanceStart5K = false;
  10400. isDanceStart6K = false;
  10401. isDanceStart9K = false;
  10402. isDanceStart13K = false;
  10403. }
  10404. if (isDanceStart14V)
  10405. {
  10406. for (int j = 0; j < maidCnt; j++)
  10407. {
  10408. if (maidArray[j] && maidArray[j].Visible)
  10409. {
  10410. if (isDanceStart14V)
  10411. {
  10412. maidArray[j].SetPos(dancePos[j]);
  10413. maidArray[j].body0.transform.localRotation = danceRot[j];
  10414. }
  10415. }
  10416. }
  10417. isDanceStart14V = false;
  10418. }
  10419. if (isDanceStart15V)
  10420. {
  10421. for (int j = 0; j < maidCnt; j++)
  10422. {
  10423. if (maidArray[j] && maidArray[j].Visible)
  10424. {
  10425. if (isDanceStart15V)
  10426. {
  10427. maidArray[j].SetPos(dancePos[j]);
  10428. maidArray[j].body0.transform.localRotation = danceRot[j];
  10429. }
  10430. }
  10431. }
  10432. isDanceStart15V = false;
  10433. }
  10434. if (maidArray[1] && maidArray[1].Visible)
  10435. {
  10436. if (maidArray[0].transform.position == maidArray[1].transform.position)
  10437. {
  10438. Vector3 vector = Vector3.zero;
  10439. vector.x = 0.6f;
  10440. maidArray[1].SetPos(vector);
  10441. if (maidArray[2] && maidArray[2].Visible)
  10442. {
  10443. vector.x = -0.6f;
  10444. maidArray[2].SetPos(vector);
  10445. }
  10446. if (maidArray[3] && maidArray[3].Visible)
  10447. {
  10448. vector.x = 1.2f;
  10449. maidArray[3].SetPos(vector);
  10450. }
  10451. if (maidArray[4] && maidArray[4].Visible)
  10452. {
  10453. vector.x = -1.2f;
  10454. maidArray[4].SetPos(vector);
  10455. }
  10456. if (maidArray[5] && maidArray[5].Visible)
  10457. {
  10458. vector.x = 1.8f;
  10459. maidArray[5].SetPos(vector);
  10460. }
  10461. if (maidArray[6] && maidArray[6].Visible)
  10462. {
  10463. vector.x = -1.8f;
  10464. maidArray[6].SetPos(vector);
  10465. }
  10466. if (maidArray[7] && maidArray[7].Visible)
  10467. {
  10468. vector.x = 2.4f;
  10469. maidArray[7].SetPos(vector);
  10470. }
  10471. if (maidArray[8] && maidArray[8].Visible)
  10472. {
  10473. vector.x = -2.4f;
  10474. maidArray[8].SetPos(vector);
  10475. }
  10476. if (maidArray[9] && maidArray[9].Visible)
  10477. {
  10478. vector.x = 3f;
  10479. maidArray[9].SetPos(vector);
  10480. }
  10481. if (maidArray[10] && maidArray[10].Visible)
  10482. {
  10483. vector.x = -3f;
  10484. maidArray[10].SetPos(vector);
  10485. }
  10486. if (maidArray[11] && maidArray[11].Visible)
  10487. {
  10488. vector.x = 3.6f;
  10489. maidArray[11].SetPos(vector);
  10490. }
  10491. if (maidArray[12] && maidArray[12].Visible)
  10492. {
  10493. vector.x = -3.6f;
  10494. maidArray[12].SetPos(vector);
  10495. }
  10496. if (maidArray[13] && maidArray[13].Visible)
  10497. {
  10498. vector.x = 4.2f;
  10499. maidArray[13].SetPos(vector);
  10500. }
  10501. }
  10502. }
  10503. if (isShift)
  10504. {
  10505. isDanceStart3K = true;
  10506. for (int j = 0; j < maidCnt; j++)
  10507. {
  10508. maidArray[j].SetRot(new Vector3(maidArray[j].body0.transform.localRotation.x,
  10509. maidArray[j].body0.transform.localRotation.y + 90f,
  10510. maidArray[j].body0.transform.localRotation.z));
  10511. maidArray[j].SetPos(new Vector3(maidArray[j].body0.transform.position.x + 1f,
  10512. maidArray[j].body0.transform.position.y,
  10513. maidArray[j].body0.transform.position.z + 4f));
  10514. string text2 = "handitem,HanditemL_Karaoke_Mike_I_.menu";
  10515. int i = j;
  10516. Maid maid = maidArray[j];
  10517. if (!isVR)
  10518. {
  10519. delCount[i] = 20;
  10520. if (goSlot[(int) selectList[i]] != null)
  10521. {
  10522. maidArray[i].body0.goSlot = new List<TBodySkin>(goSlot[(int) selectList[i]]);
  10523. for (int l = 0; l < bodyHit[(int) selectList[i]].Count; l++)
  10524. {
  10525. maidArray[i].body0.goSlot[l].bonehair.bodyhit = bodyHit[(int) selectList[i]][l];
  10526. }
  10527. }
  10528. }
  10529. string[] array = new string[2];
  10530. array = text2.Split(new char[] {','});
  10531. maid.DelProp(MPN.handitem, true);
  10532. maid.DelProp(MPN.accvag, true);
  10533. maid.DelProp(MPN.accanl, true);
  10534. maid.DelProp(MPN.kousoku_upper, true);
  10535. maid.DelProp(MPN.kousoku_lower, true);
  10536. if (array[0] != "")
  10537. {
  10538. maid.SetProp(array[0], array[1], 0, true, false);
  10539. }
  10540. maid.AllProcPropSeqStart();
  10541. }
  10542. }
  10543. isDance = true;
  10544. isDanceStart3 = true;
  10545. isF3 = false;
  10546. }
  10547. if ((Input.GetKey(KeyCode.Return) && Input.GetKeyDown(KeyCode.Alpha3))
  10548. || (Input.GetKey(KeyCode.KeypadEnter) && Input.GetKeyDown(KeyCode.Keypad3)))
  10549. {
  10550. GameMain.Instance.SoundMgr.StopBGM(0f);
  10551. isF3 = true;
  10552. if (this.getModKeyPressing(modKey.Shift))
  10553. {
  10554. isShift = true;
  10555. }
  10556. }
  10557. if (isSF1 || isSF2 || isSF3)
  10558. {
  10559. TextAsset textAsset = Resources.Load("SceneDance/dance_SmT_m0") as TextAsset;
  10560. string text4 = textAsset.text;
  10561. text4 = Regex.Replace(text4, "(\\r|\\n| )", string.Empty);
  10562. audioSourceBgm = GameMain.Instance.SoundMgr.GetAudioSourceBgm();
  10563. GameMain.Instance.SoundMgr.PlayBGM("se002.ogg", 0f, false);
  10564. for (int j = 0; j < maidCnt; j++)
  10565. {
  10566. if (!isShift)
  10567. {
  10568. if (!maidArray[j].body0.m_Bones.GetComponent<Animation>().GetClip("dance_cm3d2_002_smt_f.anm"))
  10569. {
  10570. maidArray[j].body0.LoadAnime("dance_cm3d2_002_smt_f.anm",
  10571. GameUty.FileSystem,
  10572. "dance_cm3d2_002_smt_f.anm",
  10573. false,
  10574. false);
  10575. }
  10576. }
  10577. else
  10578. {
  10579. if (!maidArray[j].body0.m_Bones.GetComponent<Animation>().GetClip("dance_cm3d2_kara02_001_smt_f1.anm"))
  10580. {
  10581. maidArray[j].body0.LoadAnime("dance_cm3d2_kara02_001_smt_f1.anm",
  10582. GameUty.FileSystem,
  10583. "dance_cm3d2_kara02_001_smt_f1.anm",
  10584. false,
  10585. false);
  10586. }
  10587. textAsset = (Resources.Load("SceneDance/stellar my tears_kara_voice") as TextAsset);
  10588. text4 = textAsset.text;
  10589. text4 = Regex.Replace(text4, "(\\r|\\n| )", string.Empty);
  10590. if (!isDanceStart1K && !isDanceStart3K && !isDanceStart4K && !isDanceStart5K && !isDanceStart6K
  10591. && !isDanceStart9K && !isDanceStart13K)
  10592. {
  10593. dancePos[j] = maidArray[j].transform.position;
  10594. danceRot[j] = maidArray[j].transform.localRotation;
  10595. }
  10596. }
  10597. m_baKuchipakuPattern[j] = Convert.FromBase64String(text4);
  10598. }
  10599. if (!isShift)
  10600. {
  10601. if (isSF1)
  10602. {
  10603. GameMain.Instance.SoundMgr.PlayDanceBGM("stellarmytears_short.ogg", 0f, false);
  10604. }
  10605. if (isSF2)
  10606. {
  10607. GameMain.Instance.SoundMgr.PlayDanceBGM("stellarmytears_short2.ogg", 0f, false);
  10608. }
  10609. if (isSF3)
  10610. {
  10611. GameMain.Instance.SoundMgr.PlayDanceBGM("stellarmytears_short3.ogg", 0f, false);
  10612. }
  10613. }
  10614. else
  10615. {
  10616. if (isSF1)
  10617. {
  10618. GameMain.Instance.SoundMgr.PlayDanceBGM("stellarmytears_short_nao_kara.ogg", 0f, false);
  10619. }
  10620. if (isSF2)
  10621. {
  10622. GameMain.Instance.SoundMgr.PlayDanceBGM("stellarmytears_short_sasaki_kara.ogg", 0f, false);
  10623. }
  10624. if (isSF3)
  10625. {
  10626. GameMain.Instance.SoundMgr.PlayDanceBGM("stellarmytears_short_misato_kara.ogg", 0f, false);
  10627. }
  10628. }
  10629. for (int j = 0; j < maidCnt; j++)
  10630. {
  10631. maidArray[j].StartKuchipakuPattern(0f, text4, true);
  10632. isStop[j] = false;
  10633. isLock[j] = false;
  10634. pHandL[j] = 0;
  10635. pHandR[j] = 0;
  10636. muneIKL[j] = false;
  10637. muneIKR[j] = false;
  10638. if (!isVR)
  10639. {
  10640. maidArray[j].body0.quaDefEyeL.eulerAngles = eyeL[(int) selectList[j]];
  10641. maidArray[j].body0.quaDefEyeR.eulerAngles = eyeR[(int) selectList[j]];
  10642. }
  10643. }
  10644. ikBui = 5;
  10645. isDanceStart1F = false;
  10646. isDanceStart2F = false;
  10647. isDanceStart3F = false;
  10648. isDanceStart4F = false;
  10649. isDanceStart5F = false;
  10650. isDanceStart6F = false;
  10651. isDanceStart7F = false;
  10652. isDanceStart8F = false;
  10653. isDanceStart9F = false;
  10654. isDanceStart10F = false;
  10655. isDanceStart11F = false;
  10656. isDanceStart12F = false;
  10657. isDanceStart13F = false;
  10658. isDanceStart14F = false;
  10659. isDanceStart15F = false;
  10660. for (int j = 0; j < maidCnt; j++)
  10661. {
  10662. danceFace[j] = 0f;
  10663. }
  10664. if (isDanceStart7V)
  10665. {
  10666. for (int j = 0; j < maidCnt; j++)
  10667. {
  10668. if (maidArray[j] && maidArray[j].Visible)
  10669. {
  10670. if (isDanceStart7V)
  10671. {
  10672. maidArray[j].SetPos(dancePos[j]);
  10673. maidArray[j].body0.transform.localRotation = danceRot[j];
  10674. }
  10675. }
  10676. }
  10677. isDanceStart7V = false;
  10678. }
  10679. if (isDanceStart8V)
  10680. {
  10681. for (int j = 0; j < maidCnt; j++)
  10682. {
  10683. if (maidArray[j] && maidArray[j].Visible)
  10684. {
  10685. if (isDanceStart8V)
  10686. {
  10687. maidArray[j].SetPos(dancePos[j]);
  10688. maidArray[j].body0.transform.localRotation = danceRot[j];
  10689. }
  10690. }
  10691. }
  10692. isDanceStart8V = false;
  10693. isDanceStart8P = false;
  10694. }
  10695. if (isDanceStart11V)
  10696. {
  10697. for (int j = 0; j < maidCnt; j++)
  10698. {
  10699. if (maidArray[j] && maidArray[j].Visible)
  10700. {
  10701. if (isDanceStart11V)
  10702. {
  10703. maidArray[j].SetPos(dancePos[j]);
  10704. maidArray[j].body0.transform.localRotation = danceRot[j];
  10705. }
  10706. }
  10707. }
  10708. isDanceStart11V = false;
  10709. }
  10710. if (isDanceStart1K || isDanceStart3K || isDanceStart4K || isDanceStart5K || isDanceStart6K || isDanceStart9K
  10711. || isDanceStart13K)
  10712. {
  10713. for (int j = 0; j < maidCnt; j++)
  10714. {
  10715. if (maidArray[j] && maidArray[j].Visible)
  10716. {
  10717. if (isDanceStart1K || isDanceStart3K || isDanceStart4K || isDanceStart5K || isDanceStart6K || isDanceStart9K
  10718. || isDanceStart13K)
  10719. {
  10720. maidArray[j].SetPos(dancePos[j]);
  10721. maidArray[j].body0.transform.localRotation = danceRot[j];
  10722. int i = j;
  10723. if (!isVR)
  10724. {
  10725. delCount[i] = 20;
  10726. if (goSlot[(int) selectList[i]] != null)
  10727. {
  10728. maidArray[i].body0.goSlot = new List<TBodySkin>(goSlot[(int) selectList[i]]);
  10729. for (int l = 0; l < bodyHit[(int) selectList[i]].Count; l++)
  10730. {
  10731. maidArray[i].body0.goSlot[l].bonehair.bodyhit = bodyHit[(int) selectList[i]][l];
  10732. }
  10733. }
  10734. }
  10735. Maid maid = maidArray[j];
  10736. maid.DelProp(MPN.handitem, true);
  10737. maid.DelProp(MPN.accvag, true);
  10738. maid.DelProp(MPN.accanl, true);
  10739. maid.DelProp(MPN.kousoku_upper, true);
  10740. maid.DelProp(MPN.kousoku_lower, true);
  10741. maid.AllProcPropSeqStart();
  10742. }
  10743. }
  10744. }
  10745. isDanceStart1K = false;
  10746. isDanceStart3K = false;
  10747. isDanceStart4K = false;
  10748. isDanceStart5K = false;
  10749. isDanceStart6K = false;
  10750. isDanceStart9K = false;
  10751. isDanceStart13K = false;
  10752. }
  10753. if (isDanceStart14V)
  10754. {
  10755. for (int j = 0; j < maidCnt; j++)
  10756. {
  10757. if (maidArray[j] && maidArray[j].Visible)
  10758. {
  10759. if (isDanceStart14V)
  10760. {
  10761. maidArray[j].SetPos(dancePos[j]);
  10762. maidArray[j].body0.transform.localRotation = danceRot[j];
  10763. }
  10764. }
  10765. }
  10766. isDanceStart14V = false;
  10767. }
  10768. if (isDanceStart15V)
  10769. {
  10770. for (int j = 0; j < maidCnt; j++)
  10771. {
  10772. if (maidArray[j] && maidArray[j].Visible)
  10773. {
  10774. if (isDanceStart15V)
  10775. {
  10776. maidArray[j].SetPos(dancePos[j]);
  10777. maidArray[j].body0.transform.localRotation = danceRot[j];
  10778. }
  10779. }
  10780. }
  10781. isDanceStart15V = false;
  10782. }
  10783. if (maidArray[1] && maidArray[1].Visible)
  10784. {
  10785. if (maidArray[0].transform.position == maidArray[1].transform.position)
  10786. {
  10787. Vector3 vector = Vector3.zero;
  10788. vector.x = 0.6f;
  10789. maidArray[1].SetPos(vector);
  10790. if (maidArray[2] && maidArray[2].Visible)
  10791. {
  10792. vector.x = -0.6f;
  10793. maidArray[2].SetPos(vector);
  10794. }
  10795. if (maidArray[3] && maidArray[3].Visible)
  10796. {
  10797. vector.x = 1.2f;
  10798. maidArray[3].SetPos(vector);
  10799. }
  10800. if (maidArray[4] && maidArray[4].Visible)
  10801. {
  10802. vector.x = -1.2f;
  10803. maidArray[4].SetPos(vector);
  10804. }
  10805. if (maidArray[5] && maidArray[5].Visible)
  10806. {
  10807. vector.x = 1.8f;
  10808. maidArray[5].SetPos(vector);
  10809. }
  10810. if (maidArray[6] && maidArray[6].Visible)
  10811. {
  10812. vector.x = -1.8f;
  10813. maidArray[6].SetPos(vector);
  10814. }
  10815. if (maidArray[7] && maidArray[7].Visible)
  10816. {
  10817. vector.x = 2.4f;
  10818. maidArray[7].SetPos(vector);
  10819. }
  10820. if (maidArray[8] && maidArray[8].Visible)
  10821. {
  10822. vector.x = -2.4f;
  10823. maidArray[8].SetPos(vector);
  10824. }
  10825. if (maidArray[9] && maidArray[9].Visible)
  10826. {
  10827. vector.x = 3f;
  10828. maidArray[9].SetPos(vector);
  10829. }
  10830. if (maidArray[10] && maidArray[10].Visible)
  10831. {
  10832. vector.x = -3f;
  10833. maidArray[10].SetPos(vector);
  10834. }
  10835. if (maidArray[11] && maidArray[11].Visible)
  10836. {
  10837. vector.x = 3.6f;
  10838. maidArray[11].SetPos(vector);
  10839. }
  10840. if (maidArray[12] && maidArray[12].Visible)
  10841. {
  10842. vector.x = -3.6f;
  10843. maidArray[12].SetPos(vector);
  10844. }
  10845. if (maidArray[13] && maidArray[13].Visible)
  10846. {
  10847. vector.x = 4.2f;
  10848. maidArray[13].SetPos(vector);
  10849. }
  10850. }
  10851. }
  10852. if (isShift)
  10853. {
  10854. isDanceStart4K = true;
  10855. for (int j = 0; j < maidCnt; j++)
  10856. {
  10857. maidArray[j].SetRot(new Vector3(maidArray[j].body0.transform.localRotation.x,
  10858. maidArray[j].body0.transform.localRotation.y + 90f,
  10859. maidArray[j].body0.transform.localRotation.z));
  10860. maidArray[j].SetPos(new Vector3(maidArray[j].body0.transform.position.x + 1f,
  10861. maidArray[j].body0.transform.position.y,
  10862. maidArray[j].body0.transform.position.z + 4f));
  10863. string text2 = "handitem,HanditemL_Karaoke_Mike_I_.menu";
  10864. int i = j;
  10865. Maid maid = maidArray[j];
  10866. if (!isVR)
  10867. {
  10868. delCount[i] = 20;
  10869. if (goSlot[(int) selectList[i]] != null)
  10870. {
  10871. maidArray[i].body0.goSlot = new List<TBodySkin>(goSlot[(int) selectList[i]]);
  10872. for (int l = 0; l < bodyHit[(int) selectList[i]].Count; l++)
  10873. {
  10874. maidArray[i].body0.goSlot[l].bonehair.bodyhit = bodyHit[(int) selectList[i]][l];
  10875. }
  10876. }
  10877. }
  10878. string[] array = new string[2];
  10879. array = text2.Split(new char[] {','});
  10880. maid.DelProp(MPN.handitem, true);
  10881. maid.DelProp(MPN.accvag, true);
  10882. maid.DelProp(MPN.accanl, true);
  10883. maid.DelProp(MPN.kousoku_upper, true);
  10884. maid.DelProp(MPN.kousoku_lower, true);
  10885. if (array[0] != "")
  10886. {
  10887. maid.SetProp(array[0], array[1], 0, true, false);
  10888. }
  10889. maid.AllProcPropSeqStart();
  10890. }
  10891. }
  10892. isDance = true;
  10893. isDanceStart4 = true;
  10894. isSF1 = false;
  10895. isSF2 = false;
  10896. isSF3 = false;
  10897. }
  10898. if (isHS1 || isHS2 || isHS3)
  10899. {
  10900. TextAsset textAsset = Resources.Load("SceneDance/dance_Hhs_m0") as TextAsset;
  10901. string text4 = textAsset.text;
  10902. text4 = Regex.Replace(text4, "(\\r|\\n| )", string.Empty);
  10903. audioSourceBgm = GameMain.Instance.SoundMgr.GetAudioSourceBgm();
  10904. GameMain.Instance.SoundMgr.PlayBGM("se002.ogg", 0f, false);
  10905. for (int j = 0; j < maidCnt; j++)
  10906. {
  10907. if (!isShift)
  10908. {
  10909. if (!maidArray[j].body0.m_Bones.GetComponent<Animation>().GetClip("dance_cm3d2_003_hs_f1.anm"))
  10910. {
  10911. maidArray[j].body0.LoadAnime("dance_cm3d2_003_hs_f1.anm",
  10912. GameUty.FileSystem,
  10913. "dance_cm3d2_003_hs_f1.anm",
  10914. false,
  10915. false);
  10916. }
  10917. }
  10918. else
  10919. {
  10920. if (!maidArray[j].body0.m_Bones.GetComponent<Animation>().GetClip("dance_cm3d2_kara02_003_hs_f1.anm"))
  10921. {
  10922. maidArray[j].body0.LoadAnime("dance_cm3d2_kara02_003_hs_f1.anm",
  10923. GameUty.FileSystem,
  10924. "dance_cm3d2_kara02_003_hs_f1.anm",
  10925. false,
  10926. false);
  10927. }
  10928. textAsset = (Resources.Load("SceneDance/happy_happy_scandal_kara_voice") as TextAsset);
  10929. text4 = textAsset.text;
  10930. text4 = Regex.Replace(text4, "(\\r|\\n| )", string.Empty);
  10931. if (!isDanceStart1K && !isDanceStart3K && !isDanceStart4K && !isDanceStart5K && !isDanceStart6K
  10932. && !isDanceStart9K && !isDanceStart13K)
  10933. {
  10934. dancePos[j] = maidArray[j].transform.position;
  10935. danceRot[j] = maidArray[j].transform.localRotation;
  10936. }
  10937. }
  10938. m_baKuchipakuPattern[j] = Convert.FromBase64String(text4);
  10939. }
  10940. if (!isShift)
  10941. {
  10942. if (isHS1)
  10943. {
  10944. GameMain.Instance.SoundMgr.PlayDanceBGM("happy_happy_scandal1.ogg", 0f, false);
  10945. }
  10946. if (isHS2)
  10947. {
  10948. GameMain.Instance.SoundMgr.PlayDanceBGM("happy_happy_scandal2.ogg", 0f, false);
  10949. }
  10950. if (isHS3)
  10951. {
  10952. GameMain.Instance.SoundMgr.PlayDanceBGM("happy_happy_scandal3.ogg", 0f, false);
  10953. }
  10954. }
  10955. else
  10956. {
  10957. if (isHS1)
  10958. {
  10959. GameMain.Instance.SoundMgr.PlayDanceBGM("happyhappyscandal_short_nao_kara.ogg", 0f, false);
  10960. }
  10961. if (isHS2)
  10962. {
  10963. GameMain.Instance.SoundMgr.PlayDanceBGM("happy_happy_scandal_sasaki_kara.ogg", 0f, false);
  10964. }
  10965. if (isHS3)
  10966. {
  10967. GameMain.Instance.SoundMgr.PlayDanceBGM("happy_happy_scandal_misato_kara.ogg", 0f, false);
  10968. }
  10969. }
  10970. for (int j = 0; j < maidCnt; j++)
  10971. {
  10972. maidArray[j].StartKuchipakuPattern(0f, text4, true);
  10973. isStop[j] = false;
  10974. isLock[j] = false;
  10975. pHandL[j] = 0;
  10976. pHandR[j] = 0;
  10977. muneIKL[j] = false;
  10978. muneIKR[j] = false;
  10979. if (!isVR)
  10980. {
  10981. maidArray[j].body0.quaDefEyeL.eulerAngles = eyeL[(int) selectList[j]];
  10982. maidArray[j].body0.quaDefEyeR.eulerAngles = eyeR[(int) selectList[j]];
  10983. }
  10984. }
  10985. ikBui = 5;
  10986. isDanceStart1F = false;
  10987. isDanceStart2F = false;
  10988. isDanceStart3F = false;
  10989. isDanceStart4F = false;
  10990. isDanceStart5F = false;
  10991. isDanceStart6F = false;
  10992. isDanceStart7F = false;
  10993. isDanceStart8F = false;
  10994. isDanceStart9F = false;
  10995. isDanceStart10F = false;
  10996. isDanceStart11F = false;
  10997. isDanceStart12F = false;
  10998. isDanceStart13F = false;
  10999. isDanceStart14F = false;
  11000. isDanceStart15F = false;
  11001. for (int j = 0; j < maidCnt; j++)
  11002. {
  11003. danceFace[j] = 0f;
  11004. }
  11005. if (isDanceStart7V)
  11006. {
  11007. for (int j = 0; j < maidCnt; j++)
  11008. {
  11009. if (maidArray[j] && maidArray[j].Visible)
  11010. {
  11011. if (isDanceStart7V)
  11012. {
  11013. maidArray[j].SetPos(dancePos[j]);
  11014. maidArray[j].body0.transform.localRotation = danceRot[j];
  11015. }
  11016. }
  11017. }
  11018. isDanceStart7V = false;
  11019. }
  11020. if (isDanceStart8V)
  11021. {
  11022. for (int j = 0; j < maidCnt; j++)
  11023. {
  11024. if (maidArray[j] && maidArray[j].Visible)
  11025. {
  11026. if (isDanceStart8V)
  11027. {
  11028. maidArray[j].SetPos(dancePos[j]);
  11029. maidArray[j].body0.transform.localRotation = danceRot[j];
  11030. }
  11031. }
  11032. }
  11033. isDanceStart8V = false;
  11034. isDanceStart8P = false;
  11035. }
  11036. if (isDanceStart11V)
  11037. {
  11038. for (int j = 0; j < maidCnt; j++)
  11039. {
  11040. if (maidArray[j] && maidArray[j].Visible)
  11041. {
  11042. if (isDanceStart11V)
  11043. {
  11044. maidArray[j].SetPos(dancePos[j]);
  11045. maidArray[j].body0.transform.localRotation = danceRot[j];
  11046. }
  11047. }
  11048. }
  11049. isDanceStart11V = false;
  11050. }
  11051. if (isDanceStart1K || isDanceStart3K || isDanceStart4K || isDanceStart5K || isDanceStart6K || isDanceStart9K
  11052. || isDanceStart13K)
  11053. {
  11054. for (int j = 0; j < maidCnt; j++)
  11055. {
  11056. if (maidArray[j] && maidArray[j].Visible)
  11057. {
  11058. if (isDanceStart1K || isDanceStart3K || isDanceStart4K || isDanceStart5K || isDanceStart6K || isDanceStart9K
  11059. || isDanceStart13K)
  11060. {
  11061. maidArray[j].SetPos(dancePos[j]);
  11062. maidArray[j].body0.transform.localRotation = danceRot[j];
  11063. int i = j;
  11064. if (!isVR)
  11065. {
  11066. delCount[i] = 20;
  11067. if (goSlot[(int) selectList[i]] != null)
  11068. {
  11069. maidArray[i].body0.goSlot = new List<TBodySkin>(goSlot[(int) selectList[i]]);
  11070. for (int l = 0; l < bodyHit[(int) selectList[i]].Count; l++)
  11071. {
  11072. maidArray[i].body0.goSlot[l].bonehair.bodyhit = bodyHit[(int) selectList[i]][l];
  11073. }
  11074. }
  11075. }
  11076. Maid maid = maidArray[j];
  11077. maid.DelProp(MPN.handitem, true);
  11078. maid.DelProp(MPN.accvag, true);
  11079. maid.DelProp(MPN.accanl, true);
  11080. maid.DelProp(MPN.kousoku_upper, true);
  11081. maid.DelProp(MPN.kousoku_lower, true);
  11082. maid.AllProcPropSeqStart();
  11083. }
  11084. }
  11085. }
  11086. isDanceStart1K = false;
  11087. isDanceStart3K = false;
  11088. isDanceStart4K = false;
  11089. isDanceStart5K = false;
  11090. isDanceStart6K = false;
  11091. isDanceStart9K = false;
  11092. isDanceStart13K = false;
  11093. }
  11094. if (isDanceStart14V)
  11095. {
  11096. for (int j = 0; j < maidCnt; j++)
  11097. {
  11098. if (maidArray[j] && maidArray[j].Visible)
  11099. {
  11100. if (isDanceStart14V)
  11101. {
  11102. maidArray[j].SetPos(dancePos[j]);
  11103. maidArray[j].body0.transform.localRotation = danceRot[j];
  11104. }
  11105. }
  11106. }
  11107. isDanceStart14V = false;
  11108. }
  11109. if (isDanceStart15V)
  11110. {
  11111. for (int j = 0; j < maidCnt; j++)
  11112. {
  11113. if (maidArray[j] && maidArray[j].Visible)
  11114. {
  11115. if (isDanceStart15V)
  11116. {
  11117. maidArray[j].SetPos(dancePos[j]);
  11118. maidArray[j].body0.transform.localRotation = danceRot[j];
  11119. }
  11120. }
  11121. }
  11122. isDanceStart15V = false;
  11123. }
  11124. if (maidArray[1] && maidArray[1].Visible)
  11125. {
  11126. if (maidArray[0].transform.position == maidArray[1].transform.position)
  11127. {
  11128. Vector3 vector = Vector3.zero;
  11129. vector.x = 0.6f;
  11130. maidArray[1].SetPos(vector);
  11131. if (maidArray[2] && maidArray[2].Visible)
  11132. {
  11133. vector.x = -0.6f;
  11134. maidArray[2].SetPos(vector);
  11135. }
  11136. if (maidArray[3] && maidArray[3].Visible)
  11137. {
  11138. vector.x = 1.2f;
  11139. maidArray[3].SetPos(vector);
  11140. }
  11141. if (maidArray[4] && maidArray[4].Visible)
  11142. {
  11143. vector.x = -1.2f;
  11144. maidArray[4].SetPos(vector);
  11145. }
  11146. if (maidArray[5] && maidArray[5].Visible)
  11147. {
  11148. vector.x = 1.8f;
  11149. maidArray[5].SetPos(vector);
  11150. }
  11151. if (maidArray[6] && maidArray[6].Visible)
  11152. {
  11153. vector.x = -1.8f;
  11154. maidArray[6].SetPos(vector);
  11155. }
  11156. if (maidArray[7] && maidArray[7].Visible)
  11157. {
  11158. vector.x = 2.4f;
  11159. maidArray[7].SetPos(vector);
  11160. }
  11161. if (maidArray[8] && maidArray[8].Visible)
  11162. {
  11163. vector.x = -2.4f;
  11164. maidArray[8].SetPos(vector);
  11165. }
  11166. if (maidArray[9] && maidArray[9].Visible)
  11167. {
  11168. vector.x = 3f;
  11169. maidArray[9].SetPos(vector);
  11170. }
  11171. if (maidArray[10] && maidArray[10].Visible)
  11172. {
  11173. vector.x = -3f;
  11174. maidArray[10].SetPos(vector);
  11175. }
  11176. if (maidArray[11] && maidArray[11].Visible)
  11177. {
  11178. vector.x = 3.6f;
  11179. maidArray[11].SetPos(vector);
  11180. }
  11181. if (maidArray[12] && maidArray[12].Visible)
  11182. {
  11183. vector.x = -3.6f;
  11184. maidArray[12].SetPos(vector);
  11185. }
  11186. if (maidArray[13] && maidArray[13].Visible)
  11187. {
  11188. vector.x = 4.2f;
  11189. maidArray[13].SetPos(vector);
  11190. }
  11191. }
  11192. }
  11193. if (isShift)
  11194. {
  11195. isDanceStart6K = true;
  11196. for (int j = 0; j < maidCnt; j++)
  11197. {
  11198. maidArray[j].SetRot(new Vector3(maidArray[j].body0.transform.localRotation.x,
  11199. maidArray[j].body0.transform.localRotation.y + 90f,
  11200. maidArray[j].body0.transform.localRotation.z));
  11201. maidArray[j].SetPos(new Vector3(maidArray[j].body0.transform.position.x + 1f,
  11202. maidArray[j].body0.transform.position.y,
  11203. maidArray[j].body0.transform.position.z + 4f));
  11204. string text2 = "handitem,HanditemL_Karaoke_Mike_I_.menu";
  11205. int i = j;
  11206. Maid maid = maidArray[j];
  11207. if (!isVR)
  11208. {
  11209. delCount[i] = 20;
  11210. if (goSlot[(int) selectList[i]] != null)
  11211. {
  11212. maidArray[i].body0.goSlot = new List<TBodySkin>(goSlot[(int) selectList[i]]);
  11213. for (int l = 0; l < bodyHit[(int) selectList[i]].Count; l++)
  11214. {
  11215. maidArray[i].body0.goSlot[l].bonehair.bodyhit = bodyHit[(int) selectList[i]][l];
  11216. }
  11217. }
  11218. }
  11219. string[] array = new string[2];
  11220. array = text2.Split(new char[] {','});
  11221. maid.DelProp(MPN.handitem, true);
  11222. maid.DelProp(MPN.accvag, true);
  11223. maid.DelProp(MPN.accanl, true);
  11224. maid.DelProp(MPN.kousoku_upper, true);
  11225. maid.DelProp(MPN.kousoku_lower, true);
  11226. if (array[0] != "")
  11227. {
  11228. maid.SetProp(array[0], array[1], 0, true, false);
  11229. }
  11230. maid.AllProcPropSeqStart();
  11231. }
  11232. }
  11233. isDance = true;
  11234. isDanceStart6 = true;
  11235. isHS1 = false;
  11236. isHS2 = false;
  11237. isHS3 = false;
  11238. }
  11239. if (isHS4 || isHS5 || isHS6)
  11240. {
  11241. audioSourceBgm = GameMain.Instance.SoundMgr.GetAudioSourceBgm();
  11242. GameMain.Instance.SoundMgr.PlayBGM("se002.ogg", 0f, false);
  11243. for (int j = 0; j < maidCnt; j++)
  11244. {
  11245. TextAsset textAsset = Resources.Load("SceneDance/dance_Hhs_m0") as TextAsset;
  11246. string text5 = "dance_cm3d2_003_hs_f1.anm";
  11247. switch (j)
  11248. {
  11249. case 1:
  11250. case 3:
  11251. case 5:
  11252. case 7:
  11253. case 9:
  11254. case 11:
  11255. case 13:
  11256. text5 = "dance_cm3d2_003_hs_f2.anm";
  11257. textAsset = (Resources.Load("SceneDance/dance_Hhs_m1") as TextAsset);
  11258. break;
  11259. }
  11260. if (maidArray[j] && maidArray[j].Visible)
  11261. {
  11262. if (!maidArray[j].body0.m_Bones.GetComponent<Animation>().GetClip(text5))
  11263. {
  11264. maidArray[j].body0.LoadAnime(text5, GameUty.FileSystem, text5, false, false);
  11265. }
  11266. string text4 = textAsset.text;
  11267. text4 = Regex.Replace(text4, "(\\r|\\n| )", string.Empty);
  11268. maidArray[j].StartKuchipakuPattern(0f, text4, true);
  11269. m_baKuchipakuPattern[j] = Convert.FromBase64String(text4);
  11270. }
  11271. }
  11272. if (isHS4)
  11273. {
  11274. GameMain.Instance.SoundMgr.PlayDanceBGM("happy_happy_scandal1.ogg", 0f, false);
  11275. }
  11276. if (isHS5)
  11277. {
  11278. GameMain.Instance.SoundMgr.PlayDanceBGM("happy_happy_scandal2.ogg", 0f, false);
  11279. }
  11280. if (isHS6)
  11281. {
  11282. GameMain.Instance.SoundMgr.PlayDanceBGM("happy_happy_scandal3.ogg", 0f, false);
  11283. }
  11284. ikBui = 5;
  11285. isDanceStart1F = false;
  11286. isDanceStart2F = false;
  11287. isDanceStart3F = false;
  11288. isDanceStart4F = false;
  11289. isDanceStart5F = false;
  11290. isDanceStart6F = false;
  11291. isDanceStart7F = false;
  11292. isDanceStart8F = false;
  11293. isDanceStart9F = false;
  11294. isDanceStart10F = false;
  11295. isDanceStart11F = false;
  11296. isDanceStart12F = false;
  11297. isDanceStart13F = false;
  11298. isDanceStart14F = false;
  11299. isDanceStart15F = false;
  11300. for (int j = 0; j < maidCnt; j++)
  11301. {
  11302. danceFace[j] = 0f;
  11303. }
  11304. if (isDanceStart7V)
  11305. {
  11306. for (int j = 0; j < maidCnt; j++)
  11307. {
  11308. if (maidArray[j] && maidArray[j].Visible)
  11309. {
  11310. if (isDanceStart7V)
  11311. {
  11312. maidArray[j].SetPos(dancePos[j]);
  11313. maidArray[j].body0.transform.localRotation = danceRot[j];
  11314. }
  11315. }
  11316. }
  11317. isDanceStart7V = false;
  11318. }
  11319. if (isDanceStart8V)
  11320. {
  11321. for (int j = 0; j < maidCnt; j++)
  11322. {
  11323. if (maidArray[j] && maidArray[j].Visible)
  11324. {
  11325. if (isDanceStart8V)
  11326. {
  11327. maidArray[j].SetPos(dancePos[j]);
  11328. maidArray[j].body0.transform.localRotation = danceRot[j];
  11329. }
  11330. }
  11331. }
  11332. isDanceStart8V = false;
  11333. isDanceStart8P = false;
  11334. }
  11335. if (isDanceStart11V)
  11336. {
  11337. for (int j = 0; j < maidCnt; j++)
  11338. {
  11339. if (maidArray[j] && maidArray[j].Visible)
  11340. {
  11341. if (isDanceStart11V)
  11342. {
  11343. maidArray[j].SetPos(dancePos[j]);
  11344. maidArray[j].body0.transform.localRotation = danceRot[j];
  11345. }
  11346. }
  11347. }
  11348. isDanceStart11V = false;
  11349. }
  11350. if (isDanceStart1K || isDanceStart3K || isDanceStart4K || isDanceStart5K || isDanceStart6K || isDanceStart9K
  11351. || isDanceStart13K)
  11352. {
  11353. for (int j = 0; j < maidCnt; j++)
  11354. {
  11355. if (maidArray[j] && maidArray[j].Visible)
  11356. {
  11357. if (isDanceStart1K || isDanceStart3K || isDanceStart4K || isDanceStart5K || isDanceStart6K || isDanceStart9K
  11358. || isDanceStart13K)
  11359. {
  11360. maidArray[j].SetPos(dancePos[j]);
  11361. maidArray[j].body0.transform.localRotation = danceRot[j];
  11362. int i = j;
  11363. if (!isVR)
  11364. {
  11365. delCount[i] = 20;
  11366. if (goSlot[(int) selectList[i]] != null)
  11367. {
  11368. maidArray[i].body0.goSlot = new List<TBodySkin>(goSlot[(int) selectList[i]]);
  11369. for (int l = 0; l < bodyHit[(int) selectList[i]].Count; l++)
  11370. {
  11371. maidArray[i].body0.goSlot[l].bonehair.bodyhit = bodyHit[(int) selectList[i]][l];
  11372. }
  11373. }
  11374. }
  11375. Maid maid = maidArray[j];
  11376. maid.DelProp(MPN.handitem, true);
  11377. maid.DelProp(MPN.accvag, true);
  11378. maid.DelProp(MPN.accanl, true);
  11379. maid.DelProp(MPN.kousoku_upper, true);
  11380. maid.DelProp(MPN.kousoku_lower, true);
  11381. maid.AllProcPropSeqStart();
  11382. }
  11383. }
  11384. }
  11385. isDanceStart1K = false;
  11386. isDanceStart3K = false;
  11387. isDanceStart4K = false;
  11388. isDanceStart5K = false;
  11389. isDanceStart6K = false;
  11390. isDanceStart9K = false;
  11391. isDanceStart13K = false;
  11392. }
  11393. if (isDanceStart14V)
  11394. {
  11395. for (int j = 0; j < maidCnt; j++)
  11396. {
  11397. if (maidArray[j] && maidArray[j].Visible)
  11398. {
  11399. if (isDanceStart14V)
  11400. {
  11401. maidArray[j].SetPos(dancePos[j]);
  11402. maidArray[j].body0.transform.localRotation = danceRot[j];
  11403. }
  11404. }
  11405. }
  11406. isDanceStart14V = false;
  11407. }
  11408. if (isDanceStart15V)
  11409. {
  11410. for (int j = 0; j < maidCnt; j++)
  11411. {
  11412. if (maidArray[j] && maidArray[j].Visible)
  11413. {
  11414. if (isDanceStart15V)
  11415. {
  11416. maidArray[j].SetPos(dancePos[j]);
  11417. maidArray[j].body0.transform.localRotation = danceRot[j];
  11418. }
  11419. }
  11420. }
  11421. isDanceStart15V = false;
  11422. }
  11423. for (int j = 0; j < maidCnt; j++)
  11424. {
  11425. isStop[j] = false;
  11426. isLock[j] = false;
  11427. pHandL[j] = 0;
  11428. pHandR[j] = 0;
  11429. muneIKL[j] = false;
  11430. muneIKR[j] = false;
  11431. if (!isVR)
  11432. {
  11433. maidArray[j].body0.quaDefEyeL.eulerAngles = eyeL[(int) selectList[j]];
  11434. maidArray[j].body0.quaDefEyeR.eulerAngles = eyeR[(int) selectList[j]];
  11435. }
  11436. if (maidArray[j].transform.position.y != 100f)
  11437. {
  11438. dancePos[j] = maidArray[j].transform.position;
  11439. }
  11440. else
  11441. {
  11442. dancePos[j] = new Vector3(maidArray[j].transform.position.x, 0f, maidArray[j].transform.position.z);
  11443. }
  11444. danceRot[j] = maidArray[j].transform.localRotation;
  11445. }
  11446. if (maidArray[1] && maidArray[1].Visible)
  11447. {
  11448. maidArray[1].SetPos(new Vector3(maidArray[0].transform.position.x, 100f, maidArray[0].transform.position.z));
  11449. maidArray[1].body0.transform.localRotation = maidArray[0].body0.transform.localRotation;
  11450. }
  11451. if (maidArray[3] && maidArray[3].Visible)
  11452. {
  11453. maidArray[3].SetPos(new Vector3(maidArray[2].transform.position.x, 100f, maidArray[2].transform.position.z));
  11454. maidArray[3].body0.transform.localRotation = maidArray[2].body0.transform.localRotation;
  11455. }
  11456. if (maidArray[5] && maidArray[5].Visible)
  11457. {
  11458. maidArray[5].SetPos(new Vector3(maidArray[4].transform.position.x, 100f, maidArray[4].transform.position.z));
  11459. maidArray[5].body0.transform.localRotation = maidArray[4].body0.transform.localRotation;
  11460. }
  11461. if (maidArray[7] && maidArray[7].Visible)
  11462. {
  11463. maidArray[7].SetPos(new Vector3(maidArray[6].transform.position.x, 100f, maidArray[6].transform.position.z));
  11464. maidArray[7].body0.transform.localRotation = maidArray[6].body0.transform.localRotation;
  11465. }
  11466. if (maidArray[9] && maidArray[9].Visible)
  11467. {
  11468. maidArray[9].SetPos(new Vector3(maidArray[8].transform.position.x, 100f, maidArray[8].transform.position.z));
  11469. maidArray[9].body0.transform.localRotation = maidArray[8].body0.transform.localRotation;
  11470. }
  11471. if (maidArray[11] && maidArray[11].Visible)
  11472. {
  11473. maidArray[11].SetPos(new Vector3(maidArray[10].transform.position.x, 100f, maidArray[10].transform.position.z));
  11474. maidArray[11].body0.transform.localRotation = maidArray[10].body0.transform.localRotation;
  11475. }
  11476. if (maidArray[13] && maidArray[13].Visible)
  11477. {
  11478. maidArray[13].SetPos(new Vector3(maidArray[12].transform.position.x, 100f, maidArray[12].transform.position.z));
  11479. maidArray[13].body0.transform.localRotation = maidArray[12].body0.transform.localRotation;
  11480. }
  11481. if (maidArray[2] && maidArray[2].Visible)
  11482. {
  11483. if (maidArray[0].transform.position == maidArray[2].transform.position)
  11484. {
  11485. Vector3 vector = Vector3.zero;
  11486. vector.x = 0.6f;
  11487. maidArray[1].SetPos(vector);
  11488. if (maidArray[2] && maidArray[2].Visible)
  11489. {
  11490. vector.x = -0.6f;
  11491. maidArray[2].SetPos(vector);
  11492. }
  11493. if (maidArray[3] && maidArray[3].Visible)
  11494. {
  11495. vector.x = 1.2f;
  11496. maidArray[3].SetPos(vector);
  11497. }
  11498. if (maidArray[4] && maidArray[4].Visible)
  11499. {
  11500. vector.x = -1.2f;
  11501. maidArray[4].SetPos(vector);
  11502. }
  11503. if (maidArray[5] && maidArray[5].Visible)
  11504. {
  11505. vector.x = 1.8f;
  11506. maidArray[5].SetPos(vector);
  11507. }
  11508. if (maidArray[6] && maidArray[6].Visible)
  11509. {
  11510. vector.x = -1.8f;
  11511. maidArray[6].SetPos(vector);
  11512. }
  11513. if (maidArray[7] && maidArray[7].Visible)
  11514. {
  11515. vector.x = 2.4f;
  11516. maidArray[7].SetPos(vector);
  11517. }
  11518. if (maidArray[8] && maidArray[8].Visible)
  11519. {
  11520. vector.x = -2.4f;
  11521. maidArray[8].SetPos(vector);
  11522. }
  11523. if (maidArray[9] && maidArray[9].Visible)
  11524. {
  11525. vector.x = 3f;
  11526. maidArray[9].SetPos(vector);
  11527. }
  11528. if (maidArray[10] && maidArray[10].Visible)
  11529. {
  11530. vector.x = -3f;
  11531. maidArray[10].SetPos(vector);
  11532. }
  11533. if (maidArray[11] && maidArray[11].Visible)
  11534. {
  11535. vector.x = 3.6f;
  11536. maidArray[11].SetPos(vector);
  11537. }
  11538. if (maidArray[12] && maidArray[12].Visible)
  11539. {
  11540. vector.x = -3.6f;
  11541. maidArray[12].SetPos(vector);
  11542. }
  11543. if (maidArray[13] && maidArray[13].Visible)
  11544. {
  11545. vector.x = 4.2f;
  11546. maidArray[13].SetPos(vector);
  11547. }
  11548. }
  11549. }
  11550. isDance = true;
  11551. isDanceStart7 = true;
  11552. isHS4 = false;
  11553. isHS5 = false;
  11554. isHS6 = false;
  11555. }
  11556. if (isHS7 || isHS8 || isHS9)
  11557. {
  11558. audioSourceBgm = GameMain.Instance.SoundMgr.GetAudioSourceBgm();
  11559. GameMain.Instance.SoundMgr.PlayBGM("se002.ogg", 0f, false);
  11560. for (int j = 0; j < maidCnt; j++)
  11561. {
  11562. string text5 = "dance_cm3d2_003_hs_f1.anm";
  11563. TextAsset textAsset = Resources.Load("SceneDance/dance_Hhs_m0") as TextAsset;
  11564. switch (j)
  11565. {
  11566. case 1:
  11567. case 5:
  11568. case 9:
  11569. case 13:
  11570. text5 = "dance_cm3d2_003_hs_f2.anm";
  11571. textAsset = (Resources.Load("SceneDance/dance_Hhs_m1") as TextAsset);
  11572. break;
  11573. case 2:
  11574. case 6:
  11575. case 10:
  11576. text5 = "dance_cm3d2_003_hs_f3.anm";
  11577. textAsset = (Resources.Load("SceneDance/dance_Hhs_m2") as TextAsset);
  11578. break;
  11579. case 3:
  11580. case 7:
  11581. case 11:
  11582. text5 = "dance_cm3d2_003_hs_f4.anm";
  11583. textAsset = (Resources.Load("SceneDance/dance_Hhs_m2") as TextAsset);
  11584. break;
  11585. }
  11586. if (maidArray[j] && maidArray[j].Visible)
  11587. {
  11588. if (!maidArray[j].body0.m_Bones.GetComponent<Animation>().GetClip(text5))
  11589. {
  11590. maidArray[j].body0.LoadAnime(text5, GameUty.FileSystem, text5, false, false);
  11591. }
  11592. }
  11593. string text4 = textAsset.text;
  11594. text4 = Regex.Replace(text4, "(\\r|\\n| )", string.Empty);
  11595. maidArray[j].StartKuchipakuPattern(0f, text4, true);
  11596. m_baKuchipakuPattern[j] = Convert.FromBase64String(text4);
  11597. }
  11598. if (isHS7)
  11599. {
  11600. GameMain.Instance.SoundMgr.PlayDanceBGM("happy_happy_scandal1.ogg", 0f, false);
  11601. }
  11602. if (isHS8)
  11603. {
  11604. GameMain.Instance.SoundMgr.PlayDanceBGM("happy_happy_scandal2.ogg", 0f, false);
  11605. }
  11606. if (isHS9)
  11607. {
  11608. GameMain.Instance.SoundMgr.PlayDanceBGM("happy_happy_scandal3.ogg", 0f, false);
  11609. }
  11610. ikBui = 5;
  11611. isDanceStart1F = false;
  11612. isDanceStart2F = false;
  11613. isDanceStart3F = false;
  11614. isDanceStart4F = false;
  11615. isDanceStart5F = false;
  11616. isDanceStart6F = false;
  11617. isDanceStart7F = false;
  11618. isDanceStart8F = false;
  11619. isDanceStart9F = false;
  11620. isDanceStart10F = false;
  11621. isDanceStart11F = false;
  11622. isDanceStart12F = false;
  11623. isDanceStart13F = false;
  11624. isDanceStart14F = false;
  11625. isDanceStart15F = false;
  11626. for (int j = 0; j < maidCnt; j++)
  11627. {
  11628. danceFace[j] = 0f;
  11629. }
  11630. if (isDanceStart8V)
  11631. {
  11632. for (int j = 0; j < maidCnt; j++)
  11633. {
  11634. if (maidArray[j] && maidArray[j].Visible)
  11635. {
  11636. if (isDanceStart8V)
  11637. {
  11638. maidArray[j].SetPos(dancePos[j]);
  11639. maidArray[j].body0.transform.localRotation = danceRot[j];
  11640. }
  11641. }
  11642. }
  11643. isDanceStart8V = false;
  11644. isDanceStart8P = false;
  11645. }
  11646. for (int j = 0; j < maidCnt; j++)
  11647. {
  11648. isStop[j] = false;
  11649. isLock[j] = false;
  11650. pHandL[j] = 0;
  11651. pHandR[j] = 0;
  11652. muneIKL[j] = false;
  11653. muneIKR[j] = false;
  11654. if (!isVR)
  11655. {
  11656. maidArray[j].body0.quaDefEyeL.eulerAngles = eyeL[(int) selectList[j]];
  11657. maidArray[j].body0.quaDefEyeR.eulerAngles = eyeR[(int) selectList[j]];
  11658. }
  11659. if (maidArray[j].transform.position.y != 100f)
  11660. {
  11661. dancePos[j] = maidArray[j].transform.position;
  11662. }
  11663. else
  11664. {
  11665. dancePos[j] = new Vector3(maidArray[j].transform.position.x, 0f, maidArray[j].transform.position.z);
  11666. }
  11667. danceRot[j] = maidArray[j].transform.localRotation;
  11668. }
  11669. if ((maidArray[0].transform.position.x == 0.3f || maidArray[0].transform.position.x == -0.3f)
  11670. && maidArray[0].transform.position.y == 0f && maidArray[0].transform.position.z == 0f)
  11671. {
  11672. maidArray[0].SetPos(Vector3.zero);
  11673. maidArray[0].SetRot(Vector3.zero);
  11674. }
  11675. if (maidArray[1] && maidArray[1].Visible)
  11676. {
  11677. maidArray[1].SetPos(new Vector3(maidArray[0].transform.position.x, 100f, maidArray[0].transform.position.z));
  11678. maidArray[1].body0.transform.localRotation = maidArray[0].body0.transform.localRotation;
  11679. }
  11680. if (maidArray[2] && maidArray[2].Visible)
  11681. {
  11682. maidArray[2].SetPos(maidArray[0].transform.position);
  11683. maidArray[2].body0.transform.localRotation = maidArray[0].body0.transform.localRotation;
  11684. }
  11685. if (maidArray[3] && maidArray[3].Visible)
  11686. {
  11687. maidArray[3].SetPos(maidArray[0].transform.position);
  11688. maidArray[3].body0.transform.localRotation = maidArray[0].body0.transform.localRotation;
  11689. }
  11690. if (maidArray[5] && maidArray[5].Visible)
  11691. {
  11692. maidArray[5].SetPos(new Vector3(maidArray[4].transform.position.x, 100f, maidArray[4].transform.position.z));
  11693. maidArray[5].body0.transform.localRotation = maidArray[4].body0.transform.localRotation;
  11694. }
  11695. if (maidArray[6] && maidArray[6].Visible)
  11696. {
  11697. maidArray[6].SetPos(maidArray[4].transform.position);
  11698. maidArray[6].body0.transform.localRotation = maidArray[4].body0.transform.localRotation;
  11699. }
  11700. if (maidArray[7] && maidArray[7].Visible)
  11701. {
  11702. maidArray[7].SetPos(maidArray[4].transform.position);
  11703. maidArray[7].body0.transform.localRotation = maidArray[4].body0.transform.localRotation;
  11704. }
  11705. if (maidArray[9] && maidArray[9].Visible)
  11706. {
  11707. maidArray[9].SetPos(new Vector3(maidArray[8].transform.position.x, 100f, maidArray[8].transform.position.z));
  11708. maidArray[9].body0.transform.localRotation = maidArray[8].body0.transform.localRotation;
  11709. }
  11710. if (maidArray[10] && maidArray[10].Visible)
  11711. {
  11712. maidArray[10].SetPos(maidArray[8].transform.position);
  11713. maidArray[10].body0.transform.localRotation = maidArray[8].body0.transform.localRotation;
  11714. }
  11715. if (maidArray[11] && maidArray[11].Visible)
  11716. {
  11717. maidArray[11].SetPos(maidArray[8].transform.position);
  11718. maidArray[11].body0.transform.localRotation = maidArray[8].body0.transform.localRotation;
  11719. }
  11720. if (maidArray[13] && maidArray[13].Visible)
  11721. {
  11722. maidArray[13].SetPos(new Vector3(maidArray[12].transform.position.x, 100f, maidArray[12].transform.position.z));
  11723. maidArray[13].body0.transform.localRotation = maidArray[12].body0.transform.localRotation;
  11724. }
  11725. if (maidArray[4] && maidArray[4].Visible)
  11726. {
  11727. if (maidArray[0].transform.position == maidArray[4].transform.position)
  11728. {
  11729. Vector3 vector = Vector3.zero;
  11730. vector.x = 0.6f;
  11731. maidArray[1].SetPos(vector);
  11732. if (maidArray[2] && maidArray[2].Visible)
  11733. {
  11734. vector.x = -0.6f;
  11735. maidArray[2].SetPos(vector);
  11736. }
  11737. if (maidArray[3] && maidArray[3].Visible)
  11738. {
  11739. vector.x = 1.2f;
  11740. maidArray[3].SetPos(vector);
  11741. }
  11742. if (maidArray[4] && maidArray[4].Visible)
  11743. {
  11744. vector.x = -1.2f;
  11745. maidArray[4].SetPos(vector);
  11746. }
  11747. if (maidArray[5] && maidArray[5].Visible)
  11748. {
  11749. vector.x = 1.8f;
  11750. maidArray[5].SetPos(vector);
  11751. }
  11752. if (maidArray[6] && maidArray[6].Visible)
  11753. {
  11754. vector.x = -1.8f;
  11755. maidArray[6].SetPos(vector);
  11756. }
  11757. if (maidArray[7] && maidArray[7].Visible)
  11758. {
  11759. vector.x = 2.4f;
  11760. maidArray[7].SetPos(vector);
  11761. }
  11762. if (maidArray[8] && maidArray[8].Visible)
  11763. {
  11764. vector.x = -2.4f;
  11765. maidArray[8].SetPos(vector);
  11766. }
  11767. if (maidArray[9] && maidArray[9].Visible)
  11768. {
  11769. vector.x = 3f;
  11770. maidArray[9].SetPos(vector);
  11771. }
  11772. if (maidArray[10] && maidArray[10].Visible)
  11773. {
  11774. vector.x = -3f;
  11775. maidArray[10].SetPos(vector);
  11776. }
  11777. if (maidArray[11] && maidArray[11].Visible)
  11778. {
  11779. vector.x = 3.6f;
  11780. maidArray[11].SetPos(vector);
  11781. }
  11782. if (maidArray[12] && maidArray[12].Visible)
  11783. {
  11784. vector.x = -3.6f;
  11785. maidArray[12].SetPos(vector);
  11786. }
  11787. if (maidArray[13] && maidArray[13].Visible)
  11788. {
  11789. vector.x = 4.2f;
  11790. maidArray[13].SetPos(vector);
  11791. }
  11792. }
  11793. }
  11794. isDance = true;
  11795. isDanceStart8 = true;
  11796. isHS7 = false;
  11797. isHS8 = false;
  11798. isHS9 = false;
  11799. }
  11800. if (isCF1)
  11801. {
  11802. TextAsset textAsset = Resources.Load("SceneDance/dance_RtY_m0") as TextAsset;
  11803. string text4 = textAsset.text;
  11804. text4 = Regex.Replace(text4, "(\\r|\\n| )", string.Empty);
  11805. audioSourceBgm = GameMain.Instance.SoundMgr.GetAudioSourceBgm();
  11806. GameMain.Instance.SoundMgr.PlayBGM("se002.ogg", 0f, false);
  11807. for (int j = 0; j < maidCnt; j++)
  11808. {
  11809. if (!isShift)
  11810. {
  11811. if (!maidArray[j].body0.m_Bones.GetComponent<Animation>().GetClip("dance_cm3d_003_sp2_f1.anm"))
  11812. {
  11813. maidArray[j].body0.LoadAnime("dance_cm3d_003_sp2_f1.anm",
  11814. GameUty.FileSystem,
  11815. "dance_cm3d_003_sp2_f1.anm",
  11816. false,
  11817. false);
  11818. }
  11819. }
  11820. else
  11821. {
  11822. if (!maidArray[j].body0.m_Bones.GetComponent<Animation>().GetClip("dance_cm3d2_kara02_002_rty_f1.anm"))
  11823. {
  11824. maidArray[j].body0.LoadAnime("dance_cm3d2_kara02_002_rty_f1.anm",
  11825. GameUty.FileSystem,
  11826. "dance_cm3d2_kara02_002_rty_f1.anm",
  11827. false,
  11828. false);
  11829. }
  11830. textAsset = (Resources.Load("SceneDance/rhythmix to you_kara_voice") as TextAsset);
  11831. text4 = textAsset.text;
  11832. text4 = Regex.Replace(text4, "(\\r|\\n| )", string.Empty);
  11833. if (!isDanceStart1K && !isDanceStart3K && !isDanceStart4K && !isDanceStart5K && !isDanceStart6K
  11834. && !isDanceStart9K && !isDanceStart13K)
  11835. {
  11836. dancePos[j] = maidArray[j].transform.position;
  11837. danceRot[j] = maidArray[j].transform.localRotation;
  11838. }
  11839. }
  11840. m_baKuchipakuPattern[j] = Convert.FromBase64String(text4);
  11841. }
  11842. if (!isShift)
  11843. {
  11844. GameMain.Instance.SoundMgr.PlayDanceBGM("RhythmixToYou.ogg", 0f, false);
  11845. }
  11846. else
  11847. {
  11848. GameMain.Instance.SoundMgr.PlayDanceBGM("rhythmixtoyou_kara.ogg", 0f, false);
  11849. }
  11850. for (int j = 0; j < maidCnt; j++)
  11851. {
  11852. maidArray[j].StartKuchipakuPattern(0f, text4, true);
  11853. isStop[j] = false;
  11854. isLock[j] = false;
  11855. pHandL[j] = 0;
  11856. pHandR[j] = 0;
  11857. muneIKL[j] = false;
  11858. muneIKR[j] = false;
  11859. if (!isVR)
  11860. {
  11861. maidArray[j].body0.quaDefEyeL.eulerAngles = eyeL[(int) selectList[j]];
  11862. maidArray[j].body0.quaDefEyeR.eulerAngles = eyeR[(int) selectList[j]];
  11863. }
  11864. }
  11865. ikBui = 5;
  11866. isDanceStart1F = false;
  11867. isDanceStart2F = false;
  11868. isDanceStart3F = false;
  11869. isDanceStart4F = false;
  11870. isDanceStart5F = false;
  11871. isDanceStart6F = false;
  11872. isDanceStart7F = false;
  11873. isDanceStart8F = false;
  11874. isDanceStart9F = false;
  11875. isDanceStart10F = false;
  11876. isDanceStart11F = false;
  11877. isDanceStart12F = false;
  11878. isDanceStart13F = false;
  11879. isDanceStart14F = false;
  11880. isDanceStart15F = false;
  11881. for (int j = 0; j < maidCnt; j++)
  11882. {
  11883. danceFace[j] = 0f;
  11884. }
  11885. if (isDanceStart7V)
  11886. {
  11887. for (int j = 0; j < maidCnt; j++)
  11888. {
  11889. if (maidArray[j] && maidArray[j].Visible)
  11890. {
  11891. if (isDanceStart7V)
  11892. {
  11893. maidArray[j].SetPos(dancePos[j]);
  11894. maidArray[j].body0.transform.localRotation = danceRot[j];
  11895. }
  11896. }
  11897. }
  11898. isDanceStart7V = false;
  11899. }
  11900. if (isDanceStart8V)
  11901. {
  11902. for (int j = 0; j < maidCnt; j++)
  11903. {
  11904. if (maidArray[j] && maidArray[j].Visible)
  11905. {
  11906. if (isDanceStart8V)
  11907. {
  11908. maidArray[j].SetPos(dancePos[j]);
  11909. maidArray[j].body0.transform.localRotation = danceRot[j];
  11910. }
  11911. }
  11912. }
  11913. isDanceStart8V = false;
  11914. isDanceStart8P = false;
  11915. }
  11916. if (isDanceStart11V)
  11917. {
  11918. for (int j = 0; j < maidCnt; j++)
  11919. {
  11920. if (maidArray[j] && maidArray[j].Visible)
  11921. {
  11922. if (isDanceStart11V)
  11923. {
  11924. maidArray[j].SetPos(dancePos[j]);
  11925. maidArray[j].body0.transform.localRotation = danceRot[j];
  11926. }
  11927. }
  11928. }
  11929. isDanceStart11V = false;
  11930. }
  11931. if (isDanceStart1K || isDanceStart3K || isDanceStart4K || isDanceStart5K || isDanceStart6K || isDanceStart9K
  11932. || isDanceStart13K)
  11933. {
  11934. for (int j = 0; j < maidCnt; j++)
  11935. {
  11936. if (maidArray[j] && maidArray[j].Visible)
  11937. {
  11938. if (isDanceStart1K || isDanceStart3K || isDanceStart4K || isDanceStart5K || isDanceStart6K || isDanceStart9K
  11939. || isDanceStart13K)
  11940. {
  11941. maidArray[j].SetPos(dancePos[j]);
  11942. maidArray[j].body0.transform.localRotation = danceRot[j];
  11943. int i = j;
  11944. if (!isVR)
  11945. {
  11946. delCount[i] = 20;
  11947. if (goSlot[(int) selectList[i]] != null)
  11948. {
  11949. maidArray[i].body0.goSlot = new List<TBodySkin>(goSlot[(int) selectList[i]]);
  11950. for (int l = 0; l < bodyHit[(int) selectList[i]].Count; l++)
  11951. {
  11952. maidArray[i].body0.goSlot[l].bonehair.bodyhit = bodyHit[(int) selectList[i]][l];
  11953. }
  11954. }
  11955. }
  11956. Maid maid = maidArray[j];
  11957. maid.DelProp(MPN.handitem, true);
  11958. maid.DelProp(MPN.accvag, true);
  11959. maid.DelProp(MPN.accanl, true);
  11960. maid.DelProp(MPN.kousoku_upper, true);
  11961. maid.DelProp(MPN.kousoku_lower, true);
  11962. maid.AllProcPropSeqStart();
  11963. }
  11964. }
  11965. }
  11966. isDanceStart1K = false;
  11967. isDanceStart3K = false;
  11968. isDanceStart4K = false;
  11969. isDanceStart5K = false;
  11970. isDanceStart6K = false;
  11971. isDanceStart9K = false;
  11972. isDanceStart13K = false;
  11973. }
  11974. if (isDanceStart14V)
  11975. {
  11976. for (int j = 0; j < maidCnt; j++)
  11977. {
  11978. if (maidArray[j] && maidArray[j].Visible)
  11979. {
  11980. if (isDanceStart14V)
  11981. {
  11982. maidArray[j].SetPos(dancePos[j]);
  11983. maidArray[j].body0.transform.localRotation = danceRot[j];
  11984. }
  11985. }
  11986. }
  11987. isDanceStart14V = false;
  11988. }
  11989. if (isDanceStart15V)
  11990. {
  11991. for (int j = 0; j < maidCnt; j++)
  11992. {
  11993. if (maidArray[j] && maidArray[j].Visible)
  11994. {
  11995. if (isDanceStart15V)
  11996. {
  11997. maidArray[j].SetPos(dancePos[j]);
  11998. maidArray[j].body0.transform.localRotation = danceRot[j];
  11999. }
  12000. }
  12001. }
  12002. isDanceStart15V = false;
  12003. }
  12004. if (maidArray[1] && maidArray[1].Visible)
  12005. {
  12006. if (maidArray[0].transform.position == maidArray[1].transform.position)
  12007. {
  12008. Vector3 vector = Vector3.zero;
  12009. vector.x = 0.6f;
  12010. maidArray[1].SetPos(vector);
  12011. if (maidArray[2] && maidArray[2].Visible)
  12012. {
  12013. vector.x = -0.6f;
  12014. maidArray[2].SetPos(vector);
  12015. }
  12016. if (maidArray[3] && maidArray[3].Visible)
  12017. {
  12018. vector.x = 1.2f;
  12019. maidArray[3].SetPos(vector);
  12020. }
  12021. if (maidArray[4] && maidArray[4].Visible)
  12022. {
  12023. vector.x = -1.2f;
  12024. maidArray[4].SetPos(vector);
  12025. }
  12026. if (maidArray[5] && maidArray[5].Visible)
  12027. {
  12028. vector.x = 1.8f;
  12029. maidArray[5].SetPos(vector);
  12030. }
  12031. if (maidArray[6] && maidArray[6].Visible)
  12032. {
  12033. vector.x = -1.8f;
  12034. maidArray[6].SetPos(vector);
  12035. }
  12036. if (maidArray[7] && maidArray[7].Visible)
  12037. {
  12038. vector.x = 2.4f;
  12039. maidArray[7].SetPos(vector);
  12040. }
  12041. if (maidArray[8] && maidArray[8].Visible)
  12042. {
  12043. vector.x = -2.4f;
  12044. maidArray[8].SetPos(vector);
  12045. }
  12046. if (maidArray[9] && maidArray[9].Visible)
  12047. {
  12048. vector.x = 3f;
  12049. maidArray[9].SetPos(vector);
  12050. }
  12051. if (maidArray[10] && maidArray[10].Visible)
  12052. {
  12053. vector.x = -3f;
  12054. maidArray[10].SetPos(vector);
  12055. }
  12056. if (maidArray[11] && maidArray[11].Visible)
  12057. {
  12058. vector.x = 3.6f;
  12059. maidArray[11].SetPos(vector);
  12060. }
  12061. if (maidArray[12] && maidArray[12].Visible)
  12062. {
  12063. vector.x = -3.6f;
  12064. maidArray[12].SetPos(vector);
  12065. }
  12066. if (maidArray[13] && maidArray[13].Visible)
  12067. {
  12068. vector.x = 4.2f;
  12069. maidArray[13].SetPos(vector);
  12070. }
  12071. }
  12072. }
  12073. if (isShift)
  12074. {
  12075. isDanceStart5K = true;
  12076. for (int j = 0; j < maidCnt; j++)
  12077. {
  12078. maidArray[j].SetRot(new Vector3(maidArray[j].body0.transform.localRotation.x,
  12079. maidArray[j].body0.transform.localRotation.y + 90f,
  12080. maidArray[j].body0.transform.localRotation.z));
  12081. maidArray[j].SetPos(new Vector3(maidArray[j].body0.transform.position.x + 1f,
  12082. maidArray[j].body0.transform.position.y,
  12083. maidArray[j].body0.transform.position.z + 4f));
  12084. string text2 = "handitem,HanditemL_Karaoke_Mike_I_.menu";
  12085. int i = j;
  12086. Maid maid = maidArray[j];
  12087. if (!isVR)
  12088. {
  12089. delCount[i] = 20;
  12090. if (goSlot[(int) selectList[i]] != null)
  12091. {
  12092. maidArray[i].body0.goSlot = new List<TBodySkin>(goSlot[(int) selectList[i]]);
  12093. for (int l = 0; l < bodyHit[(int) selectList[i]].Count; l++)
  12094. {
  12095. maidArray[i].body0.goSlot[l].bonehair.bodyhit = bodyHit[(int) selectList[i]][l];
  12096. }
  12097. }
  12098. }
  12099. string[] array = new string[2];
  12100. array = text2.Split(new char[] {','});
  12101. maid.DelProp(MPN.handitem, true);
  12102. maid.DelProp(MPN.accvag, true);
  12103. maid.DelProp(MPN.accanl, true);
  12104. maid.DelProp(MPN.kousoku_upper, true);
  12105. maid.DelProp(MPN.kousoku_lower, true);
  12106. if (array[0] != "")
  12107. {
  12108. maid.SetProp(array[0], array[1], 0, true, false);
  12109. }
  12110. maid.AllProcPropSeqStart();
  12111. }
  12112. }
  12113. isDance = true;
  12114. isDanceStart5 = true;
  12115. isCF1 = false;
  12116. }
  12117. if ((Input.GetKey(KeyCode.Return) && Input.GetKeyDown(KeyCode.Alpha4))
  12118. || (Input.GetKey(KeyCode.KeypadEnter) && Input.GetKeyDown(KeyCode.Keypad4)))
  12119. {
  12120. GameMain.Instance.SoundMgr.StopBGM(0f);
  12121. isCF1 = true;
  12122. if (this.getModKeyPressing(modKey.Shift))
  12123. {
  12124. isShift = true;
  12125. }
  12126. }
  12127. if (isKT1)
  12128. {
  12129. TextAsset textAsset = Resources.Load("SceneDance/dance_cktc_1_m0") as TextAsset;
  12130. string text4 = textAsset.text;
  12131. text4 = Regex.Replace(text4, "(\\r|\\n| )", string.Empty);
  12132. audioSourceBgm = GameMain.Instance.SoundMgr.GetAudioSourceBgm();
  12133. GameMain.Instance.SoundMgr.PlayBGM("se002.ogg", 0f, false);
  12134. for (int j = 0; j < maidCnt; j++)
  12135. {
  12136. if (!isShift)
  12137. {
  12138. if (!maidArray[j].body0.m_Bones.GetComponent<Animation>().GetClip("dance_cm3d_004_kano_f1.anm"))
  12139. {
  12140. maidArray[j].body0.LoadAnime("dance_cm3d_004_kano_f1.anm",
  12141. GameUty.FileSystem,
  12142. "dance_cm3d_004_kano_f1.anm",
  12143. false,
  12144. false);
  12145. }
  12146. danceName[j] = "dance_cm3d_004_kano_f1.anm";
  12147. }
  12148. else
  12149. {
  12150. if (!maidArray[j].body0.m_Bones.GetComponent<Animation>().GetClip("dance_cm3d2_kara_002_cktc_f1.anm"))
  12151. {
  12152. maidArray[j].body0.LoadAnime("dance_cm3d2_kara_002_cktc_f1.anm",
  12153. GameUty.FileSystem,
  12154. "dance_cm3d2_kara_002_cktc_f1.anm",
  12155. false,
  12156. false);
  12157. }
  12158. textAsset = (Resources.Load("SceneDance/cktc_kara_voice_2") as TextAsset);
  12159. text4 = textAsset.text;
  12160. text4 = Regex.Replace(text4, "(\\r|\\n| )", string.Empty);
  12161. if (!isDanceStart1K && !isDanceStart3K && !isDanceStart4K && !isDanceStart5K && !isDanceStart6K
  12162. && !isDanceStart9K && !isDanceStart13K)
  12163. {
  12164. dancePos[j] = maidArray[j].transform.position;
  12165. danceRot[j] = maidArray[j].transform.localRotation;
  12166. }
  12167. }
  12168. m_baKuchipakuPattern[j] = Convert.FromBase64String(text4);
  12169. }
  12170. if (!isShift)
  12171. {
  12172. GameMain.Instance.SoundMgr.PlayDanceBGM("can_know_two_close.ogg", 0f, false);
  12173. }
  12174. else
  12175. {
  12176. GameMain.Instance.SoundMgr.PlayDanceBGM("canknowtwoclose_short_kara.ogg", 0f, false);
  12177. }
  12178. for (int j = 0; j < maidCnt; j++)
  12179. {
  12180. maidArray[j].StartKuchipakuPattern(0f, text4, true);
  12181. isStop[j] = false;
  12182. isLock[j] = false;
  12183. pHandL[j] = 0;
  12184. pHandR[j] = 0;
  12185. muneIKL[j] = false;
  12186. muneIKR[j] = false;
  12187. if (!isVR)
  12188. {
  12189. maidArray[j].body0.quaDefEyeL.eulerAngles = eyeL[(int) selectList[j]];
  12190. maidArray[j].body0.quaDefEyeR.eulerAngles = eyeR[(int) selectList[j]];
  12191. }
  12192. }
  12193. ikBui = 5;
  12194. isDanceStart1F = false;
  12195. isDanceStart2F = false;
  12196. isDanceStart3F = false;
  12197. isDanceStart4F = false;
  12198. isDanceStart5F = false;
  12199. isDanceStart6F = false;
  12200. isDanceStart7F = false;
  12201. isDanceStart8F = false;
  12202. isDanceStart9F = false;
  12203. isDanceStart10F = false;
  12204. isDanceStart11F = false;
  12205. isDanceStart12F = false;
  12206. isDanceStart13F = false;
  12207. isDanceStart14F = false;
  12208. isDanceStart15F = false;
  12209. for (int j = 0; j < maidCnt; j++)
  12210. {
  12211. danceFace[j] = 0f;
  12212. }
  12213. if (isDanceStart7V)
  12214. {
  12215. for (int j = 0; j < maidCnt; j++)
  12216. {
  12217. if (maidArray[j] && maidArray[j].Visible)
  12218. {
  12219. if (isDanceStart7V)
  12220. {
  12221. maidArray[j].SetPos(dancePos[j]);
  12222. maidArray[j].body0.transform.localRotation = danceRot[j];
  12223. }
  12224. }
  12225. }
  12226. isDanceStart7V = false;
  12227. }
  12228. if (isDanceStart8V)
  12229. {
  12230. for (int j = 0; j < maidCnt; j++)
  12231. {
  12232. if (maidArray[j] && maidArray[j].Visible)
  12233. {
  12234. if (isDanceStart8V)
  12235. {
  12236. maidArray[j].SetPos(dancePos[j]);
  12237. maidArray[j].body0.transform.localRotation = danceRot[j];
  12238. }
  12239. }
  12240. }
  12241. isDanceStart8V = false;
  12242. isDanceStart8P = false;
  12243. }
  12244. if (isDanceStart11V)
  12245. {
  12246. for (int j = 0; j < maidCnt; j++)
  12247. {
  12248. if (maidArray[j] && maidArray[j].Visible)
  12249. {
  12250. if (isDanceStart11V)
  12251. {
  12252. maidArray[j].SetPos(dancePos[j]);
  12253. maidArray[j].body0.transform.localRotation = danceRot[j];
  12254. }
  12255. }
  12256. }
  12257. isDanceStart11V = false;
  12258. }
  12259. if (isDanceStart1K || isDanceStart3K || isDanceStart4K || isDanceStart5K || isDanceStart6K || isDanceStart9K
  12260. || isDanceStart13K)
  12261. {
  12262. for (int j = 0; j < maidCnt; j++)
  12263. {
  12264. if (maidArray[j] && maidArray[j].Visible)
  12265. {
  12266. if (isDanceStart1K || isDanceStart3K || isDanceStart4K || isDanceStart5K || isDanceStart6K || isDanceStart9K
  12267. || isDanceStart13K)
  12268. {
  12269. maidArray[j].SetPos(dancePos[j]);
  12270. maidArray[j].body0.transform.localRotation = danceRot[j];
  12271. int i = j;
  12272. if (!isVR)
  12273. {
  12274. delCount[i] = 20;
  12275. if (goSlot[(int) selectList[i]] != null)
  12276. {
  12277. maidArray[i].body0.goSlot = new List<TBodySkin>(goSlot[(int) selectList[i]]);
  12278. for (int l = 0; l < bodyHit[(int) selectList[i]].Count; l++)
  12279. {
  12280. maidArray[i].body0.goSlot[l].bonehair.bodyhit = bodyHit[(int) selectList[i]][l];
  12281. }
  12282. }
  12283. }
  12284. Maid maid = maidArray[j];
  12285. maid.DelProp(MPN.handitem, true);
  12286. maid.DelProp(MPN.accvag, true);
  12287. maid.DelProp(MPN.accanl, true);
  12288. maid.DelProp(MPN.kousoku_upper, true);
  12289. maid.DelProp(MPN.kousoku_lower, true);
  12290. maid.AllProcPropSeqStart();
  12291. }
  12292. }
  12293. }
  12294. isDanceStart1K = false;
  12295. isDanceStart3K = false;
  12296. isDanceStart4K = false;
  12297. isDanceStart5K = false;
  12298. isDanceStart6K = false;
  12299. isDanceStart9K = false;
  12300. isDanceStart13K = false;
  12301. }
  12302. if (isDanceStart14V)
  12303. {
  12304. for (int j = 0; j < maidCnt; j++)
  12305. {
  12306. if (maidArray[j] && maidArray[j].Visible)
  12307. {
  12308. if (isDanceStart14V)
  12309. {
  12310. maidArray[j].SetPos(dancePos[j]);
  12311. maidArray[j].body0.transform.localRotation = danceRot[j];
  12312. }
  12313. }
  12314. }
  12315. isDanceStart14V = false;
  12316. }
  12317. if (isDanceStart15V)
  12318. {
  12319. for (int j = 0; j < maidCnt; j++)
  12320. {
  12321. if (maidArray[j] && maidArray[j].Visible)
  12322. {
  12323. if (isDanceStart15V)
  12324. {
  12325. maidArray[j].SetPos(dancePos[j]);
  12326. maidArray[j].body0.transform.localRotation = danceRot[j];
  12327. }
  12328. }
  12329. }
  12330. isDanceStart15V = false;
  12331. }
  12332. if (maidArray[1] && maidArray[1].Visible)
  12333. {
  12334. if (maidArray[0].transform.position == maidArray[1].transform.position)
  12335. {
  12336. Vector3 vector = Vector3.zero;
  12337. vector.x = 0.6f;
  12338. maidArray[1].SetPos(vector);
  12339. if (maidArray[2] && maidArray[2].Visible)
  12340. {
  12341. vector.x = -0.6f;
  12342. maidArray[2].SetPos(vector);
  12343. }
  12344. if (maidArray[3] && maidArray[3].Visible)
  12345. {
  12346. vector.x = 1.2f;
  12347. maidArray[3].SetPos(vector);
  12348. }
  12349. if (maidArray[4] && maidArray[4].Visible)
  12350. {
  12351. vector.x = -1.2f;
  12352. maidArray[4].SetPos(vector);
  12353. }
  12354. if (maidArray[5] && maidArray[5].Visible)
  12355. {
  12356. vector.x = 1.8f;
  12357. maidArray[5].SetPos(vector);
  12358. }
  12359. if (maidArray[6] && maidArray[6].Visible)
  12360. {
  12361. vector.x = -1.8f;
  12362. maidArray[6].SetPos(vector);
  12363. }
  12364. if (maidArray[7] && maidArray[7].Visible)
  12365. {
  12366. vector.x = 2.4f;
  12367. maidArray[7].SetPos(vector);
  12368. }
  12369. if (maidArray[8] && maidArray[8].Visible)
  12370. {
  12371. vector.x = -2.4f;
  12372. maidArray[8].SetPos(vector);
  12373. }
  12374. if (maidArray[9] && maidArray[9].Visible)
  12375. {
  12376. vector.x = 3f;
  12377. maidArray[9].SetPos(vector);
  12378. }
  12379. if (maidArray[10] && maidArray[10].Visible)
  12380. {
  12381. vector.x = -3f;
  12382. maidArray[10].SetPos(vector);
  12383. }
  12384. if (maidArray[11] && maidArray[11].Visible)
  12385. {
  12386. vector.x = 3.6f;
  12387. maidArray[11].SetPos(vector);
  12388. }
  12389. if (maidArray[12] && maidArray[12].Visible)
  12390. {
  12391. vector.x = -3.6f;
  12392. maidArray[12].SetPos(vector);
  12393. }
  12394. if (maidArray[13] && maidArray[13].Visible)
  12395. {
  12396. vector.x = 4.2f;
  12397. maidArray[13].SetPos(vector);
  12398. }
  12399. }
  12400. }
  12401. if (maidArray[2] && maidArray[2].Visible)
  12402. {
  12403. if (maidArray[0].transform.position == maidArray[2].transform.position)
  12404. {
  12405. Vector3 vector = Vector3.zero;
  12406. vector.x = 0.6f;
  12407. maidArray[1].SetPos(vector);
  12408. if (maidArray[2] && maidArray[2].Visible)
  12409. {
  12410. vector.x = -0.6f;
  12411. maidArray[2].SetPos(vector);
  12412. }
  12413. if (maidArray[3] && maidArray[3].Visible)
  12414. {
  12415. vector.x = 1.2f;
  12416. maidArray[3].SetPos(vector);
  12417. }
  12418. if (maidArray[4] && maidArray[4].Visible)
  12419. {
  12420. vector.x = -1.2f;
  12421. maidArray[4].SetPos(vector);
  12422. }
  12423. if (maidArray[5] && maidArray[5].Visible)
  12424. {
  12425. vector.x = 1.8f;
  12426. maidArray[5].SetPos(vector);
  12427. }
  12428. if (maidArray[6] && maidArray[6].Visible)
  12429. {
  12430. vector.x = -1.8f;
  12431. maidArray[6].SetPos(vector);
  12432. }
  12433. if (maidArray[7] && maidArray[7].Visible)
  12434. {
  12435. vector.x = 2.4f;
  12436. maidArray[7].SetPos(vector);
  12437. }
  12438. if (maidArray[8] && maidArray[8].Visible)
  12439. {
  12440. vector.x = -2.4f;
  12441. maidArray[8].SetPos(vector);
  12442. }
  12443. if (maidArray[9] && maidArray[9].Visible)
  12444. {
  12445. vector.x = 3f;
  12446. maidArray[9].SetPos(vector);
  12447. }
  12448. if (maidArray[10] && maidArray[10].Visible)
  12449. {
  12450. vector.x = -3f;
  12451. maidArray[10].SetPos(vector);
  12452. }
  12453. if (maidArray[11] && maidArray[11].Visible)
  12454. {
  12455. vector.x = 3.6f;
  12456. maidArray[11].SetPos(vector);
  12457. }
  12458. if (maidArray[12] && maidArray[12].Visible)
  12459. {
  12460. vector.x = -3.6f;
  12461. maidArray[12].SetPos(vector);
  12462. }
  12463. if (maidArray[13] && maidArray[13].Visible)
  12464. {
  12465. vector.x = 4.2f;
  12466. maidArray[13].SetPos(vector);
  12467. }
  12468. }
  12469. }
  12470. if (isShift)
  12471. {
  12472. isDanceStart9K = true;
  12473. for (int j = 0; j < maidCnt; j++)
  12474. {
  12475. maidArray[j].SetRot(new Vector3(maidArray[j].body0.transform.localRotation.x,
  12476. maidArray[j].body0.transform.localRotation.y + 90f,
  12477. maidArray[j].body0.transform.localRotation.z));
  12478. maidArray[j].SetPos(new Vector3(maidArray[j].body0.transform.position.x + 1f,
  12479. maidArray[j].body0.transform.position.y,
  12480. maidArray[j].body0.transform.position.z + 4f));
  12481. string text2 = "handitem,HanditemL_Karaoke_Mike_I_.menu";
  12482. int i = j;
  12483. Maid maid = maidArray[j];
  12484. if (!isVR)
  12485. {
  12486. delCount[i] = 20;
  12487. if (goSlot[(int) selectList[i]] != null)
  12488. {
  12489. maidArray[i].body0.goSlot = new List<TBodySkin>(goSlot[(int) selectList[i]]);
  12490. for (int l = 0; l < bodyHit[(int) selectList[i]].Count; l++)
  12491. {
  12492. maidArray[i].body0.goSlot[l].bonehair.bodyhit = bodyHit[(int) selectList[i]][l];
  12493. }
  12494. }
  12495. }
  12496. string[] array = new string[2];
  12497. array = text2.Split(new char[] {','});
  12498. maid.DelProp(MPN.handitem, true);
  12499. maid.DelProp(MPN.accvag, true);
  12500. maid.DelProp(MPN.accanl, true);
  12501. maid.DelProp(MPN.kousoku_upper, true);
  12502. maid.DelProp(MPN.kousoku_lower, true);
  12503. if (array[0] != "")
  12504. {
  12505. maid.SetProp(array[0], array[1], 0, true, false);
  12506. }
  12507. maid.AllProcPropSeqStart();
  12508. }
  12509. }
  12510. isDance = true;
  12511. isDanceStart9 = true;
  12512. isKT1 = false;
  12513. }
  12514. if (isSS && (isSS1 || isSS2 || isSS3 || isSS4 || isSS5 || isSS6))
  12515. {
  12516. audioSourceBgm = GameMain.Instance.SoundMgr.GetAudioSourceBgm();
  12517. GameMain.Instance.SoundMgr.PlayBGM("se002.ogg", 0f, false);
  12518. if (isSS1)
  12519. {
  12520. nameK = "dance_BlD_m";
  12521. nameA = "dance_cm3d21_002_bid_f";
  12522. nameS = "bloomingdreaming_short";
  12523. danceNo1 = 1;
  12524. danceNo2 = 3;
  12525. danceNo3 = 2;
  12526. }
  12527. if (isSS2)
  12528. {
  12529. nameK = "dance_KAD_m";
  12530. nameA = "dance_cm3d21_003_kad_f";
  12531. nameS = "kiminiaijodelicious_short";
  12532. danceNo1 = 1;
  12533. danceNo2 = 2;
  12534. danceNo3 = 3;
  12535. }
  12536. if (isSS3)
  12537. {
  12538. nameK = "dance_LUM_m";
  12539. nameA = "dance_cm3d21_004_lm_f";
  12540. nameS = "luminousmoment_short";
  12541. danceNo1 = 3;
  12542. danceNo2 = 1;
  12543. danceNo3 = 2;
  12544. }
  12545. if (isSS4)
  12546. {
  12547. nameK = "dance_NmF_m";
  12548. nameA = "dance_cm3d21_001_nmf_f";
  12549. nameS = "nightmagicfire_short";
  12550. danceNo1 = 2;
  12551. danceNo2 = 1;
  12552. danceNo3 = 3;
  12553. }
  12554. if (isSS5)
  12555. {
  12556. nameK = "dance_MoE_m";
  12557. nameA = "dance_cm3d21_005_moe_f";
  12558. nameS = "melodyofempire_short";
  12559. danceNo1 = 1;
  12560. danceNo2 = 3;
  12561. danceNo3 = 2;
  12562. }
  12563. if (isSS6)
  12564. {
  12565. nameK = "dance_NmF_m";
  12566. nameA = "dance_cm3d21_kara_001_nmf_f";
  12567. nameS = "nightmagicfire_short";
  12568. danceNo1 = 1;
  12569. danceNo2 = 1;
  12570. danceNo3 = 1;
  12571. }
  12572. for (int j = 0; j < maidCnt; j++)
  12573. {
  12574. TextAsset textAsset = Resources.Load("SceneDance/" + nameK + (danceNo1 - 1)) as TextAsset;
  12575. string text5 = nameA + danceNo1 + ".anm";
  12576. switch (j)
  12577. {
  12578. case 1:
  12579. case 4:
  12580. case 7:
  12581. case 10:
  12582. case 13:
  12583. text5 = nameA + danceNo2 + ".anm";
  12584. textAsset = (Resources.Load("SceneDance/" + nameK + (danceNo2 - 1)) as TextAsset);
  12585. break;
  12586. case 2:
  12587. case 5:
  12588. case 8:
  12589. case 11:
  12590. text5 = nameA + danceNo3 + ".anm";
  12591. textAsset = (Resources.Load("SceneDance/" + nameK + (danceNo3 - 1)) as TextAsset);
  12592. break;
  12593. }
  12594. if (maidArray[j] && maidArray[j].Visible)
  12595. {
  12596. if (!maidArray[j].body0.m_Bones.GetComponent<Animation>().GetClip(text5))
  12597. {
  12598. maidArray[j].body0.LoadAnime(text5, GameUty.FileSystem, text5, false, false);
  12599. }
  12600. string text4 = textAsset.text;
  12601. text4 = Regex.Replace(text4, "(\\r|\\n| )", string.Empty);
  12602. maidArray[j].StartKuchipakuPattern(0f, text4, true);
  12603. m_baKuchipakuPattern[j] = Convert.FromBase64String(text4);
  12604. }
  12605. }
  12606. GameMain.Instance.SoundMgr.PlayDanceBGM(nameS + ".ogg", 0f, false);
  12607. ikBui = 5;
  12608. isDanceStart1F = false;
  12609. isDanceStart2F = false;
  12610. isDanceStart3F = false;
  12611. isDanceStart4F = false;
  12612. isDanceStart5F = false;
  12613. isDanceStart6F = false;
  12614. isDanceStart7F = false;
  12615. isDanceStart8F = false;
  12616. isDanceStart9F = false;
  12617. isDanceStart10F = false;
  12618. isDanceStart11F = false;
  12619. isDanceStart12F = false;
  12620. isDanceStart13F = false;
  12621. isDanceStart14F = false;
  12622. isDanceStart15F = false;
  12623. for (int j = 0; j < maidCnt; j++)
  12624. {
  12625. danceFace[j] = 0f;
  12626. }
  12627. if (isDanceStart7V)
  12628. {
  12629. for (int j = 0; j < maidCnt; j++)
  12630. {
  12631. if (maidArray[j] && maidArray[j].Visible)
  12632. {
  12633. if (isDanceStart7V)
  12634. {
  12635. maidArray[j].SetPos(dancePos[j]);
  12636. maidArray[j].body0.transform.localRotation = danceRot[j];
  12637. }
  12638. }
  12639. }
  12640. isDanceStart7V = false;
  12641. }
  12642. if (isDanceStart8V)
  12643. {
  12644. for (int j = 0; j < maidCnt; j++)
  12645. {
  12646. if (maidArray[j] && maidArray[j].Visible)
  12647. {
  12648. if (isDanceStart8V)
  12649. {
  12650. maidArray[j].SetPos(dancePos[j]);
  12651. maidArray[j].body0.transform.localRotation = danceRot[j];
  12652. }
  12653. }
  12654. }
  12655. isDanceStart8V = false;
  12656. isDanceStart8P = false;
  12657. }
  12658. if (isDanceStart11V)
  12659. {
  12660. for (int j = 0; j < maidCnt; j++)
  12661. {
  12662. if (maidArray[j] && maidArray[j].Visible)
  12663. {
  12664. if (isDanceStart11V)
  12665. {
  12666. maidArray[j].SetPos(dancePos[j]);
  12667. maidArray[j].body0.transform.localRotation = danceRot[j];
  12668. }
  12669. }
  12670. }
  12671. isDanceStart11V = false;
  12672. }
  12673. if (isDanceStart1K || isDanceStart3K || isDanceStart4K || isDanceStart5K || isDanceStart6K || isDanceStart9K
  12674. || isDanceStart13K)
  12675. {
  12676. for (int j = 0; j < maidCnt; j++)
  12677. {
  12678. if (maidArray[j] && maidArray[j].Visible)
  12679. {
  12680. if (isDanceStart1K || isDanceStart3K || isDanceStart4K || isDanceStart5K || isDanceStart6K || isDanceStart9K
  12681. || isDanceStart13K)
  12682. {
  12683. maidArray[j].SetPos(dancePos[j]);
  12684. maidArray[j].body0.transform.localRotation = danceRot[j];
  12685. int i = j;
  12686. if (!isVR)
  12687. {
  12688. delCount[i] = 20;
  12689. if (goSlot[(int) selectList[i]] != null)
  12690. {
  12691. maidArray[i].body0.goSlot = new List<TBodySkin>(goSlot[(int) selectList[i]]);
  12692. for (int l = 0; l < bodyHit[(int) selectList[i]].Count; l++)
  12693. {
  12694. maidArray[i].body0.goSlot[l].bonehair.bodyhit = bodyHit[(int) selectList[i]][l];
  12695. }
  12696. }
  12697. }
  12698. Maid maid = maidArray[j];
  12699. maid.DelProp(MPN.handitem, true);
  12700. maid.DelProp(MPN.accvag, true);
  12701. maid.DelProp(MPN.accanl, true);
  12702. maid.DelProp(MPN.kousoku_upper, true);
  12703. maid.DelProp(MPN.kousoku_lower, true);
  12704. maid.AllProcPropSeqStart();
  12705. }
  12706. }
  12707. }
  12708. isDanceStart1K = false;
  12709. isDanceStart3K = false;
  12710. isDanceStart4K = false;
  12711. isDanceStart5K = false;
  12712. isDanceStart6K = false;
  12713. isDanceStart9K = false;
  12714. isDanceStart13K = false;
  12715. }
  12716. if (isDanceStart14V)
  12717. {
  12718. for (int j = 0; j < maidCnt; j++)
  12719. {
  12720. if (maidArray[j] && maidArray[j].Visible)
  12721. {
  12722. if (isDanceStart14V)
  12723. {
  12724. maidArray[j].SetPos(dancePos[j]);
  12725. maidArray[j].body0.transform.localRotation = danceRot[j];
  12726. }
  12727. }
  12728. }
  12729. isDanceStart14V = false;
  12730. }
  12731. if (isDanceStart15V)
  12732. {
  12733. for (int j = 0; j < maidCnt; j++)
  12734. {
  12735. if (maidArray[j] && maidArray[j].Visible)
  12736. {
  12737. if (isDanceStart15V)
  12738. {
  12739. maidArray[j].SetPos(dancePos[j]);
  12740. maidArray[j].body0.transform.localRotation = danceRot[j];
  12741. }
  12742. }
  12743. }
  12744. isDanceStart15V = false;
  12745. }
  12746. for (int j = 0; j < maidCnt; j++)
  12747. {
  12748. isStop[j] = false;
  12749. isLock[j] = false;
  12750. pHandL[j] = 0;
  12751. pHandR[j] = 0;
  12752. muneIKL[j] = false;
  12753. muneIKR[j] = false;
  12754. if (!isVR)
  12755. {
  12756. maidArray[j].body0.quaDefEyeL.eulerAngles = eyeL[(int) selectList[j]];
  12757. maidArray[j].body0.quaDefEyeR.eulerAngles = eyeR[(int) selectList[j]];
  12758. }
  12759. if (maidArray[j].transform.position.y != 100f)
  12760. {
  12761. dancePos[j] = maidArray[j].transform.position;
  12762. }
  12763. else
  12764. {
  12765. dancePos[j] = new Vector3(maidArray[j].transform.position.x, 0f, maidArray[j].transform.position.z);
  12766. }
  12767. danceRot[j] = maidArray[j].transform.localRotation;
  12768. }
  12769. if (maidArray[1] && maidArray[1].Visible)
  12770. {
  12771. maidArray[1].SetPos(new Vector3(maidArray[0].transform.position.x,
  12772. maidArray[0].transform.position.y,
  12773. maidArray[0].transform.position.z));
  12774. maidArray[1].body0.transform.localRotation = maidArray[0].body0.transform.localRotation;
  12775. }
  12776. if (maidArray[2] && maidArray[2].Visible)
  12777. {
  12778. maidArray[2].SetPos(new Vector3(maidArray[0].transform.position.x,
  12779. maidArray[0].transform.position.y,
  12780. maidArray[0].transform.position.z));
  12781. maidArray[2].body0.transform.localRotation = maidArray[0].body0.transform.localRotation;
  12782. }
  12783. if (maidArray[4] && maidArray[4].Visible)
  12784. {
  12785. maidArray[4].SetPos(new Vector3(maidArray[3].transform.position.x,
  12786. maidArray[3].transform.position.y,
  12787. maidArray[3].transform.position.z));
  12788. maidArray[4].body0.transform.localRotation = maidArray[3].body0.transform.localRotation;
  12789. }
  12790. if (maidArray[5] && maidArray[5].Visible)
  12791. {
  12792. maidArray[5].SetPos(new Vector3(maidArray[3].transform.position.x,
  12793. maidArray[3].transform.position.y,
  12794. maidArray[3].transform.position.z));
  12795. maidArray[5].body0.transform.localRotation = maidArray[3].body0.transform.localRotation;
  12796. }
  12797. if (maidArray[7] && maidArray[7].Visible)
  12798. {
  12799. maidArray[7].SetPos(new Vector3(maidArray[6].transform.position.x,
  12800. maidArray[6].transform.position.y,
  12801. maidArray[6].transform.position.z));
  12802. maidArray[7].body0.transform.localRotation = maidArray[6].body0.transform.localRotation;
  12803. }
  12804. if (maidArray[8] && maidArray[8].Visible)
  12805. {
  12806. maidArray[8].SetPos(new Vector3(maidArray[6].transform.position.x,
  12807. maidArray[6].transform.position.y,
  12808. maidArray[6].transform.position.z));
  12809. maidArray[8].body0.transform.localRotation = maidArray[6].body0.transform.localRotation;
  12810. }
  12811. if (maidArray[10] && maidArray[10].Visible)
  12812. {
  12813. maidArray[10].SetPos(new Vector3(maidArray[9].transform.position.x,
  12814. maidArray[9].transform.position.y,
  12815. maidArray[9].transform.position.z));
  12816. maidArray[10].body0.transform.localRotation = maidArray[9].body0.transform.localRotation;
  12817. }
  12818. if (maidArray[11] && maidArray[11].Visible)
  12819. {
  12820. maidArray[11].SetPos(new Vector3(maidArray[9].transform.position.x,
  12821. maidArray[9].transform.position.y,
  12822. maidArray[9].transform.position.z));
  12823. maidArray[11].body0.transform.localRotation = maidArray[9].body0.transform.localRotation;
  12824. }
  12825. if (maidArray[13] && maidArray[13].Visible)
  12826. {
  12827. maidArray[13].SetPos(new Vector3(maidArray[12].transform.position.x,
  12828. maidArray[12].transform.position.y,
  12829. maidArray[12].transform.position.z));
  12830. maidArray[13].body0.transform.localRotation = maidArray[12].body0.transform.localRotation;
  12831. }
  12832. isSS = false;
  12833. isDance = true;
  12834. isDanceStart11 = true;
  12835. }
  12836. if ((Input.GetKey(KeyCode.Return) && Input.GetKeyDown(KeyCode.Alpha5))
  12837. || (Input.GetKey(KeyCode.KeypadEnter) && Input.GetKeyDown(KeyCode.Alpha5)))
  12838. {
  12839. GameMain.Instance.SoundMgr.StopBGM(0f);
  12840. isSS1 = true;
  12841. isSS2 = false;
  12842. isSS3 = false;
  12843. isSS4 = false;
  12844. isSS5 = false;
  12845. isSS6 = false;
  12846. isSS = true;
  12847. }
  12848. if ((Input.GetKey(KeyCode.Return) && Input.GetKeyDown(KeyCode.Alpha6))
  12849. || (Input.GetKey(KeyCode.KeypadEnter) && Input.GetKeyDown(KeyCode.Alpha6)))
  12850. {
  12851. GameMain.Instance.SoundMgr.StopBGM(0f);
  12852. isSS1 = false;
  12853. isSS2 = true;
  12854. isSS3 = false;
  12855. isSS4 = false;
  12856. isSS5 = false;
  12857. isSS6 = false;
  12858. isSS = true;
  12859. }
  12860. if ((Input.GetKey(KeyCode.Return) && Input.GetKeyDown(KeyCode.Alpha7))
  12861. || (Input.GetKey(KeyCode.KeypadEnter) && Input.GetKeyDown(KeyCode.Alpha7)))
  12862. {
  12863. GameMain.Instance.SoundMgr.StopBGM(0f);
  12864. isSS1 = false;
  12865. isSS2 = false;
  12866. isSS3 = true;
  12867. isSS4 = false;
  12868. isSS5 = false;
  12869. isSS6 = false;
  12870. isSS = true;
  12871. }
  12872. if ((Input.GetKey(KeyCode.Return) && Input.GetKeyDown(KeyCode.Alpha8))
  12873. || (Input.GetKey(KeyCode.KeypadEnter) && Input.GetKeyDown(KeyCode.Alpha8)))
  12874. {
  12875. GameMain.Instance.SoundMgr.StopBGM(0f);
  12876. isSS1 = false;
  12877. isSS2 = false;
  12878. isSS3 = false;
  12879. isSS4 = true;
  12880. isSS5 = false;
  12881. isSS6 = false;
  12882. isSS = true;
  12883. }
  12884. if ((Input.GetKey(KeyCode.Return) && Input.GetKeyDown(KeyCode.Alpha9))
  12885. || (Input.GetKey(KeyCode.KeypadEnter) && Input.GetKeyDown(KeyCode.Alpha9)))
  12886. {
  12887. GameMain.Instance.SoundMgr.StopBGM(0f);
  12888. isSS1 = false;
  12889. isSS2 = false;
  12890. isSS3 = false;
  12891. isSS4 = false;
  12892. isSS5 = true;
  12893. isSS6 = false;
  12894. isSS = true;
  12895. }
  12896. if (isKHG1 || isKHG2)
  12897. {
  12898. TextAsset textAsset = Resources.Load("SceneDance/dance_KhG_m0") as TextAsset;
  12899. string text4 = textAsset.text;
  12900. text4 = Regex.Replace(text4, "(\\r|\\n| )", string.Empty);
  12901. audioSourceBgm = GameMain.Instance.SoundMgr.GetAudioSourceBgm();
  12902. GameMain.Instance.SoundMgr.PlayBGM("se002.ogg", 0f, false);
  12903. for (int j = 0; j < maidCnt; j++)
  12904. {
  12905. if (!maidArray[j].body0.m_Bones.GetComponent<Animation>().GetClip("dance_cm3d2_005_khg_f.anm"))
  12906. {
  12907. maidArray[j].body0.LoadAnime("dance_cm3d2_005_khg_f.anm",
  12908. GameUty.FileSystem,
  12909. "dance_cm3d2_005_khg_f.anm",
  12910. false,
  12911. false);
  12912. }
  12913. m_baKuchipakuPattern[j] = Convert.FromBase64String(text4);
  12914. }
  12915. if (isKHG1)
  12916. {
  12917. GameMain.Instance.SoundMgr.PlayDanceBGM("kaikaku_short1.ogg", 0f, false);
  12918. }
  12919. if (isKHG2)
  12920. {
  12921. GameMain.Instance.SoundMgr.PlayDanceBGM("kaikaku_short2.ogg", 0f, false);
  12922. }
  12923. for (int j = 0; j < maidCnt; j++)
  12924. {
  12925. maidArray[j].StartKuchipakuPattern(0f, text4, true);
  12926. isStop[j] = false;
  12927. isLock[j] = false;
  12928. pHandL[j] = 0;
  12929. pHandR[j] = 0;
  12930. muneIKL[j] = false;
  12931. muneIKR[j] = false;
  12932. if (!isVR)
  12933. {
  12934. maidArray[j].body0.quaDefEyeL.eulerAngles = eyeL[(int) selectList[j]];
  12935. maidArray[j].body0.quaDefEyeR.eulerAngles = eyeR[(int) selectList[j]];
  12936. }
  12937. }
  12938. ikBui = 5;
  12939. isDanceStart1F = false;
  12940. isDanceStart2F = false;
  12941. isDanceStart3F = false;
  12942. isDanceStart4F = false;
  12943. isDanceStart5F = false;
  12944. isDanceStart6F = false;
  12945. isDanceStart7F = false;
  12946. isDanceStart8F = false;
  12947. isDanceStart9F = false;
  12948. isDanceStart10F = false;
  12949. isDanceStart11F = false;
  12950. isDanceStart12F = false;
  12951. isDanceStart13F = false;
  12952. isDanceStart14F = false;
  12953. isDanceStart15F = false;
  12954. for (int j = 0; j < maidCnt; j++)
  12955. {
  12956. danceFace[j] = 0f;
  12957. }
  12958. if (isDanceStart7V)
  12959. {
  12960. for (int j = 0; j < maidCnt; j++)
  12961. {
  12962. if (maidArray[j] && maidArray[j].Visible)
  12963. {
  12964. if (isDanceStart7V)
  12965. {
  12966. maidArray[j].SetPos(dancePos[j]);
  12967. maidArray[j].body0.transform.localRotation = danceRot[j];
  12968. }
  12969. }
  12970. }
  12971. isDanceStart7V = false;
  12972. }
  12973. if (isDanceStart8V)
  12974. {
  12975. for (int j = 0; j < maidCnt; j++)
  12976. {
  12977. if (maidArray[j] && maidArray[j].Visible)
  12978. {
  12979. if (isDanceStart8V)
  12980. {
  12981. maidArray[j].SetPos(dancePos[j]);
  12982. maidArray[j].body0.transform.localRotation = danceRot[j];
  12983. }
  12984. }
  12985. }
  12986. isDanceStart8V = false;
  12987. isDanceStart8P = false;
  12988. }
  12989. if (isDanceStart11V)
  12990. {
  12991. for (int j = 0; j < maidCnt; j++)
  12992. {
  12993. if (maidArray[j] && maidArray[j].Visible)
  12994. {
  12995. if (isDanceStart11V)
  12996. {
  12997. maidArray[j].SetPos(dancePos[j]);
  12998. maidArray[j].body0.transform.localRotation = danceRot[j];
  12999. }
  13000. }
  13001. }
  13002. isDanceStart11V = false;
  13003. }
  13004. if (isDanceStart1K || isDanceStart3K || isDanceStart4K || isDanceStart5K || isDanceStart6K || isDanceStart9K
  13005. || isDanceStart13K)
  13006. {
  13007. for (int j = 0; j < maidCnt; j++)
  13008. {
  13009. if (maidArray[j] && maidArray[j].Visible)
  13010. {
  13011. if (isDanceStart1K || isDanceStart3K || isDanceStart4K || isDanceStart5K || isDanceStart6K || isDanceStart9K
  13012. || isDanceStart13K)
  13013. {
  13014. maidArray[j].SetPos(dancePos[j]);
  13015. maidArray[j].body0.transform.localRotation = danceRot[j];
  13016. int i = j;
  13017. if (!isVR)
  13018. {
  13019. delCount[i] = 20;
  13020. if (goSlot[(int) selectList[i]] != null)
  13021. {
  13022. maidArray[i].body0.goSlot = new List<TBodySkin>(goSlot[(int) selectList[i]]);
  13023. for (int l = 0; l < bodyHit[(int) selectList[i]].Count; l++)
  13024. {
  13025. maidArray[i].body0.goSlot[l].bonehair.bodyhit = bodyHit[(int) selectList[i]][l];
  13026. }
  13027. }
  13028. }
  13029. Maid maid = maidArray[j];
  13030. maid.DelProp(MPN.handitem, true);
  13031. maid.DelProp(MPN.accvag, true);
  13032. maid.DelProp(MPN.accanl, true);
  13033. maid.DelProp(MPN.kousoku_upper, true);
  13034. maid.DelProp(MPN.kousoku_lower, true);
  13035. maid.AllProcPropSeqStart();
  13036. }
  13037. }
  13038. }
  13039. isDanceStart1K = false;
  13040. isDanceStart3K = false;
  13041. isDanceStart4K = false;
  13042. isDanceStart5K = false;
  13043. isDanceStart6K = false;
  13044. isDanceStart9K = false;
  13045. isDanceStart13K = false;
  13046. }
  13047. if (isDanceStart14V)
  13048. {
  13049. for (int j = 0; j < maidCnt; j++)
  13050. {
  13051. if (maidArray[j] && maidArray[j].Visible)
  13052. {
  13053. if (isDanceStart14V)
  13054. {
  13055. maidArray[j].SetPos(dancePos[j]);
  13056. maidArray[j].body0.transform.localRotation = danceRot[j];
  13057. }
  13058. }
  13059. }
  13060. isDanceStart14V = false;
  13061. }
  13062. if (isDanceStart15V)
  13063. {
  13064. for (int j = 0; j < maidCnt; j++)
  13065. {
  13066. if (maidArray[j] && maidArray[j].Visible)
  13067. {
  13068. if (isDanceStart15V)
  13069. {
  13070. maidArray[j].SetPos(dancePos[j]);
  13071. maidArray[j].body0.transform.localRotation = danceRot[j];
  13072. }
  13073. }
  13074. }
  13075. isDanceStart15V = false;
  13076. }
  13077. if (maidArray[1] && maidArray[1].Visible)
  13078. {
  13079. if (maidArray[0].transform.position == maidArray[1].transform.position)
  13080. {
  13081. Vector3 vector = Vector3.zero;
  13082. vector.x = 0.6f;
  13083. maidArray[1].SetPos(vector);
  13084. if (maidArray[2] && maidArray[2].Visible)
  13085. {
  13086. vector.x = -0.6f;
  13087. maidArray[2].SetPos(vector);
  13088. }
  13089. if (maidArray[3] && maidArray[3].Visible)
  13090. {
  13091. vector.x = 1.2f;
  13092. maidArray[3].SetPos(vector);
  13093. }
  13094. if (maidArray[4] && maidArray[4].Visible)
  13095. {
  13096. vector.x = -1.2f;
  13097. maidArray[4].SetPos(vector);
  13098. }
  13099. if (maidArray[5] && maidArray[5].Visible)
  13100. {
  13101. vector.x = 1.8f;
  13102. maidArray[5].SetPos(vector);
  13103. }
  13104. if (maidArray[6] && maidArray[6].Visible)
  13105. {
  13106. vector.x = -1.8f;
  13107. maidArray[6].SetPos(vector);
  13108. }
  13109. if (maidArray[7] && maidArray[7].Visible)
  13110. {
  13111. vector.x = 2.4f;
  13112. maidArray[7].SetPos(vector);
  13113. }
  13114. if (maidArray[8] && maidArray[8].Visible)
  13115. {
  13116. vector.x = -2.4f;
  13117. maidArray[8].SetPos(vector);
  13118. }
  13119. if (maidArray[9] && maidArray[9].Visible)
  13120. {
  13121. vector.x = 3f;
  13122. maidArray[9].SetPos(vector);
  13123. }
  13124. if (maidArray[10] && maidArray[10].Visible)
  13125. {
  13126. vector.x = -3f;
  13127. maidArray[10].SetPos(vector);
  13128. }
  13129. if (maidArray[11] && maidArray[11].Visible)
  13130. {
  13131. vector.x = 3.6f;
  13132. maidArray[11].SetPos(vector);
  13133. }
  13134. if (maidArray[12] && maidArray[12].Visible)
  13135. {
  13136. vector.x = -3.6f;
  13137. maidArray[12].SetPos(vector);
  13138. }
  13139. if (maidArray[13] && maidArray[13].Visible)
  13140. {
  13141. vector.x = 4.2f;
  13142. maidArray[13].SetPos(vector);
  13143. }
  13144. }
  13145. }
  13146. isDance = true;
  13147. isDanceStart12 = true;
  13148. isKHG1 = false;
  13149. isKHG2 = false;
  13150. }
  13151. if (isDanceStart13Count > 0)
  13152. {
  13153. isDanceStart13Count++;
  13154. }
  13155. if (isDanceStart13Count == 1)
  13156. {
  13157. GameMain.Instance.SoundMgr.PlayDanceBGM("nightmagicfire_short.ogg", 0f, false);
  13158. isDanceStart13Count = 0;
  13159. TextAsset textAsset = Resources.Load("SceneDance/dance_SsN_m0") as TextAsset;
  13160. string text4 = textAsset.text;
  13161. text4 = Regex.Replace(text4, "(\\r|\\n| )", string.Empty);
  13162. for (int j = 0; j < maidCnt; j++)
  13163. {
  13164. maidArray[j].StartKuchipakuPattern(0f, text4, true);
  13165. }
  13166. }
  13167. if ((isSN1 || isSN2 || isSN3) && isShift)
  13168. {
  13169. TextAsset textAsset = Resources.Load("SceneDance/dance_SsN_m0") as TextAsset;
  13170. string text4 = textAsset.text;
  13171. text4 = Regex.Replace(text4, "(\\r|\\n| )", string.Empty);
  13172. audioSourceBgm = GameMain.Instance.SoundMgr.GetAudioSourceBgm();
  13173. GameMain.Instance.SoundMgr.PlayBGM("se002.ogg", 0f, false);
  13174. for (int j = 0; j < maidCnt; j++)
  13175. {
  13176. if (!isShift)
  13177. {
  13178. if (!maidArray[j].body0.m_Bones.GetComponent<Animation>().GetClip("dance_cm3d2_006_ssn_f1.anm"))
  13179. {
  13180. maidArray[j].body0.LoadAnime("dance_cm3d2_006_ssn_f1.anm",
  13181. GameUty.FileSystem,
  13182. "dance_cm3d2_006_ssn_f1.anm",
  13183. false,
  13184. false);
  13185. }
  13186. }
  13187. else
  13188. {
  13189. if (!maidArray[j].body0.m_Bones.GetComponent<Animation>().GetClip("dance_cm3d21_kara_001_nmf_f1.anm"))
  13190. {
  13191. maidArray[j].body0.LoadAnime("dance_cm3d21_kara_001_nmf_f1.anm",
  13192. GameUty.FileSystem,
  13193. "dance_cm3d21_kara_001_nmf_f1.anm",
  13194. false,
  13195. false);
  13196. }
  13197. textAsset = (Resources.Load("SceneDance/dance_NmF_m1") as TextAsset);
  13198. string text5 = nameA + danceNo1 + ".anm";
  13199. switch (j)
  13200. {
  13201. case 1:
  13202. case 4:
  13203. case 7:
  13204. case 10:
  13205. case 13:
  13206. textAsset = (Resources.Load("SceneDance/dance_NmF_m0") as TextAsset);
  13207. break;
  13208. case 2:
  13209. case 5:
  13210. case 8:
  13211. case 11:
  13212. textAsset = (Resources.Load("SceneDance/dance_NmF_m2") as TextAsset);
  13213. break;
  13214. }
  13215. text4 = textAsset.text;
  13216. text4 = Regex.Replace(text4, "(\\r|\\n| )", string.Empty);
  13217. if (!isDanceStart1K && !isDanceStart3K && !isDanceStart4K && !isDanceStart5K && !isDanceStart6K
  13218. && !isDanceStart9K && !isDanceStart13K)
  13219. {
  13220. dancePos[j] = maidArray[j].transform.position;
  13221. danceRot[j] = maidArray[j].transform.localRotation;
  13222. }
  13223. }
  13224. m_baKuchipakuPattern[j] = Convert.FromBase64String(text4);
  13225. }
  13226. if (!isShift)
  13227. {
  13228. if (isSN1)
  13229. {
  13230. GameMain.Instance.SoundMgr.PlayDanceBGM("nightmagicfire_short.ogg", 0f, false);
  13231. }
  13232. if (isSN2)
  13233. {
  13234. GameMain.Instance.SoundMgr.PlayDanceBGM("sunshinenatsu2.ogg", 0f, false);
  13235. }
  13236. if (isSN3)
  13237. {
  13238. GameMain.Instance.SoundMgr.PlayDanceBGM("sunshinenatsu3.ogg", 0f, false);
  13239. }
  13240. }
  13241. else
  13242. {
  13243. danceWait = 400;
  13244. isDanceStart13Count++;
  13245. GameMain.Instance.SoundMgr.PlayDanceBGM("nightmagicfire_short.ogg", 0f, false);
  13246. }
  13247. for (int j = 0; j < maidCnt; j++)
  13248. {
  13249. maidArray[j].StartKuchipakuPattern(0f, text4, true);
  13250. isStop[j] = false;
  13251. isLock[j] = false;
  13252. pHandL[j] = 0;
  13253. pHandR[j] = 0;
  13254. muneIKL[j] = false;
  13255. muneIKR[j] = false;
  13256. if (!isVR)
  13257. {
  13258. maidArray[j].body0.quaDefEyeL.eulerAngles = eyeL[(int) selectList[j]];
  13259. maidArray[j].body0.quaDefEyeR.eulerAngles = eyeR[(int) selectList[j]];
  13260. }
  13261. }
  13262. ikBui = 5;
  13263. isDanceStart1F = false;
  13264. isDanceStart2F = false;
  13265. isDanceStart3F = false;
  13266. isDanceStart4F = false;
  13267. isDanceStart5F = false;
  13268. isDanceStart6F = false;
  13269. isDanceStart7F = false;
  13270. isDanceStart8F = false;
  13271. isDanceStart9F = false;
  13272. isDanceStart10F = false;
  13273. isDanceStart11F = false;
  13274. isDanceStart12F = false;
  13275. isDanceStart13F = false;
  13276. isDanceStart14F = false;
  13277. isDanceStart15F = false;
  13278. for (int j = 0; j < maidCnt; j++)
  13279. {
  13280. danceFace[j] = 0f;
  13281. }
  13282. if (isDanceStart7V)
  13283. {
  13284. for (int j = 0; j < maidCnt; j++)
  13285. {
  13286. if (maidArray[j] && maidArray[j].Visible)
  13287. {
  13288. if (isDanceStart7V)
  13289. {
  13290. maidArray[j].SetPos(dancePos[j]);
  13291. maidArray[j].body0.transform.localRotation = danceRot[j];
  13292. }
  13293. }
  13294. }
  13295. isDanceStart7V = false;
  13296. }
  13297. if (isDanceStart8V)
  13298. {
  13299. for (int j = 0; j < maidCnt; j++)
  13300. {
  13301. if (maidArray[j] && maidArray[j].Visible)
  13302. {
  13303. if (isDanceStart8V)
  13304. {
  13305. maidArray[j].SetPos(dancePos[j]);
  13306. maidArray[j].body0.transform.localRotation = danceRot[j];
  13307. }
  13308. }
  13309. }
  13310. isDanceStart8V = false;
  13311. isDanceStart8P = false;
  13312. }
  13313. if (isDanceStart11V)
  13314. {
  13315. for (int j = 0; j < maidCnt; j++)
  13316. {
  13317. if (maidArray[j] && maidArray[j].Visible)
  13318. {
  13319. if (isDanceStart11V)
  13320. {
  13321. maidArray[j].SetPos(dancePos[j]);
  13322. maidArray[j].body0.transform.localRotation = danceRot[j];
  13323. }
  13324. }
  13325. }
  13326. isDanceStart11V = false;
  13327. }
  13328. if (isDanceStart1K || isDanceStart3K || isDanceStart4K || isDanceStart5K || isDanceStart6K || isDanceStart9K
  13329. || isDanceStart13K)
  13330. {
  13331. for (int j = 0; j < maidCnt; j++)
  13332. {
  13333. if (maidArray[j] && maidArray[j].Visible)
  13334. {
  13335. if (isDanceStart1K || isDanceStart3K || isDanceStart4K || isDanceStart5K || isDanceStart6K || isDanceStart9K
  13336. || isDanceStart13K)
  13337. {
  13338. maidArray[j].SetPos(dancePos[j]);
  13339. maidArray[j].body0.transform.localRotation = danceRot[j];
  13340. int i = j;
  13341. if (!isVR)
  13342. {
  13343. delCount[i] = 20;
  13344. if (goSlot[(int) selectList[i]] != null)
  13345. {
  13346. maidArray[i].body0.goSlot = new List<TBodySkin>(goSlot[(int) selectList[i]]);
  13347. for (int l = 0; l < bodyHit[(int) selectList[i]].Count; l++)
  13348. {
  13349. maidArray[i].body0.goSlot[l].bonehair.bodyhit = bodyHit[(int) selectList[i]][l];
  13350. }
  13351. }
  13352. }
  13353. Maid maid = maidArray[j];
  13354. maid.DelProp(MPN.handitem, true);
  13355. maid.DelProp(MPN.accvag, true);
  13356. maid.DelProp(MPN.accanl, true);
  13357. maid.DelProp(MPN.kousoku_upper, true);
  13358. maid.DelProp(MPN.kousoku_lower, true);
  13359. maid.AllProcPropSeqStart();
  13360. }
  13361. }
  13362. }
  13363. isDanceStart1K = false;
  13364. isDanceStart3K = false;
  13365. isDanceStart4K = false;
  13366. isDanceStart5K = false;
  13367. isDanceStart6K = false;
  13368. isDanceStart9K = false;
  13369. isDanceStart13K = false;
  13370. }
  13371. if (isDanceStart14V)
  13372. {
  13373. for (int j = 0; j < maidCnt; j++)
  13374. {
  13375. if (maidArray[j] && maidArray[j].Visible)
  13376. {
  13377. if (isDanceStart14V)
  13378. {
  13379. maidArray[j].SetPos(dancePos[j]);
  13380. maidArray[j].body0.transform.localRotation = danceRot[j];
  13381. }
  13382. }
  13383. }
  13384. isDanceStart14V = false;
  13385. }
  13386. if (isDanceStart15V)
  13387. {
  13388. for (int j = 0; j < maidCnt; j++)
  13389. {
  13390. if (maidArray[j] && maidArray[j].Visible)
  13391. {
  13392. if (isDanceStart15V)
  13393. {
  13394. maidArray[j].SetPos(dancePos[j]);
  13395. maidArray[j].body0.transform.localRotation = danceRot[j];
  13396. }
  13397. }
  13398. }
  13399. isDanceStart15V = false;
  13400. }
  13401. if (maidArray[1] && maidArray[1].Visible)
  13402. {
  13403. if (maidArray[0].transform.position == maidArray[1].transform.position)
  13404. {
  13405. Vector3 vector = Vector3.zero;
  13406. vector.x = 0.6f;
  13407. maidArray[1].SetPos(vector);
  13408. if (maidArray[2] && maidArray[2].Visible)
  13409. {
  13410. vector.x = -0.6f;
  13411. maidArray[2].SetPos(vector);
  13412. }
  13413. if (maidArray[3] && maidArray[3].Visible)
  13414. {
  13415. vector.x = 1.2f;
  13416. maidArray[3].SetPos(vector);
  13417. }
  13418. if (maidArray[4] && maidArray[4].Visible)
  13419. {
  13420. vector.x = -1.2f;
  13421. maidArray[4].SetPos(vector);
  13422. }
  13423. if (maidArray[5] && maidArray[5].Visible)
  13424. {
  13425. vector.x = 1.8f;
  13426. maidArray[5].SetPos(vector);
  13427. }
  13428. if (maidArray[6] && maidArray[6].Visible)
  13429. {
  13430. vector.x = -1.8f;
  13431. maidArray[6].SetPos(vector);
  13432. }
  13433. if (maidArray[7] && maidArray[7].Visible)
  13434. {
  13435. vector.x = 2.4f;
  13436. maidArray[7].SetPos(vector);
  13437. }
  13438. if (maidArray[8] && maidArray[8].Visible)
  13439. {
  13440. vector.x = -2.4f;
  13441. maidArray[8].SetPos(vector);
  13442. }
  13443. if (maidArray[9] && maidArray[9].Visible)
  13444. {
  13445. vector.x = 3f;
  13446. maidArray[9].SetPos(vector);
  13447. }
  13448. if (maidArray[10] && maidArray[10].Visible)
  13449. {
  13450. vector.x = -3f;
  13451. maidArray[10].SetPos(vector);
  13452. }
  13453. if (maidArray[11] && maidArray[11].Visible)
  13454. {
  13455. vector.x = 3.6f;
  13456. maidArray[11].SetPos(vector);
  13457. }
  13458. if (maidArray[12] && maidArray[12].Visible)
  13459. {
  13460. vector.x = -3.6f;
  13461. maidArray[12].SetPos(vector);
  13462. }
  13463. if (maidArray[13] && maidArray[13].Visible)
  13464. {
  13465. vector.x = 4.2f;
  13466. maidArray[13].SetPos(vector);
  13467. }
  13468. }
  13469. }
  13470. if (isShift)
  13471. {
  13472. isDanceStart13K = true;
  13473. for (int j = 0; j < maidCnt; j++)
  13474. {
  13475. maidArray[j].SetRot(new Vector3(maidArray[j].body0.transform.localRotation.x,
  13476. maidArray[j].body0.transform.localRotation.y + 90f,
  13477. maidArray[j].body0.transform.localRotation.z));
  13478. maidArray[j].SetPos(new Vector3(maidArray[j].body0.transform.position.x + 1f,
  13479. maidArray[j].body0.transform.position.y,
  13480. maidArray[j].body0.transform.position.z + 4f));
  13481. string text2 = "handitem,HanditemL_Karaoke_Mike_I_.menu";
  13482. int i = j;
  13483. Maid maid = maidArray[j];
  13484. if (!isVR)
  13485. {
  13486. delCount[i] = 20;
  13487. if (goSlot[(int) selectList[i]] != null)
  13488. {
  13489. maidArray[i].body0.goSlot = new List<TBodySkin>(goSlot[(int) selectList[i]]);
  13490. for (int l = 0; l < bodyHit[(int) selectList[i]].Count; l++)
  13491. {
  13492. maidArray[i].body0.goSlot[l].bonehair.bodyhit = bodyHit[(int) selectList[i]][l];
  13493. }
  13494. }
  13495. }
  13496. string[] array = new string[2];
  13497. array = text2.Split(new char[] {','});
  13498. maid.DelProp(MPN.handitem, true);
  13499. maid.DelProp(MPN.accvag, true);
  13500. maid.DelProp(MPN.accanl, true);
  13501. maid.DelProp(MPN.kousoku_upper, true);
  13502. maid.DelProp(MPN.kousoku_lower, true);
  13503. if (array[0] != "")
  13504. {
  13505. maid.SetProp(array[0], array[1], 0, true, false);
  13506. }
  13507. maid.AllProcPropSeqStart();
  13508. }
  13509. }
  13510. isDance = true;
  13511. isDanceStart13 = true;
  13512. isSN1 = false;
  13513. isSN2 = false;
  13514. isSN3 = false;
  13515. }
  13516. if ((Input.GetKey(KeyCode.Return) && Input.GetKeyDown(KeyCode.Alpha8))
  13517. || (Input.GetKey(KeyCode.KeypadEnter) && Input.GetKeyDown(KeyCode.Alpha8)))
  13518. {
  13519. GameMain.Instance.SoundMgr.StopBGM(0f);
  13520. isSN1 = true;
  13521. hFlg = true;
  13522. if (this.getModKeyPressing(modKey.Shift))
  13523. {
  13524. isShift = true;
  13525. }
  13526. }
  13527. if (isSN4 || isSN5 || isSN6)
  13528. {
  13529. audioSourceBgm = GameMain.Instance.SoundMgr.GetAudioSourceBgm();
  13530. GameMain.Instance.SoundMgr.PlayBGM("se002.ogg", 0f, false);
  13531. for (int j = 0; j < maidCnt; j++)
  13532. {
  13533. TextAsset textAsset = Resources.Load("SceneDance/dance_SsN_m0") as TextAsset;
  13534. string text5 = "dance_cm3d2_006_ssn_f1.anm";
  13535. switch (j)
  13536. {
  13537. case 1:
  13538. case 4:
  13539. case 7:
  13540. case 10:
  13541. case 13:
  13542. text5 = "dance_cm3d2_006_ssn_f2.anm";
  13543. textAsset = (Resources.Load("SceneDance/dance_SsN_m1") as TextAsset);
  13544. break;
  13545. case 2:
  13546. case 5:
  13547. case 8:
  13548. case 11:
  13549. text5 = "dance_cm3d2_006_ssn_f3.anm";
  13550. textAsset = (Resources.Load("SceneDance/dance_SsN_m1") as TextAsset);
  13551. break;
  13552. }
  13553. if (maidArray[j] && maidArray[j].Visible)
  13554. {
  13555. if (!maidArray[j].body0.m_Bones.GetComponent<Animation>().GetClip(text5))
  13556. {
  13557. maidArray[j].body0.LoadAnime(text5, GameUty.FileSystem, text5, false, false);
  13558. }
  13559. string text4 = textAsset.text;
  13560. text4 = Regex.Replace(text4, "(\\r|\\n| )", string.Empty);
  13561. maidArray[j].StartKuchipakuPattern(0f, text4, true);
  13562. m_baKuchipakuPattern[j] = Convert.FromBase64String(text4);
  13563. }
  13564. }
  13565. if (isSN4)
  13566. {
  13567. GameMain.Instance.SoundMgr.PlayDanceBGM("sunshinenatsu1.ogg", 0f, false);
  13568. }
  13569. if (isSN5)
  13570. {
  13571. GameMain.Instance.SoundMgr.PlayDanceBGM("sunshinenatsu2.ogg", 0f, false);
  13572. }
  13573. if (isSN6)
  13574. {
  13575. GameMain.Instance.SoundMgr.PlayDanceBGM("sunshinenatsu3.ogg", 0f, false);
  13576. }
  13577. ikBui = 5;
  13578. isDanceStart1F = false;
  13579. isDanceStart2F = false;
  13580. isDanceStart3F = false;
  13581. isDanceStart4F = false;
  13582. isDanceStart5F = false;
  13583. isDanceStart6F = false;
  13584. isDanceStart7F = false;
  13585. isDanceStart8F = false;
  13586. isDanceStart9F = false;
  13587. isDanceStart10F = false;
  13588. isDanceStart11F = false;
  13589. isDanceStart12F = false;
  13590. isDanceStart13F = false;
  13591. isDanceStart14F = false;
  13592. isDanceStart15F = false;
  13593. for (int j = 0; j < maidCnt; j++)
  13594. {
  13595. danceFace[j] = 0f;
  13596. }
  13597. if (isDanceStart7V)
  13598. {
  13599. for (int j = 0; j < maidCnt; j++)
  13600. {
  13601. if (maidArray[j] && maidArray[j].Visible)
  13602. {
  13603. if (isDanceStart7V)
  13604. {
  13605. maidArray[j].SetPos(dancePos[j]);
  13606. maidArray[j].body0.transform.localRotation = danceRot[j];
  13607. }
  13608. }
  13609. }
  13610. isDanceStart7V = false;
  13611. }
  13612. if (isDanceStart8V)
  13613. {
  13614. for (int j = 0; j < maidCnt; j++)
  13615. {
  13616. if (maidArray[j] && maidArray[j].Visible)
  13617. {
  13618. if (isDanceStart8V)
  13619. {
  13620. maidArray[j].SetPos(dancePos[j]);
  13621. maidArray[j].body0.transform.localRotation = danceRot[j];
  13622. }
  13623. }
  13624. }
  13625. isDanceStart8V = false;
  13626. isDanceStart8P = false;
  13627. }
  13628. if (isDanceStart11V)
  13629. {
  13630. for (int j = 0; j < maidCnt; j++)
  13631. {
  13632. if (maidArray[j] && maidArray[j].Visible)
  13633. {
  13634. if (isDanceStart11V)
  13635. {
  13636. maidArray[j].SetPos(dancePos[j]);
  13637. maidArray[j].body0.transform.localRotation = danceRot[j];
  13638. }
  13639. }
  13640. }
  13641. isDanceStart11V = false;
  13642. }
  13643. if (isDanceStart1K || isDanceStart3K || isDanceStart4K || isDanceStart5K || isDanceStart6K || isDanceStart9K
  13644. || isDanceStart13K)
  13645. {
  13646. for (int j = 0; j < maidCnt; j++)
  13647. {
  13648. if (maidArray[j] && maidArray[j].Visible)
  13649. {
  13650. if (isDanceStart1K || isDanceStart3K || isDanceStart4K || isDanceStart5K || isDanceStart6K || isDanceStart9K
  13651. || isDanceStart13K)
  13652. {
  13653. maidArray[j].SetPos(dancePos[j]);
  13654. maidArray[j].body0.transform.localRotation = danceRot[j];
  13655. int i = j;
  13656. if (!isVR)
  13657. {
  13658. delCount[i] = 20;
  13659. if (goSlot[(int) selectList[i]] != null)
  13660. {
  13661. maidArray[i].body0.goSlot = new List<TBodySkin>(goSlot[(int) selectList[i]]);
  13662. for (int l = 0; l < bodyHit[(int) selectList[i]].Count; l++)
  13663. {
  13664. maidArray[i].body0.goSlot[l].bonehair.bodyhit = bodyHit[(int) selectList[i]][l];
  13665. }
  13666. }
  13667. }
  13668. Maid maid = maidArray[j];
  13669. maid.DelProp(MPN.handitem, true);
  13670. maid.DelProp(MPN.accvag, true);
  13671. maid.DelProp(MPN.accanl, true);
  13672. maid.DelProp(MPN.kousoku_upper, true);
  13673. maid.DelProp(MPN.kousoku_lower, true);
  13674. maid.AllProcPropSeqStart();
  13675. }
  13676. }
  13677. }
  13678. isDanceStart1K = false;
  13679. isDanceStart3K = false;
  13680. isDanceStart4K = false;
  13681. isDanceStart5K = false;
  13682. isDanceStart6K = false;
  13683. isDanceStart9K = false;
  13684. isDanceStart13K = false;
  13685. }
  13686. if (isDanceStart14V)
  13687. {
  13688. for (int j = 0; j < maidCnt; j++)
  13689. {
  13690. if (maidArray[j] && maidArray[j].Visible)
  13691. {
  13692. if (isDanceStart14V)
  13693. {
  13694. maidArray[j].SetPos(dancePos[j]);
  13695. maidArray[j].body0.transform.localRotation = danceRot[j];
  13696. }
  13697. }
  13698. }
  13699. isDanceStart14V = false;
  13700. }
  13701. if (isDanceStart15V)
  13702. {
  13703. for (int j = 0; j < maidCnt; j++)
  13704. {
  13705. if (maidArray[j] && maidArray[j].Visible)
  13706. {
  13707. if (isDanceStart15V)
  13708. {
  13709. maidArray[j].SetPos(dancePos[j]);
  13710. maidArray[j].body0.transform.localRotation = danceRot[j];
  13711. }
  13712. }
  13713. }
  13714. isDanceStart15V = false;
  13715. }
  13716. for (int j = 0; j < maidCnt; j++)
  13717. {
  13718. isStop[j] = false;
  13719. isLock[j] = false;
  13720. pHandL[j] = 0;
  13721. pHandR[j] = 0;
  13722. muneIKL[j] = false;
  13723. muneIKR[j] = false;
  13724. if (!isVR)
  13725. {
  13726. maidArray[j].body0.quaDefEyeL.eulerAngles = eyeL[(int) selectList[j]];
  13727. maidArray[j].body0.quaDefEyeR.eulerAngles = eyeR[(int) selectList[j]];
  13728. }
  13729. if (maidArray[j].transform.position.y != 100f)
  13730. {
  13731. dancePos[j] = maidArray[j].transform.position;
  13732. }
  13733. else
  13734. {
  13735. dancePos[j] = new Vector3(maidArray[j].transform.position.x, 0f, maidArray[j].transform.position.z);
  13736. }
  13737. danceRot[j] = maidArray[j].transform.localRotation;
  13738. }
  13739. if (maidArray[1] && maidArray[1].Visible)
  13740. {
  13741. maidArray[1].SetPos(new Vector3(maidArray[0].transform.position.x,
  13742. maidArray[0].transform.position.y,
  13743. maidArray[0].transform.position.z));
  13744. maidArray[1].body0.transform.localRotation = maidArray[0].body0.transform.localRotation;
  13745. }
  13746. if (maidArray[2] && maidArray[2].Visible)
  13747. {
  13748. maidArray[2].SetPos(new Vector3(maidArray[0].transform.position.x,
  13749. maidArray[0].transform.position.y,
  13750. maidArray[0].transform.position.z));
  13751. maidArray[2].body0.transform.localRotation = maidArray[0].body0.transform.localRotation;
  13752. }
  13753. if (maidArray[4] && maidArray[4].Visible)
  13754. {
  13755. maidArray[4].SetPos(new Vector3(maidArray[3].transform.position.x,
  13756. maidArray[3].transform.position.y,
  13757. maidArray[3].transform.position.z));
  13758. maidArray[4].body0.transform.localRotation = maidArray[3].body0.transform.localRotation;
  13759. }
  13760. if (maidArray[5] && maidArray[5].Visible)
  13761. {
  13762. maidArray[5].SetPos(new Vector3(maidArray[3].transform.position.x,
  13763. maidArray[3].transform.position.y,
  13764. maidArray[3].transform.position.z));
  13765. maidArray[5].body0.transform.localRotation = maidArray[3].body0.transform.localRotation;
  13766. }
  13767. if (maidArray[7] && maidArray[7].Visible)
  13768. {
  13769. maidArray[7].SetPos(new Vector3(maidArray[6].transform.position.x,
  13770. maidArray[6].transform.position.y,
  13771. maidArray[6].transform.position.z));
  13772. maidArray[7].body0.transform.localRotation = maidArray[6].body0.transform.localRotation;
  13773. }
  13774. if (maidArray[8] && maidArray[8].Visible)
  13775. {
  13776. maidArray[8].SetPos(new Vector3(maidArray[6].transform.position.x,
  13777. maidArray[6].transform.position.y,
  13778. maidArray[6].transform.position.z));
  13779. maidArray[8].body0.transform.localRotation = maidArray[6].body0.transform.localRotation;
  13780. }
  13781. if (maidArray[10] && maidArray[10].Visible)
  13782. {
  13783. maidArray[10].SetPos(new Vector3(maidArray[9].transform.position.x,
  13784. maidArray[9].transform.position.y,
  13785. maidArray[9].transform.position.z));
  13786. maidArray[10].body0.transform.localRotation = maidArray[9].body0.transform.localRotation;
  13787. }
  13788. if (maidArray[11] && maidArray[11].Visible)
  13789. {
  13790. maidArray[11].SetPos(new Vector3(maidArray[9].transform.position.x,
  13791. maidArray[9].transform.position.y,
  13792. maidArray[9].transform.position.z));
  13793. maidArray[11].body0.transform.localRotation = maidArray[9].body0.transform.localRotation;
  13794. }
  13795. if (maidArray[13] && maidArray[13].Visible)
  13796. {
  13797. maidArray[13].SetPos(new Vector3(maidArray[12].transform.position.x,
  13798. maidArray[12].transform.position.y,
  13799. maidArray[12].transform.position.z));
  13800. maidArray[13].body0.transform.localRotation = maidArray[12].body0.transform.localRotation;
  13801. }
  13802. isDance = true;
  13803. isDanceStart14 = true;
  13804. isSN4 = false;
  13805. isSN5 = false;
  13806. isSN6 = false;
  13807. }
  13808. if (isSD1)
  13809. {
  13810. audioSourceBgm = GameMain.Instance.SoundMgr.GetAudioSourceBgm();
  13811. GameMain.Instance.SoundMgr.PlayBGM("se002.ogg", 0f, false);
  13812. for (int j = 0; j < maidCnt; j++)
  13813. {
  13814. TextAsset textAsset = Resources.Load("SceneDance/uta_mmlop_mix_Bok") as TextAsset;
  13815. string text5 = "dance_cmo_002_sd_f1.anm";
  13816. switch (j)
  13817. {
  13818. case 1:
  13819. case 3:
  13820. case 5:
  13821. case 7:
  13822. case 9:
  13823. case 11:
  13824. case 13:
  13825. text5 = "dance_cmo_002_sd_f2.anm";
  13826. textAsset = (Resources.Load("SceneDance/uta_mmlop_mix_Aok") as TextAsset);
  13827. break;
  13828. }
  13829. danceName[j] = text5;
  13830. if (maidArray[j] && maidArray[j].Visible)
  13831. {
  13832. if (!maidArray[j].body0.m_Bones.GetComponent<Animation>().GetClip(text5))
  13833. {
  13834. maidArray[j].body0.LoadAnime(text5, GameUty.FileSystem, text5, false, false);
  13835. }
  13836. string text4 = textAsset.text;
  13837. text4 = Regex.Replace(text4, "(\\r|\\n| )", string.Empty);
  13838. maidArray[j].StartKuchipakuPattern(0f, text4, true);
  13839. m_baKuchipakuPattern[j] = Convert.FromBase64String(text4);
  13840. }
  13841. }
  13842. GameMain.Instance.SoundMgr.PlayDanceBGM("selfishdestiny_due_short_1.ogg", 0f, false);
  13843. ikBui = 5;
  13844. isDanceStart1F = false;
  13845. isDanceStart2F = false;
  13846. isDanceStart3F = false;
  13847. isDanceStart4F = false;
  13848. isDanceStart5F = false;
  13849. isDanceStart6F = false;
  13850. isDanceStart7F = false;
  13851. isDanceStart8F = false;
  13852. isDanceStart9F = false;
  13853. isDanceStart10F = false;
  13854. isDanceStart11F = false;
  13855. isDanceStart12F = false;
  13856. isDanceStart13F = false;
  13857. isDanceStart14F = false;
  13858. isDanceStart15F = false;
  13859. for (int j = 0; j < maidCnt; j++)
  13860. {
  13861. danceFace[j] = 0f;
  13862. }
  13863. if (isDanceStart7V)
  13864. {
  13865. for (int j = 0; j < maidCnt; j++)
  13866. {
  13867. if (maidArray[j] && maidArray[j].Visible)
  13868. {
  13869. if (isDanceStart7V)
  13870. {
  13871. maidArray[j].SetPos(dancePos[j]);
  13872. maidArray[j].body0.transform.localRotation = danceRot[j];
  13873. }
  13874. }
  13875. }
  13876. isDanceStart7V = false;
  13877. }
  13878. if (isDanceStart8V)
  13879. {
  13880. for (int j = 0; j < maidCnt; j++)
  13881. {
  13882. if (maidArray[j] && maidArray[j].Visible)
  13883. {
  13884. if (isDanceStart8V)
  13885. {
  13886. maidArray[j].SetPos(dancePos[j]);
  13887. maidArray[j].body0.transform.localRotation = danceRot[j];
  13888. }
  13889. }
  13890. }
  13891. isDanceStart8V = false;
  13892. isDanceStart8P = false;
  13893. }
  13894. if (isDanceStart11V)
  13895. {
  13896. for (int j = 0; j < maidCnt; j++)
  13897. {
  13898. if (maidArray[j] && maidArray[j].Visible)
  13899. {
  13900. if (isDanceStart11V)
  13901. {
  13902. maidArray[j].SetPos(dancePos[j]);
  13903. maidArray[j].body0.transform.localRotation = danceRot[j];
  13904. }
  13905. }
  13906. }
  13907. isDanceStart11V = false;
  13908. }
  13909. if (isDanceStart1K || isDanceStart3K || isDanceStart4K || isDanceStart5K || isDanceStart6K || isDanceStart9K
  13910. || isDanceStart13K)
  13911. {
  13912. for (int j = 0; j < maidCnt; j++)
  13913. {
  13914. if (maidArray[j] && maidArray[j].Visible)
  13915. {
  13916. if (isDanceStart1K || isDanceStart3K || isDanceStart4K || isDanceStart5K || isDanceStart6K || isDanceStart9K
  13917. || isDanceStart13K)
  13918. {
  13919. maidArray[j].SetPos(dancePos[j]);
  13920. maidArray[j].body0.transform.localRotation = danceRot[j];
  13921. int i = j;
  13922. if (!isVR)
  13923. {
  13924. delCount[i] = 20;
  13925. if (goSlot[(int) selectList[i]] != null)
  13926. {
  13927. maidArray[i].body0.goSlot = new List<TBodySkin>(goSlot[(int) selectList[i]]);
  13928. for (int l = 0; l < bodyHit[(int) selectList[i]].Count; l++)
  13929. {
  13930. maidArray[i].body0.goSlot[l].bonehair.bodyhit = bodyHit[(int) selectList[i]][l];
  13931. }
  13932. }
  13933. }
  13934. Maid maid = maidArray[j];
  13935. maid.DelProp(MPN.handitem, true);
  13936. maid.DelProp(MPN.accvag, true);
  13937. maid.DelProp(MPN.accanl, true);
  13938. maid.DelProp(MPN.kousoku_upper, true);
  13939. maid.DelProp(MPN.kousoku_lower, true);
  13940. maid.AllProcPropSeqStart();
  13941. }
  13942. }
  13943. }
  13944. isDanceStart1K = false;
  13945. isDanceStart3K = false;
  13946. isDanceStart4K = false;
  13947. isDanceStart5K = false;
  13948. isDanceStart6K = false;
  13949. isDanceStart9K = false;
  13950. isDanceStart13K = false;
  13951. }
  13952. if (isDanceStart14V)
  13953. {
  13954. for (int j = 0; j < maidCnt; j++)
  13955. {
  13956. if (maidArray[j] && maidArray[j].Visible)
  13957. {
  13958. if (isDanceStart14V)
  13959. {
  13960. maidArray[j].SetPos(dancePos[j]);
  13961. maidArray[j].body0.transform.localRotation = danceRot[j];
  13962. }
  13963. }
  13964. }
  13965. isDanceStart14V = false;
  13966. }
  13967. if (isDanceStart15V)
  13968. {
  13969. for (int j = 0; j < maidCnt; j++)
  13970. {
  13971. if (maidArray[j] && maidArray[j].Visible)
  13972. {
  13973. if (isDanceStart15V)
  13974. {
  13975. maidArray[j].SetPos(dancePos[j]);
  13976. maidArray[j].body0.transform.localRotation = danceRot[j];
  13977. }
  13978. }
  13979. }
  13980. isDanceStart15V = false;
  13981. }
  13982. for (int j = 0; j < maidCnt; j++)
  13983. {
  13984. isStop[j] = false;
  13985. isLock[j] = false;
  13986. pHandL[j] = 0;
  13987. pHandR[j] = 0;
  13988. muneIKL[j] = false;
  13989. muneIKR[j] = false;
  13990. if (!isVR)
  13991. {
  13992. maidArray[j].body0.quaDefEyeL.eulerAngles = eyeL[(int) selectList[j]];
  13993. maidArray[j].body0.quaDefEyeR.eulerAngles = eyeR[(int) selectList[j]];
  13994. }
  13995. if (maidArray[j].transform.position.y != 100f)
  13996. {
  13997. dancePos[j] = maidArray[j].transform.position;
  13998. }
  13999. else
  14000. {
  14001. dancePos[j] = new Vector3(maidArray[j].transform.position.x, 0f, maidArray[j].transform.position.z);
  14002. }
  14003. danceRot[j] = maidArray[j].transform.localRotation;
  14004. }
  14005. if (maidArray[0] && maidArray[0].Visible && maidArray[1] && maidArray[1].Visible)
  14006. {
  14007. maidArray[0].SetPos(new Vector3((maidArray[0].transform.position.x + maidArray[1].transform.position.x) / 2f,
  14008. (maidArray[0].transform.position.y + maidArray[1].transform.position.y) / 2f,
  14009. (maidArray[0].transform.position.z + maidArray[1].transform.position.z) / 2f));
  14010. maidArray[0].body0.transform.localRotation =
  14011. Quaternion.Lerp(maidArray[0].transform.localRotation, maidArray[1].transform.localRotation, 0.5f);
  14012. }
  14013. if (maidArray[2] && maidArray[2].Visible && maidArray[3] && maidArray[3].Visible)
  14014. {
  14015. maidArray[2].SetPos(new Vector3((maidArray[2].transform.position.x + maidArray[3].transform.position.x) / 2f,
  14016. (maidArray[2].transform.position.y + maidArray[3].transform.position.y) / 2f,
  14017. (maidArray[2].transform.position.z + maidArray[3].transform.position.z) / 2f));
  14018. maidArray[2].body0.transform.localRotation =
  14019. Quaternion.Lerp(maidArray[2].transform.localRotation, maidArray[3].transform.localRotation, 0.5f);
  14020. }
  14021. if (maidArray[4] && maidArray[4].Visible && maidArray[5] && maidArray[5].Visible)
  14022. {
  14023. maidArray[4].SetPos(new Vector3((maidArray[4].transform.position.x + maidArray[5].transform.position.x) / 2f,
  14024. (maidArray[4].transform.position.y + maidArray[5].transform.position.y) / 2f,
  14025. (maidArray[4].transform.position.z + maidArray[5].transform.position.z) / 2f));
  14026. maidArray[4].body0.transform.localRotation =
  14027. Quaternion.Lerp(maidArray[4].transform.localRotation, maidArray[5].transform.localRotation, 0.5f);
  14028. }
  14029. if (maidArray[6] && maidArray[6].Visible && maidArray[7] && maidArray[7].Visible)
  14030. {
  14031. maidArray[6].SetPos(new Vector3((maidArray[6].transform.position.x + maidArray[7].transform.position.x) / 2f,
  14032. (maidArray[6].transform.position.y + maidArray[7].transform.position.y) / 2f,
  14033. (maidArray[6].transform.position.z + maidArray[7].transform.position.z) / 2f));
  14034. maidArray[6].body0.transform.localRotation =
  14035. Quaternion.Lerp(maidArray[6].transform.localRotation, maidArray[7].transform.localRotation, 0.5f);
  14036. }
  14037. if (maidArray[8] && maidArray[8].Visible && maidArray[9] && maidArray[9].Visible)
  14038. {
  14039. maidArray[8].SetPos(new Vector3((maidArray[8].transform.position.x + maidArray[9].transform.position.x) / 2f,
  14040. (maidArray[8].transform.position.y + maidArray[9].transform.position.y) / 2f,
  14041. (maidArray[8].transform.position.z + maidArray[9].transform.position.z) / 2f));
  14042. maidArray[8].body0.transform.localRotation =
  14043. Quaternion.Lerp(maidArray[8].transform.localRotation, maidArray[9].transform.localRotation, 0.5f);
  14044. }
  14045. if (maidArray[10] && maidArray[10].Visible && maidArray[11] && maidArray[11].Visible)
  14046. {
  14047. maidArray[10].SetPos(new Vector3((maidArray[10].transform.position.x + maidArray[11].transform.position.x) / 2f,
  14048. (maidArray[10].transform.position.y + maidArray[11].transform.position.y) / 2f,
  14049. (maidArray[10].transform.position.z + maidArray[11].transform.position.z) / 2f));
  14050. maidArray[10].body0.transform.localRotation =
  14051. Quaternion.Lerp(maidArray[10].transform.localRotation, maidArray[11].transform.localRotation, 0.5f);
  14052. }
  14053. if (maidArray[12] && maidArray[12].Visible && maidArray[13] && maidArray[13].Visible)
  14054. {
  14055. maidArray[12].SetPos(new Vector3((maidArray[12].transform.position.x + maidArray[13].transform.position.x) / 2f,
  14056. (maidArray[12].transform.position.y + maidArray[13].transform.position.y) / 2f,
  14057. (maidArray[12].transform.position.z + maidArray[13].transform.position.z) / 2f));
  14058. maidArray[12].body0.transform.localRotation =
  14059. Quaternion.Lerp(maidArray[12].transform.localRotation, maidArray[13].transform.localRotation, 0.5f);
  14060. }
  14061. if (maidArray[1] && maidArray[1].Visible)
  14062. {
  14063. maidArray[1].SetPos(new Vector3(maidArray[0].transform.position.x,
  14064. maidArray[0].transform.position.y,
  14065. maidArray[0].transform.position.z));
  14066. maidArray[1].body0.transform.localRotation = maidArray[0].body0.transform.localRotation;
  14067. }
  14068. if (maidArray[3] && maidArray[3].Visible)
  14069. {
  14070. maidArray[3].SetPos(new Vector3(maidArray[2].transform.position.x,
  14071. maidArray[2].transform.position.y,
  14072. maidArray[2].transform.position.z));
  14073. maidArray[3].body0.transform.localRotation = maidArray[2].body0.transform.localRotation;
  14074. }
  14075. if (maidArray[5] && maidArray[5].Visible)
  14076. {
  14077. maidArray[5].SetPos(new Vector3(maidArray[4].transform.position.x,
  14078. maidArray[4].transform.position.y,
  14079. maidArray[4].transform.position.z));
  14080. maidArray[5].body0.transform.localRotation = maidArray[4].body0.transform.localRotation;
  14081. }
  14082. if (maidArray[7] && maidArray[7].Visible)
  14083. {
  14084. maidArray[7].SetPos(new Vector3(maidArray[6].transform.position.x,
  14085. maidArray[6].transform.position.y,
  14086. maidArray[6].transform.position.z));
  14087. maidArray[7].body0.transform.localRotation = maidArray[6].body0.transform.localRotation;
  14088. }
  14089. if (maidArray[9] && maidArray[9].Visible)
  14090. {
  14091. maidArray[9].SetPos(new Vector3(maidArray[8].transform.position.x,
  14092. maidArray[8].transform.position.y,
  14093. maidArray[8].transform.position.z));
  14094. maidArray[9].body0.transform.localRotation = maidArray[8].body0.transform.localRotation;
  14095. }
  14096. if (maidArray[11] && maidArray[11].Visible)
  14097. {
  14098. maidArray[11].SetPos(new Vector3(maidArray[10].transform.position.x,
  14099. maidArray[10].transform.position.y,
  14100. maidArray[10].transform.position.z));
  14101. maidArray[11].body0.transform.localRotation = maidArray[10].body0.transform.localRotation;
  14102. }
  14103. if (maidArray[13] && maidArray[13].Visible)
  14104. {
  14105. maidArray[13].SetPos(new Vector3(maidArray[12].transform.position.x,
  14106. maidArray[12].transform.position.y,
  14107. maidArray[12].transform.position.z));
  14108. maidArray[13].body0.transform.localRotation = maidArray[12].body0.transform.localRotation;
  14109. }
  14110. if (maidArray[2] && maidArray[2].Visible)
  14111. {
  14112. if (maidArray[0].transform.position == maidArray[2].transform.position)
  14113. {
  14114. Vector3 vector = Vector3.zero;
  14115. vector.x = 0.6f;
  14116. maidArray[1].SetPos(vector);
  14117. if (maidArray[2] && maidArray[2].Visible)
  14118. {
  14119. vector.x = -0.6f;
  14120. maidArray[2].SetPos(vector);
  14121. }
  14122. if (maidArray[3] && maidArray[3].Visible)
  14123. {
  14124. vector.x = 1.2f;
  14125. maidArray[3].SetPos(vector);
  14126. }
  14127. if (maidArray[4] && maidArray[4].Visible)
  14128. {
  14129. vector.x = -1.2f;
  14130. maidArray[4].SetPos(vector);
  14131. }
  14132. if (maidArray[5] && maidArray[5].Visible)
  14133. {
  14134. vector.x = 1.8f;
  14135. maidArray[5].SetPos(vector);
  14136. }
  14137. if (maidArray[6] && maidArray[6].Visible)
  14138. {
  14139. vector.x = -1.8f;
  14140. maidArray[6].SetPos(vector);
  14141. }
  14142. if (maidArray[7] && maidArray[7].Visible)
  14143. {
  14144. vector.x = 2.4f;
  14145. maidArray[7].SetPos(vector);
  14146. }
  14147. if (maidArray[8] && maidArray[8].Visible)
  14148. {
  14149. vector.x = -2.4f;
  14150. maidArray[8].SetPos(vector);
  14151. }
  14152. if (maidArray[9] && maidArray[9].Visible)
  14153. {
  14154. vector.x = 3f;
  14155. maidArray[9].SetPos(vector);
  14156. }
  14157. if (maidArray[10] && maidArray[10].Visible)
  14158. {
  14159. vector.x = -3f;
  14160. maidArray[10].SetPos(vector);
  14161. }
  14162. if (maidArray[11] && maidArray[11].Visible)
  14163. {
  14164. vector.x = 3.6f;
  14165. maidArray[11].SetPos(vector);
  14166. }
  14167. if (maidArray[12] && maidArray[12].Visible)
  14168. {
  14169. vector.x = -3.6f;
  14170. maidArray[12].SetPos(vector);
  14171. }
  14172. if (maidArray[13] && maidArray[13].Visible)
  14173. {
  14174. vector.x = 4.2f;
  14175. maidArray[13].SetPos(vector);
  14176. }
  14177. }
  14178. }
  14179. isDance = true;
  14180. isDanceStart15 = true;
  14181. isSD1 = false;
  14182. }
  14183. if (Input.GetKeyDown(KeyCode.Keypad1) || Input.GetKeyDown(KeyCode.Keypad2) || Input.GetKeyDown(KeyCode.Keypad3)
  14184. || Input.GetKeyDown(KeyCode.Keypad4) || Input.GetKeyDown(KeyCode.Keypad5) || Input.GetKeyDown(KeyCode.Keypad6)
  14185. || Input.GetKeyDown(KeyCode.Keypad7) || Input.GetKeyDown(KeyCode.Keypad8) || Input.GetKeyDown(KeyCode.Keypad9)
  14186. || Input.GetKeyDown(KeyCode.Keypad0))
  14187. {
  14188. for (int j = 0; j < maidCnt; j++)
  14189. {
  14190. if (maidArray[j] && maidArray[j].Visible)
  14191. {
  14192. if (!isVR)
  14193. {
  14194. if (goSlot[(int) selectList[j]] != null)
  14195. {
  14196. maidArray[j].body0.goSlot = new List<TBodySkin>(goSlot[(int) selectList[j]]);
  14197. for (int l = 0; l < bodyHit[(int) selectList[j]].Count; l++)
  14198. {
  14199. maidArray[j].body0.goSlot[l].bonehair.bodyhit = bodyHit[(int) selectList[j]][l];
  14200. }
  14201. }
  14202. }
  14203. }
  14204. }
  14205. }
  14206. if (!Input.GetKeyUp(KeyCode.Return) && Input.GetKeyUp(KeyCode.H) && !hFlg)
  14207. {
  14208. if (h2Flg)
  14209. {
  14210. h2Flg = false;
  14211. }
  14212. else
  14213. {
  14214. string text4 = "";
  14215. if (wearIndex == 0)
  14216. {
  14217. text4 = "Underwear";
  14218. wearIndex = 1;
  14219. isWear = false;
  14220. isSkirt = false;
  14221. isBra = true;
  14222. isPanz = true;
  14223. isHeadset = false;
  14224. isGlove = false;
  14225. isStkg = true;
  14226. isShoes = false;
  14227. }
  14228. else if (wearIndex == 1)
  14229. {
  14230. text4 = "Nude";
  14231. wearIndex = 2;
  14232. isWear = false;
  14233. isSkirt = false;
  14234. isBra = false;
  14235. isPanz = false;
  14236. isHeadset = false;
  14237. isGlove = false;
  14238. isStkg = false;
  14239. isShoes = false;
  14240. }
  14241. else if (wearIndex == 2)
  14242. {
  14243. text4 = "None";
  14244. wearIndex = 0;
  14245. isWear = true;
  14246. isSkirt = true;
  14247. isBra = true;
  14248. isPanz = true;
  14249. isHeadset = true;
  14250. isGlove = true;
  14251. isStkg = true;
  14252. isShoes = true;
  14253. }
  14254. TBody.MaskMode maskMode = (TBody.MaskMode) ((int) Enum.Parse(typeof(TBody.MaskMode), text4));
  14255. for (int j = 0; j < maidCnt; j++)
  14256. {
  14257. if (maidArray[j] && maidArray[j].Visible)
  14258. {
  14259. if (!isVR)
  14260. {
  14261. if (goSlot[(int) selectList[j]] != null)
  14262. {
  14263. maidArray[j].body0.goSlot = new List<TBodySkin>(goSlot[(int) selectList[j]]);
  14264. for (int l = 0; l < bodyHit[(int) selectList[j]].Count; l++)
  14265. {
  14266. maidArray[j].body0.goSlot[l].bonehair.bodyhit = bodyHit[(int) selectList[j]][l];
  14267. }
  14268. }
  14269. }
  14270. maidArray[j].body0.SetMaskMode(maskMode);
  14271. }
  14272. }
  14273. }
  14274. }
  14275. if (this.getModKeyPressing(modKey.Ctrl) && Input.GetKeyDown(KeyCode.S) && !sFlg)
  14276. {
  14277. saveScene = 9999;
  14278. saveScene2 = saveScene;
  14279. GameMain.Instance.SoundMgr.PlaySe("se002.ogg", false);
  14280. try
  14281. {
  14282. thum_byte_to_base64_ = string.Empty;
  14283. thum_file_path_ = Path.Combine(Path.GetTempPath(), "cm3d2_" + Guid.NewGuid().ToString() + ".png");
  14284. GameMain.Instance.MainCamera.ScreenShot(thum_file_path_, 1, false);
  14285. }
  14286. catch { }
  14287. }
  14288. if (this.getModKeyPressing(modKey.Ctrl) && Input.GetKeyDown(KeyCode.A))
  14289. {
  14290. loadScene = 9999;
  14291. GameMain.Instance.SoundMgr.PlaySe("se002.ogg", false);
  14292. }
  14293. if (isScreen)
  14294. {
  14295. isScreen = false;
  14296. bGui = isGui;
  14297. isGui = false;
  14298. if (!isMessage)
  14299. {
  14300. foreach (UICamera uicamera in ui_cam_hide_list_)
  14301. {
  14302. uicamera.GetComponent<Camera>().enabled = true;
  14303. }
  14304. ui_cam_hide_list_.Clear();
  14305. }
  14306. else
  14307. {
  14308. if (editUI != null)
  14309. {
  14310. editUI.SetActive(true);
  14311. }
  14312. if (GameMain.Instance.CMSystem.ViewFps)
  14313. {
  14314. GameObject childObject = UTY.GetChildObject(GameMain.Instance.gameObject, "SystemUI Root/FpsCounter", false);
  14315. childObject.SetActive(true);
  14316. }
  14317. GameObject childObject2 = UTY.GetChildObject(GameMain.Instance.gameObject, "SystemUI Root/SystemDialog", false);
  14318. GameObject childObject3 = UTY.GetChildObject(GameMain.Instance.gameObject, "SystemUI Root/SystemShortcut", false);
  14319. childObject2.SetActive(true);
  14320. childObject3.SetActive(true);
  14321. }
  14322. for (int j = 0; j < maidCnt; j++)
  14323. {
  14324. if (maidArray[j] && maidArray[j].Visible)
  14325. {
  14326. isBone[j] = isBoneN[j];
  14327. if (isBone[j])
  14328. {
  14329. gNeck[j].SetActive(true);
  14330. gSpine[j].SetActive(true);
  14331. gSpine0a[j].SetActive(true);
  14332. gSpine1a[j].SetActive(true);
  14333. gSpine1[j].SetActive(true);
  14334. gPelvis[j].SetActive(true);
  14335. gHandL[j].SetActive(true);
  14336. gArmL[j].SetActive(true);
  14337. gFootL[j].SetActive(true);
  14338. gHizaL[j].SetActive(true);
  14339. gHandR[j].SetActive(true);
  14340. gArmR[j].SetActive(true);
  14341. gFootR[j].SetActive(true);
  14342. gHizaR[j].SetActive(true);
  14343. gClavicleL[j].SetActive(true);
  14344. gClavicleR[j].SetActive(true);
  14345. }
  14346. }
  14347. }
  14348. }
  14349. if (isScreen2)
  14350. {
  14351. isScreen = true;
  14352. isScreen2 = false;
  14353. }
  14354. if (!isVR && Input.GetKeyDown(KeyCode.S) && !sFlg && !Input.GetKey(KeyCode.KeypadEnter) && !Input.GetKey(KeyCode.Return)
  14355. && !Input.GetKey(KeyCode.Q))
  14356. {
  14357. if (!Input.GetKey(KeyCode.LeftShift) && !Input.GetKey(KeyCode.LeftAlt) && !this.getModKeyPressing(modKey.Ctrl))
  14358. {
  14359. isScreen = true;
  14360. for (int j = 0; j < maidCnt; j++)
  14361. {
  14362. if (maidArray[j] && maidArray[j].Visible)
  14363. {
  14364. if (isBone[j])
  14365. {
  14366. gNeck[j].SetActive(false);
  14367. gSpine[j].SetActive(false);
  14368. gSpine0a[j].SetActive(false);
  14369. gSpine1a[j].SetActive(false);
  14370. gSpine1[j].SetActive(false);
  14371. gPelvis[j].SetActive(false);
  14372. gHandL[j].SetActive(false);
  14373. gArmL[j].SetActive(false);
  14374. gFootL[j].SetActive(false);
  14375. gHizaL[j].SetActive(false);
  14376. gHandR[j].SetActive(false);
  14377. gArmR[j].SetActive(false);
  14378. gFootR[j].SetActive(false);
  14379. gHizaR[j].SetActive(false);
  14380. gClavicleL[j].SetActive(false);
  14381. gClavicleR[j].SetActive(false);
  14382. }
  14383. isBoneN[j] = isBone[j];
  14384. isBone[j] = false;
  14385. }
  14386. }
  14387. if (!isMessage)
  14388. {
  14389. ui_cam_hide_list_.Clear();
  14390. UICamera[] array16 = NGUITools.FindActive<UICamera>();
  14391. foreach (UICamera uicamera2 in array16)
  14392. {
  14393. if (uicamera2.GetComponent<Camera>().enabled)
  14394. {
  14395. uicamera2.GetComponent<Camera>().enabled = false;
  14396. ui_cam_hide_list_.Add(uicamera2);
  14397. }
  14398. }
  14399. }
  14400. else
  14401. {
  14402. editUI = GameObject.Find("/UI Root/Camera");
  14403. if (editUI != null)
  14404. {
  14405. editUI.SetActive(false);
  14406. }
  14407. if (GameMain.Instance.CMSystem.ViewFps)
  14408. {
  14409. GameObject childObject =
  14410. UTY.GetChildObject(GameMain.Instance.gameObject, "SystemUI Root/FpsCounter", false);
  14411. childObject.SetActive(false);
  14412. }
  14413. GameObject childObject2 = UTY.GetChildObject(GameMain.Instance.gameObject, "SystemUI Root/SystemDialog", false);
  14414. GameObject childObject3 =
  14415. UTY.GetChildObject(GameMain.Instance.gameObject, "SystemUI Root/SystemShortcut", false);
  14416. childObject2.SetActive(false);
  14417. childObject3.SetActive(false);
  14418. }
  14419. isGui = bGui;
  14420. bGui = false;
  14421. GameMain.Instance.MainCamera.ScreenShot(false);
  14422. GameMain.Instance.SoundMgr.PlaySe("se022.ogg", false);
  14423. }
  14424. }
  14425. if (!isVR && Input.GetKey(KeyCode.Q) && Input.GetKey(KeyCode.U) && !qFlg)
  14426. {
  14427. mainCameraTransform.Rotate(0f, 0f, -0.15f);
  14428. keyFlg2 = true;
  14429. }
  14430. else if (!isVR && Input.GetKey(KeyCode.Q) && Input.GetKey(KeyCode.O) && !qFlg)
  14431. {
  14432. mainCameraTransform.Rotate(0f, 0f, 0.15f);
  14433. keyFlg2 = true;
  14434. }
  14435. else if (!isVR && Input.GetKey(KeyCode.Q) && Input.GetKeyDown(KeyCode.BackQuote) && !qFlg)
  14436. {
  14437. mainCameraTransform.eulerAngles =
  14438. new Vector3(mainCameraTransform.rotation.eulerAngles.x, mainCameraTransform.rotation.eulerAngles.y, 0f);
  14439. keyFlg2 = true;
  14440. }
  14441. else if (!isVR && Input.GetKey(KeyCode.Q) && Input.GetKeyDown(KeyCode.R) && !qFlg)
  14442. {
  14443. GameMain.Instance.MainCamera.Reset(CameraMain.CameraType.Target, true);
  14444. mainCamera.SetTargetPos(new Vector3(0f, 0.9f, 0f), true);
  14445. mainCamera.SetDistance(3f, true);
  14446. keyFlg2 = true;
  14447. }
  14448. else if (!isVR && Input.GetKey(KeyCode.Q) && Input.GetKeyDown(KeyCode.S) && !qFlg)
  14449. {
  14450. cameraIti = mainCamera.GetTargetPos();
  14451. cameraIti2 = mainCamera.GetPos();
  14452. cameraItiAngle = mainCamera.GetAroundAngle();
  14453. cameraItiDistance = mainCamera.GetDistance();
  14454. keyFlg2 = true;
  14455. }
  14456. else if (!isVR && Input.GetKey(KeyCode.Q) && Input.GetKeyDown(KeyCode.A) && !qFlg)
  14457. {
  14458. mainCamera.SetTargetPos(cameraIti, true);
  14459. mainCamera.SetPos(cameraIti2);
  14460. mainCamera.SetAroundAngle(cameraItiAngle, true);
  14461. mainCamera.SetDistance(cameraItiDistance, true);
  14462. keyFlg2 = true;
  14463. }
  14464. else if (!isVR && Input.GetKeyUp(KeyCode.Q) && !qFlg)
  14465. {
  14466. if (keyFlg2)
  14467. {
  14468. keyFlg2 = false;
  14469. }
  14470. else
  14471. {
  14472. effectIndex++;
  14473. if (effectIndex == 9)
  14474. {
  14475. kami.SetActive(false);
  14476. effectIndex = 0;
  14477. }
  14478. Vignetting component3 = GameMain.Instance.MainCamera.gameObject.GetComponent<Vignetting>();
  14479. if (!isBlur)
  14480. {
  14481. component3.mode = Vignetting.AberrationMode.Simple;
  14482. component3.intensity = -3.98f;
  14483. component3.chromaticAberration = -0.75f;
  14484. component3.axialAberration = 1.18f;
  14485. component3.blurSpread = 4.19f;
  14486. component3.luminanceDependency = 0.494f;
  14487. component3.blurDistance = 1.71f;
  14488. component3.enabled = false;
  14489. }
  14490. if (kami) { }
  14491. if (effectIndex == 0)
  14492. {
  14493. component3.enabled = false;
  14494. }
  14495. if (effectIndex == 1)
  14496. {
  14497. component3.mode = Vignetting.AberrationMode.Simple;
  14498. component3.intensity = -1f;
  14499. component3.chromaticAberration = 0f;
  14500. component3.axialAberration = 0f;
  14501. component3.blurSpread = 5f;
  14502. component3.luminanceDependency = 0f;
  14503. component3.blurDistance = 0f;
  14504. component3.enabled = true;
  14505. }
  14506. if (effectIndex == 2)
  14507. {
  14508. component3.enabled = true;
  14509. }
  14510. if (effectIndex == 3)
  14511. {
  14512. component3.mode = Vignetting.AberrationMode.Simple;
  14513. component3.intensity = 9f;
  14514. component3.chromaticAberration = 0f;
  14515. component3.axialAberration = 0f;
  14516. component3.blurSpread = 5f;
  14517. component3.luminanceDependency = 0f;
  14518. component3.blurDistance = 0f;
  14519. component3.enabled = true;
  14520. }
  14521. if (effectIndex == 4)
  14522. {
  14523. Object @object = Resources.Load("Prefab/p_kamihubuki_photo_ver");
  14524. kami = (GameObject) Instantiate(@object);
  14525. Vector3 localPosition = kami.transform.localPosition;
  14526. localPosition.y = 3.5f;
  14527. kami.transform.localPosition = localPosition;
  14528. }
  14529. if (effectIndex == 5)
  14530. {
  14531. component3.enabled = true;
  14532. component3.mode = Vignetting.AberrationMode.Simple;
  14533. component3.intensity = -2.5f;
  14534. component3.chromaticAberration = -0.3f;
  14535. component3.axialAberration = 0.5f;
  14536. component3.blurSpread = 4.5f;
  14537. component3.luminanceDependency = 0.2f;
  14538. component3.blurDistance = 0.8f;
  14539. component3.enabled = true;
  14540. }
  14541. if (effectIndex == 6)
  14542. {
  14543. kami.SetActive(false);
  14544. Object @object = Resources.Load("Prefab/p_powder_snow_photo_ver");
  14545. kami = (GameObject) Instantiate(@object);
  14546. Vector3 localPosition = kami.transform.localPosition;
  14547. localPosition.y = 3.5f;
  14548. kami.transform.localPosition = localPosition;
  14549. }
  14550. if (effectIndex == 7)
  14551. {
  14552. component3.enabled = true;
  14553. component3.mode = Vignetting.AberrationMode.Simple;
  14554. component3.intensity = -2.5f;
  14555. component3.chromaticAberration = -0.3f;
  14556. component3.axialAberration = 0.5f;
  14557. component3.blurSpread = 4.5f;
  14558. component3.luminanceDependency = 0.2f;
  14559. component3.blurDistance = 0.8f;
  14560. component3.enabled = true;
  14561. }
  14562. if (effectIndex == 8)
  14563. {
  14564. component3.mode = Vignetting.AberrationMode.Simple;
  14565. component3.intensity = 8f;
  14566. component3.chromaticAberration = 0f;
  14567. component3.axialAberration = 0f;
  14568. component3.blurSpread = 5f;
  14569. component3.luminanceDependency = 0f;
  14570. component3.blurDistance = 0f;
  14571. component3.enabled = true;
  14572. }
  14573. }
  14574. }
  14575. if (!isVR && Input.GetKeyUp(KeyCode.Q) && qFlg)
  14576. {
  14577. qFlg = false;
  14578. }
  14579. if (Input.GetKey(KeyCode.A) && !Input.GetKey(KeyCode.Space))
  14580. {
  14581. bool flag5 = false;
  14582. for (int k = 0; k < keyArray.Length; k++)
  14583. {
  14584. if (Input.GetKey(keyArray[k]))
  14585. {
  14586. flag5 = true;
  14587. break;
  14588. }
  14589. }
  14590. if (!this.getModKeyPressing(modKey.Shift))
  14591. {
  14592. if (!flag5)
  14593. {
  14594. Vector3 vector2 = mainCameraTransform.TransformDirection(Vector3.forward);
  14595. Vector3 vector3 = mainCameraTransform.TransformDirection(Vector3.right);
  14596. Vector3 vector4 = mainCameraTransform.TransformDirection(Vector3.up);
  14597. if (Input.GetKey(KeyCode.A) && Input.GetKey(KeyCode.I) && Input.GetKey(KeyCode.J))
  14598. {
  14599. Vector3 vector = softG;
  14600. vector += new Vector3(vector2.x, 0f, vector2.z) * 6E-05f * speed;
  14601. vector += new Vector3(vector3.x, 0f, vector3.z) * -6E-05f * speed;
  14602. softG = vector;
  14603. }
  14604. else if (Input.GetKey(KeyCode.A) && Input.GetKey(KeyCode.I) && Input.GetKey(KeyCode.L))
  14605. {
  14606. Vector3 vector = softG;
  14607. vector += new Vector3(vector2.x, 0f, vector2.z) * 6E-05f * speed;
  14608. vector += new Vector3(vector3.x, 0f, vector3.z) * 6E-05f * speed;
  14609. softG = vector;
  14610. }
  14611. else if (Input.GetKey(KeyCode.A) && Input.GetKey(KeyCode.K) && Input.GetKey(KeyCode.J))
  14612. {
  14613. Vector3 vector = softG;
  14614. vector += new Vector3(vector2.x, 0f, vector2.z) * -6E-05f * speed;
  14615. vector += new Vector3(vector3.x, 0f, vector3.z) * -6E-05f * speed;
  14616. softG = vector;
  14617. }
  14618. else if (Input.GetKey(KeyCode.A) && Input.GetKey(KeyCode.K) && Input.GetKey(KeyCode.L))
  14619. {
  14620. Vector3 vector = softG;
  14621. vector += new Vector3(vector2.x, 0f, vector2.z) * -6E-05f * speed;
  14622. vector += new Vector3(vector3.x, 0f, vector3.z) * 6E-05f * speed;
  14623. softG = vector;
  14624. }
  14625. else if (Input.GetKey(KeyCode.A) && Input.GetKey(KeyCode.I))
  14626. {
  14627. Vector3 vector = softG;
  14628. vector += new Vector3(vector2.x, 0f, vector2.z) * 6E-05f * speed;
  14629. softG = vector;
  14630. }
  14631. else if (Input.GetKey(KeyCode.A) && Input.GetKey(KeyCode.K))
  14632. {
  14633. Vector3 vector = softG;
  14634. vector += new Vector3(vector2.x, 0f, vector2.z) * -6E-05f * speed;
  14635. softG = vector;
  14636. }
  14637. else if (Input.GetKey(KeyCode.A) && Input.GetKey(KeyCode.J))
  14638. {
  14639. Vector3 vector = softG;
  14640. vector += new Vector3(vector3.x, 0f, vector3.z) * -6E-05f * speed;
  14641. softG = vector;
  14642. }
  14643. else if (Input.GetKey(KeyCode.A) && Input.GetKey(KeyCode.L))
  14644. {
  14645. Vector3 vector = softG;
  14646. vector += new Vector3(vector3.x, 0f, vector3.z) * 6E-05f * speed;
  14647. softG = vector;
  14648. }
  14649. else if (Input.GetKey(KeyCode.A) && Input.GetKey(KeyCode.Alpha0))
  14650. {
  14651. Vector3 vector = softG;
  14652. vector.y += 6E-05f * speed;
  14653. softG = vector;
  14654. }
  14655. else if (Input.GetKey(KeyCode.A) && Input.GetKey(KeyCode.P))
  14656. {
  14657. Vector3 vector = softG;
  14658. vector.y -= 6E-05f * speed;
  14659. softG = vector;
  14660. }
  14661. else if (Input.GetKey(KeyCode.A) && Input.GetKey(KeyCode.BackQuote) && !atFlg)
  14662. {
  14663. softG = new Vector3(0f, -0.003f, 0f);
  14664. }
  14665. for (int j = 0; j < maidCnt; j++)
  14666. {
  14667. Maid maid = maidArray[j];
  14668. for (int l = 0; l < maid.body0.goSlot.Count; l++)
  14669. {
  14670. if (maid.body0.goSlot[l].obj != null)
  14671. {
  14672. DynamicBone component2 = maid.body0.goSlot[l].obj.GetComponent<DynamicBone>();
  14673. if (component2 != null && component2.enabled)
  14674. {
  14675. component2.m_Gravity = new Vector3(softG.x * 5f, (softG.y + 0.003f) * 5f, softG.z * 5f);
  14676. }
  14677. }
  14678. List<THair1> fieldValue3 =
  14679. GetFieldValue<TBoneHair_, List<THair1>>(maid.body0.goSlot[l].bonehair, "hair1list");
  14680. for (int k = 0; k < fieldValue3.Count; k++)
  14681. {
  14682. fieldValue3[k].SoftG = new Vector3(softG.x, softG.y + kamiyure, softG.z);
  14683. }
  14684. }
  14685. }
  14686. }
  14687. }
  14688. else if (!flag5)
  14689. {
  14690. Vector3 vector2 = mainCameraTransform.TransformDirection(Vector3.forward);
  14691. Vector3 vector3 = mainCameraTransform.TransformDirection(Vector3.right);
  14692. Vector3 vector4 = mainCameraTransform.TransformDirection(Vector3.up);
  14693. if (Input.GetKey(KeyCode.A) && Input.GetKey(KeyCode.I) && Input.GetKey(KeyCode.J))
  14694. {
  14695. Vector3 vector = softG2;
  14696. vector += new Vector3(vector2.x, 0f, vector2.z) * 4E-05f * speed;
  14697. vector += new Vector3(vector3.x, 0f, vector3.z) * -4E-05f * speed;
  14698. softG2 = vector;
  14699. }
  14700. else if (Input.GetKey(KeyCode.A) && Input.GetKey(KeyCode.I) && Input.GetKey(KeyCode.L))
  14701. {
  14702. Vector3 vector = softG2;
  14703. vector += new Vector3(vector2.x, 0f, vector2.z) * 4E-05f * speed;
  14704. vector += new Vector3(vector3.x, 0f, vector3.z) * 4E-05f * speed;
  14705. softG2 = vector;
  14706. }
  14707. else if (Input.GetKey(KeyCode.A) && Input.GetKey(KeyCode.K) && Input.GetKey(KeyCode.J))
  14708. {
  14709. Vector3 vector = softG2;
  14710. vector += new Vector3(vector2.x, 0f, vector2.z) * -4E-05f * speed;
  14711. vector += new Vector3(vector3.x, 0f, vector3.z) * -4E-05f * speed;
  14712. softG2 = vector;
  14713. }
  14714. else if (Input.GetKey(KeyCode.A) && Input.GetKey(KeyCode.K) && Input.GetKey(KeyCode.L))
  14715. {
  14716. Vector3 vector = softG2;
  14717. vector += new Vector3(vector2.x, 0f, vector2.z) * -4E-05f * speed;
  14718. vector += new Vector3(vector3.x, 0f, vector3.z) * 4E-05f * speed;
  14719. softG2 = vector;
  14720. }
  14721. else if (Input.GetKey(KeyCode.A) && Input.GetKey(KeyCode.I))
  14722. {
  14723. Vector3 vector = softG2;
  14724. vector += new Vector3(vector2.x, 0f, vector2.z) * 4E-05f * speed;
  14725. softG2 = vector;
  14726. }
  14727. else if (Input.GetKey(KeyCode.A) && Input.GetKey(KeyCode.K))
  14728. {
  14729. Vector3 vector = softG2;
  14730. vector += new Vector3(vector2.x, 0f, vector2.z) * -4E-05f * speed;
  14731. softG2 = vector;
  14732. }
  14733. else if (Input.GetKey(KeyCode.A) && Input.GetKey(KeyCode.J))
  14734. {
  14735. Vector3 vector = softG2;
  14736. vector += new Vector3(vector3.x, 0f, vector3.z) * -4E-05f * speed;
  14737. softG2 = vector;
  14738. }
  14739. else if (Input.GetKey(KeyCode.A) && Input.GetKey(KeyCode.L))
  14740. {
  14741. Vector3 vector = softG2;
  14742. vector += new Vector3(vector3.x, 0f, vector3.z) * 4E-05f * speed;
  14743. softG2 = vector;
  14744. }
  14745. else if (Input.GetKey(KeyCode.A) && Input.GetKey(KeyCode.Alpha0))
  14746. {
  14747. Vector3 vector = softG2;
  14748. vector.y += 2E-05f * speed;
  14749. softG2 = vector;
  14750. }
  14751. else if (Input.GetKey(KeyCode.A) && Input.GetKey(KeyCode.P))
  14752. {
  14753. Vector3 vector = softG2;
  14754. vector.y -= 2E-05f * speed;
  14755. softG2 = vector;
  14756. }
  14757. else if (Input.GetKey(KeyCode.A) && Input.GetKey(KeyCode.BackQuote) && !atFlg)
  14758. {
  14759. softG2 = new Vector3(0f, -0.005f, 0f);
  14760. }
  14761. for (int j = 0; j < maidCnt; j++)
  14762. {
  14763. Maid maid = maidArray[j];
  14764. for (int l = 0; l < maid.body0.goSlot.Count; l++)
  14765. {
  14766. if (maid.body0.goSlot[l].obj != null)
  14767. {
  14768. DynamicSkirtBone fieldValue8 =
  14769. GetFieldValue<BoneHair3, DynamicSkirtBone>(maidArray[j].body0.goSlot[l].bonehair3,
  14770. "m_SkirtBone");
  14771. if (fieldValue8 != null)
  14772. {
  14773. fieldValue8.m_vGravity = new Vector3(softG2.x, softG2.y, softG2.z);
  14774. MethodInfo method = fieldValue8
  14775. .GetType().GetMethod("UpdateParameters",
  14776. BindingFlags.Instance | BindingFlags.NonPublic);
  14777. method.Invoke(fieldValue8, null);
  14778. }
  14779. }
  14780. }
  14781. }
  14782. }
  14783. }
  14784. if (!isVR)
  14785. {
  14786. if (doguObject.Count > 0)
  14787. {
  14788. Vector3 vector2 = mainCameraTransform.TransformDirection(Vector3.forward);
  14789. Vector3 vector3 = mainCameraTransform.TransformDirection(Vector3.right);
  14790. Vector3 vector4 = mainCameraTransform.TransformDirection(Vector3.up);
  14791. if (doguObject[doguSelectIndex] && Input.GetKey(KeyCode.W) && Input.GetKey(KeyCode.E))
  14792. {
  14793. idoFlg2 = true;
  14794. doguObject[doguSelectIndex].transform.localScale =
  14795. new Vector3(doguObject[doguSelectIndex].transform.localScale.x * 1.005f,
  14796. doguObject[doguSelectIndex].transform.localScale.y * 1.005f,
  14797. doguObject[doguSelectIndex].transform.localScale.z * 1.005f);
  14798. }
  14799. else if (doguObject[doguSelectIndex] && Input.GetKey(KeyCode.W) && Input.GetKey(KeyCode.D))
  14800. {
  14801. idoFlg2 = true;
  14802. doguObject[doguSelectIndex].transform.localScale =
  14803. new Vector3(doguObject[doguSelectIndex].transform.localScale.x * 0.995f,
  14804. doguObject[doguSelectIndex].transform.localScale.y * 0.995f,
  14805. doguObject[doguSelectIndex].transform.localScale.z * 0.995f);
  14806. }
  14807. else if (doguObject[doguSelectIndex] && Input.GetKey(KeyCode.W) && Input.GetKeyDown(KeyCode.C))
  14808. {
  14809. idoFlg2 = true;
  14810. doguObject[doguSelectIndex].transform.localScale = new Vector3(1f, 1f, 1f);
  14811. }
  14812. else if (doguObject[doguSelectIndex] && Input.GetKey(KeyCode.W) && Input.GetKey(KeyCode.U))
  14813. {
  14814. doguObject[doguSelectIndex]
  14815. .transform.RotateAround(doguObject[doguSelectIndex].transform.position, Vector3.up, -0.7f);
  14816. idoFlg2 = true;
  14817. }
  14818. else if (doguObject[doguSelectIndex] && Input.GetKey(KeyCode.W) && Input.GetKey(KeyCode.O))
  14819. {
  14820. doguObject[doguSelectIndex]
  14821. .transform.RotateAround(doguObject[doguSelectIndex].transform.position, Vector3.up, 0.7f);
  14822. idoFlg2 = true;
  14823. }
  14824. else if (doguObject[doguSelectIndex] && Input.GetKey(KeyCode.W) && Input.GetKeyDown(KeyCode.BackQuote)
  14825. && this.getModKeyPressing(modKey.Alt))
  14826. {
  14827. for (int k = 0; k < 10; k++)
  14828. {
  14829. doguObject[doguSelectIndex].transform.RotateAround(doguObject[doguSelectIndex].transform.position,
  14830. Vector3.right,
  14831. -doguObject[doguSelectIndex]
  14832. .transform.rotation.eulerAngles.x);
  14833. doguObject[doguSelectIndex].transform.RotateAround(doguObject[doguSelectIndex].transform.position,
  14834. Vector3.forward,
  14835. -doguObject[doguSelectIndex]
  14836. .transform.rotation.eulerAngles.z);
  14837. }
  14838. idoFlg2 = true;
  14839. Vector3 vector = Vector3.zero;
  14840. Vector3 zero3 = Vector3.zero;
  14841. zero3.x = -90f;
  14842. int num12 = doguIndex[doguSelectIndex];
  14843. switch (num12)
  14844. {
  14845. case 3:
  14846. vector.z = 0.5f;
  14847. zero3.z = 90f;
  14848. break;
  14849. case 4:
  14850. case 5:
  14851. case 7:
  14852. case 10:
  14853. case 11: break;
  14854. case 6:
  14855. vector.z = 0.6f;
  14856. zero3.x = 0f;
  14857. break;
  14858. case 8:
  14859. vector.z = 0.5f;
  14860. zero3.x = 0f;
  14861. break;
  14862. case 9:
  14863. vector.z = 0.32f;
  14864. zero3.z = 180f;
  14865. break;
  14866. case 12:
  14867. vector.z = 0.5f;
  14868. zero3.z = 180f;
  14869. break;
  14870. case 13:
  14871. vector.z = 0.7f;
  14872. zero3.z = 180f;
  14873. break;
  14874. default:
  14875. if (num12 != 16)
  14876. {
  14877. switch (num12)
  14878. {
  14879. case 23:
  14880. vector.z = 2.7f;
  14881. vector.x = 0.77f;
  14882. zero3.z = 90f;
  14883. break;
  14884. case 25:
  14885. vector.z = 0.5f;
  14886. vector.y = 0.9f;
  14887. zero3.z = 180f;
  14888. break;
  14889. case 26:
  14890. vector.z = 0.5f;
  14891. vector.y = 0.9f;
  14892. zero3.z = 180f;
  14893. break;
  14894. case 30:
  14895. vector.z = 0f;
  14896. zero3.z = 0f;
  14897. break;
  14898. case 31:
  14899. vector.z = -0.6f;
  14900. vector.y = 0.96f;
  14901. zero3.z = 180f;
  14902. break;
  14903. case 32:
  14904. vector.z = -0.6f;
  14905. vector.y = 0.96f;
  14906. zero3.z = 180f;
  14907. break;
  14908. case 33:
  14909. vector.z = -0.6f;
  14910. vector.y = 0.85f;
  14911. zero3.z = 180f;
  14912. break;
  14913. }
  14914. }
  14915. else
  14916. {
  14917. vector.z = -0.4f;
  14918. zero3.z = 180f;
  14919. }
  14920. break;
  14921. }
  14922. doguObject[doguSelectIndex].transform.localRotation = Quaternion.Euler(zero3);
  14923. }
  14924. else if (Input.GetKey(KeyCode.W) && this.getModKeyPressing(modKey.Alt) && Input.GetKey(KeyCode.I)
  14925. && Input.GetKey(KeyCode.J))
  14926. {
  14927. doguObject[doguSelectIndex]
  14928. .transform.RotateAround(doguObject[doguSelectIndex].transform.position,
  14929. new Vector3(vector3.x, 0f, vector3.z),
  14930. 0.3f);
  14931. doguObject[doguSelectIndex]
  14932. .transform.RotateAround(doguObject[doguSelectIndex].transform.position,
  14933. new Vector3(vector2.x, 0f, vector2.z),
  14934. 0.3f);
  14935. idoFlg2 = true;
  14936. }
  14937. else if (Input.GetKey(KeyCode.W) && this.getModKeyPressing(modKey.Alt) && Input.GetKey(KeyCode.I)
  14938. && Input.GetKey(KeyCode.L))
  14939. {
  14940. doguObject[doguSelectIndex]
  14941. .transform.RotateAround(doguObject[doguSelectIndex].transform.position,
  14942. new Vector3(vector3.x, 0f, vector3.z),
  14943. 0.3f);
  14944. doguObject[doguSelectIndex].transform.RotateAround(doguObject[doguSelectIndex].transform.position,
  14945. new Vector3(vector2.x, 0f, vector2.z),
  14946. -0.3f);
  14947. idoFlg2 = true;
  14948. }
  14949. else if (Input.GetKey(KeyCode.W) && this.getModKeyPressing(modKey.Alt) && Input.GetKey(KeyCode.K)
  14950. && Input.GetKey(KeyCode.J))
  14951. {
  14952. doguObject[doguSelectIndex].transform.RotateAround(doguObject[doguSelectIndex].transform.position,
  14953. new Vector3(vector3.x, 0f, vector3.z),
  14954. -0.3f);
  14955. doguObject[doguSelectIndex]
  14956. .transform.RotateAround(doguObject[doguSelectIndex].transform.position,
  14957. new Vector3(vector2.x, 0f, vector2.z),
  14958. 0.3f);
  14959. idoFlg2 = true;
  14960. }
  14961. else if (Input.GetKey(KeyCode.W) && this.getModKeyPressing(modKey.Alt) && Input.GetKey(KeyCode.K)
  14962. && Input.GetKey(KeyCode.L))
  14963. {
  14964. doguObject[doguSelectIndex].transform.RotateAround(doguObject[doguSelectIndex].transform.position,
  14965. new Vector3(vector3.x, 0f, vector3.z),
  14966. -0.3f);
  14967. doguObject[doguSelectIndex].transform.RotateAround(doguObject[doguSelectIndex].transform.position,
  14968. new Vector3(vector2.x, 0f, vector2.z),
  14969. -0.3f);
  14970. idoFlg2 = true;
  14971. }
  14972. else if (Input.GetKey(KeyCode.W) && this.getModKeyPressing(modKey.Alt) && Input.GetKey(KeyCode.I))
  14973. {
  14974. doguObject[doguSelectIndex]
  14975. .transform.RotateAround(doguObject[doguSelectIndex].transform.position,
  14976. new Vector3(vector3.x, 0f, vector3.z),
  14977. 0.4f);
  14978. idoFlg2 = true;
  14979. }
  14980. else if (Input.GetKey(KeyCode.W) && this.getModKeyPressing(modKey.Alt) && Input.GetKey(KeyCode.K))
  14981. {
  14982. doguObject[doguSelectIndex].transform.RotateAround(doguObject[doguSelectIndex].transform.position,
  14983. new Vector3(vector3.x, 0f, vector3.z),
  14984. -0.4f);
  14985. idoFlg2 = true;
  14986. }
  14987. else if (Input.GetKey(KeyCode.W) && this.getModKeyPressing(modKey.Alt) && Input.GetKey(KeyCode.J))
  14988. {
  14989. doguObject[doguSelectIndex]
  14990. .transform.RotateAround(doguObject[doguSelectIndex].transform.position,
  14991. new Vector3(vector2.x, 0f, vector2.z),
  14992. 0.4f);
  14993. idoFlg2 = true;
  14994. }
  14995. else if (Input.GetKey(KeyCode.W) && this.getModKeyPressing(modKey.Alt) && Input.GetKey(KeyCode.L))
  14996. {
  14997. doguObject[doguSelectIndex].transform.RotateAround(doguObject[doguSelectIndex].transform.position,
  14998. new Vector3(vector2.x, 0f, vector2.z),
  14999. -0.4f);
  15000. idoFlg2 = true;
  15001. }
  15002. else if (Input.GetKey(KeyCode.W) && this.getModKeyPressing(modKey.Alt) && Input.GetKey(KeyCode.U))
  15003. {
  15004. doguObject[doguSelectIndex].transform.localRotation =
  15005. Quaternion.Euler(doguObject[doguSelectIndex].transform.localEulerAngles)
  15006. * Quaternion.AngleAxis(-1.5f, Vector3.up);
  15007. idoFlg2 = true;
  15008. }
  15009. else if (Input.GetKey(KeyCode.W) && this.getModKeyPressing(modKey.Alt) && Input.GetKey(KeyCode.O))
  15010. {
  15011. doguObject[doguSelectIndex].transform.localRotation =
  15012. Quaternion.Euler(doguObject[doguSelectIndex].transform.localEulerAngles)
  15013. * Quaternion.AngleAxis(1.5f, Vector3.up);
  15014. idoFlg2 = true;
  15015. }
  15016. else if (doguObject[doguSelectIndex] && Input.GetKey(KeyCode.W)
  15017. && ((Input.GetKey(KeyCode.Minus) && this.getModKeyPressing(modKey.Shift))
  15018. || (Input.GetKey(KeyCode.K) && this.getModKeyPressing(modKey.Alt))))
  15019. {
  15020. doguObject[doguSelectIndex].transform.RotateAround(doguObject[doguSelectIndex].transform.position,
  15021. new Vector3(vector3.x, 0f, vector3.z),
  15022. -0.7f);
  15023. idoFlg2 = true;
  15024. }
  15025. else if (doguObject[doguSelectIndex] && Input.GetKey(KeyCode.W)
  15026. && ((Input.GetKey(KeyCode.Quote) && this.getModKeyPressing(modKey.Shift))
  15027. || (Input.GetKey(KeyCode.I) && this.getModKeyPressing(modKey.Alt))))
  15028. {
  15029. doguObject[doguSelectIndex]
  15030. .transform.RotateAround(doguObject[doguSelectIndex].transform.position,
  15031. new Vector3(vector3.x, 0f, vector3.z),
  15032. 0.7f);
  15033. idoFlg2 = true;
  15034. }
  15035. else if (doguObject[doguSelectIndex] && Input.GetKey(KeyCode.W)
  15036. && (Input.GetKey(KeyCode.Minus)
  15037. || (Input.GetKey(KeyCode.J) && this.getModKeyPressing(modKey.Alt))))
  15038. {
  15039. doguObject[doguSelectIndex]
  15040. .transform.RotateAround(doguObject[doguSelectIndex].transform.position,
  15041. new Vector3(vector2.x, 0f, vector2.z),
  15042. 0.7f);
  15043. idoFlg2 = true;
  15044. }
  15045. else if (doguObject[doguSelectIndex] && Input.GetKey(KeyCode.W)
  15046. && (Input.GetKey(KeyCode.Quote)
  15047. || (Input.GetKey(KeyCode.L) && this.getModKeyPressing(modKey.Alt))))
  15048. {
  15049. doguObject[doguSelectIndex].transform.RotateAround(doguObject[doguSelectIndex].transform.position,
  15050. new Vector3(vector2.x, 0f, vector2.z),
  15051. -0.7f);
  15052. idoFlg2 = true;
  15053. }
  15054. else if (doguObject[doguSelectIndex] && Input.GetKey(KeyCode.W) && Input.GetKey(KeyCode.I)
  15055. && Input.GetKey(KeyCode.J))
  15056. {
  15057. Vector3 vector = doguObject[doguSelectIndex].transform.position;
  15058. vector += new Vector3(vector2.x, 0f, vector2.z) * 0.0075f * speed;
  15059. vector += new Vector3(vector3.x, 0f, vector3.z) * -0.0075f * speed;
  15060. doguObject[doguSelectIndex].transform.localPosition = vector;
  15061. idoFlg2 = true;
  15062. }
  15063. else if (doguObject[doguSelectIndex] && Input.GetKey(KeyCode.W) && Input.GetKey(KeyCode.I)
  15064. && Input.GetKey(KeyCode.L))
  15065. {
  15066. Vector3 vector = doguObject[doguSelectIndex].transform.position;
  15067. vector += new Vector3(vector2.x, 0f, vector2.z) * 0.0075f * speed;
  15068. vector += new Vector3(vector3.x, 0f, vector3.z) * 0.0075f * speed;
  15069. doguObject[doguSelectIndex].transform.localPosition = vector;
  15070. idoFlg2 = true;
  15071. }
  15072. else if (doguObject[doguSelectIndex] && Input.GetKey(KeyCode.W) && Input.GetKey(KeyCode.K)
  15073. && Input.GetKey(KeyCode.J))
  15074. {
  15075. Vector3 vector = doguObject[doguSelectIndex].transform.position;
  15076. vector += new Vector3(vector2.x, 0f, vector2.z) * -0.0075f * speed;
  15077. vector += new Vector3(vector3.x, 0f, vector3.z) * -0.0075f * speed;
  15078. doguObject[doguSelectIndex].transform.localPosition = vector;
  15079. idoFlg2 = true;
  15080. }
  15081. else if (doguObject[doguSelectIndex] && Input.GetKey(KeyCode.W) && Input.GetKey(KeyCode.K)
  15082. && Input.GetKey(KeyCode.L))
  15083. {
  15084. Vector3 vector = doguObject[doguSelectIndex].transform.position;
  15085. vector += new Vector3(vector2.x, 0f, vector2.z) * -0.0075f * speed;
  15086. vector += new Vector3(vector3.x, 0f, vector3.z) * 0.0075f * speed;
  15087. doguObject[doguSelectIndex].transform.localPosition = vector;
  15088. idoFlg2 = true;
  15089. }
  15090. else if (doguObject[doguSelectIndex] && Input.GetKey(KeyCode.W) && Input.GetKey(KeyCode.I))
  15091. {
  15092. Vector3 vector = doguObject[doguSelectIndex].transform.position;
  15093. vector += new Vector3(vector2.x, 0f, vector2.z) * 0.0075f * speed;
  15094. doguObject[doguSelectIndex].transform.localPosition = vector;
  15095. idoFlg2 = true;
  15096. }
  15097. else if (doguObject[doguSelectIndex] && Input.GetKey(KeyCode.W) && Input.GetKey(KeyCode.K))
  15098. {
  15099. Vector3 vector = doguObject[doguSelectIndex].transform.position;
  15100. vector += new Vector3(vector2.x, 0f, vector2.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.J))
  15105. {
  15106. Vector3 vector = doguObject[doguSelectIndex].transform.position;
  15107. vector += new Vector3(vector3.x, 0f, vector3.z) * -0.0075f * speed;
  15108. doguObject[doguSelectIndex].transform.localPosition = vector;
  15109. idoFlg2 = true;
  15110. }
  15111. else if (doguObject[doguSelectIndex] && Input.GetKey(KeyCode.W) && Input.GetKey(KeyCode.L))
  15112. {
  15113. Vector3 vector = doguObject[doguSelectIndex].transform.position;
  15114. vector += new Vector3(vector3.x, 0f, vector3.z) * 0.0075f * speed;
  15115. doguObject[doguSelectIndex].transform.localPosition = vector;
  15116. idoFlg2 = true;
  15117. }
  15118. else if (doguObject[doguSelectIndex] && Input.GetKey(KeyCode.W) && Input.GetKey(KeyCode.Alpha0))
  15119. {
  15120. Vector3 vector = doguObject[doguSelectIndex].transform.position;
  15121. vector.y += 0.0075f * speed;
  15122. doguObject[doguSelectIndex].transform.localPosition = vector;
  15123. idoFlg2 = true;
  15124. }
  15125. else if (doguObject[doguSelectIndex] && Input.GetKey(KeyCode.W) && Input.GetKey(KeyCode.P))
  15126. {
  15127. Vector3 vector = doguObject[doguSelectIndex].transform.position;
  15128. vector.y -= 0.0075f * speed;
  15129. doguObject[doguSelectIndex].transform.localPosition = vector;
  15130. idoFlg2 = true;
  15131. }
  15132. else if (doguObject[doguSelectIndex] && Input.GetKey(KeyCode.W) && Input.GetKeyDown(KeyCode.BackQuote) && !atFlg)
  15133. {
  15134. idoFlg2 = true;
  15135. if (doguObject.Count > 0 && doguObject[doguSelectIndex] != null)
  15136. {
  15137. Destroy(doguObject[doguSelectIndex]);
  15138. doguObject.RemoveAt(doguSelectIndex);
  15139. }
  15140. doguIndex.RemoveAt(doguSelectIndex);
  15141. doguSelectIndex = 0;
  15142. }
  15143. }
  15144. if (Input.GetKeyDown(KeyCode.W) && this.getModKeyPressing(modKey.Shift))
  15145. {
  15146. idoFlg2 = true;
  15147. if (doguSelectIndex == doguObject.Count)
  15148. {
  15149. doguIndex.Add(0);
  15150. }
  15151. else if (doguObject.Count > 0 && doguObject[doguSelectIndex] != null)
  15152. {
  15153. Destroy(doguObject[doguSelectIndex]);
  15154. doguObject.RemoveAt(doguSelectIndex);
  15155. }
  15156. else
  15157. {
  15158. doguIndex.Add(0);
  15159. doguSelectIndex = doguIndex.Count - 1;
  15160. }
  15161. List<int> list2;
  15162. int index;
  15163. (list2 = doguIndex)[index = doguSelectIndex] = list2[index] - 1;
  15164. if (doguIndex[doguSelectIndex] <= -1)
  15165. {
  15166. doguIndex[doguSelectIndex] = doguArray.Length - 1;
  15167. }
  15168. if (doguIndex[doguSelectIndex] > 0)
  15169. {
  15170. if (!doguArray[doguIndex[doguSelectIndex]].StartsWith("mirror"))
  15171. {
  15172. Object @object = null;
  15173. for (int j = 0; j < 5; j++)
  15174. {
  15175. @object = Resources.Load("Prefab/" + doguArray[doguIndex[doguSelectIndex]]);
  15176. if (@object != null)
  15177. {
  15178. break;
  15179. }
  15180. (list2 = doguIndex)[index = doguSelectIndex] = list2[index] - 1;
  15181. }
  15182. doguObject.Add(Instantiate(@object) as GameObject);
  15183. }
  15184. else
  15185. {
  15186. Material material = new Material(Shader.Find("Mirror"));
  15187. GameObject gameObject7 = GameObject.CreatePrimitive(PrimitiveType.Plane);
  15188. gameObject7.transform.localScale = new Vector3(0.3f, 1f, 0.3f);
  15189. gameObject7.GetComponent<Renderer>().material = material;
  15190. gameObject7.AddComponent<MirrorReflection2>();
  15191. MirrorReflection2 component5 = gameObject7.GetComponent<MirrorReflection2>();
  15192. component5.m_TextureSize = 2048;
  15193. component5.m_ClipPlaneOffset = 0f;
  15194. gameObject7.GetComponent<Renderer>().enabled = true;
  15195. doguObject.Add(gameObject7);
  15196. }
  15197. Vector3 vector = Vector3.zero;
  15198. Vector3 zero3 = Vector3.zero;
  15199. zero3.x = -90f;
  15200. switch (doguIndex[doguSelectIndex])
  15201. {
  15202. case 1:
  15203. vector.z = -0.5f;
  15204. goto IL_344DC;
  15205. case 2:
  15206. vector.z = -0.5f;
  15207. goto IL_344DC;
  15208. case 3:
  15209. vector.z = 0.5f;
  15210. zero3.z = 90f;
  15211. goto IL_344DC;
  15212. case 4:
  15213. vector.z = 0.9f;
  15214. goto IL_344DC;
  15215. case 5:
  15216. vector.z = 0.9f;
  15217. goto IL_344DC;
  15218. case 6:
  15219. vector.z = 0.6f;
  15220. zero3.x = 0f;
  15221. doguObject[doguSelectIndex].transform.localScale = new Vector3(4.5f, 4.5f, 4.5f);
  15222. goto IL_344DC;
  15223. case 7:
  15224. vector.z = 0.6f;
  15225. doguObject[doguSelectIndex].transform.localScale = new Vector3(3.5f, 3.5f, 3.5f);
  15226. goto IL_344DC;
  15227. case 8:
  15228. vector.z = 0.5f;
  15229. zero3.x = 0f;
  15230. goto IL_344DC;
  15231. case 9:
  15232. vector.z = 0.32f;
  15233. zero3.z = 180f;
  15234. goto IL_344DC;
  15235. case 10:
  15236. vector.z = 0.6f;
  15237. goto IL_344DC;
  15238. case 11:
  15239. vector.z = 0.6f;
  15240. goto IL_344DC;
  15241. case 12:
  15242. vector.z = 0.5f;
  15243. zero3.z = 180f;
  15244. goto IL_344DC;
  15245. case 13:
  15246. vector.z = 0.7f;
  15247. zero3.z = 180f;
  15248. goto IL_344DC;
  15249. case 14:
  15250. vector.z = -0.4f;
  15251. goto IL_344DC;
  15252. case 15:
  15253. vector.z = -0.4f;
  15254. goto IL_344DC;
  15255. case 16:
  15256. vector.z = -0.4f;
  15257. zero3.z = 180f;
  15258. goto IL_344DC;
  15259. case 17:
  15260. vector.z = -0.4f;
  15261. goto IL_344DC;
  15262. case 18:
  15263. vector.z = -0.2f;
  15264. goto IL_344DC;
  15265. case 19:
  15266. vector.z = 0f;
  15267. goto IL_344DC;
  15268. case 20:
  15269. vector.z = 3.4f;
  15270. vector.x = -1f;
  15271. goto IL_344DC;
  15272. case 21:
  15273. vector.z = 3.4f;
  15274. vector.x = -1f;
  15275. goto IL_344DC;
  15276. case 22:
  15277. vector.z = 3.4f;
  15278. vector.y = 0.3f;
  15279. vector.x = -1f;
  15280. goto IL_344DC;
  15281. case 23:
  15282. vector.z = 2.7f;
  15283. vector.x = 0.77f;
  15284. zero3.z = 90f;
  15285. goto IL_344DC;
  15286. case 25:
  15287. vector.z = 0.5f;
  15288. vector.y = 0.9f;
  15289. zero3.z = 180f;
  15290. goto IL_344DC;
  15291. case 26:
  15292. vector.z = 0.5f;
  15293. vector.y = 0.9f;
  15294. zero3.z = 180f;
  15295. goto IL_344DC;
  15296. case 29:
  15297. vector.z = 0.5f;
  15298. vector.x = -1.05f;
  15299. goto IL_344DC;
  15300. case 30:
  15301. vector.z = -2.8f;
  15302. zero3.z = 0f;
  15303. zero3.x = 0f;
  15304. doguObject[doguSelectIndex].transform.localScale = new Vector3(0.75f, 0.75f, 0.75f);
  15305. goto IL_344DC;
  15306. case 31:
  15307. vector.z = -0.6f;
  15308. vector.y = 0.96f;
  15309. zero3.z = 180f;
  15310. doguObject[doguSelectIndex].transform.localScale = new Vector3(0.2f, 0.4f, 0.2f);
  15311. goto IL_344DC;
  15312. case 32:
  15313. vector.z = -0.6f;
  15314. vector.y = 0.96f;
  15315. zero3.z = 180f;
  15316. doguObject[doguSelectIndex].transform.localScale = new Vector3(0.1f, 0.4f, 0.2f);
  15317. goto IL_344DC;
  15318. case 33:
  15319. vector.z = -0.6f;
  15320. vector.y = 0.85f;
  15321. zero3.z = 180f;
  15322. doguObject[doguSelectIndex].transform.localScale = new Vector3(0.03f, 0.18f, 0.124f);
  15323. goto IL_344DC;
  15324. }
  15325. vector.z = 0.5f;
  15326. IL_344DC:
  15327. doguObject[doguSelectIndex].transform.localPosition = vector;
  15328. doguObject[doguSelectIndex].transform.localRotation = Quaternion.Euler(zero3);
  15329. }
  15330. if (doguIndex[doguSelectIndex] == 0)
  15331. {
  15332. doguIndex.RemoveAt(doguSelectIndex);
  15333. }
  15334. }
  15335. else if (Input.GetKeyDown(KeyCode.W))
  15336. {
  15337. for (int k = 0; k < keyArray.Length; k++)
  15338. {
  15339. if (Input.GetKey(keyArray[k]))
  15340. {
  15341. wFlg = true;
  15342. break;
  15343. }
  15344. }
  15345. }
  15346. else if (Input.GetKeyUp(KeyCode.W))
  15347. {
  15348. if (wFlg)
  15349. {
  15350. wFlg = false;
  15351. }
  15352. else if (idoFlg2)
  15353. {
  15354. idoFlg2 = false;
  15355. }
  15356. else
  15357. {
  15358. if (doguObject.Count > 0 && doguObject[doguSelectIndex] != null)
  15359. {
  15360. Destroy(doguObject[doguSelectIndex]);
  15361. doguObject.RemoveAt(doguSelectIndex);
  15362. }
  15363. else
  15364. {
  15365. doguIndex.Add(0);
  15366. doguSelectIndex = doguIndex.Count - 1;
  15367. }
  15368. List<int> list2;
  15369. int index;
  15370. (list2 = doguIndex)[index = doguSelectIndex] = list2[index] + 1;
  15371. if (doguIndex[doguSelectIndex] == doguArray.Length)
  15372. {
  15373. doguIndex[doguSelectIndex] = 0;
  15374. }
  15375. if (doguIndex[doguSelectIndex] > 0)
  15376. {
  15377. if (!doguArray[doguIndex[doguSelectIndex]].StartsWith("mirror"))
  15378. {
  15379. Object @object = null;
  15380. for (int j = 0; j < 5; j++)
  15381. {
  15382. @object = Resources.Load("Prefab/" + doguArray[doguIndex[doguSelectIndex]]);
  15383. if (@object != null)
  15384. {
  15385. break;
  15386. }
  15387. (list2 = doguIndex)[index = doguSelectIndex] = list2[index] + 1;
  15388. }
  15389. doguObject.Add(Instantiate(@object) as GameObject);
  15390. }
  15391. else
  15392. {
  15393. Material material = new Material(Shader.Find("Mirror"));
  15394. GameObject gameObject7 = GameObject.CreatePrimitive(PrimitiveType.Plane);
  15395. gameObject7.transform.localScale = new Vector3(0.3f, 1f, 0.3f);
  15396. gameObject7.GetComponent<Renderer>().material = material;
  15397. gameObject7.AddComponent<MirrorReflection2>();
  15398. MirrorReflection2 component5 = gameObject7.GetComponent<MirrorReflection2>();
  15399. component5.m_TextureSize = 2048;
  15400. component5.m_ClipPlaneOffset = 0f;
  15401. gameObject7.GetComponent<Renderer>().enabled = true;
  15402. doguObject.Add(gameObject7);
  15403. }
  15404. Vector3 vector = Vector3.zero;
  15405. Vector3 zero3 = Vector3.zero;
  15406. zero3.x = -90f;
  15407. switch (doguIndex[doguSelectIndex])
  15408. {
  15409. case 1:
  15410. vector.z = -0.5f;
  15411. goto IL_34D66;
  15412. case 2:
  15413. vector.z = -0.5f;
  15414. goto IL_34D66;
  15415. case 3:
  15416. vector.z = 0.5f;
  15417. zero3.z = 90f;
  15418. goto IL_34D66;
  15419. case 4:
  15420. vector.z = 0.9f;
  15421. goto IL_34D66;
  15422. case 5:
  15423. vector.z = 0.9f;
  15424. goto IL_34D66;
  15425. case 6:
  15426. vector.z = 0.6f;
  15427. zero3.x = 0f;
  15428. doguObject[doguSelectIndex].transform.localScale = new Vector3(4.5f, 4.5f, 4.5f);
  15429. goto IL_34D66;
  15430. case 7:
  15431. vector.z = 0.6f;
  15432. doguObject[doguSelectIndex].transform.localScale = new Vector3(3.5f, 3.5f, 3.5f);
  15433. goto IL_34D66;
  15434. case 8:
  15435. vector.z = 0.5f;
  15436. zero3.x = 0f;
  15437. goto IL_34D66;
  15438. case 9:
  15439. vector.z = 0.32f;
  15440. zero3.z = 180f;
  15441. goto IL_34D66;
  15442. case 10:
  15443. vector.z = 0.6f;
  15444. goto IL_34D66;
  15445. case 11:
  15446. vector.z = 0.6f;
  15447. goto IL_34D66;
  15448. case 12:
  15449. vector.z = 0.5f;
  15450. zero3.z = 180f;
  15451. goto IL_34D66;
  15452. case 13:
  15453. vector.z = 0.7f;
  15454. zero3.z = 180f;
  15455. goto IL_34D66;
  15456. case 14:
  15457. vector.z = -0.4f;
  15458. goto IL_34D66;
  15459. case 15:
  15460. vector.z = -0.4f;
  15461. goto IL_34D66;
  15462. case 16:
  15463. vector.z = -0.4f;
  15464. zero3.z = 180f;
  15465. goto IL_34D66;
  15466. case 17:
  15467. vector.z = -0.4f;
  15468. goto IL_34D66;
  15469. case 18:
  15470. vector.z = -0.2f;
  15471. goto IL_34D66;
  15472. case 19:
  15473. vector.z = 0f;
  15474. goto IL_34D66;
  15475. case 20:
  15476. vector.z = 3.4f;
  15477. vector.x = -1f;
  15478. goto IL_34D66;
  15479. case 21:
  15480. vector.z = 3.4f;
  15481. vector.x = -1f;
  15482. goto IL_34D66;
  15483. case 22:
  15484. vector.z = 3.4f;
  15485. vector.y = 0.3f;
  15486. vector.x = -1f;
  15487. goto IL_34D66;
  15488. case 23:
  15489. vector.z = 2.7f;
  15490. vector.x = 0.77f;
  15491. zero3.z = 90f;
  15492. goto IL_34D66;
  15493. case 25:
  15494. vector.z = 0.5f;
  15495. vector.y = 0.9f;
  15496. zero3.z = 180f;
  15497. goto IL_34D66;
  15498. case 26:
  15499. vector.z = 0.5f;
  15500. vector.y = 0.9f;
  15501. zero3.z = 180f;
  15502. goto IL_34D66;
  15503. case 29:
  15504. vector.z = 0.5f;
  15505. vector.x = -1.05f;
  15506. goto IL_34D66;
  15507. case 30:
  15508. vector.z = -2.8f;
  15509. zero3.z = 0f;
  15510. zero3.x = 0f;
  15511. doguObject[doguSelectIndex].transform.localScale = new Vector3(0.75f, 0.75f, 0.75f);
  15512. goto IL_34D66;
  15513. case 31:
  15514. vector.z = -0.6f;
  15515. vector.y = 0.96f;
  15516. zero3.z = 180f;
  15517. doguObject[doguSelectIndex].transform.localScale = new Vector3(0.2f, 0.4f, 0.2f);
  15518. goto IL_34D66;
  15519. case 32:
  15520. vector.z = -0.6f;
  15521. vector.y = 0.96f;
  15522. zero3.z = 180f;
  15523. doguObject[doguSelectIndex].transform.localScale = new Vector3(0.1f, 0.4f, 0.2f);
  15524. goto IL_34D66;
  15525. case 33:
  15526. vector.z = -0.6f;
  15527. vector.y = 0.85f;
  15528. zero3.z = 180f;
  15529. doguObject[doguSelectIndex].transform.localScale = new Vector3(0.03f, 0.18f, 0.124f);
  15530. goto IL_34D66;
  15531. }
  15532. vector.z = 0.5f;
  15533. IL_34D66:;
  15534. }
  15535. if (doguIndex[doguSelectIndex] == 0)
  15536. {
  15537. doguIndex.RemoveAt(doguSelectIndex);
  15538. }
  15539. }
  15540. }
  15541. }
  15542. if (!isVR)
  15543. {
  15544. int i;
  15545. for (i = 0; i < 999; i++)
  15546. {
  15547. if (gDogu[i] != null)
  15548. {
  15549. gDogu[i].GetComponent<Renderer>().enabled = false;
  15550. gDogu[i].SetActive(false);
  15551. if (mDogu[i].del)
  15552. {
  15553. mDogu[i].del = false;
  15554. Destroy(doguBObject[i]);
  15555. doguBObject.RemoveAt(i);
  15556. }
  15557. else if (mDogu[i].count > 0)
  15558. {
  15559. mDogu[i].count--;
  15560. if (doguBObject.Count > i && doguBObject[i] != null && doguBObject[i].name.StartsWith("Particle/p"))
  15561. {
  15562. if (mDogu[i].count == 1)
  15563. {
  15564. doguBObject[i].SetActive(false);
  15565. }
  15566. if (mDogu[i].count == 0)
  15567. {
  15568. doguBObject[i].SetActive(true);
  15569. string name = doguBObject[i].name;
  15570. if (name != null)
  15571. {
  15572. if (!(name == "Particle/pLineY"))
  15573. {
  15574. if (!(name == "Particle/pLineP02"))
  15575. {
  15576. if (!(name == "Particle/pLine_act2"))
  15577. {
  15578. if (name == "Particle/pHeart01")
  15579. {
  15580. mDogu[i].count = 77;
  15581. }
  15582. }
  15583. else
  15584. {
  15585. mDogu[i].count = 90;
  15586. }
  15587. }
  15588. else
  15589. {
  15590. mDogu[i].count = 115;
  15591. }
  15592. }
  15593. else
  15594. {
  15595. mDogu[i].count = 180;
  15596. }
  15597. }
  15598. }
  15599. }
  15600. }
  15601. }
  15602. }
  15603. if (Input.GetKey(KeyCode.Z) && this.getModKeyPressing(modKey.Shift))
  15604. {
  15605. ikMode2 = 11;
  15606. }
  15607. else if (Input.GetKey(KeyCode.Z) && this.getModKeyPressing(modKey.Ctrl))
  15608. {
  15609. ikMode2 = 12;
  15610. }
  15611. else if (Input.GetKey(KeyCode.X) && this.getModKeyPressing(modKey.Shift))
  15612. {
  15613. ikMode2 = 14;
  15614. }
  15615. else if (Input.GetKey(KeyCode.X))
  15616. {
  15617. ikMode2 = 9;
  15618. }
  15619. else if (Input.GetKey(KeyCode.Z))
  15620. {
  15621. ikMode2 = 10;
  15622. }
  15623. else if (Input.GetKey(KeyCode.C))
  15624. {
  15625. ikMode2 = 13;
  15626. }
  15627. else if (Input.GetKey(KeyCode.D))
  15628. {
  15629. ikMode2 = 15;
  15630. }
  15631. else
  15632. {
  15633. ikMode2 = 0;
  15634. }
  15635. if (gBg != null)
  15636. {
  15637. if (!isCube3)
  15638. {
  15639. gBg.GetComponent<Renderer>().enabled = false;
  15640. gBg.SetActive(false);
  15641. }
  15642. else
  15643. {
  15644. if (ikMode2 > 0 && ikMode2 != 15)
  15645. {
  15646. gBg.GetComponent<Renderer>().enabled = true;
  15647. gBg.SetActive(true);
  15648. }
  15649. else
  15650. {
  15651. gBg.GetComponent<Renderer>().enabled = false;
  15652. gBg.SetActive(false);
  15653. }
  15654. if (ikMode2 == 10 || ikMode2 == 11 || ikMode2 == 12)
  15655. {
  15656. gBg.GetComponent<Renderer>().material.color = new Color(0.4f, 0.4f, 1f, 0.5f);
  15657. }
  15658. if (ikMode2 == 9 || ikMode2 == 14)
  15659. {
  15660. gBg.GetComponent<Renderer>().material.color = new Color(0.3f, 0.7f, 0.3f, 0.5f);
  15661. mBg.Update();
  15662. }
  15663. if (ikMode2 == 13)
  15664. {
  15665. gBg.GetComponent<Renderer>().material.color = new Color(0.7f, 0.7f, 0.3f, 0.5f);
  15666. mBg.Update();
  15667. }
  15668. if (ikMode2 == 13)
  15669. {
  15670. if ((ikModeOld2 == 0 || ikModeOld2 >= 9) && ikModeOld2 != 13 && gBg)
  15671. {
  15672. mBg.ido = 5;
  15673. mBg.reset = true;
  15674. }
  15675. else
  15676. {
  15677. gBg.transform.position = bg.position;
  15678. gBg.transform.eulerAngles = bg.eulerAngles;
  15679. mBg.maid = bgObject;
  15680. mBg.ido = 5;
  15681. }
  15682. }
  15683. else if (ikMode2 == 11)
  15684. {
  15685. if ((ikModeOld2 == 0 || ikModeOld2 >= 9) && ikModeOld2 != 11 && gBg)
  15686. {
  15687. mBg.ido = 3;
  15688. mBg.reset = true;
  15689. }
  15690. else
  15691. {
  15692. gBg.transform.position = bg.position;
  15693. gBg.transform.eulerAngles = bg.eulerAngles;
  15694. mBg.maid = bgObject;
  15695. mBg.ido = 3;
  15696. }
  15697. }
  15698. else if (ikMode2 == 12)
  15699. {
  15700. if ((ikModeOld2 == 0 || ikModeOld2 >= 9) && ikModeOld2 != 12 && gBg)
  15701. {
  15702. mBg.ido = 2;
  15703. mBg.reset = true;
  15704. }
  15705. else
  15706. {
  15707. gBg.transform.position = bg.position;
  15708. gBg.transform.eulerAngles = bg.eulerAngles;
  15709. mBg.maid = bgObject;
  15710. mBg.ido = 2;
  15711. }
  15712. }
  15713. else if (ikMode2 == 10)
  15714. {
  15715. if ((ikModeOld2 == 0 || ikModeOld2 >= 9) && ikModeOld2 != 10 && gBg)
  15716. {
  15717. mBg.ido = 1;
  15718. mBg.reset = true;
  15719. }
  15720. else
  15721. {
  15722. gBg.transform.position = bg.position;
  15723. gBg.transform.eulerAngles = bg.eulerAngles;
  15724. mBg.maid = bgObject;
  15725. mBg.ido = 1;
  15726. }
  15727. }
  15728. else if (ikMode2 == 9)
  15729. {
  15730. if ((ikModeOld2 == 0 || ikModeOld2 >= 9) && ikModeOld2 != 9 && gBg)
  15731. {
  15732. mBg.ido = 4;
  15733. mBg.reset = true;
  15734. }
  15735. else
  15736. {
  15737. gBg.transform.position = bg.position;
  15738. gBg.transform.eulerAngles = bg.eulerAngles;
  15739. mBg.maid = bgObject;
  15740. mBg.ido = 4;
  15741. }
  15742. }
  15743. else if (ikMode2 == 14)
  15744. {
  15745. if ((ikModeOld2 == 0 || ikModeOld2 >= 9) && ikModeOld2 != 14 && gBg)
  15746. {
  15747. mBg.ido = 6;
  15748. mBg.reset = true;
  15749. }
  15750. else
  15751. {
  15752. gBg.transform.position = bg.position;
  15753. gBg.transform.eulerAngles = bg.eulerAngles;
  15754. mBg.maid = bgObject;
  15755. mBg.ido = 6;
  15756. }
  15757. }
  15758. }
  15759. }
  15760. i = 0;
  15761. while (i < lightIndex.Count)
  15762. {
  15763. if (gLight[0] == null)
  15764. {
  15765. gLight[0] = GameObject.CreatePrimitive(PrimitiveType.Cube);
  15766. Material material2 = new Material(Shader.Find("Transparent/Diffuse"));
  15767. material2.color = new Color(0.5f, 0.5f, 1f, 0.8f);
  15768. gLight[0].GetComponent<Renderer>().material = material2;
  15769. gLight[0].layer = 8;
  15770. gLight[0].GetComponent<Renderer>().enabled = false;
  15771. gLight[0].SetActive(false);
  15772. gLight[0].transform.position = GameMain.Instance.MainLight.transform.position;
  15773. mLight[0] = gLight[0].AddComponent<MouseDrag6>();
  15774. mLight[0].obj = gLight[0];
  15775. mLight[0].maid = GameMain.Instance.MainLight.gameObject;
  15776. mLight[0].angles = GameMain.Instance.MainLight.gameObject.transform.eulerAngles;
  15777. gLight[0].transform.localScale = new Vector3(0.12f, 0.12f, 0.12f);
  15778. mLight[0].ido = 1;
  15779. mLight[0].isScale = false;
  15780. }
  15781. if (gLight[i] != null)
  15782. {
  15783. if (!isCube4)
  15784. {
  15785. gLight[i].GetComponent<Renderer>().enabled = false;
  15786. gLight[i].SetActive(false);
  15787. }
  15788. else if (lightList[i].GetComponent<Light>().type == LightType.Spot
  15789. || lightList[i].GetComponent<Light>().type == LightType.Point)
  15790. {
  15791. if (ikMode2 > 0 && ikMode2 != 15)
  15792. {
  15793. gLight[i].GetComponent<Renderer>().enabled = true;
  15794. gLight[i].SetActive(true);
  15795. }
  15796. else
  15797. {
  15798. gLight[i].GetComponent<Renderer>().enabled = false;
  15799. gLight[i].SetActive(false);
  15800. mLight[i].isAlt = false;
  15801. }
  15802. if (ikMode2 == 10 || ikMode2 == 11 || ikMode2 == 12)
  15803. {
  15804. gLight[i].GetComponent<Renderer>().material.color = new Color(0.4f, 0.4f, 1f, 0.5f);
  15805. if (mLight[i].isAlt)
  15806. {
  15807. gLight[i].GetComponent<Renderer>().material.color = new Color(0.6f, 0.6f, 1f, 0.5f);
  15808. }
  15809. }
  15810. if (ikMode2 == 9 || ikMode2 == 14)
  15811. {
  15812. gLight[i].GetComponent<Renderer>().material.color = new Color(0.3f, 0.7f, 0.3f, 0.5f);
  15813. mLight[i].Update();
  15814. }
  15815. if (ikMode2 == 13)
  15816. {
  15817. gLight[i].GetComponent<Renderer>().material.color = new Color(0.7f, 0.7f, 0.3f, 0.5f);
  15818. mLight[i].Update();
  15819. }
  15820. if (ikMode2 == 13)
  15821. {
  15822. if ((ikModeOld2 == 0 || ikModeOld2 >= 9) && ikModeOld2 != 13 && gLight[i])
  15823. {
  15824. mLight[i].ido = 15;
  15825. mLight[i].reset = true;
  15826. }
  15827. else
  15828. {
  15829. if (lightList[i].transform.localScale.x == 1f)
  15830. {
  15831. lightList[i].transform.localScale = new Vector3(lightRange[i], lightRange[i], lightRange[i]);
  15832. }
  15833. lightRange[i] = lightList[i].transform.localScale.x;
  15834. gLight[i].transform.position = lightList[i].transform.position;
  15835. gLight[i].transform.eulerAngles = lightList[i].transform.eulerAngles;
  15836. mLight[i].maid = lightList[i];
  15837. mLight[i].ido = 15;
  15838. }
  15839. }
  15840. else if (ikMode2 == 11)
  15841. {
  15842. if ((ikModeOld2 == 0 || ikModeOld2 >= 9) && ikModeOld2 != 11 && gLight[i])
  15843. {
  15844. mLight[i].ido = 3;
  15845. mLight[i].reset = true;
  15846. }
  15847. else
  15848. {
  15849. gLight[i].transform.position = lightList[i].transform.position;
  15850. gLight[i].transform.eulerAngles = lightList[i].transform.eulerAngles;
  15851. lightX[i] = gLight[i].transform.eulerAngles.x;
  15852. lightY[i] = gLight[i].transform.eulerAngles.y;
  15853. mLight[i].maid = lightList[i];
  15854. mLight[i].ido = 3;
  15855. }
  15856. }
  15857. else if (ikMode2 == 12)
  15858. {
  15859. if ((ikModeOld2 == 0 || ikModeOld2 >= 9) && ikModeOld2 != 12 && gLight[i])
  15860. {
  15861. mLight[i].ido = 2;
  15862. mLight[i].reset = true;
  15863. }
  15864. else
  15865. {
  15866. gLight[i].transform.position = lightList[i].transform.position;
  15867. gLight[i].transform.eulerAngles = lightList[i].transform.eulerAngles;
  15868. mLight[i].maid = lightList[i];
  15869. mLight[i].ido = 2;
  15870. }
  15871. }
  15872. else if (ikMode2 == 10)
  15873. {
  15874. if ((ikModeOld2 == 0 || ikModeOld2 >= 9) && ikModeOld2 != 10 && gLight[i])
  15875. {
  15876. mLight[i].ido = 1;
  15877. mLight[i].reset = true;
  15878. }
  15879. else
  15880. {
  15881. gLight[i].transform.position = lightList[i].transform.position;
  15882. gLight[i].transform.eulerAngles = lightList[i].transform.eulerAngles;
  15883. mLight[i].maid = lightList[i];
  15884. mLight[i].maidArray = lightList.ToArray();
  15885. mLight[i].mArray = mLight.ToArray<MouseDrag6>();
  15886. mLight[i].ido = 1;
  15887. }
  15888. }
  15889. else if (ikMode2 == 9)
  15890. {
  15891. if ((ikModeOld2 == 0 || ikModeOld2 >= 9) && ikModeOld2 != 9 && gLight[i])
  15892. {
  15893. mLight[i].ido = 4;
  15894. mLight[i].reset = true;
  15895. }
  15896. else
  15897. {
  15898. gLight[i].transform.position = lightList[i].transform.position;
  15899. gLight[i].transform.eulerAngles = lightList[i].transform.eulerAngles;
  15900. lightX[i] = gLight[i].transform.eulerAngles.x;
  15901. lightY[i] = gLight[i].transform.eulerAngles.y;
  15902. mLight[i].maid = lightList[i];
  15903. mLight[i].ido = 4;
  15904. }
  15905. }
  15906. else if (ikMode2 == 14)
  15907. {
  15908. if ((ikModeOld2 == 0 || ikModeOld2 >= 9) && ikModeOld2 != 14 && gLight[i])
  15909. {
  15910. mLight[i].ido = 6;
  15911. mLight[i].reset = true;
  15912. }
  15913. else
  15914. {
  15915. gLight[i].transform.position = lightList[i].transform.position;
  15916. gLight[i].transform.eulerAngles = lightList[i].transform.eulerAngles;
  15917. lightX[i] = gLight[i].transform.eulerAngles.x;
  15918. lightY[i] = gLight[i].transform.eulerAngles.y;
  15919. mLight[i].maid = lightList[i];
  15920. mLight[i].ido = 6;
  15921. }
  15922. }
  15923. }
  15924. }
  15925. IL_36227:
  15926. i++;
  15927. continue;
  15928. goto IL_36227;
  15929. }
  15930. for (i = 0; i < doguBObject.Count; i++)
  15931. {
  15932. if (!isCube2)
  15933. {
  15934. gDogu[i].GetComponent<Renderer>().enabled = false;
  15935. gDogu[i].SetActive(false);
  15936. }
  15937. else
  15938. {
  15939. if (ikMode2 > 0)
  15940. {
  15941. gDogu[i].GetComponent<Renderer>().enabled = true;
  15942. gDogu[i].SetActive(true);
  15943. }
  15944. else
  15945. {
  15946. gDogu[i].GetComponent<Renderer>().enabled = false;
  15947. gDogu[i].SetActive(false);
  15948. mDogu[i].isAlt = false;
  15949. }
  15950. if (ikMode2 == 10 || ikMode2 == 11 || ikMode2 == 12)
  15951. {
  15952. gDogu[i].GetComponent<Renderer>().material.color = new Color(0.4f, 0.4f, 1f, 0.5f);
  15953. if (mDogu[i].isAlt)
  15954. {
  15955. gDogu[i].GetComponent<Renderer>().material.color = new Color(0.6f, 0.6f, 1f, 0.5f);
  15956. }
  15957. }
  15958. if (ikMode2 == 9 || ikMode2 == 14)
  15959. {
  15960. gDogu[i].GetComponent<Renderer>().material.color = new Color(0.3f, 0.7f, 0.3f, 0.5f);
  15961. mDogu[i].Update();
  15962. }
  15963. if (ikMode2 == 15)
  15964. {
  15965. gDogu[i].GetComponent<Renderer>().material.color = new Color(1f, 0.3f, 0.3f, 0.5f);
  15966. }
  15967. if (ikMode2 == 13)
  15968. {
  15969. gDogu[i].GetComponent<Renderer>().material.color = new Color(0.7f, 0.7f, 0.3f, 0.5f);
  15970. mDogu[i].Update();
  15971. }
  15972. if (ikMode2 == 13)
  15973. {
  15974. if ((ikModeOld2 == 0 || ikModeOld2 >= 9) && ikModeOld2 != 13 && gDogu[i])
  15975. {
  15976. mDogu[i].ido = 5;
  15977. mDogu[i].reset = true;
  15978. }
  15979. else
  15980. {
  15981. gDogu[i].transform.position = doguBObject[i].transform.position;
  15982. gDogu[i].transform.eulerAngles = doguBObject[i].transform.eulerAngles;
  15983. mDogu[i].maid = doguBObject[i];
  15984. mDogu[i].ido = 5;
  15985. }
  15986. }
  15987. else if (ikMode2 == 11)
  15988. {
  15989. if ((ikModeOld2 == 0 || ikModeOld2 >= 9) && ikModeOld2 != 11 && gDogu[i])
  15990. {
  15991. mDogu[i].ido = 3;
  15992. mDogu[i].reset = true;
  15993. }
  15994. else
  15995. {
  15996. gDogu[i].transform.position = doguBObject[i].transform.position;
  15997. gDogu[i].transform.eulerAngles = doguBObject[i].transform.eulerAngles;
  15998. mDogu[i].maid = doguBObject[i];
  15999. mDogu[i].ido = 3;
  16000. }
  16001. }
  16002. else if (ikMode2 == 12)
  16003. {
  16004. if ((ikModeOld2 == 0 || ikModeOld2 >= 9) && ikModeOld2 != 12 && gDogu[i])
  16005. {
  16006. mDogu[i].ido = 2;
  16007. mDogu[i].reset = true;
  16008. }
  16009. else
  16010. {
  16011. gDogu[i].transform.position = doguBObject[i].transform.position;
  16012. gDogu[i].transform.eulerAngles = doguBObject[i].transform.eulerAngles;
  16013. mDogu[i].maid = doguBObject[i];
  16014. mDogu[i].ido = 2;
  16015. }
  16016. }
  16017. else if (ikMode2 == 10)
  16018. {
  16019. if ((ikModeOld2 == 0 || ikModeOld2 >= 9) && ikModeOld2 != 10 && gDogu[i])
  16020. {
  16021. mDogu[i].ido = 1;
  16022. mDogu[i].reset = true;
  16023. }
  16024. else
  16025. {
  16026. gDogu[i].transform.position = doguBObject[i].transform.position;
  16027. gDogu[i].transform.eulerAngles = doguBObject[i].transform.eulerAngles;
  16028. mDogu[i].maid = doguBObject[i];
  16029. mDogu[i].maidArray = doguBObject.ToArray();
  16030. mDogu[i].mArray = mDogu.ToArray<MouseDrag6>();
  16031. mDogu[i].ido = 1;
  16032. }
  16033. }
  16034. else if (ikMode2 == 9)
  16035. {
  16036. if ((ikModeOld2 == 0 || ikModeOld2 >= 9) && ikModeOld2 != 9 && gDogu[i])
  16037. {
  16038. mDogu[i].ido = 4;
  16039. mDogu[i].reset = true;
  16040. }
  16041. else
  16042. {
  16043. gDogu[i].transform.position = doguBObject[i].transform.position;
  16044. gDogu[i].transform.eulerAngles = doguBObject[i].transform.eulerAngles;
  16045. mDogu[i].maid = doguBObject[i];
  16046. mDogu[i].ido = 4;
  16047. }
  16048. }
  16049. else if (ikMode2 == 14)
  16050. {
  16051. if ((ikModeOld2 == 0 || ikModeOld2 >= 9) && ikModeOld2 != 14 && gDogu[i])
  16052. {
  16053. mDogu[i].ido = 6;
  16054. mDogu[i].reset = true;
  16055. }
  16056. else
  16057. {
  16058. gDogu[i].transform.position = doguBObject[i].transform.position;
  16059. gDogu[i].transform.eulerAngles = doguBObject[i].transform.eulerAngles;
  16060. mDogu[i].maid = doguBObject[i];
  16061. mDogu[i].ido = 6;
  16062. }
  16063. }
  16064. else if (ikMode2 == 15)
  16065. {
  16066. if ((ikModeOld2 == 0 || ikModeOld2 >= 9) && ikModeOld2 != 15 && gDogu[i])
  16067. {
  16068. mDogu[i].ido = 7;
  16069. mDogu[i].reset = true;
  16070. }
  16071. else
  16072. {
  16073. gDogu[i].transform.position = doguBObject[i].transform.position;
  16074. gDogu[i].transform.eulerAngles = doguBObject[i].transform.eulerAngles;
  16075. mDogu[i].maid = doguBObject[i];
  16076. mDogu[i].ido = 7;
  16077. }
  16078. }
  16079. }
  16080. }
  16081. ikModeOld2 = ikMode2;
  16082. }
  16083. if (isVR)
  16084. {
  16085. if (Input.GetKeyDown(KeyCode.F8) && this.getModKeyPressing(modKey.Shift))
  16086. {
  16087. if (!isVR2)
  16088. {
  16089. isVR2 = true;
  16090. base.Preferences["config"]["shift_f8"].Value = "true";
  16091. base.SaveConfig();
  16092. GameMain.Instance.SoundMgr.PlaySe("se002.ogg", false);
  16093. }
  16094. else
  16095. {
  16096. isVR2 = false;
  16097. base.Preferences["config"]["shift_f8"].Value = "false";
  16098. base.SaveConfig();
  16099. GameMain.Instance.SoundMgr.PlaySe("se003.ogg", false);
  16100. }
  16101. }
  16102. if (Input.GetKey(KeyCode.F8) && Input.GetKeyDown(KeyCode.Alpha1))
  16103. {
  16104. loadScene = 1;
  16105. GameMain.Instance.SoundMgr.PlaySe("se002.ogg", false);
  16106. }
  16107. if (Input.GetKey(KeyCode.F8) && Input.GetKeyDown(KeyCode.Alpha2))
  16108. {
  16109. loadScene = 2;
  16110. GameMain.Instance.SoundMgr.PlaySe("se002.ogg", false);
  16111. }
  16112. if (Input.GetKey(KeyCode.F8) && Input.GetKeyDown(KeyCode.Alpha3))
  16113. {
  16114. loadScene = 3;
  16115. GameMain.Instance.SoundMgr.PlaySe("se002.ogg", false);
  16116. }
  16117. if (Input.GetKey(KeyCode.F8) && Input.GetKeyDown(KeyCode.Alpha4))
  16118. {
  16119. loadScene = 4;
  16120. GameMain.Instance.SoundMgr.PlaySe("se002.ogg", false);
  16121. }
  16122. if (Input.GetKey(KeyCode.F8) && Input.GetKeyDown(KeyCode.Alpha5))
  16123. {
  16124. loadScene = 5;
  16125. GameMain.Instance.SoundMgr.PlaySe("se002.ogg", false);
  16126. }
  16127. if (Input.GetKey(KeyCode.F8) && Input.GetKeyDown(KeyCode.Alpha6))
  16128. {
  16129. loadScene = 6;
  16130. GameMain.Instance.SoundMgr.PlaySe("se002.ogg", false);
  16131. }
  16132. if (Input.GetKey(KeyCode.F8) && Input.GetKeyDown(KeyCode.Alpha7))
  16133. {
  16134. loadScene = 7;
  16135. GameMain.Instance.SoundMgr.PlaySe("se002.ogg", false);
  16136. }
  16137. if (Input.GetKey(KeyCode.F8) && Input.GetKeyDown(KeyCode.Alpha8))
  16138. {
  16139. loadScene = 8;
  16140. GameMain.Instance.SoundMgr.PlaySe("se002.ogg", false);
  16141. }
  16142. if (Input.GetKey(KeyCode.F8) && Input.GetKeyDown(KeyCode.Alpha9))
  16143. {
  16144. loadScene = 9;
  16145. GameMain.Instance.SoundMgr.PlaySe("se002.ogg", false);
  16146. }
  16147. if (Input.GetKey(KeyCode.F8) && Input.GetKeyDown(KeyCode.Alpha0))
  16148. {
  16149. loadScene = 10;
  16150. GameMain.Instance.SoundMgr.PlaySe("se002.ogg", false);
  16151. }
  16152. for (int j = 0; j < 7; j++)
  16153. {
  16154. if (!maidArray[j])
  16155. {
  16156. maidArray[j] = GameMain.Instance.CharacterMgr.GetMaid(j);
  16157. }
  16158. }
  16159. }
  16160. }
  16161. }
  16162. }
  16163. }