MultipleMaids.MaidUpdate.cs 917 KB

1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950515253545556575859606162636465666768697071727374757677787980818283848586878889909192939495969798991001011021031041051061071081091101111121131141151161171181191201211221231241251261271281291301311321331341351361371381391401411421431441451461471481491501511521531541551561571581591601611621631641651661671681691701711721731741751761771781791801811821831841851861871881891901911921931941951961971981992002012022032042052062072082092102112122132142152162172182192202212222232242252262272282292302312322332342352362372382392402412422432442452462472482492502512522532542552562572582592602612622632642652662672682692702712722732742752762772782792802812822832842852862872882892902912922932942952962972982993003013023033043053063073083093103113123133143153163173183193203213223233243253263273283293303313323333343353363373383393403413423433443453463473483493503513523533543553563573583593603613623633643653663673683693703713723733743753763773783793803813823833843853863873883893903913923933943953963973983994004014024034044054064074084094104114124134144154164174184194204214224234244254264274284294304314324334344354364374384394404414424434444454464474484494504514524534544554564574584594604614624634644654664674684694704714724734744754764774784794804814824834844854864874884894904914924934944954964974984995005015025035045055065075085095105115125135145155165175185195205215225235245255265275285295305315325335345355365375385395405415425435445455465475485495505515525535545555565575585595605615625635645655665675685695705715725735745755765775785795805815825835845855865875885895905915925935945955965975985996006016026036046056066076086096106116126136146156166176186196206216226236246256266276286296306316326336346356366376386396406416426436446456466476486496506516526536546556566576586596606616626636646656666676686696706716726736746756766776786796806816826836846856866876886896906916926936946956966976986997007017027037047057067077087097107117127137147157167177187197207217227237247257267277287297307317327337347357367377387397407417427437447457467477487497507517527537547557567577587597607617627637647657667677687697707717727737747757767777787797807817827837847857867877887897907917927937947957967977987998008018028038048058068078088098108118128138148158168178188198208218228238248258268278288298308318328338348358368378388398408418428438448458468478488498508518528538548558568578588598608618628638648658668678688698708718728738748758768778788798808818828838848858868878888898908918928938948958968978988999009019029039049059069079089099109119129139149159169179189199209219229239249259269279289299309319329339349359369379389399409419429439449459469479489499509519529539549559569579589599609619629639649659669679689699709719729739749759769779789799809819829839849859869879889899909919929939949959969979989991000100110021003100410051006100710081009101010111012101310141015101610171018101910201021102210231024102510261027102810291030103110321033103410351036103710381039104010411042104310441045104610471048104910501051105210531054105510561057105810591060106110621063106410651066106710681069107010711072107310741075107610771078107910801081108210831084108510861087108810891090109110921093109410951096109710981099110011011102110311041105110611071108110911101111111211131114111511161117111811191120112111221123112411251126112711281129113011311132113311341135113611371138113911401141114211431144114511461147114811491150115111521153115411551156115711581159116011611162116311641165116611671168116911701171117211731174117511761177117811791180118111821183118411851186118711881189119011911192119311941195119611971198119912001201120212031204120512061207120812091210121112121213121412151216121712181219122012211222122312241225122612271228122912301231123212331234123512361237123812391240124112421243124412451246124712481249125012511252125312541255125612571258125912601261126212631264126512661267126812691270127112721273127412751276127712781279128012811282128312841285128612871288128912901291129212931294129512961297129812991300130113021303130413051306130713081309131013111312131313141315131613171318131913201321132213231324132513261327132813291330133113321333133413351336133713381339134013411342134313441345134613471348134913501351135213531354135513561357135813591360136113621363136413651366136713681369137013711372137313741375137613771378137913801381138213831384138513861387138813891390139113921393139413951396139713981399140014011402140314041405140614071408140914101411141214131414141514161417141814191420142114221423142414251426142714281429143014311432143314341435143614371438143914401441144214431444144514461447144814491450145114521453145414551456145714581459146014611462146314641465146614671468146914701471147214731474147514761477147814791480148114821483148414851486148714881489149014911492149314941495149614971498149915001501150215031504150515061507150815091510151115121513151415151516151715181519152015211522152315241525152615271528152915301531153215331534153515361537153815391540154115421543154415451546154715481549155015511552155315541555155615571558155915601561156215631564156515661567156815691570157115721573157415751576157715781579158015811582158315841585158615871588158915901591159215931594159515961597159815991600160116021603160416051606160716081609161016111612161316141615161616171618161916201621162216231624162516261627162816291630163116321633163416351636163716381639164016411642164316441645164616471648164916501651165216531654165516561657165816591660166116621663166416651666166716681669167016711672167316741675167616771678167916801681168216831684168516861687168816891690169116921693169416951696169716981699170017011702170317041705170617071708170917101711171217131714171517161717171817191720172117221723172417251726172717281729173017311732173317341735173617371738173917401741174217431744174517461747174817491750175117521753175417551756175717581759176017611762176317641765176617671768176917701771177217731774177517761777177817791780178117821783178417851786178717881789179017911792179317941795179617971798179918001801180218031804180518061807180818091810181118121813181418151816181718181819182018211822182318241825182618271828182918301831183218331834183518361837183818391840184118421843184418451846184718481849185018511852185318541855185618571858185918601861186218631864186518661867186818691870187118721873187418751876187718781879188018811882188318841885188618871888188918901891189218931894189518961897189818991900190119021903190419051906190719081909191019111912191319141915191619171918191919201921192219231924192519261927192819291930193119321933193419351936193719381939194019411942194319441945194619471948194919501951195219531954195519561957195819591960196119621963196419651966196719681969197019711972197319741975197619771978197919801981198219831984198519861987198819891990199119921993199419951996199719981999200020012002200320042005200620072008200920102011201220132014201520162017201820192020202120222023202420252026202720282029203020312032203320342035203620372038203920402041204220432044204520462047204820492050205120522053205420552056205720582059206020612062206320642065206620672068206920702071207220732074207520762077207820792080208120822083208420852086208720882089209020912092209320942095209620972098209921002101210221032104210521062107210821092110211121122113211421152116211721182119212021212122212321242125212621272128212921302131213221332134213521362137213821392140214121422143214421452146214721482149215021512152215321542155215621572158215921602161216221632164216521662167216821692170217121722173217421752176217721782179218021812182218321842185218621872188218921902191219221932194219521962197219821992200220122022203220422052206220722082209221022112212221322142215221622172218221922202221222222232224222522262227222822292230223122322233223422352236223722382239224022412242224322442245224622472248224922502251225222532254225522562257225822592260226122622263226422652266226722682269227022712272227322742275227622772278227922802281228222832284228522862287228822892290229122922293229422952296229722982299230023012302230323042305230623072308230923102311231223132314231523162317231823192320232123222323232423252326232723282329233023312332233323342335233623372338233923402341234223432344234523462347234823492350235123522353235423552356235723582359236023612362236323642365236623672368236923702371237223732374237523762377237823792380238123822383238423852386238723882389239023912392239323942395239623972398239924002401240224032404240524062407240824092410241124122413241424152416241724182419242024212422242324242425242624272428242924302431243224332434243524362437243824392440244124422443244424452446244724482449245024512452245324542455245624572458245924602461246224632464246524662467246824692470247124722473247424752476247724782479248024812482248324842485248624872488248924902491249224932494249524962497249824992500250125022503250425052506250725082509251025112512251325142515251625172518251925202521252225232524252525262527252825292530253125322533253425352536253725382539254025412542254325442545254625472548254925502551255225532554255525562557255825592560256125622563256425652566256725682569257025712572257325742575257625772578257925802581258225832584258525862587258825892590259125922593259425952596259725982599260026012602260326042605260626072608260926102611261226132614261526162617261826192620262126222623262426252626262726282629263026312632263326342635263626372638263926402641264226432644264526462647264826492650265126522653265426552656265726582659266026612662266326642665266626672668266926702671267226732674267526762677267826792680268126822683268426852686268726882689269026912692269326942695269626972698269927002701270227032704270527062707270827092710271127122713271427152716271727182719272027212722272327242725272627272728272927302731273227332734273527362737273827392740274127422743274427452746274727482749275027512752275327542755275627572758275927602761276227632764276527662767276827692770277127722773277427752776277727782779278027812782278327842785278627872788278927902791279227932794279527962797279827992800280128022803280428052806280728082809281028112812281328142815281628172818281928202821282228232824282528262827282828292830283128322833283428352836283728382839284028412842284328442845284628472848284928502851285228532854285528562857285828592860286128622863286428652866286728682869287028712872287328742875287628772878287928802881288228832884288528862887288828892890289128922893289428952896289728982899290029012902290329042905290629072908290929102911291229132914291529162917291829192920292129222923292429252926292729282929293029312932293329342935293629372938293929402941294229432944294529462947294829492950295129522953295429552956295729582959296029612962296329642965296629672968296929702971297229732974297529762977297829792980298129822983298429852986298729882989299029912992299329942995299629972998299930003001300230033004300530063007300830093010301130123013301430153016301730183019302030213022302330243025302630273028302930303031303230333034303530363037303830393040304130423043304430453046304730483049305030513052305330543055305630573058305930603061306230633064306530663067306830693070307130723073307430753076307730783079308030813082308330843085308630873088308930903091309230933094309530963097309830993100310131023103310431053106310731083109311031113112311331143115311631173118311931203121312231233124312531263127312831293130313131323133313431353136313731383139314031413142314331443145314631473148314931503151315231533154315531563157315831593160316131623163316431653166316731683169317031713172317331743175317631773178317931803181318231833184318531863187318831893190319131923193319431953196319731983199320032013202320332043205320632073208320932103211321232133214321532163217321832193220322132223223322432253226322732283229323032313232323332343235323632373238323932403241324232433244324532463247324832493250325132523253325432553256325732583259326032613262326332643265326632673268326932703271327232733274327532763277327832793280328132823283328432853286328732883289329032913292329332943295329632973298329933003301330233033304330533063307330833093310331133123313331433153316331733183319332033213322332333243325332633273328332933303331333233333334333533363337333833393340334133423343334433453346334733483349335033513352335333543355335633573358335933603361336233633364336533663367336833693370337133723373337433753376337733783379338033813382338333843385338633873388338933903391339233933394339533963397339833993400340134023403340434053406340734083409341034113412341334143415341634173418341934203421342234233424342534263427342834293430343134323433343434353436343734383439344034413442344334443445344634473448344934503451345234533454345534563457345834593460346134623463346434653466346734683469347034713472347334743475347634773478347934803481348234833484348534863487348834893490349134923493349434953496349734983499350035013502350335043505350635073508350935103511351235133514351535163517351835193520352135223523352435253526352735283529353035313532353335343535353635373538353935403541354235433544354535463547354835493550355135523553355435553556355735583559356035613562356335643565356635673568356935703571357235733574357535763577357835793580358135823583358435853586358735883589359035913592359335943595359635973598359936003601360236033604360536063607360836093610361136123613361436153616361736183619362036213622362336243625362636273628362936303631363236333634363536363637363836393640364136423643364436453646364736483649365036513652365336543655365636573658365936603661366236633664366536663667366836693670367136723673367436753676367736783679368036813682368336843685368636873688368936903691369236933694369536963697369836993700370137023703370437053706370737083709371037113712371337143715371637173718371937203721372237233724372537263727372837293730373137323733373437353736373737383739374037413742374337443745374637473748374937503751375237533754375537563757375837593760376137623763376437653766376737683769377037713772377337743775377637773778377937803781378237833784378537863787378837893790379137923793379437953796379737983799380038013802380338043805380638073808380938103811381238133814381538163817381838193820382138223823382438253826382738283829383038313832383338343835383638373838383938403841384238433844384538463847384838493850385138523853385438553856385738583859386038613862386338643865386638673868386938703871387238733874387538763877387838793880388138823883388438853886388738883889389038913892389338943895389638973898389939003901390239033904390539063907390839093910391139123913391439153916391739183919392039213922392339243925392639273928392939303931393239333934393539363937393839393940394139423943394439453946394739483949395039513952395339543955395639573958395939603961396239633964396539663967396839693970397139723973397439753976397739783979398039813982398339843985398639873988398939903991399239933994399539963997399839994000400140024003400440054006400740084009401040114012401340144015401640174018401940204021402240234024402540264027402840294030403140324033403440354036403740384039404040414042404340444045404640474048404940504051405240534054405540564057405840594060406140624063406440654066406740684069407040714072407340744075407640774078407940804081408240834084408540864087408840894090409140924093409440954096409740984099410041014102410341044105410641074108410941104111411241134114411541164117411841194120412141224123412441254126412741284129413041314132413341344135413641374138413941404141414241434144414541464147414841494150415141524153415441554156415741584159416041614162416341644165416641674168416941704171417241734174417541764177417841794180418141824183418441854186418741884189419041914192419341944195419641974198419942004201420242034204420542064207420842094210421142124213421442154216421742184219422042214222422342244225422642274228422942304231423242334234423542364237423842394240424142424243424442454246424742484249425042514252425342544255425642574258425942604261426242634264426542664267426842694270427142724273427442754276427742784279428042814282428342844285428642874288428942904291429242934294429542964297429842994300430143024303430443054306430743084309431043114312431343144315431643174318431943204321432243234324432543264327432843294330433143324333433443354336433743384339434043414342434343444345434643474348434943504351435243534354435543564357435843594360436143624363436443654366436743684369437043714372437343744375437643774378437943804381438243834384438543864387438843894390439143924393439443954396439743984399440044014402440344044405440644074408440944104411441244134414441544164417441844194420442144224423442444254426442744284429443044314432443344344435443644374438443944404441444244434444444544464447444844494450445144524453445444554456445744584459446044614462446344644465446644674468446944704471447244734474447544764477447844794480448144824483448444854486448744884489449044914492449344944495449644974498449945004501450245034504450545064507450845094510451145124513451445154516451745184519452045214522452345244525452645274528452945304531453245334534453545364537453845394540454145424543454445454546454745484549455045514552455345544555455645574558455945604561456245634564456545664567456845694570457145724573457445754576457745784579458045814582458345844585458645874588458945904591459245934594459545964597459845994600460146024603460446054606460746084609461046114612461346144615461646174618461946204621462246234624462546264627462846294630463146324633463446354636463746384639464046414642464346444645464646474648464946504651465246534654465546564657465846594660466146624663466446654666466746684669467046714672467346744675467646774678467946804681468246834684468546864687468846894690469146924693469446954696469746984699470047014702470347044705470647074708470947104711471247134714471547164717471847194720472147224723472447254726472747284729473047314732473347344735473647374738473947404741474247434744474547464747474847494750475147524753475447554756475747584759476047614762476347644765476647674768476947704771477247734774477547764777477847794780478147824783478447854786478747884789479047914792479347944795479647974798479948004801480248034804480548064807480848094810481148124813481448154816481748184819482048214822482348244825482648274828482948304831483248334834483548364837483848394840484148424843484448454846484748484849485048514852485348544855485648574858485948604861486248634864486548664867486848694870487148724873487448754876487748784879488048814882488348844885488648874888488948904891489248934894489548964897489848994900490149024903490449054906490749084909491049114912491349144915491649174918491949204921492249234924492549264927492849294930493149324933493449354936493749384939494049414942494349444945494649474948494949504951495249534954495549564957495849594960496149624963496449654966496749684969497049714972497349744975497649774978497949804981498249834984498549864987498849894990499149924993499449954996499749984999500050015002500350045005500650075008500950105011501250135014501550165017501850195020502150225023502450255026502750285029503050315032503350345035503650375038503950405041504250435044504550465047504850495050505150525053505450555056505750585059506050615062506350645065506650675068506950705071507250735074507550765077507850795080508150825083508450855086508750885089509050915092509350945095509650975098509951005101510251035104510551065107510851095110511151125113511451155116511751185119512051215122512351245125512651275128512951305131513251335134513551365137513851395140514151425143514451455146514751485149515051515152515351545155515651575158515951605161516251635164516551665167516851695170517151725173517451755176517751785179518051815182518351845185518651875188518951905191519251935194519551965197519851995200520152025203520452055206520752085209521052115212521352145215521652175218521952205221522252235224522552265227522852295230523152325233523452355236523752385239524052415242524352445245524652475248524952505251525252535254525552565257525852595260526152625263526452655266526752685269527052715272527352745275527652775278527952805281528252835284528552865287528852895290529152925293529452955296529752985299530053015302530353045305530653075308530953105311531253135314531553165317531853195320532153225323532453255326532753285329533053315332533353345335533653375338533953405341534253435344534553465347534853495350535153525353535453555356535753585359536053615362536353645365536653675368536953705371537253735374537553765377537853795380538153825383538453855386538753885389539053915392539353945395539653975398539954005401540254035404540554065407540854095410541154125413541454155416541754185419542054215422542354245425542654275428542954305431543254335434543554365437543854395440544154425443544454455446544754485449545054515452545354545455545654575458545954605461546254635464546554665467546854695470547154725473547454755476547754785479548054815482548354845485548654875488548954905491549254935494549554965497549854995500550155025503550455055506550755085509551055115512551355145515551655175518551955205521552255235524552555265527552855295530553155325533553455355536553755385539554055415542554355445545554655475548554955505551555255535554555555565557555855595560556155625563556455655566556755685569557055715572557355745575557655775578557955805581558255835584558555865587558855895590559155925593559455955596559755985599560056015602560356045605560656075608560956105611561256135614561556165617561856195620562156225623562456255626562756285629563056315632563356345635563656375638563956405641564256435644564556465647564856495650565156525653565456555656565756585659566056615662566356645665566656675668566956705671567256735674567556765677567856795680568156825683568456855686568756885689569056915692569356945695569656975698569957005701570257035704570557065707570857095710571157125713571457155716571757185719572057215722572357245725572657275728572957305731573257335734573557365737573857395740574157425743574457455746574757485749575057515752575357545755575657575758575957605761576257635764576557665767576857695770577157725773577457755776577757785779578057815782578357845785578657875788578957905791579257935794579557965797579857995800580158025803580458055806580758085809581058115812581358145815581658175818581958205821582258235824582558265827582858295830583158325833583458355836583758385839584058415842584358445845584658475848584958505851585258535854585558565857585858595860586158625863586458655866586758685869587058715872587358745875587658775878587958805881588258835884588558865887588858895890589158925893589458955896589758985899590059015902590359045905590659075908590959105911591259135914591559165917591859195920592159225923592459255926592759285929593059315932593359345935593659375938593959405941594259435944594559465947594859495950595159525953595459555956595759585959596059615962596359645965596659675968596959705971597259735974597559765977597859795980598159825983598459855986598759885989599059915992599359945995599659975998599960006001600260036004600560066007600860096010601160126013601460156016601760186019602060216022602360246025602660276028602960306031603260336034603560366037603860396040604160426043604460456046604760486049605060516052605360546055605660576058605960606061606260636064606560666067606860696070607160726073607460756076607760786079608060816082608360846085608660876088608960906091609260936094609560966097609860996100610161026103610461056106610761086109611061116112611361146115611661176118611961206121612261236124612561266127612861296130613161326133613461356136613761386139614061416142614361446145614661476148614961506151615261536154615561566157615861596160616161626163616461656166616761686169617061716172617361746175617661776178617961806181618261836184618561866187618861896190619161926193619461956196619761986199620062016202620362046205620662076208620962106211621262136214621562166217621862196220622162226223622462256226622762286229623062316232623362346235623662376238623962406241624262436244624562466247624862496250625162526253625462556256625762586259626062616262626362646265626662676268626962706271627262736274627562766277627862796280628162826283628462856286628762886289629062916292629362946295629662976298629963006301630263036304630563066307630863096310631163126313631463156316631763186319632063216322632363246325632663276328632963306331633263336334633563366337633863396340634163426343634463456346634763486349635063516352635363546355635663576358635963606361636263636364636563666367636863696370637163726373637463756376637763786379638063816382638363846385638663876388638963906391639263936394639563966397639863996400640164026403640464056406640764086409641064116412641364146415641664176418641964206421642264236424642564266427642864296430643164326433643464356436643764386439644064416442644364446445644664476448644964506451645264536454645564566457645864596460646164626463646464656466646764686469647064716472647364746475647664776478647964806481648264836484648564866487648864896490649164926493649464956496649764986499650065016502650365046505650665076508650965106511651265136514651565166517651865196520652165226523652465256526652765286529653065316532653365346535653665376538653965406541654265436544654565466547654865496550655165526553655465556556655765586559656065616562656365646565656665676568656965706571657265736574657565766577657865796580658165826583658465856586658765886589659065916592659365946595659665976598659966006601660266036604660566066607660866096610661166126613661466156616661766186619662066216622662366246625662666276628662966306631663266336634663566366637663866396640664166426643664466456646664766486649665066516652665366546655665666576658665966606661666266636664666566666667666866696670667166726673667466756676667766786679668066816682668366846685668666876688668966906691669266936694669566966697669866996700670167026703670467056706670767086709671067116712671367146715671667176718671967206721672267236724672567266727672867296730673167326733673467356736673767386739674067416742674367446745674667476748674967506751675267536754675567566757675867596760676167626763676467656766676767686769677067716772677367746775677667776778677967806781678267836784678567866787678867896790679167926793679467956796679767986799680068016802680368046805680668076808680968106811681268136814681568166817681868196820682168226823682468256826682768286829683068316832683368346835683668376838683968406841684268436844684568466847684868496850685168526853685468556856685768586859686068616862686368646865686668676868686968706871687268736874687568766877687868796880688168826883688468856886688768886889689068916892689368946895689668976898689969006901690269036904690569066907690869096910691169126913691469156916691769186919692069216922692369246925692669276928692969306931693269336934693569366937693869396940694169426943694469456946694769486949695069516952695369546955695669576958695969606961696269636964696569666967696869696970697169726973697469756976697769786979698069816982698369846985698669876988698969906991699269936994699569966997699869997000700170027003700470057006700770087009701070117012701370147015701670177018701970207021702270237024702570267027702870297030703170327033703470357036703770387039704070417042704370447045704670477048704970507051705270537054705570567057705870597060706170627063706470657066706770687069707070717072707370747075707670777078707970807081708270837084708570867087708870897090709170927093709470957096709770987099710071017102710371047105710671077108710971107111711271137114711571167117711871197120712171227123712471257126712771287129713071317132713371347135713671377138713971407141714271437144714571467147714871497150715171527153715471557156715771587159716071617162716371647165716671677168716971707171717271737174717571767177717871797180718171827183718471857186718771887189719071917192719371947195719671977198719972007201720272037204720572067207720872097210721172127213721472157216721772187219722072217222722372247225722672277228722972307231723272337234723572367237723872397240724172427243724472457246724772487249725072517252725372547255725672577258725972607261726272637264726572667267726872697270727172727273727472757276727772787279728072817282728372847285728672877288728972907291729272937294729572967297729872997300730173027303730473057306730773087309731073117312731373147315731673177318731973207321732273237324732573267327732873297330733173327333733473357336733773387339734073417342734373447345734673477348734973507351735273537354735573567357735873597360736173627363736473657366736773687369737073717372737373747375737673777378737973807381738273837384738573867387738873897390739173927393739473957396739773987399740074017402740374047405740674077408740974107411741274137414741574167417741874197420742174227423742474257426742774287429743074317432743374347435743674377438743974407441744274437444744574467447744874497450745174527453745474557456745774587459746074617462746374647465746674677468746974707471747274737474747574767477747874797480748174827483748474857486748774887489749074917492749374947495749674977498749975007501750275037504750575067507750875097510751175127513751475157516751775187519752075217522752375247525752675277528752975307531753275337534753575367537753875397540754175427543754475457546754775487549755075517552755375547555755675577558755975607561756275637564756575667567756875697570757175727573757475757576757775787579758075817582758375847585758675877588758975907591759275937594759575967597759875997600760176027603760476057606760776087609761076117612761376147615761676177618761976207621762276237624762576267627762876297630763176327633763476357636763776387639764076417642764376447645764676477648764976507651765276537654765576567657765876597660766176627663766476657666766776687669767076717672767376747675767676777678767976807681768276837684768576867687768876897690769176927693769476957696769776987699770077017702770377047705770677077708770977107711771277137714771577167717771877197720772177227723772477257726772777287729773077317732773377347735773677377738773977407741774277437744774577467747774877497750775177527753775477557756775777587759776077617762776377647765776677677768776977707771777277737774777577767777777877797780778177827783778477857786778777887789779077917792779377947795779677977798779978007801780278037804780578067807780878097810781178127813781478157816781778187819782078217822782378247825782678277828782978307831783278337834783578367837783878397840784178427843784478457846784778487849785078517852785378547855785678577858785978607861786278637864786578667867786878697870787178727873787478757876787778787879788078817882788378847885788678877888788978907891789278937894789578967897789878997900790179027903790479057906790779087909791079117912791379147915791679177918791979207921792279237924792579267927792879297930793179327933793479357936793779387939794079417942794379447945794679477948794979507951795279537954795579567957795879597960796179627963796479657966796779687969797079717972797379747975797679777978797979807981798279837984798579867987798879897990799179927993799479957996799779987999800080018002800380048005800680078008800980108011801280138014801580168017801880198020802180228023802480258026802780288029803080318032803380348035803680378038803980408041804280438044804580468047804880498050805180528053805480558056805780588059806080618062806380648065806680678068806980708071807280738074807580768077807880798080808180828083808480858086808780888089809080918092809380948095809680978098809981008101810281038104810581068107810881098110811181128113811481158116811781188119812081218122812381248125812681278128812981308131813281338134813581368137813881398140814181428143814481458146814781488149815081518152815381548155815681578158815981608161816281638164816581668167816881698170817181728173817481758176817781788179818081818182818381848185818681878188818981908191819281938194819581968197819881998200820182028203820482058206820782088209821082118212821382148215821682178218821982208221822282238224822582268227822882298230823182328233823482358236823782388239824082418242824382448245824682478248824982508251825282538254825582568257825882598260826182628263826482658266826782688269827082718272827382748275827682778278827982808281828282838284828582868287828882898290829182928293829482958296829782988299830083018302830383048305830683078308830983108311831283138314831583168317831883198320832183228323832483258326832783288329833083318332833383348335833683378338833983408341834283438344834583468347834883498350835183528353835483558356835783588359836083618362836383648365836683678368836983708371837283738374837583768377837883798380838183828383838483858386838783888389839083918392839383948395839683978398839984008401840284038404840584068407840884098410841184128413841484158416841784188419842084218422842384248425842684278428842984308431843284338434843584368437843884398440844184428443844484458446844784488449845084518452845384548455845684578458845984608461846284638464846584668467846884698470847184728473847484758476847784788479848084818482848384848485848684878488848984908491849284938494849584968497849884998500850185028503850485058506850785088509851085118512851385148515851685178518851985208521852285238524852585268527852885298530853185328533853485358536853785388539854085418542854385448545854685478548854985508551855285538554855585568557855885598560856185628563856485658566856785688569857085718572857385748575857685778578857985808581858285838584858585868587858885898590859185928593859485958596859785988599860086018602860386048605860686078608860986108611861286138614861586168617861886198620862186228623862486258626862786288629863086318632863386348635863686378638863986408641864286438644864586468647864886498650865186528653865486558656865786588659866086618662866386648665866686678668866986708671867286738674867586768677867886798680868186828683868486858686868786888689869086918692869386948695869686978698869987008701870287038704870587068707870887098710871187128713871487158716871787188719872087218722872387248725872687278728872987308731873287338734873587368737873887398740874187428743874487458746874787488749875087518752875387548755875687578758875987608761876287638764876587668767876887698770877187728773877487758776877787788779878087818782878387848785878687878788878987908791879287938794879587968797879887998800880188028803880488058806880788088809881088118812881388148815881688178818881988208821882288238824882588268827882888298830883188328833883488358836883788388839884088418842884388448845884688478848884988508851885288538854885588568857885888598860886188628863886488658866886788688869887088718872887388748875887688778878887988808881888288838884888588868887888888898890889188928893889488958896889788988899890089018902890389048905890689078908890989108911891289138914891589168917891889198920892189228923892489258926892789288929893089318932893389348935893689378938893989408941894289438944894589468947894889498950895189528953895489558956895789588959896089618962896389648965896689678968896989708971897289738974897589768977897889798980898189828983898489858986898789888989899089918992899389948995899689978998899990009001900290039004900590069007900890099010901190129013901490159016901790189019902090219022902390249025902690279028902990309031903290339034903590369037903890399040904190429043904490459046904790489049905090519052905390549055905690579058905990609061906290639064906590669067906890699070907190729073907490759076907790789079908090819082908390849085908690879088908990909091909290939094909590969097909890999100910191029103910491059106910791089109911091119112911391149115911691179118911991209121912291239124912591269127912891299130913191329133913491359136913791389139914091419142914391449145914691479148914991509151915291539154915591569157915891599160916191629163916491659166916791689169917091719172917391749175917691779178917991809181918291839184918591869187918891899190919191929193919491959196919791989199920092019202920392049205920692079208920992109211921292139214921592169217921892199220922192229223922492259226922792289229923092319232923392349235923692379238923992409241924292439244924592469247924892499250925192529253925492559256925792589259926092619262926392649265926692679268926992709271927292739274927592769277927892799280928192829283928492859286928792889289929092919292929392949295929692979298929993009301930293039304930593069307930893099310931193129313931493159316931793189319932093219322932393249325932693279328932993309331933293339334933593369337933893399340934193429343934493459346934793489349935093519352935393549355935693579358935993609361936293639364936593669367936893699370937193729373937493759376937793789379938093819382938393849385938693879388938993909391939293939394939593969397939893999400940194029403940494059406940794089409941094119412941394149415941694179418941994209421942294239424942594269427942894299430943194329433943494359436943794389439944094419442944394449445944694479448944994509451945294539454945594569457945894599460946194629463946494659466946794689469947094719472947394749475947694779478947994809481948294839484948594869487948894899490949194929493949494959496949794989499950095019502950395049505950695079508950995109511951295139514951595169517951895199520952195229523952495259526952795289529953095319532953395349535953695379538953995409541954295439544954595469547954895499550955195529553955495559556955795589559956095619562956395649565956695679568956995709571957295739574957595769577957895799580958195829583958495859586958795889589959095919592959395949595959695979598959996009601960296039604960596069607960896099610961196129613961496159616961796189619962096219622962396249625962696279628962996309631963296339634963596369637963896399640964196429643964496459646964796489649965096519652965396549655965696579658965996609661966296639664966596669667966896699670967196729673967496759676967796789679968096819682968396849685968696879688968996909691969296939694969596969697969896999700970197029703970497059706970797089709971097119712971397149715971697179718971997209721972297239724972597269727972897299730973197329733973497359736973797389739974097419742974397449745974697479748974997509751975297539754975597569757975897599760976197629763976497659766976797689769977097719772977397749775977697779778977997809781978297839784978597869787978897899790979197929793979497959796979797989799980098019802980398049805980698079808980998109811981298139814981598169817981898199820982198229823982498259826982798289829983098319832983398349835983698379838983998409841984298439844984598469847984898499850985198529853985498559856985798589859986098619862986398649865986698679868986998709871987298739874987598769877987898799880988198829883988498859886988798889889989098919892989398949895989698979898989999009901990299039904990599069907990899099910991199129913991499159916991799189919992099219922992399249925992699279928992999309931993299339934993599369937993899399940994199429943994499459946994799489949995099519952995399549955995699579958995999609961996299639964996599669967996899699970997199729973997499759976997799789979998099819982998399849985998699879988998999909991999299939994999599969997999899991000010001100021000310004100051000610007100081000910010100111001210013100141001510016100171001810019100201002110022100231002410025100261002710028100291003010031100321003310034100351003610037100381003910040100411004210043100441004510046100471004810049100501005110052100531005410055100561005710058100591006010061100621006310064100651006610067100681006910070100711007210073100741007510076100771007810079100801008110082100831008410085100861008710088100891009010091100921009310094100951009610097100981009910100101011010210103101041010510106101071010810109101101011110112101131011410115101161011710118101191012010121101221012310124101251012610127101281012910130101311013210133101341013510136101371013810139101401014110142101431014410145101461014710148101491015010151101521015310154101551015610157101581015910160101611016210163101641016510166101671016810169101701017110172101731017410175101761017710178101791018010181101821018310184101851018610187101881018910190101911019210193101941019510196101971019810199102001020110202102031020410205102061020710208102091021010211102121021310214102151021610217102181021910220102211022210223102241022510226102271022810229102301023110232102331023410235102361023710238102391024010241102421024310244102451024610247102481024910250102511025210253102541025510256102571025810259102601026110262102631026410265102661026710268102691027010271102721027310274102751027610277102781027910280102811028210283102841028510286102871028810289102901029110292102931029410295102961029710298102991030010301103021030310304103051030610307103081030910310103111031210313103141031510316103171031810319103201032110322103231032410325103261032710328103291033010331103321033310334103351033610337103381033910340103411034210343103441034510346103471034810349103501035110352103531035410355103561035710358103591036010361103621036310364103651036610367103681036910370103711037210373103741037510376103771037810379103801038110382103831038410385103861038710388103891039010391103921039310394103951039610397103981039910400104011040210403104041040510406104071040810409104101041110412104131041410415104161041710418104191042010421104221042310424104251042610427104281042910430104311043210433104341043510436104371043810439104401044110442104431044410445104461044710448104491045010451104521045310454104551045610457104581045910460104611046210463104641046510466104671046810469104701047110472104731047410475104761047710478104791048010481104821048310484104851048610487104881048910490104911049210493104941049510496104971049810499105001050110502105031050410505105061050710508105091051010511105121051310514105151051610517105181051910520105211052210523105241052510526105271052810529105301053110532105331053410535105361053710538105391054010541105421054310544105451054610547105481054910550105511055210553105541055510556105571055810559105601056110562105631056410565105661056710568105691057010571105721057310574105751057610577105781057910580105811058210583105841058510586105871058810589105901059110592105931059410595105961059710598105991060010601106021060310604106051060610607106081060910610106111061210613106141061510616106171061810619106201062110622106231062410625106261062710628106291063010631106321063310634106351063610637106381063910640106411064210643106441064510646106471064810649106501065110652106531065410655106561065710658106591066010661106621066310664106651066610667106681066910670106711067210673106741067510676106771067810679106801068110682106831068410685106861068710688106891069010691106921069310694106951069610697106981069910700107011070210703107041070510706107071070810709107101071110712107131071410715107161071710718107191072010721107221072310724107251072610727107281072910730107311073210733107341073510736107371073810739107401074110742107431074410745107461074710748107491075010751107521075310754107551075610757107581075910760107611076210763107641076510766107671076810769107701077110772107731077410775107761077710778107791078010781107821078310784107851078610787107881078910790107911079210793107941079510796107971079810799108001080110802108031080410805108061080710808108091081010811108121081310814108151081610817108181081910820108211082210823108241082510826108271082810829108301083110832108331083410835108361083710838108391084010841108421084310844108451084610847108481084910850108511085210853108541085510856108571085810859108601086110862108631086410865108661086710868108691087010871108721087310874108751087610877108781087910880108811088210883108841088510886108871088810889108901089110892108931089410895108961089710898108991090010901109021090310904109051090610907109081090910910109111091210913109141091510916109171091810919109201092110922109231092410925109261092710928109291093010931109321093310934109351093610937109381093910940109411094210943109441094510946109471094810949109501095110952109531095410955109561095710958109591096010961109621096310964109651096610967109681096910970109711097210973109741097510976109771097810979109801098110982109831098410985109861098710988109891099010991109921099310994109951099610997109981099911000110011100211003110041100511006110071100811009110101101111012110131101411015110161101711018110191102011021110221102311024110251102611027110281102911030110311103211033110341103511036110371103811039110401104111042110431104411045110461104711048110491105011051110521105311054110551105611057110581105911060110611106211063110641106511066110671106811069110701107111072110731107411075110761107711078110791108011081110821108311084110851108611087110881108911090110911109211093110941109511096110971109811099111001110111102111031110411105111061110711108111091111011111111121111311114111151111611117111181111911120111211112211123111241112511126111271112811129111301113111132111331113411135111361113711138111391114011141111421114311144111451114611147111481114911150111511115211153111541115511156111571115811159111601116111162111631116411165111661116711168111691117011171111721117311174111751117611177111781117911180111811118211183111841118511186111871118811189111901119111192111931119411195111961119711198111991120011201112021120311204112051120611207112081120911210112111121211213112141121511216112171121811219112201122111222112231122411225112261122711228112291123011231112321123311234112351123611237112381123911240112411124211243112441124511246112471124811249112501125111252112531125411255112561125711258112591126011261112621126311264112651126611267112681126911270112711127211273112741127511276112771127811279112801128111282112831128411285112861128711288112891129011291112921129311294112951129611297112981129911300113011130211303113041130511306113071130811309113101131111312113131131411315113161131711318113191132011321113221132311324113251132611327113281132911330113311133211333113341133511336113371133811339113401134111342113431134411345113461134711348113491135011351113521135311354113551135611357113581135911360113611136211363113641136511366113671136811369113701137111372113731137411375113761137711378113791138011381113821138311384113851138611387113881138911390113911139211393113941139511396113971139811399114001140111402114031140411405114061140711408114091141011411114121141311414114151141611417114181141911420114211142211423114241142511426114271142811429114301143111432114331143411435114361143711438114391144011441114421144311444114451144611447114481144911450114511145211453114541145511456114571145811459114601146111462114631146411465114661146711468114691147011471114721147311474114751147611477114781147911480114811148211483114841148511486114871148811489114901149111492114931149411495114961149711498114991150011501115021150311504115051150611507115081150911510115111151211513115141151511516115171151811519115201152111522115231152411525115261152711528115291153011531115321153311534115351153611537115381153911540115411154211543115441154511546115471154811549115501155111552115531155411555115561155711558115591156011561115621156311564115651156611567115681156911570115711157211573115741157511576115771157811579115801158111582115831158411585115861158711588115891159011591115921159311594115951159611597115981159911600116011160211603116041160511606116071160811609116101161111612116131161411615116161161711618116191162011621116221162311624116251162611627116281162911630116311163211633116341163511636116371163811639116401164111642116431164411645116461164711648116491165011651116521165311654116551165611657116581165911660116611166211663116641166511666116671166811669116701167111672116731167411675116761167711678116791168011681116821168311684116851168611687116881168911690116911169211693116941169511696116971169811699117001170111702117031170411705117061170711708117091171011711117121171311714117151171611717117181171911720117211172211723117241172511726117271172811729117301173111732117331173411735117361173711738117391174011741117421174311744117451174611747117481174911750117511175211753117541175511756117571175811759117601176111762117631176411765117661176711768117691177011771117721177311774117751177611777117781177911780117811178211783117841178511786117871178811789117901179111792117931179411795117961179711798117991180011801118021180311804118051180611807118081180911810118111181211813118141181511816118171181811819118201182111822118231182411825118261182711828118291183011831118321183311834118351183611837118381183911840118411184211843118441184511846118471184811849118501185111852118531185411855118561185711858118591186011861118621186311864118651186611867118681186911870118711187211873118741187511876118771187811879118801188111882118831188411885118861188711888118891189011891118921189311894118951189611897118981189911900119011190211903119041190511906119071190811909119101191111912119131191411915119161191711918119191192011921119221192311924119251192611927119281192911930119311193211933119341193511936119371193811939119401194111942119431194411945119461194711948119491195011951119521195311954119551195611957119581195911960119611196211963119641196511966119671196811969119701197111972119731197411975119761197711978119791198011981119821198311984119851198611987119881198911990119911199211993119941199511996119971199811999120001200112002120031200412005120061200712008120091201012011120121201312014120151201612017120181201912020120211202212023120241202512026120271202812029120301203112032120331203412035120361203712038120391204012041120421204312044120451204612047120481204912050120511205212053120541205512056120571205812059120601206112062120631206412065120661206712068120691207012071120721207312074120751207612077120781207912080120811208212083120841208512086120871208812089120901209112092120931209412095120961209712098120991210012101121021210312104121051210612107121081210912110121111211212113121141211512116121171211812119121201212112122121231212412125121261212712128121291213012131121321213312134121351213612137121381213912140121411214212143121441214512146121471214812149121501215112152121531215412155121561215712158121591216012161121621216312164121651216612167121681216912170121711217212173121741217512176121771217812179121801218112182121831218412185121861218712188121891219012191121921219312194121951219612197121981219912200122011220212203122041220512206122071220812209122101221112212122131221412215122161221712218122191222012221122221222312224122251222612227122281222912230122311223212233122341223512236122371223812239122401224112242122431224412245122461224712248122491225012251122521225312254122551225612257122581225912260122611226212263122641226512266122671226812269122701227112272122731227412275122761227712278122791228012281122821228312284122851228612287122881228912290122911229212293122941229512296122971229812299123001230112302123031230412305123061230712308123091231012311123121231312314123151231612317123181231912320123211232212323123241232512326123271232812329123301233112332123331233412335123361233712338123391234012341123421234312344123451234612347123481234912350123511235212353123541235512356123571235812359123601236112362123631236412365123661236712368123691237012371123721237312374123751237612377123781237912380123811238212383123841238512386123871238812389123901239112392123931239412395123961239712398123991240012401124021240312404124051240612407124081240912410124111241212413124141241512416124171241812419124201242112422124231242412425124261242712428124291243012431124321243312434124351243612437124381243912440124411244212443124441244512446124471244812449124501245112452124531245412455124561245712458124591246012461124621246312464124651246612467124681246912470124711247212473124741247512476124771247812479124801248112482124831248412485124861248712488124891249012491124921249312494124951249612497124981249912500125011250212503125041250512506125071250812509125101251112512125131251412515125161251712518125191252012521125221252312524125251252612527125281252912530125311253212533125341253512536125371253812539125401254112542125431254412545125461254712548125491255012551125521255312554125551255612557125581255912560125611256212563125641256512566125671256812569125701257112572125731257412575125761257712578125791258012581125821258312584125851258612587125881258912590125911259212593125941259512596125971259812599126001260112602126031260412605126061260712608126091261012611126121261312614126151261612617126181261912620126211262212623126241262512626126271262812629126301263112632126331263412635126361263712638126391264012641126421264312644126451264612647126481264912650126511265212653126541265512656126571265812659126601266112662126631266412665126661266712668126691267012671126721267312674126751267612677126781267912680126811268212683126841268512686126871268812689126901269112692126931269412695126961269712698126991270012701127021270312704127051270612707127081270912710127111271212713127141271512716127171271812719127201272112722127231272412725127261272712728127291273012731127321273312734127351273612737127381273912740127411274212743127441274512746127471274812749127501275112752127531275412755127561275712758127591276012761127621276312764127651276612767127681276912770127711277212773127741277512776127771277812779127801278112782127831278412785127861278712788127891279012791127921279312794127951279612797127981279912800128011280212803128041280512806128071280812809128101281112812128131281412815128161281712818128191282012821128221282312824128251282612827128281282912830128311283212833128341283512836128371283812839128401284112842128431284412845128461284712848128491285012851128521285312854128551285612857128581285912860128611286212863128641286512866128671286812869128701287112872128731287412875128761287712878128791288012881128821288312884128851288612887128881288912890128911289212893128941289512896128971289812899129001290112902129031290412905129061290712908129091291012911129121291312914129151291612917129181291912920129211292212923129241292512926129271292812929129301293112932129331293412935129361293712938129391294012941129421294312944129451294612947129481294912950129511295212953129541295512956129571295812959129601296112962129631296412965129661296712968129691297012971129721297312974129751297612977129781297912980129811298212983129841298512986129871298812989129901299112992129931299412995129961299712998129991300013001130021300313004130051300613007130081300913010130111301213013130141301513016130171301813019130201302113022130231302413025130261302713028130291303013031130321303313034130351303613037130381303913040130411304213043130441304513046130471304813049130501305113052130531305413055130561305713058130591306013061130621306313064130651306613067130681306913070130711307213073130741307513076130771307813079130801308113082130831308413085130861308713088130891309013091130921309313094130951309613097130981309913100131011310213103131041310513106131071310813109131101311113112131131311413115131161311713118131191312013121131221312313124131251312613127131281312913130131311313213133131341313513136131371313813139131401314113142131431314413145131461314713148131491315013151131521315313154131551315613157131581315913160131611316213163131641316513166131671316813169131701317113172131731317413175131761317713178131791318013181131821318313184131851318613187131881318913190131911319213193131941319513196131971319813199132001320113202132031320413205132061320713208132091321013211132121321313214132151321613217132181321913220132211322213223132241322513226132271322813229132301323113232132331323413235132361323713238132391324013241132421324313244132451324613247132481324913250132511325213253132541325513256132571325813259132601326113262132631326413265132661326713268132691327013271132721327313274132751327613277132781327913280132811328213283132841328513286132871328813289132901329113292132931329413295132961329713298132991330013301133021330313304133051330613307133081330913310133111331213313133141331513316133171331813319133201332113322133231332413325133261332713328133291333013331133321333313334133351333613337133381333913340133411334213343133441334513346133471334813349133501335113352133531335413355133561335713358133591336013361133621336313364133651336613367133681336913370133711337213373133741337513376133771337813379133801338113382133831338413385133861338713388133891339013391133921339313394133951339613397133981339913400134011340213403134041340513406134071340813409134101341113412134131341413415134161341713418134191342013421134221342313424134251342613427134281342913430134311343213433134341343513436134371343813439134401344113442134431344413445134461344713448134491345013451134521345313454134551345613457134581345913460134611346213463134641346513466134671346813469134701347113472134731347413475134761347713478134791348013481134821348313484134851348613487134881348913490134911349213493134941349513496134971349813499135001350113502135031350413505135061350713508135091351013511135121351313514135151351613517135181351913520135211352213523135241352513526135271352813529135301353113532135331353413535135361353713538135391354013541135421354313544135451354613547135481354913550135511355213553135541355513556135571355813559135601356113562135631356413565135661356713568135691357013571135721357313574135751357613577135781357913580135811358213583135841358513586135871358813589135901359113592135931359413595135961359713598135991360013601136021360313604136051360613607136081360913610136111361213613136141361513616136171361813619136201362113622136231362413625136261362713628136291363013631136321363313634136351363613637136381363913640136411364213643136441364513646136471364813649136501365113652136531365413655136561365713658136591366013661136621366313664136651366613667136681366913670136711367213673136741367513676136771367813679136801368113682136831368413685136861368713688136891369013691136921369313694136951369613697136981369913700137011370213703137041370513706137071370813709137101371113712137131371413715137161371713718137191372013721137221372313724137251372613727137281372913730137311373213733137341373513736137371373813739137401374113742137431374413745137461374713748137491375013751137521375313754137551375613757137581375913760137611376213763137641376513766137671376813769137701377113772137731377413775137761377713778137791378013781137821378313784137851378613787137881378913790137911379213793137941379513796137971379813799138001380113802138031380413805138061380713808138091381013811138121381313814138151381613817138181381913820138211382213823138241382513826138271382813829138301383113832138331383413835138361383713838138391384013841138421384313844138451384613847138481384913850138511385213853138541385513856138571385813859138601386113862138631386413865138661386713868138691387013871138721387313874138751387613877138781387913880138811388213883138841388513886138871388813889138901389113892138931389413895138961389713898138991390013901139021390313904139051390613907139081390913910139111391213913139141391513916139171391813919139201392113922139231392413925139261392713928139291393013931139321393313934139351393613937139381393913940139411394213943139441394513946139471394813949139501395113952139531395413955139561395713958139591396013961139621396313964139651396613967139681396913970139711397213973139741397513976139771397813979139801398113982139831398413985139861398713988139891399013991139921399313994139951399613997139981399914000140011400214003140041400514006140071400814009140101401114012140131401414015140161401714018140191402014021140221402314024140251402614027140281402914030140311403214033140341403514036140371403814039140401404114042140431404414045140461404714048140491405014051140521405314054140551405614057140581405914060140611406214063140641406514066140671406814069140701407114072140731407414075140761407714078140791408014081140821408314084140851408614087140881408914090140911409214093140941409514096140971409814099141001410114102141031410414105141061410714108141091411014111141121411314114141151411614117141181411914120141211412214123141241412514126141271412814129141301413114132141331413414135141361413714138141391414014141141421414314144141451414614147141481414914150141511415214153141541415514156141571415814159141601416114162141631416414165141661416714168141691417014171141721417314174141751417614177141781417914180141811418214183141841418514186141871418814189141901419114192141931419414195141961419714198141991420014201142021420314204142051420614207142081420914210142111421214213142141421514216142171421814219142201422114222142231422414225142261422714228142291423014231142321423314234142351423614237142381423914240142411424214243142441424514246142471424814249142501425114252142531425414255142561425714258142591426014261142621426314264142651426614267142681426914270142711427214273142741427514276142771427814279142801428114282142831428414285142861428714288142891429014291142921429314294142951429614297142981429914300143011430214303143041430514306143071430814309143101431114312143131431414315143161431714318143191432014321143221432314324143251432614327143281432914330143311433214333143341433514336143371433814339143401434114342143431434414345143461434714348143491435014351143521435314354143551435614357143581435914360143611436214363143641436514366143671436814369143701437114372143731437414375143761437714378143791438014381143821438314384143851438614387143881438914390143911439214393143941439514396143971439814399144001440114402144031440414405144061440714408144091441014411144121441314414144151441614417144181441914420144211442214423144241442514426144271442814429144301443114432144331443414435144361443714438144391444014441144421444314444144451444614447144481444914450144511445214453144541445514456144571445814459144601446114462144631446414465144661446714468144691447014471144721447314474144751447614477144781447914480144811448214483144841448514486144871448814489144901449114492144931449414495144961449714498144991450014501145021450314504145051450614507145081450914510145111451214513145141451514516145171451814519145201452114522145231452414525145261452714528145291453014531145321453314534145351453614537145381453914540145411454214543145441454514546145471454814549145501455114552145531455414555145561455714558145591456014561145621456314564145651456614567145681456914570145711457214573145741457514576145771457814579145801458114582145831458414585145861458714588145891459014591145921459314594145951459614597145981459914600146011460214603146041460514606146071460814609146101461114612146131461414615146161461714618146191462014621146221462314624146251462614627146281462914630146311463214633146341463514636146371463814639146401464114642146431464414645146461464714648146491465014651146521465314654146551465614657146581465914660146611466214663146641466514666146671466814669146701467114672146731467414675146761467714678146791468014681146821468314684146851468614687146881468914690146911469214693146941469514696146971469814699147001470114702147031470414705147061470714708147091471014711147121471314714147151471614717147181471914720147211472214723147241472514726147271472814729147301473114732147331473414735147361473714738147391474014741147421474314744147451474614747147481474914750147511475214753147541475514756147571475814759147601476114762147631476414765147661476714768147691477014771147721477314774147751477614777147781477914780147811478214783147841478514786147871478814789147901479114792147931479414795147961479714798147991480014801148021480314804148051480614807148081480914810148111481214813148141481514816148171481814819148201482114822148231482414825148261482714828148291483014831148321483314834148351483614837148381483914840148411484214843148441484514846148471484814849148501485114852148531485414855148561485714858148591486014861148621486314864148651486614867148681486914870148711487214873148741487514876148771487814879148801488114882148831488414885148861488714888148891489014891148921489314894148951489614897148981489914900149011490214903149041490514906149071490814909149101491114912149131491414915149161491714918149191492014921149221492314924149251492614927149281492914930149311493214933149341493514936149371493814939149401494114942149431494414945149461494714948149491495014951149521495314954149551495614957149581495914960149611496214963149641496514966149671496814969149701497114972149731497414975149761497714978149791498014981149821498314984149851498614987149881498914990149911499214993149941499514996149971499814999150001500115002150031500415005150061500715008150091501015011150121501315014150151501615017150181501915020150211502215023150241502515026150271502815029150301503115032150331503415035150361503715038150391504015041150421504315044150451504615047150481504915050150511505215053150541505515056150571505815059150601506115062150631506415065150661506715068150691507015071150721507315074150751507615077150781507915080150811508215083150841508515086150871508815089150901509115092150931509415095150961509715098150991510015101151021510315104151051510615107151081510915110151111511215113151141511515116151171511815119151201512115122151231512415125151261512715128151291513015131151321513315134151351513615137151381513915140151411514215143151441514515146151471514815149151501515115152151531515415155151561515715158151591516015161151621516315164151651516615167151681516915170151711517215173151741517515176151771517815179151801518115182151831518415185151861518715188151891519015191151921519315194151951519615197151981519915200152011520215203152041520515206152071520815209152101521115212152131521415215152161521715218152191522015221152221522315224152251522615227152281522915230152311523215233152341523515236152371523815239152401524115242152431524415245152461524715248152491525015251152521525315254152551525615257152581525915260152611526215263152641526515266152671526815269152701527115272152731527415275152761527715278152791528015281152821528315284152851528615287152881528915290152911529215293152941529515296152971529815299153001530115302153031530415305153061530715308153091531015311153121531315314153151531615317153181531915320153211532215323153241532515326153271532815329153301533115332153331533415335153361533715338153391534015341153421534315344153451534615347153481534915350153511535215353153541535515356153571535815359153601536115362153631536415365153661536715368153691537015371153721537315374153751537615377153781537915380153811538215383153841538515386153871538815389153901539115392153931539415395153961539715398153991540015401154021540315404154051540615407154081540915410154111541215413154141541515416154171541815419154201542115422154231542415425154261542715428154291543015431154321543315434154351543615437154381543915440154411544215443154441544515446154471544815449154501545115452154531545415455154561545715458154591546015461154621546315464154651546615467154681546915470154711547215473154741547515476154771547815479154801548115482154831548415485154861548715488154891549015491154921549315494154951549615497154981549915500155011550215503155041550515506155071550815509155101551115512155131551415515155161551715518155191552015521155221552315524155251552615527155281552915530155311553215533155341553515536155371553815539155401554115542155431554415545155461554715548155491555015551155521555315554155551555615557155581555915560155611556215563155641556515566155671556815569155701557115572155731557415575155761557715578155791558015581155821558315584155851558615587155881558915590155911559215593155941559515596155971559815599156001560115602156031560415605156061560715608156091561015611156121561315614156151561615617156181561915620156211562215623156241562515626156271562815629156301563115632156331563415635156361563715638156391564015641156421564315644156451564615647156481564915650156511565215653156541565515656156571565815659156601566115662156631566415665156661566715668156691567015671156721567315674156751567615677156781567915680156811568215683156841568515686156871568815689156901569115692156931569415695156961569715698156991570015701157021570315704157051570615707157081570915710157111571215713157141571515716157171571815719157201572115722157231572415725157261572715728157291573015731157321573315734157351573615737157381573915740157411574215743157441574515746157471574815749157501575115752157531575415755157561575715758157591576015761157621576315764157651576615767157681576915770157711577215773157741577515776157771577815779157801578115782157831578415785157861578715788157891579015791157921579315794157951579615797157981579915800158011580215803158041580515806158071580815809158101581115812158131581415815158161581715818158191582015821158221582315824158251582615827158281582915830158311583215833158341583515836158371583815839158401584115842158431584415845158461584715848158491585015851158521585315854158551585615857158581585915860158611586215863158641586515866158671586815869158701587115872158731587415875158761587715878158791588015881158821588315884158851588615887158881588915890158911589215893158941589515896158971589815899159001590115902159031590415905159061590715908159091591015911159121591315914159151591615917159181591915920159211592215923159241592515926159271592815929159301593115932159331593415935159361593715938159391594015941159421594315944159451594615947159481594915950159511595215953159541595515956159571595815959159601596115962159631596415965159661596715968159691597015971159721597315974159751597615977159781597915980159811598215983159841598515986159871598815989159901599115992159931599415995159961599715998159991600016001160021600316004160051600616007160081600916010160111601216013160141601516016160171601816019160201602116022160231602416025160261602716028160291603016031160321603316034160351603616037160381603916040160411604216043160441604516046160471604816049160501605116052160531605416055160561605716058160591606016061160621606316064160651606616067160681606916070160711607216073160741607516076160771607816079160801608116082160831608416085160861608716088160891609016091160921609316094160951609616097160981609916100161011610216103161041610516106161071610816109161101611116112161131611416115161161611716118161191612016121161221612316124161251612616127161281612916130161311613216133161341613516136161371613816139161401614116142161431614416145161461614716148161491615016151161521615316154161551615616157161581615916160161611616216163161641616516166161671616816169161701617116172161731617416175161761617716178161791618016181161821618316184161851618616187161881618916190161911619216193161941619516196161971619816199162001620116202162031620416205162061620716208162091621016211162121621316214162151621616217162181621916220162211622216223162241622516226162271622816229162301623116232162331623416235162361623716238162391624016241162421624316244162451624616247162481624916250162511625216253162541625516256162571625816259162601626116262162631626416265162661626716268162691627016271162721627316274162751627616277162781627916280162811628216283162841628516286162871628816289162901629116292162931629416295162961629716298162991630016301163021630316304163051630616307163081630916310163111631216313163141631516316163171631816319163201632116322163231632416325163261632716328163291633016331163321633316334163351633616337163381633916340163411634216343163441634516346163471634816349163501635116352163531635416355163561635716358163591636016361163621636316364163651636616367163681636916370163711637216373163741637516376163771637816379163801638116382163831638416385163861638716388163891639016391163921639316394163951639616397163981639916400164011640216403164041640516406164071640816409164101641116412164131641416415164161641716418164191642016421164221642316424164251642616427164281642916430164311643216433164341643516436164371643816439164401644116442164431644416445164461644716448164491645016451164521645316454164551645616457164581645916460164611646216463164641646516466164671646816469164701647116472164731647416475164761647716478164791648016481164821648316484164851648616487164881648916490164911649216493164941649516496164971649816499165001650116502165031650416505165061650716508165091651016511165121651316514165151651616517165181651916520165211652216523165241652516526165271652816529165301653116532165331653416535165361653716538165391654016541165421654316544165451654616547165481654916550165511655216553165541655516556165571655816559165601656116562165631656416565165661656716568165691657016571165721657316574165751657616577165781657916580165811658216583165841658516586165871658816589165901659116592165931659416595165961659716598165991660016601166021660316604166051660616607166081660916610166111661216613166141661516616166171661816619166201662116622166231662416625166261662716628166291663016631166321663316634166351663616637166381663916640166411664216643166441664516646166471664816649166501665116652166531665416655166561665716658166591666016661166621666316664166651666616667166681666916670166711667216673166741667516676166771667816679166801668116682166831668416685166861668716688166891669016691166921669316694166951669616697166981669916700167011670216703167041670516706167071670816709167101671116712167131671416715167161671716718167191672016721167221672316724167251672616727167281672916730167311673216733167341673516736167371673816739167401674116742167431674416745167461674716748167491675016751167521675316754167551675616757167581675916760167611676216763167641676516766167671676816769167701677116772167731677416775167761677716778167791678016781167821678316784167851678616787167881678916790167911679216793167941679516796167971679816799168001680116802168031680416805168061680716808168091681016811168121681316814168151681616817168181681916820168211682216823168241682516826168271682816829168301683116832168331683416835168361683716838168391684016841168421684316844168451684616847168481684916850168511685216853168541685516856168571685816859168601686116862168631686416865168661686716868168691687016871168721687316874168751687616877168781687916880168811688216883168841688516886168871688816889168901689116892168931689416895168961689716898168991690016901169021690316904169051690616907169081690916910169111691216913169141691516916169171691816919169201692116922169231692416925169261692716928169291693016931169321693316934169351693616937169381693916940169411694216943169441694516946169471694816949169501695116952169531695416955169561695716958169591696016961169621696316964169651696616967169681696916970169711697216973169741697516976169771697816979169801698116982169831698416985169861698716988169891699016991169921699316994169951699616997169981699917000170011700217003170041700517006170071700817009170101701117012170131701417015170161701717018170191702017021170221702317024170251702617027170281702917030170311703217033170341703517036170371703817039170401704117042170431704417045170461704717048170491705017051170521705317054170551705617057170581705917060170611706217063170641706517066170671706817069170701707117072170731707417075170761707717078170791708017081170821708317084170851708617087170881708917090170911709217093170941709517096170971709817099171001710117102171031710417105171061710717108171091711017111171121711317114171151711617117171181711917120171211712217123171241712517126171271712817129171301713117132171331713417135171361713717138171391714017141171421714317144171451714617147171481714917150171511715217153171541715517156171571715817159171601716117162171631716417165171661716717168171691717017171171721717317174171751717617177171781717917180171811718217183171841718517186171871718817189171901719117192171931719417195171961719717198171991720017201172021720317204172051720617207172081720917210172111721217213172141721517216172171721817219172201722117222172231722417225172261722717228172291723017231172321723317234172351723617237172381723917240172411724217243172441724517246172471724817249172501725117252172531725417255172561725717258172591726017261172621726317264172651726617267172681726917270172711727217273172741727517276172771727817279172801728117282172831728417285172861728717288172891729017291172921729317294172951729617297172981729917300173011730217303173041730517306173071730817309173101731117312173131731417315173161731717318173191732017321173221732317324173251732617327173281732917330173311733217333173341733517336173371733817339173401734117342173431734417345173461734717348173491735017351173521735317354173551735617357173581735917360173611736217363173641736517366173671736817369173701737117372173731737417375173761737717378173791738017381173821738317384173851738617387173881738917390173911739217393173941739517396173971739817399174001740117402174031740417405174061740717408174091741017411174121741317414174151741617417174181741917420174211742217423174241742517426174271742817429174301743117432174331743417435174361743717438174391744017441174421744317444174451744617447
  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. maid.body0.jbMuneL.enabled = true;
  2544. maid.body0.jbMuneR.enabled = true;
  2545. }
  2546. int num6;
  2547. if (array[0].Contains("MultipleMaidsPose"))
  2548. {
  2549. string path = array[0].Split(new char[] {'/'})[1];
  2550. byte[] array2 = new byte[0];
  2551. try
  2552. {
  2553. using (FileStream fileStream = new FileStream(path, FileMode.Open, FileAccess.Read))
  2554. {
  2555. array2 = new byte[fileStream.Length];
  2556. fileStream.Read(array2, 0, array2.Length);
  2557. }
  2558. }
  2559. catch { }
  2560. if (0 < array2.Length)
  2561. {
  2562. string text = Path.GetFileName(path);
  2563. long num5 = (long) text.GetHashCode();
  2564. maid.body0.CrossFade(num5.ToString(), array2, false, false, false, 0f, 1f);
  2565. Maid.AutoTwist[] array3 = new Maid.AutoTwist[]
  2566. {
  2567. Maid.AutoTwist.ShoulderL, Maid.AutoTwist.ShoulderR, Maid.AutoTwist.WristL,
  2568. Maid.AutoTwist.WristR, Maid.AutoTwist.ThighL, Maid.AutoTwist.ThighR
  2569. };
  2570. for (int m = 0; m < array3.Length; m++)
  2571. {
  2572. maid.SetAutoTwist(array3[m], true);
  2573. }
  2574. }
  2575. }
  2576. else if (array[0].StartsWith("p") && int.TryParse(array[0].Substring(1), out num6))
  2577. {
  2578. loadPose[i] = array[0];
  2579. }
  2580. else if (!array[0].StartsWith("dance_"))
  2581. {
  2582. maidArray[i].CrossFade(array[0] + ".anm", false, true, false, 0f, 1f);
  2583. }
  2584. else
  2585. {
  2586. if (!maidArray[i].body0.m_Bones.GetComponent<Animation>().GetClip(array[0] + ".anm"))
  2587. {
  2588. maidArray[i].body0.LoadAnime(array[0] + ".anm",
  2589. GameUty.FileSystem,
  2590. array[0] + ".anm",
  2591. false,
  2592. false);
  2593. }
  2594. maidArray[i].body0.m_Bones.GetComponent<Animation>().Play(array[0] + ".anm");
  2595. }
  2596. if (array.Length > 1)
  2597. {
  2598. maidArray[i].body0.m_Bones.GetComponent<Animation>()[array[0] + ".anm"].time = float.Parse(array[1]);
  2599. isStop[i] = true;
  2600. if (array.Length > 2)
  2601. {
  2602. Transform transform2 = CMT.SearchObjName(maidArray[i].body0.m_Bones.transform, "Bip01", true);
  2603. isPoseIti[i] = true;
  2604. poseIti[i] = maidArray[i].transform.position;
  2605. maidArray[i].transform.position = new Vector3(100f, 100f, 100f);
  2606. }
  2607. }
  2608. isLock[i] = false;
  2609. idoFlg[i] = true;
  2610. mHandL[i].initFlg = false;
  2611. mHandR[i].initFlg = false;
  2612. mFootL[i].initFlg = false;
  2613. mFootR[i].initFlg = false;
  2614. pHandL[i] = 0;
  2615. pHandR[i] = 0;
  2616. muneIKL[i] = false;
  2617. muneIKR[i] = false;
  2618. if (!isVR)
  2619. {
  2620. maidArray[i].body0.quaDefEyeL.eulerAngles = eyeL[(int) selectList[i]];
  2621. maidArray[i].body0.quaDefEyeR.eulerAngles = eyeR[(int) selectList[i]];
  2622. }
  2623. if (i >= 7)
  2624. {
  2625. idoFlg[i - 7] = true;
  2626. }
  2627. }
  2628. else if (maid.body0.isLoadedBody)
  2629. {
  2630. if (muneIKL[i] && vIKMuneL[i].x != 0f)
  2631. {
  2632. IKMuneLSub[i].localEulerAngles = vIKMuneLSub[i];
  2633. IKMuneL[i].localEulerAngles = vIKMuneL[i];
  2634. }
  2635. if (muneIKR[i] && vIKMuneR[i].x != 0f)
  2636. {
  2637. IKMuneRSub[i].localEulerAngles = vIKMuneRSub[i];
  2638. IKMuneR[i].localEulerAngles = vIKMuneR[i];
  2639. }
  2640. if (!HandL1[i])
  2641. {
  2642. this.SetIKInit(i);
  2643. this.SetIK(maid, i);
  2644. ikBui = 5;
  2645. }
  2646. else
  2647. {
  2648. bool flag5 = false;
  2649. for (int k = 0; k < keyArray.Length; k++)
  2650. {
  2651. if (Input.GetKey(keyArray[k]))
  2652. {
  2653. flag5 = true;
  2654. break;
  2655. }
  2656. }
  2657. if ((!Input.GetKey(KeyCode.Space) && Input.GetKey(KeyCode.W)) || Input.GetKey(KeyCode.R)
  2658. || Input.GetKey(KeyCode.Y))
  2659. {
  2660. flag5 = true;
  2661. }
  2662. if (!flag5)
  2663. {
  2664. if (this.getModKeyPressing(modKey.Ctrl) && this.getModKeyPressing(modKey.Alt)
  2665. && this.getModKeyPressing(modKey.Shift))
  2666. {
  2667. ikMode[i] = 15;
  2668. }
  2669. else if (this.getModKeyPressing(modKey.Shift) && this.getModKeyPressing(modKey.Alt))
  2670. {
  2671. ikMode[i] = 5;
  2672. }
  2673. else if (this.getModKeyPressing(modKey.Shift) && Input.GetKey(KeyCode.Space))
  2674. {
  2675. ikMode[i] = 6;
  2676. }
  2677. else if (this.getModKeyPressing(modKey.Ctrl) && Input.GetKey(KeyCode.Space))
  2678. {
  2679. ikMode[i] = 7;
  2680. }
  2681. else if (Input.GetKey(KeyCode.Z) && this.getModKeyPressing(modKey.Shift))
  2682. {
  2683. ikMode[i] = 11;
  2684. }
  2685. else if (Input.GetKey(KeyCode.Z) && this.getModKeyPressing(modKey.Ctrl))
  2686. {
  2687. ikMode[i] = 12;
  2688. }
  2689. else if (Input.GetKey(KeyCode.X) && this.getModKeyPressing(modKey.Shift))
  2690. {
  2691. ikMode[i] = 14;
  2692. }
  2693. else if (this.getModKeyPressing(modKey.Shift))
  2694. {
  2695. ikMode[i] = 1;
  2696. }
  2697. else if (this.getModKeyPressing(modKey.Ctrl) && this.getModKeyPressing(modKey.Alt))
  2698. {
  2699. ikMode[i] = 8;
  2700. }
  2701. else if (this.getModKeyPressing(modKey.Ctrl))
  2702. {
  2703. ikMode[i] = 2;
  2704. }
  2705. else if (this.getModKeyPressing(modKey.Alt))
  2706. {
  2707. ikMode[i] = 3;
  2708. }
  2709. else if (Input.GetKey(KeyCode.Space))
  2710. {
  2711. ikMode[i] = 4;
  2712. }
  2713. else if (Input.GetKey(KeyCode.X))
  2714. {
  2715. ikMode[i] = 9;
  2716. }
  2717. else if (Input.GetKey(KeyCode.Z))
  2718. {
  2719. ikMode[i] = 10;
  2720. }
  2721. else if (Input.GetKey(KeyCode.C))
  2722. {
  2723. ikMode[i] = 13;
  2724. }
  2725. else if (Input.GetKey(KeyCode.A))
  2726. {
  2727. ikMode[i] = 16;
  2728. }
  2729. else
  2730. {
  2731. ikMode[i] = 0;
  2732. }
  2733. if (!isIK[i])
  2734. {
  2735. if (ikMode[i] < 9)
  2736. {
  2737. ikMode[i] = 0;
  2738. }
  2739. }
  2740. bool flag9 = false;
  2741. bool flag10 = false;
  2742. bool flag11 = false;
  2743. bool flag12 = false;
  2744. if (gFinger[i, 0])
  2745. {
  2746. for (int j = 0; j < 15; j++)
  2747. {
  2748. if (mFinger[i, j].isStop)
  2749. {
  2750. flag9 = true;
  2751. }
  2752. }
  2753. for (int j = 15; j < 30; j++)
  2754. {
  2755. if (mFinger[i, j].isStop)
  2756. {
  2757. flag10 = true;
  2758. }
  2759. }
  2760. for (int j = 0; j < 6; j++)
  2761. {
  2762. if (mFinger2[i, j].isStop)
  2763. {
  2764. flag11 = true;
  2765. }
  2766. }
  2767. for (int j = 6; j < 12; j++)
  2768. {
  2769. if (mFinger2[i, j].isStop)
  2770. {
  2771. flag12 = true;
  2772. }
  2773. }
  2774. }
  2775. if (gMaid[i] != null)
  2776. {
  2777. if (ikMode[i] >= 9 && ikMode[i] <= 14)
  2778. {
  2779. gMaid[i].SetActive(true);
  2780. if (isCube)
  2781. {
  2782. gMaidC[i].SetActive(true);
  2783. }
  2784. }
  2785. else
  2786. {
  2787. gMaid[i].SetActive(false);
  2788. gMaidC[i].SetActive(false);
  2789. }
  2790. }
  2791. if (flag10 || mHandR[i].isSelect || mArmR[i].isSelect || mClavicleR[i].isSelect
  2792. || (ikMode[i] == 4 && Input.GetKeyDown(KeyCode.Q)))
  2793. {
  2794. ikBui = 1;
  2795. if (ikMode[i] != 4 || !Input.GetKeyDown(KeyCode.Q))
  2796. {
  2797. ikMaid = i;
  2798. }
  2799. if (ikMaid == i)
  2800. {
  2801. this.SetIK(maid, i);
  2802. HandL = CMT.SearchObjName(maid.body0.m_Bones.transform, "Bip01 R Hand", true);
  2803. UpperArmL = CMT.SearchObjName(maid.body0.m_Bones.transform, "Bip01 R UpperArm", true);
  2804. ForearmL = CMT.SearchObjName(maid.body0.m_Bones.transform, "Bip01 R Forearm", true);
  2805. Clavicle = CMT.SearchObjName(maid.body0.m_Bones.transform, "Bip01 R Clavicle", true);
  2806. IK_hand = CMT.SearchObjName(maid.body0.m_Bones.transform, "_IK_handR", true);
  2807. }
  2808. if (Input.GetKeyDown(KeyCode.Q))
  2809. {
  2810. qFlg = true;
  2811. }
  2812. }
  2813. else if (flag9 || mHandL[i].isSelect || mArmL[i].isSelect || mClavicleL[i].isSelect
  2814. || (ikMode[i] == 4 && Input.GetKeyDown(KeyCode.W)))
  2815. {
  2816. ikBui = 2;
  2817. if (ikMode[i] != 4 || !Input.GetKeyDown(KeyCode.W))
  2818. {
  2819. ikMaid = i;
  2820. }
  2821. if (ikMaid == i)
  2822. {
  2823. this.SetIK(maid, i);
  2824. HandL = CMT.SearchObjName(maid.body0.m_Bones.transform, "Bip01 L Hand", true);
  2825. UpperArmL = CMT.SearchObjName(maid.body0.m_Bones.transform, "Bip01 L UpperArm", true);
  2826. ForearmL = CMT.SearchObjName(maid.body0.m_Bones.transform, "Bip01 L Forearm", true);
  2827. Clavicle = CMT.SearchObjName(maid.body0.m_Bones.transform, "Bip01 L Clavicle", true);
  2828. IK_hand = CMT.SearchObjName(maid.body0.m_Bones.transform, "_IK_handL", true);
  2829. }
  2830. if (Input.GetKeyDown(KeyCode.W))
  2831. {
  2832. wFlg = true;
  2833. }
  2834. }
  2835. else if (flag12 || mFootR[i].isSelect || mHizaR[i].isSelect
  2836. || (ikMode[i] == 4 && Input.GetKeyDown(KeyCode.A)))
  2837. {
  2838. ikBui = 3;
  2839. if (ikMode[i] != 4 || !Input.GetKeyDown(KeyCode.A))
  2840. {
  2841. ikMaid = i;
  2842. }
  2843. if (ikMaid == i)
  2844. {
  2845. this.SetIK(maid, i);
  2846. HandL = CMT.SearchObjName(maid.body0.m_Bones.transform, "Bip01 R Foot", true);
  2847. UpperArmL = CMT.SearchObjName(maid.body0.m_Bones.transform, "Bip01 R Thigh", true);
  2848. ForearmL = CMT.SearchObjName(maid.body0.m_Bones.transform, "Bip01 R Calf", true);
  2849. Clavicle = CMT.SearchObjName(maid.body0.m_Bones.transform, "Hip_L", true);
  2850. }
  2851. }
  2852. else if (flag11 || mFootL[i].isSelect || mHizaL[i].isSelect
  2853. || (ikMode[i] == 4 && Input.GetKeyDown(KeyCode.S)))
  2854. {
  2855. ikBui = 4;
  2856. if (ikMode[i] != 4 || !Input.GetKeyDown(KeyCode.S))
  2857. {
  2858. ikMaid = i;
  2859. }
  2860. if (ikMaid == i)
  2861. {
  2862. this.SetIK(maid, i);
  2863. HandL = CMT.SearchObjName(maid.body0.m_Bones.transform, "Bip01 L Foot", true);
  2864. UpperArmL = CMT.SearchObjName(maid.body0.m_Bones.transform, "Bip01 L Thigh", true);
  2865. ForearmL = CMT.SearchObjName(maid.body0.m_Bones.transform, "Bip01 L Calf", true);
  2866. Clavicle = CMT.SearchObjName(maid.body0.m_Bones.transform, "Hip_L", true);
  2867. }
  2868. if (Input.GetKeyDown(KeyCode.S))
  2869. {
  2870. sFlg = true;
  2871. }
  2872. }
  2873. mHandR[i].isSelect = false;
  2874. mArmR[i].isSelect = false;
  2875. mHandL[i].isSelect = false;
  2876. mArmL[i].isSelect = false;
  2877. mFootR[i].isSelect = false;
  2878. mHizaR[i].isSelect = false;
  2879. mFootL[i].isSelect = false;
  2880. mHizaL[i].isSelect = false;
  2881. mClavicleL[i].isSelect = false;
  2882. mClavicleR[i].isSelect = false;
  2883. if (ikMode[i] == 16)
  2884. {
  2885. if (!gHead2[i])
  2886. {
  2887. this.SetIKInit6(i);
  2888. }
  2889. if (mHead2[i].isClick)
  2890. {
  2891. mHead2[i].isClick = false;
  2892. bGui = true;
  2893. isFaceInit = true;
  2894. isGuiInit = true;
  2895. faceFlg = true;
  2896. poseFlg = false;
  2897. sceneFlg = false;
  2898. kankyoFlg = false;
  2899. kankyo2Flg = false;
  2900. maid.boMabataki = false;
  2901. selectMaidIndex = mHead2[i].no;
  2902. faceCombo.selectedItemIndex = faceIndex[selectMaidIndex];
  2903. }
  2904. if (mMaid2[i].isClick)
  2905. {
  2906. mMaid2[i].isClick = false;
  2907. bGui = true;
  2908. isPoseInit = true;
  2909. isGuiInit = true;
  2910. poseFlg = true;
  2911. faceFlg = false;
  2912. sceneFlg = false;
  2913. kankyoFlg = false;
  2914. kankyo2Flg = false;
  2915. selectMaidIndex = mMaid2[i].no;
  2916. copyIndex = 0;
  2917. }
  2918. gHead2[i].transform.position =
  2919. new Vector3(Head2[i].position.x,
  2920. (Head2[i].position.y * 1.2f + Head3[i].position.y * 0.8f) / 2f,
  2921. Head2[i].position.z);
  2922. gHead2[i].transform.eulerAngles =
  2923. new Vector3(Head2[i].transform.eulerAngles.x,
  2924. Head2[i].transform.eulerAngles.y,
  2925. Head2[i].transform.eulerAngles.z + 90f);
  2926. mHead2[i].no = i;
  2927. mHead2[i].maid = maid;
  2928. mHead2[i].ido = 1;
  2929. gMaid2[i].transform.position =
  2930. new Vector3((Pelvis2[i].position.x + Spine0a2[i].position.x) / 2f,
  2931. (Spine12[i].position.y + Spine0a2[i].position.y) / 2f,
  2932. (Spine0a2[i].position.z + Pelvis2[i].position.z) / 2f);
  2933. gMaid2[i].transform.eulerAngles =
  2934. new Vector3(Spine0a2[i].transform.eulerAngles.x,
  2935. Spine0a2[i].transform.eulerAngles.y,
  2936. Spine0a2[i].transform.eulerAngles.z + 90f);
  2937. mMaid2[i].no = i;
  2938. mMaid2[i].maid = maid;
  2939. mMaid2[i].ido = 2;
  2940. gArmL[i].SetActive(false);
  2941. gFootL[i].SetActive(false);
  2942. gHizaL[i].SetActive(false);
  2943. gHandR[i].SetActive(false);
  2944. gArmR[i].SetActive(false);
  2945. gFootR[i].SetActive(false);
  2946. gHizaR[i].SetActive(false);
  2947. gClavicleL[i].SetActive(false);
  2948. gClavicleR[i].SetActive(false);
  2949. gNeck[i].SetActive(false);
  2950. gSpine[i].SetActive(false);
  2951. gSpine0a[i].SetActive(false);
  2952. gSpine1a[i].SetActive(false);
  2953. gSpine1[i].SetActive(false);
  2954. gPelvis[i].SetActive(false);
  2955. }
  2956. else if (ikMode[i] == 8)
  2957. {
  2958. if (ikModeOld[i] == 15 && gIKHandL[i])
  2959. {
  2960. mIKHandL[i].ido = 1;
  2961. mIKHandL[i].reset = true;
  2962. mIKHandR[i].ido = 1;
  2963. mIKHandR[i].reset = true;
  2964. }
  2965. else if (ikModeOld[i] == 3 && gHead[i])
  2966. {
  2967. mHead[i].ido = 7;
  2968. mHead[i].reset = true;
  2969. }
  2970. else
  2971. {
  2972. if (!gIKHandL[i])
  2973. {
  2974. this.SetIKInit5(i);
  2975. }
  2976. gIKHandL[i].transform.position = IKHandL[i].position;
  2977. gIKHandL[i].transform.eulerAngles = IKHandL[i].eulerAngles;
  2978. mIKHandL[i].maid = maid;
  2979. mIKHandL[i].HandL = IKHandL[i];
  2980. mIKHandL[i].ido = 1;
  2981. gIKHandR[i].transform.position = IKHandR[i].position;
  2982. gIKHandR[i].transform.eulerAngles = IKHandR[i].eulerAngles;
  2983. mIKHandR[i].maid = maid;
  2984. mIKHandR[i].HandL = IKHandR[i];
  2985. mIKHandR[i].ido = 1;
  2986. if (!gIKMuneL[i])
  2987. {
  2988. this.SetIKInit7(i);
  2989. }
  2990. if (!gHead[i])
  2991. {
  2992. this.SetIKInit4(i);
  2993. }
  2994. mIKMuneL[i].maid = maid;
  2995. mIKMuneL[i].HandL = IKMuneLSub[i];
  2996. mIKMuneL[i].UpperArmL = IKMuneL[i];
  2997. mIKMuneL[i].ForearmL = IKMuneL[i];
  2998. gIKMuneL[i].transform.position = (IKMuneL[i].position + IKMuneLSub[i].position) / 2f;
  2999. mIKMuneR[i].maid = maid;
  3000. mIKMuneR[i].HandL = IKMuneRSub[i];
  3001. mIKMuneR[i].UpperArmL = IKMuneR[i];
  3002. mIKMuneR[i].ForearmL = IKMuneR[i];
  3003. gIKMuneR[i].transform.position = (IKMuneR[i].position + IKMuneRSub[i].position) / 2f;
  3004. gHead[i].transform.position =
  3005. new Vector3(Head2[i].position.x,
  3006. (Head2[i].position.y * 1.2f + Head3[i].position.y * 0.8f) / 2f,
  3007. Head2[i].position.z);
  3008. gHead[i].transform.eulerAngles =
  3009. new Vector3(Head2[i].transform.eulerAngles.x,
  3010. Head2[i].transform.eulerAngles.y,
  3011. Head2[i].transform.eulerAngles.z + 90f);
  3012. mHead[i].head = Head1[i];
  3013. mHead[i].maid = maid;
  3014. mHead[i].ido = 7;
  3015. mHead[i].shodaiFlg = shodaiFlg[(int) selectList[i]];
  3016. gHead[i].SetActive(true);
  3017. if (mHead[i].isClick)
  3018. {
  3019. mHead[i].isClick = false;
  3020. mHead[i].isClick2 = false;
  3021. maid.body0.quaDefEyeL.eulerAngles = eyeL[(int) selectList[i]];
  3022. maid.body0.quaDefEyeR.eulerAngles = eyeR[(int) selectList[i]];
  3023. }
  3024. if (mIKMuneL[i].isMouseUp && mIKMuneL[i].isMouseDrag)
  3025. {
  3026. IKMuneLSub[i].localEulerAngles = mIKMuneL[i].HandLangles;
  3027. IKMuneL[i].localEulerAngles = mIKMuneL[i].UpperArmLangles;
  3028. vIKMuneLSub[i] = new Vector3(IKMuneLSub[i].localEulerAngles.x,
  3029. IKMuneLSub[i].localEulerAngles.y,
  3030. IKMuneLSub[i].localEulerAngles.z);
  3031. vIKMuneL[i] = new Vector3(IKMuneL[i].localEulerAngles.x,
  3032. IKMuneL[i].localEulerAngles.y,
  3033. IKMuneL[i].localEulerAngles.z);
  3034. muneIKL[i] = true;
  3035. isStop[i] = true;
  3036. isLock[i] = true;
  3037. mIKMuneL[i].isMouseDrag = false;
  3038. }
  3039. if (mIKMuneL[i].isMouseDown)
  3040. {
  3041. maid.body0.MuneYureL(0f);
  3042. maid.body0.MuneYureR(0f);
  3043. maid.body0.jbMuneL.enabled = false;
  3044. maid.body0.jbMuneR.enabled = false;
  3045. muneIKL[i] = false;
  3046. mIKMuneL[i].isMouseUp = false;
  3047. }
  3048. if (mIKMuneR[i].isMouseUp && mIKMuneR[i].isMouseDrag)
  3049. {
  3050. IKMuneRSub[i].localEulerAngles = mIKMuneR[i].HandLangles;
  3051. IKMuneR[i].localEulerAngles = mIKMuneR[i].UpperArmLangles;
  3052. vIKMuneRSub[i] = new Vector3(IKMuneRSub[i].localEulerAngles.x,
  3053. IKMuneRSub[i].localEulerAngles.y,
  3054. IKMuneRSub[i].localEulerAngles.z);
  3055. vIKMuneR[i] = new Vector3(IKMuneR[i].localEulerAngles.x,
  3056. IKMuneR[i].localEulerAngles.y,
  3057. IKMuneR[i].localEulerAngles.z);
  3058. muneIKR[i] = true;
  3059. isStop[i] = true;
  3060. isLock[i] = true;
  3061. mIKMuneR[i].isMouseDrag = false;
  3062. }
  3063. if (mIKMuneR[i].isMouseDown)
  3064. {
  3065. maid.body0.MuneYureL(0f);
  3066. maid.body0.MuneYureR(0f);
  3067. maid.body0.jbMuneL.enabled = false;
  3068. maid.body0.jbMuneR.enabled = false;
  3069. muneIKR[i] = false;
  3070. mIKMuneL[i].isMouseUp = false;
  3071. }
  3072. if (mHead[i].isStop)
  3073. {
  3074. isStop[i] = true;
  3075. isLock[i] = true;
  3076. mHead[i].isStop = false;
  3077. }
  3078. gJotai[i].SetActive(false);
  3079. gKahuku[i].SetActive(false);
  3080. gHandL[i].SetActive(false);
  3081. gArmL[i].SetActive(false);
  3082. gFootL[i].SetActive(false);
  3083. gHizaL[i].SetActive(false);
  3084. gHandR[i].SetActive(false);
  3085. gArmR[i].SetActive(false);
  3086. gFootR[i].SetActive(false);
  3087. gHizaR[i].SetActive(false);
  3088. gClavicleL[i].SetActive(false);
  3089. gClavicleR[i].SetActive(false);
  3090. gNeck[i].SetActive(false);
  3091. gSpine[i].SetActive(false);
  3092. gSpine0a[i].SetActive(false);
  3093. gSpine1a[i].SetActive(false);
  3094. gSpine1[i].SetActive(false);
  3095. gPelvis[i].SetActive(false);
  3096. }
  3097. }
  3098. else if (ikMode[i] == 15)
  3099. {
  3100. if (ikModeOld[i] == 8 && gIKHandL[i])
  3101. {
  3102. mIKHandL[i].ido = 2;
  3103. mIKHandL[i].reset = true;
  3104. mIKHandR[i].ido = 2;
  3105. mIKHandR[i].reset = true;
  3106. }
  3107. else
  3108. {
  3109. if (!gIKHandL[i])
  3110. {
  3111. this.SetIKInit5(i);
  3112. }
  3113. gIKHandL[i].transform.position = IKHandL[i].position;
  3114. gIKHandL[i].transform.eulerAngles = IKHandL[i].eulerAngles;
  3115. mIKHandL[i].maid = maid;
  3116. mIKHandL[i].HandL = IKHandL[i];
  3117. mIKHandL[i].ido = 2;
  3118. gIKHandR[i].transform.position = IKHandR[i].position;
  3119. gIKHandR[i].transform.eulerAngles = IKHandR[i].eulerAngles;
  3120. mIKHandR[i].maid = maid;
  3121. mIKHandR[i].HandL = IKHandR[i];
  3122. mIKHandR[i].ido = 2;
  3123. Destroy(gHead[i]);
  3124. Destroy(gJotai[i]);
  3125. Destroy(gKahuku[i]);
  3126. gHandL[i].SetActive(false);
  3127. gArmL[i].SetActive(false);
  3128. gFootL[i].SetActive(false);
  3129. gHizaL[i].SetActive(false);
  3130. gHandR[i].SetActive(false);
  3131. gArmR[i].SetActive(false);
  3132. gFootR[i].SetActive(false);
  3133. gHizaR[i].SetActive(false);
  3134. gClavicleL[i].SetActive(false);
  3135. gClavicleR[i].SetActive(false);
  3136. gNeck[i].SetActive(false);
  3137. gSpine[i].SetActive(false);
  3138. gSpine0a[i].SetActive(false);
  3139. gSpine1a[i].SetActive(false);
  3140. gSpine1[i].SetActive(false);
  3141. gPelvis[i].SetActive(false);
  3142. }
  3143. }
  3144. else if (ikMode[i] == 1)
  3145. {
  3146. mHandL[i].ido = 10;
  3147. mHandR[i].ido = 10;
  3148. mFootL[i].ido = 10;
  3149. mFootR[i].ido = 10;
  3150. if (ikModeOld[i] == 0 && gNeck[i])
  3151. {
  3152. if (isBone[i])
  3153. {
  3154. mNeck[i].ido = 4;
  3155. mNeck[i].reset = true;
  3156. mSpine[i].ido = 4;
  3157. mSpine[i].reset = true;
  3158. mSpine0a[i].ido = 4;
  3159. mSpine0a[i].reset = true;
  3160. mSpine1a[i].ido = 4;
  3161. mSpine1a[i].reset = true;
  3162. mSpine1[i].ido = 4;
  3163. mSpine1[i].reset = true;
  3164. mPelvis[i].ido = 4;
  3165. mPelvis[i].reset = true;
  3166. mHizaL[i].ido = 5;
  3167. mHizaL[i].reset = true;
  3168. mHizaR[i].ido = 5;
  3169. mHizaR[i].reset = true;
  3170. }
  3171. }
  3172. else
  3173. {
  3174. gArmL[i].SetActive(false);
  3175. gArmR[i].SetActive(false);
  3176. if (!isBone[i])
  3177. {
  3178. gHizaL[i].SetActive(false);
  3179. gHizaR[i].SetActive(false);
  3180. }
  3181. gClavicleL[i].SetActive(false);
  3182. gClavicleR[i].SetActive(false);
  3183. if (isBone[i])
  3184. {
  3185. mNeck[i].maid = maid;
  3186. mNeck[i].head = Neck[i];
  3187. mNeck[i].no = i;
  3188. mNeck[i].ido = 4;
  3189. gNeck[i].transform.position = Neck[i].position;
  3190. gNeck[i].transform.localEulerAngles = Neck[i].localEulerAngles;
  3191. if (mNeck[i].isHead)
  3192. {
  3193. mNeck[i].isHead = false;
  3194. isLookn[i] = isLook[i];
  3195. isLook[i] = !isLook[i];
  3196. }
  3197. mSpine[i].maid = maid;
  3198. mSpine[i].head = Spine2[i];
  3199. mSpine[i].no = i;
  3200. mSpine[i].ido = 4;
  3201. gSpine[i].transform.position = Spine2[i].position;
  3202. gSpine[i].transform.localEulerAngles = Spine2[i].localEulerAngles;
  3203. mSpine0a[i].maid = maid;
  3204. mSpine0a[i].head = Spine0a2[i];
  3205. mSpine0a[i].no = i;
  3206. mSpine0a[i].ido = 4;
  3207. gSpine0a[i].transform.position = Spine0a2[i].position;
  3208. gSpine0a[i].transform.localEulerAngles = Spine0a2[i].localEulerAngles;
  3209. mSpine1a[i].maid = maid;
  3210. mSpine1a[i].head = Spine1a2[i];
  3211. mSpine1a[i].no = i;
  3212. mSpine1a[i].ido = 4;
  3213. gSpine1a[i].transform.position = Spine1a2[i].position;
  3214. gSpine1a[i].transform.localEulerAngles = Spine1a2[i].localEulerAngles;
  3215. mSpine1[i].maid = maid;
  3216. mSpine1[i].head = Spine12[i];
  3217. mSpine1[i].no = i;
  3218. mSpine1[i].ido = 4;
  3219. gSpine1[i].transform.position = Spine12[i].position;
  3220. gSpine1[i].transform.localEulerAngles = Spine12[i].localEulerAngles;
  3221. mPelvis[i].maid = maid;
  3222. mPelvis[i].head = Pelvis2[i];
  3223. mPelvis[i].no = i;
  3224. mPelvis[i].ido = 8;
  3225. gPelvis[i].transform.position = Pelvis2[i].position;
  3226. gPelvis[i].transform.localEulerAngles = Pelvis2[i].localEulerAngles;
  3227. mHizaL[i].ido = 5;
  3228. mHizaR[i].ido = 5;
  3229. }
  3230. }
  3231. }
  3232. else if (ikMode[i] == 2)
  3233. {
  3234. if (ikModeOld[i] == 0 && gPelvis[i])
  3235. {
  3236. mPelvis[i].ido = 9;
  3237. mPelvis[i].reset = true;
  3238. }
  3239. else
  3240. {
  3241. gArmL[i].SetActive(false);
  3242. gHizaL[i].SetActive(false);
  3243. gArmR[i].SetActive(false);
  3244. gHizaR[i].SetActive(false);
  3245. gClavicleL[i].SetActive(false);
  3246. gClavicleR[i].SetActive(false);
  3247. gNeck[i].SetActive(false);
  3248. gSpine[i].SetActive(false);
  3249. gSpine0a[i].SetActive(false);
  3250. gSpine1a[i].SetActive(false);
  3251. gSpine1[i].SetActive(false);
  3252. mPelvis[i].maid = maid;
  3253. mPelvis[i].head = Pelvis2[i];
  3254. mPelvis[i].no = i;
  3255. mPelvis[i].ido = 9;
  3256. gPelvis[i].transform.position = Pelvis2[i].position;
  3257. gPelvis[i].transform.localEulerAngles = Pelvis2[i].localEulerAngles;
  3258. }
  3259. }
  3260. else if (ikMode[i] == 3)
  3261. {
  3262. if ((ikModeOld[i] == 5 || ikModeOld[i] == 8) && gHead[i])
  3263. {
  3264. mHead[i].ido = 1;
  3265. mHead[i].reset = true;
  3266. mJotai[i].ido = 2;
  3267. mJotai[i].reset = true;
  3268. mKahuku[i].ido = 3;
  3269. mKahuku[i].reset = true;
  3270. mHandL[i].ido = 1;
  3271. mHandR[i].ido = 1;
  3272. mFootL[i].ido = 3;
  3273. mFootR[i].ido = 3;
  3274. mHizaL[i].ido = 5;
  3275. mHizaR[i].ido = 5;
  3276. mHandL[i].reset = true;
  3277. mHandR[i].reset = true;
  3278. mFootL[i].reset = true;
  3279. mFootR[i].reset = true;
  3280. mHizaL[i].reset = true;
  3281. mHizaR[i].reset = true;
  3282. }
  3283. else if (ikModeOld[i] == 0)
  3284. {
  3285. mHandL[i].ido = 1;
  3286. mHandR[i].ido = 1;
  3287. mFootL[i].ido = 3;
  3288. mFootR[i].ido = 3;
  3289. mHizaL[i].ido = 5;
  3290. mHizaR[i].ido = 5;
  3291. mHandL[i].reset = true;
  3292. mHandR[i].reset = true;
  3293. mFootL[i].reset = true;
  3294. mFootR[i].reset = true;
  3295. mHizaL[i].reset = true;
  3296. mHizaR[i].reset = true;
  3297. }
  3298. else
  3299. {
  3300. if (!gHead[i])
  3301. {
  3302. this.SetIKInit4(i);
  3303. }
  3304. if (mHead[i].isHead)
  3305. {
  3306. mHead[i].isHead = false;
  3307. isLookn[i] = isLook[i];
  3308. isLook[i] = !isLook[i];
  3309. }
  3310. gHead[i].transform.position =
  3311. new Vector3(Head2[i].position.x,
  3312. (Head2[i].position.y * 1.2f + Head3[i].position.y * 0.8f) / 2f,
  3313. Head2[i].position.z);
  3314. gHead[i].transform.eulerAngles =
  3315. new Vector3(Head2[i].transform.eulerAngles.x,
  3316. Head2[i].transform.eulerAngles.y,
  3317. Head2[i].transform.eulerAngles.z + 90f);
  3318. mHead[i].head = Head1[i];
  3319. mHead[i].maid = maid;
  3320. mHead[i].no = i;
  3321. mHead[i].ido = 1;
  3322. Transform spine0a = CMT.SearchObjName(maid.body0.m_Bones.transform, "Bip01 Spine0a", true);
  3323. Transform transform3 =
  3324. CMT.SearchObjName(maid.body0.m_Bones.transform, "Bip01 Spine1", true);
  3325. Transform transform4 =
  3326. CMT.SearchObjName(maid.body0.m_Bones.transform, "Bip01 Spine1a", true);
  3327. Transform transform5 = CMT.SearchObjName(maid.body0.m_Bones.transform, "Bip01 Spine", true);
  3328. Transform transform6 =
  3329. CMT.SearchObjName(maid.body0.m_Bones.transform, "Bip01 Pelvis", true);
  3330. gJotai[i].transform.position =
  3331. new Vector3(transform3.position.x,
  3332. (transform3.position.y * 0f + transform4.position.y * 2f) / 2f,
  3333. transform3.position.z);
  3334. gJotai[i].transform.eulerAngles =
  3335. new Vector3(transform3.transform.eulerAngles.x,
  3336. transform3.transform.eulerAngles.y,
  3337. transform3.transform.eulerAngles.z + 90f);
  3338. mJotai[i].Spine0a = spine0a;
  3339. mJotai[i].Spine1 = transform3;
  3340. mJotai[i].Spine1a = transform4;
  3341. mJotai[i].Spine = transform5;
  3342. mJotai[i].maid = maid;
  3343. mJotai[i].ido = 2;
  3344. gKahuku[i].transform.position =
  3345. new Vector3(transform6.position.x,
  3346. (transform6.position.y + transform5.position.y) / 2f,
  3347. transform6.position.z);
  3348. gKahuku[i].transform.eulerAngles =
  3349. new Vector3(transform6.transform.eulerAngles.x + 90f,
  3350. transform6.transform.eulerAngles.y + 90f,
  3351. transform6.transform.eulerAngles.z);
  3352. mKahuku[i].Pelvis = transform6;
  3353. mKahuku[i].maid = maid;
  3354. mKahuku[i].ido = 3;
  3355. mHandL[i].ido = 1;
  3356. mHandR[i].ido = 1;
  3357. mFootL[i].ido = 3;
  3358. mFootR[i].ido = 3;
  3359. mHizaL[i].ido = 5;
  3360. mHizaR[i].ido = 5;
  3361. gJotai[i].SetActive(true);
  3362. gKahuku[i].SetActive(true);
  3363. gHandL[i].SetActive(true);
  3364. gArmL[i].SetActive(false);
  3365. gFootL[i].SetActive(true);
  3366. gHizaL[i].SetActive(true);
  3367. gHandR[i].SetActive(true);
  3368. gArmR[i].SetActive(false);
  3369. gFootR[i].SetActive(true);
  3370. gHizaR[i].SetActive(true);
  3371. Destroy(gIKHandL[i]);
  3372. Destroy(gIKHandR[i]);
  3373. Destroy(gIKMuneL[i]);
  3374. Destroy(gIKMuneR[i]);
  3375. if (isBone[i])
  3376. {
  3377. gHizaL[i].SetActive(false);
  3378. gHizaR[i].SetActive(false);
  3379. gHead[i].SetActive(false);
  3380. gJotai[i].SetActive(false);
  3381. gKahuku[i].SetActive(false);
  3382. }
  3383. else
  3384. {
  3385. gHizaL[i].SetActive(true);
  3386. gHizaR[i].SetActive(true);
  3387. gHead[i].SetActive(true);
  3388. gJotai[i].SetActive(true);
  3389. gKahuku[i].SetActive(true);
  3390. }
  3391. gClavicleL[i].SetActive(false);
  3392. gClavicleR[i].SetActive(false);
  3393. gNeck[i].SetActive(false);
  3394. gSpine[i].SetActive(false);
  3395. gSpine0a[i].SetActive(false);
  3396. gSpine1a[i].SetActive(false);
  3397. gSpine1[i].SetActive(false);
  3398. gPelvis[i].SetActive(false);
  3399. if (mHead[i].isStop)
  3400. {
  3401. isStop[i] = true;
  3402. isLock[i] = true;
  3403. mHead[i].isStop = false;
  3404. }
  3405. if (mJotai[i].isStop)
  3406. {
  3407. isStop[i] = true;
  3408. isLock[i] = true;
  3409. mJotai[i].isStop = false;
  3410. }
  3411. if (mKahuku[i].isStop)
  3412. {
  3413. isStop[i] = true;
  3414. isLock[i] = true;
  3415. mKahuku[i].isStop = false;
  3416. }
  3417. if (mKahuku[i].isSelect)
  3418. {
  3419. mKahuku[i].isSelect = false;
  3420. if (ikMaid != i)
  3421. {
  3422. ikMaid = i;
  3423. ikBui = 5;
  3424. this.SetIK(maid, i);
  3425. }
  3426. }
  3427. if (mJotai[i].isSelect)
  3428. {
  3429. mJotai[i].isSelect = false;
  3430. if (ikMaid != i)
  3431. {
  3432. ikMaid = i;
  3433. ikBui = 5;
  3434. this.SetIK(maid, i);
  3435. }
  3436. }
  3437. if (mKahuku[i].isSelect)
  3438. {
  3439. mKahuku[i].isSelect = false;
  3440. if (ikMaid != i)
  3441. {
  3442. ikMaid = i;
  3443. ikBui = 5;
  3444. this.SetIK(maid, i);
  3445. }
  3446. }
  3447. }
  3448. }
  3449. else if (ikMode[i] == 5)
  3450. {
  3451. if (ikModeOld[i] == 3 && gHead[i])
  3452. {
  3453. mHead[i].ido = 4;
  3454. mHead[i].reset = true;
  3455. mJotai[i].ido = 5;
  3456. mJotai[i].reset = true;
  3457. mKahuku[i].ido = 6;
  3458. mKahuku[i].reset = true;
  3459. mHandL[i].ido = 2;
  3460. mHandR[i].ido = 2;
  3461. mFootL[i].ido = 4;
  3462. mFootR[i].ido = 4;
  3463. mHizaL[i].ido = 5;
  3464. mHizaR[i].ido = 5;
  3465. mHandL[i].reset = true;
  3466. mHandR[i].reset = true;
  3467. mFootL[i].reset = true;
  3468. mFootR[i].reset = true;
  3469. mHizaL[i].reset = true;
  3470. mHizaR[i].reset = true;
  3471. }
  3472. else if (ikModeOld[i] == 0)
  3473. {
  3474. mHandL[i].ido = 2;
  3475. mHandR[i].ido = 2;
  3476. mFootL[i].ido = 4;
  3477. mFootR[i].ido = 4;
  3478. mHizaL[i].ido = 5;
  3479. mHizaR[i].ido = 5;
  3480. mHandL[i].reset = true;
  3481. mHandR[i].reset = true;
  3482. mFootL[i].reset = true;
  3483. mFootR[i].reset = true;
  3484. mHizaL[i].reset = true;
  3485. mHizaR[i].reset = true;
  3486. }
  3487. else
  3488. {
  3489. if (!gHead[i])
  3490. {
  3491. this.SetIKInit4(i);
  3492. }
  3493. if (mHead[i].isHead)
  3494. {
  3495. mHead[i].isHead = false;
  3496. isLookn[i] = isLook[i];
  3497. isLook[i] = !isLook[i];
  3498. }
  3499. gHead[i].transform.position =
  3500. new Vector3(Head2[i].position.x,
  3501. (Head2[i].position.y * 1.2f + Head3[i].position.y * 0.8f) / 2f,
  3502. Head2[i].position.z);
  3503. gHead[i].transform.eulerAngles =
  3504. new Vector3(Head2[i].transform.eulerAngles.x,
  3505. Head2[i].transform.eulerAngles.y,
  3506. Head2[i].transform.eulerAngles.z + 90f);
  3507. mHead[i].head = Head1[i];
  3508. mHead[i].maid = maid;
  3509. mHead[i].ido = 4;
  3510. Transform spine0a = CMT.SearchObjName(maid.body0.m_Bones.transform, "Bip01 Spine0a", true);
  3511. Transform transform3 =
  3512. CMT.SearchObjName(maid.body0.m_Bones.transform, "Bip01 Spine1", true);
  3513. Transform transform4 =
  3514. CMT.SearchObjName(maid.body0.m_Bones.transform, "Bip01 Spine1a", true);
  3515. Transform transform5 = CMT.SearchObjName(maid.body0.m_Bones.transform, "Bip01 Spine", true);
  3516. Transform transform6 =
  3517. CMT.SearchObjName(maid.body0.m_Bones.transform, "Bip01 Pelvis", true);
  3518. gJotai[i].transform.position =
  3519. new Vector3(transform3.position.x,
  3520. (transform3.position.y * 0f + transform4.position.y * 2f) / 2f,
  3521. transform3.position.z);
  3522. gJotai[i].transform.eulerAngles =
  3523. new Vector3(transform3.transform.eulerAngles.x,
  3524. transform3.transform.eulerAngles.y,
  3525. transform3.transform.eulerAngles.z + 90f);
  3526. mJotai[i].Spine0a = spine0a;
  3527. mJotai[i].Spine1 = transform3;
  3528. mJotai[i].Spine1a = transform4;
  3529. mJotai[i].Spine = transform5;
  3530. mJotai[i].maid = maid;
  3531. mJotai[i].ido = 5;
  3532. gKahuku[i].transform.position =
  3533. new Vector3(transform6.position.x,
  3534. (transform6.position.y + transform5.position.y) / 2f,
  3535. transform6.position.z);
  3536. gKahuku[i].transform.eulerAngles =
  3537. new Vector3(transform6.transform.eulerAngles.x + 90f,
  3538. transform6.transform.eulerAngles.y + 90f,
  3539. transform6.transform.eulerAngles.z);
  3540. mKahuku[i].Pelvis = transform6;
  3541. mKahuku[i].maid = maid;
  3542. mKahuku[i].ido = 6;
  3543. mHandL[i].ido = 2;
  3544. mHandR[i].ido = 2;
  3545. mFootL[i].ido = 4;
  3546. mFootR[i].ido = 4;
  3547. mHizaL[i].ido = 5;
  3548. mHizaR[i].ido = 5;
  3549. gArmL[i].SetActive(false);
  3550. gArmR[i].SetActive(false);
  3551. gClavicleL[i].SetActive(false);
  3552. gClavicleR[i].SetActive(false);
  3553. gNeck[i].SetActive(false);
  3554. gSpine[i].SetActive(false);
  3555. gSpine0a[i].SetActive(false);
  3556. gSpine1a[i].SetActive(false);
  3557. gSpine1[i].SetActive(false);
  3558. gPelvis[i].SetActive(false);
  3559. if (isBone[i])
  3560. {
  3561. gHizaL[i].SetActive(false);
  3562. gHizaR[i].SetActive(false);
  3563. gHead[i].SetActive(false);
  3564. gJotai[i].SetActive(false);
  3565. gKahuku[i].SetActive(false);
  3566. }
  3567. else
  3568. {
  3569. gHizaL[i].SetActive(true);
  3570. gHizaR[i].SetActive(true);
  3571. gHead[i].SetActive(true);
  3572. gJotai[i].SetActive(true);
  3573. gKahuku[i].SetActive(true);
  3574. }
  3575. if (mHead[i].isStop)
  3576. {
  3577. isStop[i] = true;
  3578. isLock[i] = true;
  3579. mHead[i].isStop = false;
  3580. }
  3581. if (mJotai[i].isStop)
  3582. {
  3583. isStop[i] = true;
  3584. isLock[i] = true;
  3585. mJotai[i].isStop = false;
  3586. }
  3587. if (mKahuku[i].isStop)
  3588. {
  3589. isStop[i] = true;
  3590. isLock[i] = true;
  3591. mKahuku[i].isStop = false;
  3592. }
  3593. if (mHead[i].isSelect)
  3594. {
  3595. mHead[i].isSelect = false;
  3596. if (ikMaid != i)
  3597. {
  3598. ikMaid = i;
  3599. ikBui = 5;
  3600. this.SetIK(maid, i);
  3601. }
  3602. }
  3603. if (mJotai[i].isSelect)
  3604. {
  3605. mJotai[i].isSelect = false;
  3606. if (ikMaid != i)
  3607. {
  3608. ikMaid = i;
  3609. ikBui = 5;
  3610. this.SetIK(maid, i);
  3611. }
  3612. }
  3613. if (mKahuku[i].isSelect)
  3614. {
  3615. mKahuku[i].isSelect = false;
  3616. if (ikMaid != i)
  3617. {
  3618. ikMaid = i;
  3619. ikBui = 5;
  3620. this.SetIK(maid, i);
  3621. }
  3622. }
  3623. }
  3624. }
  3625. else if (ikMode[i] == 13)
  3626. {
  3627. if ((ikModeOld[i] == 0 || ikModeOld[i] >= 9) && ikModeOld[i] != 13 && gMaid[i])
  3628. {
  3629. mMaid[i].ido = 5;
  3630. mMaid[i].reset = true;
  3631. mMaidC[i].ido = 5;
  3632. mMaidC[i].reset = true;
  3633. gMaidC[i].GetComponent<Renderer>().material.color = new Color(0.7f, 0.7f, 0.3f);
  3634. }
  3635. else
  3636. {
  3637. if (!gMaid[i])
  3638. {
  3639. this.SetIKInit3(i);
  3640. }
  3641. gMaid[i].transform.position =
  3642. new Vector3((Pelvis2[i].position.x + Spine0a2[i].position.x) / 2f,
  3643. (Spine12[i].position.y + Spine0a2[i].position.y) / 2f,
  3644. (Spine0a2[i].position.z + Pelvis2[i].position.z) / 2f);
  3645. gMaid[i].transform.eulerAngles =
  3646. new Vector3(Spine0a2[i].transform.eulerAngles.x,
  3647. Spine0a2[i].transform.eulerAngles.y,
  3648. Spine0a2[i].transform.eulerAngles.z + 90f);
  3649. mMaid[i].maid = maid;
  3650. mMaid[i].ido = 5;
  3651. gMaidC[i].transform.position = maid.transform.position;
  3652. gMaidC[i].transform.eulerAngles = maid.transform.eulerAngles;
  3653. mMaidC[i].maid = maid;
  3654. mMaidC[i].ido = 5;
  3655. if (isCube)
  3656. {
  3657. gMaidC[i].GetComponent<Renderer>().material.color = new Color(0.7f, 0.7f, 0.3f);
  3658. gMaidC[i].SetActive(true);
  3659. }
  3660. else
  3661. {
  3662. gMaidC[i].SetActive(false);
  3663. }
  3664. gHandL[i].SetActive(false);
  3665. gArmL[i].SetActive(false);
  3666. gFootL[i].SetActive(false);
  3667. gHizaL[i].SetActive(false);
  3668. gHandR[i].SetActive(false);
  3669. gArmR[i].SetActive(false);
  3670. gFootR[i].SetActive(false);
  3671. gHizaR[i].SetActive(false);
  3672. gClavicleL[i].SetActive(false);
  3673. gClavicleR[i].SetActive(false);
  3674. gNeck[i].SetActive(false);
  3675. gSpine[i].SetActive(false);
  3676. gSpine0a[i].SetActive(false);
  3677. gSpine1a[i].SetActive(false);
  3678. gSpine1[i].SetActive(false);
  3679. gPelvis[i].SetActive(false);
  3680. }
  3681. if (mMaid[i].isSelect)
  3682. {
  3683. mMaid[i].isSelect = false;
  3684. if (ikMaid != i)
  3685. {
  3686. ikMaid = i;
  3687. ikBui = 5;
  3688. this.SetIK(maid, i);
  3689. }
  3690. }
  3691. }
  3692. else if (ikMode[i] == 11)
  3693. {
  3694. if ((ikModeOld[i] == 0 || ikModeOld[i] >= 9) && ikModeOld[i] != 11 && gMaid[i])
  3695. {
  3696. mMaid[i].ido = 3;
  3697. mMaid[i].reset = true;
  3698. mMaidC[i].ido = 3;
  3699. mMaidC[i].reset = true;
  3700. gMaidC[i].GetComponent<Renderer>().material.color = new Color(0.4f, 0.4f, 1f, 0.5f);
  3701. }
  3702. else
  3703. {
  3704. if (!gMaid[i])
  3705. {
  3706. this.SetIKInit3(i);
  3707. }
  3708. gMaid[i].transform.position =
  3709. new Vector3((Pelvis2[i].position.x + Spine0a2[i].position.x) / 2f,
  3710. (Spine12[i].position.y + Spine0a2[i].position.y) / 2f,
  3711. (Spine0a2[i].position.z + Pelvis2[i].position.z) / 2f);
  3712. gMaid[i].transform.eulerAngles =
  3713. new Vector3(Spine0a2[i].transform.eulerAngles.x,
  3714. Spine0a2[i].transform.eulerAngles.y,
  3715. Spine0a2[i].transform.eulerAngles.z + 90f);
  3716. mMaid[i].maid = maid;
  3717. mMaid[i].ido = 3;
  3718. gMaidC[i].transform.position = maid.transform.position;
  3719. gMaidC[i].transform.eulerAngles = maid.transform.eulerAngles;
  3720. mMaidC[i].maid = maid;
  3721. mMaidC[i].ido = 3;
  3722. if (isCube)
  3723. {
  3724. gMaidC[i].GetComponent<Renderer>().material.color = new Color(0.4f, 0.4f, 1f, 0.5f);
  3725. gMaidC[i].SetActive(true);
  3726. }
  3727. else
  3728. {
  3729. gMaidC[i].SetActive(false);
  3730. }
  3731. gHandL[i].SetActive(false);
  3732. gArmL[i].SetActive(false);
  3733. gFootL[i].SetActive(false);
  3734. gHizaL[i].SetActive(false);
  3735. gHandR[i].SetActive(false);
  3736. gArmR[i].SetActive(false);
  3737. gFootR[i].SetActive(false);
  3738. gHizaR[i].SetActive(false);
  3739. gClavicleL[i].SetActive(false);
  3740. gClavicleR[i].SetActive(false);
  3741. gNeck[i].SetActive(false);
  3742. gSpine[i].SetActive(false);
  3743. gSpine0a[i].SetActive(false);
  3744. gSpine1a[i].SetActive(false);
  3745. gSpine1[i].SetActive(false);
  3746. gPelvis[i].SetActive(false);
  3747. }
  3748. if (mMaid[i].isSelect)
  3749. {
  3750. mMaid[i].isSelect = false;
  3751. if (ikMaid != i)
  3752. {
  3753. ikMaid = i;
  3754. ikBui = 5;
  3755. this.SetIK(maid, i);
  3756. }
  3757. }
  3758. }
  3759. else if (ikMode[i] == 12)
  3760. {
  3761. if ((ikModeOld[i] == 0 || ikModeOld[i] >= 9) && ikModeOld[i] != 12 && gMaid[i])
  3762. {
  3763. mMaid[i].ido = 2;
  3764. mMaid[i].reset = true;
  3765. mMaidC[i].ido = 2;
  3766. mMaidC[i].reset = true;
  3767. gMaidC[i].GetComponent<Renderer>().material.color = new Color(0.4f, 0.4f, 1f, 0.5f);
  3768. }
  3769. else
  3770. {
  3771. if (!gMaid[i])
  3772. {
  3773. this.SetIKInit3(i);
  3774. }
  3775. gMaid[i].transform.position =
  3776. new Vector3((Pelvis2[i].position.x + Spine0a2[i].position.x) / 2f,
  3777. (Spine12[i].position.y + Spine0a2[i].position.y) / 2f,
  3778. (Spine0a2[i].position.z + Pelvis2[i].position.z) / 2f);
  3779. gMaid[i].transform.eulerAngles =
  3780. new Vector3(Spine0a2[i].transform.eulerAngles.x,
  3781. Spine0a2[i].transform.eulerAngles.y,
  3782. Spine0a2[i].transform.eulerAngles.z + 90f);
  3783. mMaid[i].maid = maid;
  3784. mMaid[i].ido = 2;
  3785. gMaidC[i].transform.position = maid.transform.position;
  3786. gMaidC[i].transform.eulerAngles = maid.transform.eulerAngles;
  3787. mMaidC[i].maid = maid;
  3788. mMaidC[i].ido = 2;
  3789. if (isCube)
  3790. {
  3791. gMaidC[i].GetComponent<Renderer>().material.color = new Color(0.4f, 0.4f, 1f, 0.5f);
  3792. gMaidC[i].SetActive(true);
  3793. }
  3794. else
  3795. {
  3796. gMaidC[i].SetActive(false);
  3797. }
  3798. gHandL[i].SetActive(false);
  3799. gArmL[i].SetActive(false);
  3800. gFootL[i].SetActive(false);
  3801. gHizaL[i].SetActive(false);
  3802. gHandR[i].SetActive(false);
  3803. gArmR[i].SetActive(false);
  3804. gFootR[i].SetActive(false);
  3805. gHizaR[i].SetActive(false);
  3806. gClavicleL[i].SetActive(false);
  3807. gClavicleR[i].SetActive(false);
  3808. gNeck[i].SetActive(false);
  3809. gSpine[i].SetActive(false);
  3810. gSpine0a[i].SetActive(false);
  3811. gSpine1a[i].SetActive(false);
  3812. gSpine1[i].SetActive(false);
  3813. gPelvis[i].SetActive(false);
  3814. }
  3815. if (mMaid[i].isSelect)
  3816. {
  3817. mMaid[i].isSelect = false;
  3818. if (ikMaid != i)
  3819. {
  3820. ikMaid = i;
  3821. ikBui = 5;
  3822. this.SetIK(maid, i);
  3823. }
  3824. }
  3825. }
  3826. else if (ikMode[i] == 10)
  3827. {
  3828. if ((ikModeOld[i] == 0 || ikModeOld[i] >= 9) && ikModeOld[i] != 10 && gMaid[i])
  3829. {
  3830. mMaid[i].ido = 1;
  3831. mMaid[i].reset = true;
  3832. mMaidC[i].ido = 1;
  3833. mMaidC[i].reset = true;
  3834. gMaidC[i].GetComponent<Renderer>().material.color = new Color(0.4f, 0.4f, 1f, 0.5f);
  3835. }
  3836. else
  3837. {
  3838. if (!gMaid[i])
  3839. {
  3840. this.SetIKInit3(i);
  3841. }
  3842. gMaid[i].transform.position =
  3843. new Vector3((Pelvis2[i].position.x + Spine0a2[i].position.x) / 2f,
  3844. (Spine12[i].position.y + Spine0a2[i].position.y) / 2f,
  3845. (Spine0a2[i].position.z + Pelvis2[i].position.z) / 2f);
  3846. gMaid[i].transform.eulerAngles =
  3847. new Vector3(Spine0a2[i].transform.eulerAngles.x,
  3848. Spine0a2[i].transform.eulerAngles.y,
  3849. Spine0a2[i].transform.eulerAngles.z + 90f);
  3850. mMaid[i].maid = maid;
  3851. mMaid[i].ido = 1;
  3852. gMaidC[i].transform.position = maid.transform.position;
  3853. gMaidC[i].transform.eulerAngles = maid.transform.eulerAngles;
  3854. mMaidC[i].maid = maid;
  3855. mMaidC[i].ido = 1;
  3856. if (isCube)
  3857. {
  3858. gMaidC[i].GetComponent<Renderer>().material.color = new Color(0.4f, 0.4f, 1f, 0.5f);
  3859. gMaidC[i].SetActive(true);
  3860. }
  3861. else
  3862. {
  3863. gMaidC[i].SetActive(false);
  3864. }
  3865. gHandL[i].SetActive(false);
  3866. gArmL[i].SetActive(false);
  3867. gFootL[i].SetActive(false);
  3868. gHizaL[i].SetActive(false);
  3869. gHandR[i].SetActive(false);
  3870. gArmR[i].SetActive(false);
  3871. gFootR[i].SetActive(false);
  3872. gHizaR[i].SetActive(false);
  3873. gClavicleL[i].SetActive(false);
  3874. gClavicleR[i].SetActive(false);
  3875. gNeck[i].SetActive(false);
  3876. gSpine[i].SetActive(false);
  3877. gSpine0a[i].SetActive(false);
  3878. gSpine1a[i].SetActive(false);
  3879. gSpine1[i].SetActive(false);
  3880. gPelvis[i].SetActive(false);
  3881. }
  3882. if (mMaid[i].isSelect)
  3883. {
  3884. mMaid[i].isSelect = false;
  3885. if (ikMaid != i)
  3886. {
  3887. ikMaid = i;
  3888. ikBui = 5;
  3889. this.SetIK(maid, i);
  3890. }
  3891. }
  3892. }
  3893. else if (ikMode[i] == 9)
  3894. {
  3895. if ((ikModeOld[i] == 0 || ikModeOld[i] >= 9) && ikModeOld[i] != 9 && gMaid[i])
  3896. {
  3897. mMaid[i].ido = 4;
  3898. mMaid[i].reset = true;
  3899. mMaidC[i].ido = 4;
  3900. mMaidC[i].reset = true;
  3901. gMaidC[i].GetComponent<Renderer>().material.color = new Color(0.3f, 0.7f, 0.3f);
  3902. }
  3903. else
  3904. {
  3905. if (!gMaid[i])
  3906. {
  3907. this.SetIKInit3(i);
  3908. }
  3909. gMaid[i].transform.position =
  3910. new Vector3((Pelvis2[i].position.x + Spine0a2[i].position.x) / 2f,
  3911. (Spine12[i].position.y + Spine0a2[i].position.y) / 2f,
  3912. (Spine0a2[i].position.z + Pelvis2[i].position.z) / 2f);
  3913. gMaid[i].transform.eulerAngles =
  3914. new Vector3(Spine0a2[i].transform.eulerAngles.x,
  3915. Spine0a2[i].transform.eulerAngles.y,
  3916. Spine0a2[i].transform.eulerAngles.z + 90f);
  3917. mMaid[i].maid = maid;
  3918. mMaid[i].ido = 4;
  3919. gMaidC[i].transform.position = maid.transform.position;
  3920. gMaidC[i].transform.eulerAngles = maid.transform.eulerAngles;
  3921. mMaidC[i].maid = maid;
  3922. mMaidC[i].ido = 4;
  3923. if (isCube)
  3924. {
  3925. gMaidC[i].GetComponent<Renderer>().material.color = new Color(0.3f, 0.7f, 0.3f);
  3926. gMaidC[i].SetActive(true);
  3927. }
  3928. else
  3929. {
  3930. gMaidC[i].SetActive(false);
  3931. }
  3932. gHandL[i].SetActive(false);
  3933. gArmL[i].SetActive(false);
  3934. gFootL[i].SetActive(false);
  3935. gHizaL[i].SetActive(false);
  3936. gHandR[i].SetActive(false);
  3937. gArmR[i].SetActive(false);
  3938. gFootR[i].SetActive(false);
  3939. gHizaR[i].SetActive(false);
  3940. gClavicleL[i].SetActive(false);
  3941. gClavicleR[i].SetActive(false);
  3942. gNeck[i].SetActive(false);
  3943. gSpine[i].SetActive(false);
  3944. gSpine0a[i].SetActive(false);
  3945. gSpine1a[i].SetActive(false);
  3946. gSpine1[i].SetActive(false);
  3947. gPelvis[i].SetActive(false);
  3948. }
  3949. if (mMaid[i].isSelect)
  3950. {
  3951. mMaid[i].isSelect = false;
  3952. if (ikMaid != i)
  3953. {
  3954. ikMaid = i;
  3955. ikBui = 5;
  3956. this.SetIK(maid, i);
  3957. }
  3958. }
  3959. }
  3960. else if (ikMode[i] == 14)
  3961. {
  3962. if ((ikModeOld[i] == 0 || ikModeOld[i] >= 9) && ikModeOld[i] != 14 && gMaid[i])
  3963. {
  3964. mMaid[i].ido = 6;
  3965. mMaid[i].reset = true;
  3966. mMaidC[i].ido = 6;
  3967. mMaidC[i].reset = true;
  3968. gMaidC[i].GetComponent<Renderer>().material.color = new Color(0.3f, 0.7f, 0.3f);
  3969. }
  3970. else
  3971. {
  3972. if (!gMaid[i])
  3973. {
  3974. this.SetIKInit3(i);
  3975. }
  3976. gMaid[i].transform.position =
  3977. new Vector3((Pelvis2[i].position.x + Spine0a2[i].position.x) / 2f,
  3978. (Spine12[i].position.y + Spine0a2[i].position.y) / 2f,
  3979. (Spine0a2[i].position.z + Pelvis2[i].position.z) / 2f);
  3980. gMaid[i].transform.eulerAngles =
  3981. new Vector3(Spine0a2[i].transform.eulerAngles.x,
  3982. Spine0a2[i].transform.eulerAngles.y,
  3983. Spine0a2[i].transform.eulerAngles.z + 90f);
  3984. mMaid[i].maid = maid;
  3985. mMaid[i].ido = 6;
  3986. gMaidC[i].transform.position = maid.transform.position;
  3987. gMaidC[i].transform.eulerAngles = maid.transform.eulerAngles;
  3988. mMaidC[i].maid = maid;
  3989. mMaidC[i].ido = 6;
  3990. if (isCube)
  3991. {
  3992. gMaidC[i].GetComponent<Renderer>().material.color = new Color(0.3f, 0.7f, 0.3f);
  3993. gMaidC[i].SetActive(true);
  3994. }
  3995. else
  3996. {
  3997. gMaidC[i].SetActive(false);
  3998. }
  3999. gHandL[i].SetActive(false);
  4000. gArmL[i].SetActive(false);
  4001. gFootL[i].SetActive(false);
  4002. gHizaL[i].SetActive(false);
  4003. gHandR[i].SetActive(false);
  4004. gArmR[i].SetActive(false);
  4005. gFootR[i].SetActive(false);
  4006. gHizaR[i].SetActive(false);
  4007. gClavicleL[i].SetActive(false);
  4008. gClavicleR[i].SetActive(false);
  4009. gNeck[i].SetActive(false);
  4010. gSpine[i].SetActive(false);
  4011. gSpine0a[i].SetActive(false);
  4012. gSpine1a[i].SetActive(false);
  4013. gSpine1[i].SetActive(false);
  4014. gPelvis[i].SetActive(false);
  4015. }
  4016. if (mMaid[i].isSelect)
  4017. {
  4018. mMaid[i].isSelect = false;
  4019. if (ikMaid != i)
  4020. {
  4021. ikMaid = i;
  4022. ikBui = 5;
  4023. this.SetIK(maid, i);
  4024. }
  4025. }
  4026. }
  4027. else if (ikMode[i] == 6)
  4028. {
  4029. if (!gFinger[i, 0])
  4030. {
  4031. this.SetIKInit2(i);
  4032. }
  4033. Destroy(gMaid[i]);
  4034. Destroy(gMaidC[i]);
  4035. Destroy(gHead[i]);
  4036. Destroy(gJotai[i]);
  4037. Destroy(gKahuku[i]);
  4038. gHandL[i].SetActive(false);
  4039. gArmL[i].SetActive(false);
  4040. gFootL[i].SetActive(false);
  4041. gHizaL[i].SetActive(false);
  4042. gHandR[i].SetActive(false);
  4043. gArmR[i].SetActive(false);
  4044. gFootR[i].SetActive(false);
  4045. gHizaR[i].SetActive(false);
  4046. gClavicleL[i].SetActive(false);
  4047. gClavicleR[i].SetActive(false);
  4048. gNeck[i].SetActive(false);
  4049. gSpine[i].SetActive(false);
  4050. gSpine0a[i].SetActive(false);
  4051. gSpine1a[i].SetActive(false);
  4052. gSpine1[i].SetActive(false);
  4053. gPelvis[i].SetActive(false);
  4054. for (int j = 0; j < 10; j++)
  4055. {
  4056. mFinger[i, j * 3 + 2].maid = maid;
  4057. mFinger[i, j * 3 + 2].HandL = Finger[i, j * 4 + 3];
  4058. mFinger[i, j * 3 + 2].UpperArmL = Finger[i, j * 4 + 2];
  4059. mFinger[i, j * 3 + 2].ForearmL = Finger[i, j * 4 + 2];
  4060. mFinger[i, j * 3 + 2].ido = 12;
  4061. if (j == 0 || j == 5)
  4062. {
  4063. mFinger[i, j * 3 + 2].ido = 15;
  4064. }
  4065. mFinger[i, j * 3 + 1].maid = maid;
  4066. mFinger[i, j * 3 + 1].HandL = Finger[i, j * 4 + 2];
  4067. mFinger[i, j * 3 + 1].UpperArmL = Finger[i, j * 4 + 1];
  4068. mFinger[i, j * 3 + 1].ForearmL = Finger[i, j * 4 + 1];
  4069. mFinger[i, j * 3 + 1].ido = 11;
  4070. if (j == 0 || j == 5)
  4071. {
  4072. mFinger[i, j * 3 + 1].ido = 14;
  4073. }
  4074. mFinger[i, j * 3].maid = maid;
  4075. mFinger[i, j * 3].HandL = Finger[i, j * 4 + 1];
  4076. mFinger[i, j * 3].UpperArmL = Finger[i, j * 4];
  4077. mFinger[i, j * 3].ForearmL = Finger[i, j * 4];
  4078. mFinger[i, j * 3].ido = 13;
  4079. if (j == 0 || j == 5)
  4080. {
  4081. mFinger[i, j * 3].ido = 0;
  4082. }
  4083. gFinger[i, j * 3 + 2].SetActive(false);
  4084. gFinger[i, j * 3 + 1].SetActive(false);
  4085. gFinger[i, j * 3].SetActive(true);
  4086. gFinger[i, j * 3].SetActive(true);
  4087. mFinger[i, j * 3].ido = 16;
  4088. if (ikModeOld[i] != 6)
  4089. {
  4090. mFinger[i, j * 3].reset = true;
  4091. }
  4092. gFinger[i, j * 3 + 2].transform.position =
  4093. (Finger[i, j * 4 + 3].position + Finger[i, j * 4 + 3].position
  4094. + Finger[i, j * 4 + 2].position) / 3f;
  4095. gFinger[i, j * 3 + 1].transform.position = Finger[i, j * 4 + 2].position;
  4096. gFinger[i, j * 3].transform.position = Finger[i, j * 4 + 1].position;
  4097. if (mFinger[i, j * 3 + 2].isStop)
  4098. {
  4099. isStop[i] = true;
  4100. isLock[i] = true;
  4101. mFinger[i, j * 3 + 2].isStop = false;
  4102. }
  4103. if (mFinger[i, j * 3 + 1].isStop)
  4104. {
  4105. isStop[i] = true;
  4106. isLock[i] = true;
  4107. mFinger[i, j * 3 + 1].isStop = false;
  4108. }
  4109. if (mFinger[i, j * 3].isStop)
  4110. {
  4111. isStop[i] = true;
  4112. isLock[i] = true;
  4113. mFinger[i, j * 3].isStop = false;
  4114. }
  4115. }
  4116. for (int j = 0; j < 6; j++)
  4117. {
  4118. mFinger2[i, j * 2 + 1].maid = maid;
  4119. mFinger2[i, j * 2 + 1].HandL = Finger2[i, j * 3 + 2];
  4120. mFinger2[i, j * 2 + 1].UpperArmL = Finger2[i, j * 3 + 1];
  4121. mFinger2[i, j * 2 + 1].ForearmL = Finger2[i, j * 3 + 1];
  4122. mFinger2[i, j * 2 + 1].ido = 0;
  4123. mFinger2[i, j * 2].maid = maid;
  4124. mFinger2[i, j * 2].HandL = Finger2[i, j * 3 + 1];
  4125. mFinger2[i, j * 2].UpperArmL = Finger2[i, j * 3];
  4126. mFinger2[i, j * 2].ForearmL = Finger2[i, j * 3];
  4127. mFinger2[i, j * 2].ido = 0;
  4128. gFinger2[i, j * 2 + 1].SetActive(false);
  4129. gFinger2[i, j * 2].SetActive(false);
  4130. gFinger2[i, j * 2 + 1].transform.position = Finger2[i, j * 3 + 2].position;
  4131. gFinger2[i, j * 2].transform.position = Finger2[i, j * 3 + 1].position;
  4132. if (mFinger2[i, j * 2 + 1].isStop)
  4133. {
  4134. isStop[i] = true;
  4135. isLock[i] = true;
  4136. mFinger2[i, j * 2 + 1].isStop = false;
  4137. }
  4138. if (mFinger2[i, j * 2].isStop)
  4139. {
  4140. isStop[i] = true;
  4141. isLock[i] = true;
  4142. mFinger2[i, j * 2].isStop = false;
  4143. }
  4144. }
  4145. }
  4146. else if (ikMode[i] == 4)
  4147. {
  4148. if (!gFinger[i, 0])
  4149. {
  4150. this.SetIKInit2(i);
  4151. }
  4152. Destroy(gMaid[i]);
  4153. Destroy(gMaidC[i]);
  4154. Destroy(gHead[i]);
  4155. Destroy(gJotai[i]);
  4156. Destroy(gKahuku[i]);
  4157. gHandL[i].SetActive(false);
  4158. gArmL[i].SetActive(false);
  4159. gFootL[i].SetActive(false);
  4160. gHizaL[i].SetActive(false);
  4161. gHandR[i].SetActive(false);
  4162. gArmR[i].SetActive(false);
  4163. gFootR[i].SetActive(false);
  4164. gHizaR[i].SetActive(false);
  4165. gClavicleL[i].SetActive(false);
  4166. gClavicleR[i].SetActive(false);
  4167. gNeck[i].SetActive(false);
  4168. gSpine[i].SetActive(false);
  4169. gSpine0a[i].SetActive(false);
  4170. gSpine1a[i].SetActive(false);
  4171. gSpine1[i].SetActive(false);
  4172. gPelvis[i].SetActive(false);
  4173. for (int j = 0; j < 10; j++)
  4174. {
  4175. mFinger[i, j * 3 + 2].maid = maid;
  4176. mFinger[i, j * 3 + 2].HandL = Finger[i, j * 4 + 3];
  4177. mFinger[i, j * 3 + 2].UpperArmL = Finger[i, j * 4 + 2];
  4178. mFinger[i, j * 3 + 2].ForearmL = Finger[i, j * 4 + 2];
  4179. mFinger[i, j * 3 + 2].ido = 12;
  4180. mFinger[i, j * 3 + 2].onFlg = true;
  4181. if (j == 0 || j == 5)
  4182. {
  4183. mFinger[i, j * 3 + 2].ido = 15;
  4184. }
  4185. mFinger[i, j * 3 + 1].maid = maid;
  4186. mFinger[i, j * 3 + 1].HandL = Finger[i, j * 4 + 2];
  4187. mFinger[i, j * 3 + 1].UpperArmL = Finger[i, j * 4 + 1];
  4188. mFinger[i, j * 3 + 1].ForearmL = Finger[i, j * 4 + 1];
  4189. mFinger[i, j * 3 + 1].ido = 11;
  4190. mFinger[i, j * 3 + 1].onFlg = true;
  4191. if (j == 0 || j == 5)
  4192. {
  4193. mFinger[i, j * 3 + 1].ido = 14;
  4194. }
  4195. mFinger[i, j * 3].maid = maid;
  4196. mFinger[i, j * 3].HandL = Finger[i, j * 4 + 1];
  4197. mFinger[i, j * 3].UpperArmL = Finger[i, j * 4];
  4198. mFinger[i, j * 3].ForearmL = Finger[i, j * 4];
  4199. mFinger[i, j * 3].ido = 13;
  4200. mFinger[i, j * 3].onFlg = true;
  4201. if (j == 0 || j == 5)
  4202. {
  4203. mFinger[i, j * 3].ido = 0;
  4204. }
  4205. if (ikModeOld[i] != 4)
  4206. {
  4207. mFinger[i, j * 3].reset = true;
  4208. }
  4209. gFinger[i, j * 3 + 2].SetActive(true);
  4210. gFinger[i, j * 3 + 1].SetActive(true);
  4211. gFinger[i, j * 3].SetActive(true);
  4212. gFinger[i, j * 3 + 2].transform.position =
  4213. (Finger[i, j * 4 + 3].position + Finger[i, j * 4 + 3].position
  4214. + Finger[i, j * 4 + 2].position) / 3f;
  4215. gFinger[i, j * 3 + 1].transform.position = Finger[i, j * 4 + 2].position;
  4216. gFinger[i, j * 3].transform.position = Finger[i, j * 4 + 1].position;
  4217. if (mFinger[i, j * 3 + 2].isStop)
  4218. {
  4219. isStop[i] = true;
  4220. isLock[i] = true;
  4221. mFinger[i, j * 3 + 2].isStop = false;
  4222. }
  4223. if (mFinger[i, j * 3 + 1].isStop)
  4224. {
  4225. isStop[i] = true;
  4226. isLock[i] = true;
  4227. mFinger[i, j * 3 + 1].isStop = false;
  4228. }
  4229. if (mFinger[i, j * 3].isStop)
  4230. {
  4231. isStop[i] = true;
  4232. isLock[i] = true;
  4233. mFinger[i, j * 3].isStop = false;
  4234. }
  4235. }
  4236. for (int j = 0; j < 6; j++)
  4237. {
  4238. mFinger2[i, j * 2 + 1].maid = maid;
  4239. mFinger2[i, j * 2 + 1].HandL = Finger2[i, j * 3 + 2];
  4240. mFinger2[i, j * 2 + 1].UpperArmL = Finger2[i, j * 3 + 1];
  4241. mFinger2[i, j * 2 + 1].ForearmL = Finger2[i, j * 3 + 1];
  4242. mFinger2[i, j * 2 + 1].ido = 17;
  4243. mFinger2[i, j * 2].maid = maid;
  4244. mFinger2[i, j * 2].HandL = Finger2[i, j * 3 + 1];
  4245. mFinger2[i, j * 2].UpperArmL = Finger2[i, j * 3];
  4246. mFinger2[i, j * 2].ForearmL = Finger2[i, j * 3];
  4247. mFinger2[i, j * 2].ido = 0;
  4248. gFinger2[i, j * 2 + 1].SetActive(true);
  4249. gFinger2[i, j * 2].SetActive(true);
  4250. gFinger2[i, j * 2 + 1].transform.position = Finger2[i, j * 3 + 2].position;
  4251. gFinger2[i, j * 2].transform.position = Finger2[i, j * 3 + 1].position;
  4252. if (mFinger2[i, j * 2 + 1].isStop)
  4253. {
  4254. isStop[i] = true;
  4255. isLock[i] = true;
  4256. mFinger2[i, j * 2 + 1].isStop = false;
  4257. }
  4258. if (mFinger2[i, j * 2].isStop)
  4259. {
  4260. isStop[i] = true;
  4261. isLock[i] = true;
  4262. mFinger2[i, j * 2].isStop = false;
  4263. }
  4264. }
  4265. }
  4266. else if (ikModeOld[i] == 1 || ikModeOld[i] == 3 || ikModeOld[i] == 5 || ikModeOld[i] == 8)
  4267. {
  4268. mHandL[i].ido = 0;
  4269. mHandR[i].ido = 0;
  4270. mFootL[i].ido = 0;
  4271. mFootR[i].ido = 0;
  4272. mHizaL[i].ido = 0;
  4273. mHizaR[i].ido = 0;
  4274. mHandL[i].reset = true;
  4275. mHandR[i].reset = true;
  4276. mFootL[i].reset = true;
  4277. mFootR[i].reset = true;
  4278. mHizaL[i].reset = true;
  4279. mHizaR[i].reset = true;
  4280. }
  4281. else
  4282. {
  4283. if (gFinger[i, 0])
  4284. {
  4285. for (int j = 0; j < 30; j++)
  4286. {
  4287. gFinger[i, j].SetActive(false);
  4288. }
  4289. for (int j = 0; j < 12; j++)
  4290. {
  4291. gFinger2[i, j].SetActive(false);
  4292. }
  4293. }
  4294. Destroy(gHead[i]);
  4295. Destroy(gJotai[i]);
  4296. Destroy(gKahuku[i]);
  4297. Destroy(gIKHandL[i]);
  4298. Destroy(gIKHandR[i]);
  4299. Destroy(gIKMuneL[i]);
  4300. Destroy(gIKMuneR[i]);
  4301. Destroy(gHead2[i]);
  4302. Destroy(gMaid2[i]);
  4303. gHandL[i].SetActive(true);
  4304. gArmL[i].SetActive(true);
  4305. gFootL[i].SetActive(true);
  4306. gHizaL[i].SetActive(true);
  4307. gHandR[i].SetActive(true);
  4308. gArmR[i].SetActive(true);
  4309. gFootR[i].SetActive(true);
  4310. gHizaR[i].SetActive(true);
  4311. mHandL[i].ido = 0;
  4312. mHandR[i].ido = 0;
  4313. mFootL[i].ido = 0;
  4314. mFootR[i].ido = 0;
  4315. gClavicleL[i].SetActive(true);
  4316. gClavicleR[i].SetActive(true);
  4317. }
  4318. if (!isIK[i])
  4319. {
  4320. gHandL[i].SetActive(false);
  4321. gArmL[i].SetActive(false);
  4322. gFootL[i].SetActive(false);
  4323. gHizaL[i].SetActive(false);
  4324. gHandR[i].SetActive(false);
  4325. gArmR[i].SetActive(false);
  4326. gFootR[i].SetActive(false);
  4327. gHizaR[i].SetActive(false);
  4328. gClavicleL[i].SetActive(false);
  4329. gClavicleR[i].SetActive(false);
  4330. gNeck[i].SetActive(false);
  4331. gSpine[i].SetActive(false);
  4332. gSpine0a[i].SetActive(false);
  4333. gSpine1a[i].SetActive(false);
  4334. gSpine1[i].SetActive(false);
  4335. gPelvis[i].SetActive(false);
  4336. }
  4337. if (isIK[i])
  4338. {
  4339. mHandL[i].maid = maid;
  4340. mHandL[i].HandL = HandL1[i];
  4341. if (ikMode[i] == 2)
  4342. {
  4343. mHandL[i].UpperArmL = ForearmL1[i];
  4344. }
  4345. else
  4346. {
  4347. mHandL[i].UpperArmL = UpperArmL1[i];
  4348. if (ikModeOld[i] == 2 && isLock[i])
  4349. {
  4350. mHandL[i].OnMouseDown();
  4351. mHandL[i].isSelect = false;
  4352. }
  4353. }
  4354. mHandL[i].ForearmL = ForearmL1[i];
  4355. mArmL[i].maid = maid;
  4356. mArmL[i].HandL = ForearmL1[i];
  4357. mArmL[i].UpperArmL = UpperArmL1[i];
  4358. mArmL[i].ForearmL = UpperArmL1[i];
  4359. mArmL[i].onFlg = true;
  4360. if (mArmL[i].onFlg2)
  4361. {
  4362. mArmL[i].onFlg2 = false;
  4363. mHandL[i].initFlg = false;
  4364. }
  4365. if (ikMode[i] == 2)
  4366. {
  4367. mHandL[i].initFlg = false;
  4368. mHandR[i].initFlg = false;
  4369. mFootL[i].initFlg = false;
  4370. mFootR[i].initFlg = false;
  4371. mHandL[i].onFlg = true;
  4372. mHandR[i].onFlg = true;
  4373. mFootL[i].onFlg = true;
  4374. mFootR[i].onFlg = true;
  4375. }
  4376. else
  4377. {
  4378. mHandL[i].onFlg = false;
  4379. mHandR[i].onFlg = false;
  4380. mFootL[i].onFlg = false;
  4381. mFootR[i].onFlg = false;
  4382. }
  4383. gHandL[i].transform.position = HandL1[i].position;
  4384. gArmL[i].transform.position = ForearmL1[i].position;
  4385. mClavicleL[i].maid = maid;
  4386. mClavicleL[i].HandL = UpperArmL1[i];
  4387. mClavicleL[i].UpperArmL = ClavicleL1[i];
  4388. mClavicleL[i].ForearmL = ClavicleL1[i];
  4389. gClavicleL[i].transform.position = UpperArmL1[i].position;
  4390. if (mHandL[i].isStop)
  4391. {
  4392. isStop[i] = true;
  4393. isLock[i] = true;
  4394. mHandL[i].isStop = false;
  4395. }
  4396. if (mArmL[i].isStop)
  4397. {
  4398. isStop[i] = true;
  4399. isLock[i] = true;
  4400. mArmL[i].isStop = false;
  4401. }
  4402. if (mClavicleL[i].isStop)
  4403. {
  4404. isStop[i] = true;
  4405. isLock[i] = true;
  4406. mClavicleL[i].isStop = false;
  4407. }
  4408. mHandR[i].maid = maid;
  4409. mHandR[i].HandL = HandR1[i];
  4410. if (ikMode[i] == 2)
  4411. {
  4412. mHandR[i].UpperArmL = ForearmR1[i];
  4413. }
  4414. else
  4415. {
  4416. mHandR[i].UpperArmL = UpperArmR1[i];
  4417. if (ikModeOld[i] == 2 && isLock[i])
  4418. {
  4419. mHandR[i].OnMouseDown();
  4420. mHandR[i].isSelect = false;
  4421. }
  4422. }
  4423. mHandR[i].ForearmL = ForearmR1[i];
  4424. mArmR[i].maid = maid;
  4425. mArmR[i].HandL = ForearmR1[i];
  4426. mArmR[i].UpperArmL = UpperArmR1[i];
  4427. mArmR[i].ForearmL = UpperArmR1[i];
  4428. mArmR[i].onFlg = true;
  4429. if (mArmR[i].onFlg2)
  4430. {
  4431. mArmR[i].onFlg2 = false;
  4432. mHandR[i].initFlg = false;
  4433. }
  4434. gHandR[i].transform.position = HandR1[i].position;
  4435. gArmR[i].transform.position = ForearmR1[i].position;
  4436. mClavicleR[i].maid = maid;
  4437. mClavicleR[i].HandL = UpperArmR1[i];
  4438. mClavicleR[i].UpperArmL = ClavicleR1[i];
  4439. mClavicleR[i].ForearmL = ClavicleR1[i];
  4440. gClavicleR[i].transform.position = UpperArmR1[i].position;
  4441. if (mHandR[i].isStop)
  4442. {
  4443. isStop[i] = true;
  4444. isLock[i] = true;
  4445. mHandR[i].isStop = false;
  4446. }
  4447. if (mArmR[i].isStop)
  4448. {
  4449. isStop[i] = true;
  4450. isLock[i] = true;
  4451. mArmR[i].isStop = false;
  4452. }
  4453. if (mClavicleL[i].isStop)
  4454. {
  4455. isStop[i] = true;
  4456. isLock[i] = true;
  4457. mClavicleL[i].isStop = false;
  4458. }
  4459. mFootL[i].maid = maid;
  4460. mFootL[i].HandL = HandL2[i];
  4461. if (ikMode[i] == 2)
  4462. {
  4463. mFootL[i].UpperArmL = ForearmL2[i];
  4464. }
  4465. else
  4466. {
  4467. mFootL[i].UpperArmL = UpperArmL2[i];
  4468. if (ikModeOld[i] == 2 && isLock[i])
  4469. {
  4470. mFootL[i].OnMouseDown();
  4471. mFootL[i].isSelect = false;
  4472. }
  4473. }
  4474. mFootL[i].ForearmL = ForearmL2[i];
  4475. mHizaL[i].maid = maid;
  4476. mHizaL[i].HandL = ForearmL2[i];
  4477. mHizaL[i].UpperArmL = UpperArmL2[i];
  4478. mHizaL[i].ForearmL = UpperArmL2[i];
  4479. mHizaL[i].onFlg = true;
  4480. if (mHizaL[i].onFlg2)
  4481. {
  4482. mHizaL[i].onFlg2 = false;
  4483. mFootL[i].initFlg = false;
  4484. }
  4485. gFootL[i].transform.position = HandL2[i].position;
  4486. gHizaL[i].transform.position = ForearmL2[i].position;
  4487. if (mFootL[i].isStop)
  4488. {
  4489. isStop[i] = true;
  4490. isLock[i] = true;
  4491. mFootL[i].isStop = false;
  4492. }
  4493. if (mHizaL[i].isStop)
  4494. {
  4495. isStop[i] = true;
  4496. isLock[i] = true;
  4497. mHizaL[i].isStop = false;
  4498. }
  4499. mFootR[i].maid = maid;
  4500. mFootR[i].HandL = HandR2[i];
  4501. if (ikMode[i] == 2)
  4502. {
  4503. mFootR[i].UpperArmL = ForearmR2[i];
  4504. }
  4505. else
  4506. {
  4507. mFootR[i].UpperArmL = UpperArmR2[i];
  4508. if (ikModeOld[i] == 2 && isLock[i])
  4509. {
  4510. mFootR[i].OnMouseDown();
  4511. mFootR[i].isSelect = false;
  4512. }
  4513. }
  4514. mFootR[i].ForearmL = ForearmR2[i];
  4515. mHizaR[i].maid = maid;
  4516. mHizaR[i].HandL = ForearmR2[i];
  4517. mHizaR[i].UpperArmL = UpperArmR2[i];
  4518. mHizaR[i].ForearmL = UpperArmR2[i];
  4519. mHizaR[i].onFlg = true;
  4520. if (mHizaR[i].onFlg2)
  4521. {
  4522. mHizaR[i].onFlg2 = false;
  4523. mFootR[i].initFlg = false;
  4524. }
  4525. gFootR[i].transform.position = HandR2[i].position;
  4526. gHizaR[i].transform.position = ForearmR2[i].position;
  4527. if (mFootR[i].isStop)
  4528. {
  4529. isStop[i] = true;
  4530. isLock[i] = true;
  4531. mFootR[i].isStop = false;
  4532. }
  4533. if (mHizaR[i].isStop)
  4534. {
  4535. isStop[i] = true;
  4536. isLock[i] = true;
  4537. mHizaR[i].isStop = false;
  4538. }
  4539. bool flag13 = false;
  4540. if (ikModeOld[i] == 9 || ikModeOld[i] == 10 || ikModeOld[i] == 11 || ikModeOld[i] == 12
  4541. || ikModeOld[i] == 14)
  4542. {
  4543. flag13 = true;
  4544. }
  4545. if (isBone[i])
  4546. {
  4547. if ((ikMode[i] != 3 && ikMode[i] != 5 && ikMode[i] != 8) || ikMode[i] != ikModeOld[i]
  4548. || isChange[i])
  4549. {
  4550. gizmoFootL[i].Visible = false;
  4551. gizmoHandR[i].Visible = false;
  4552. gizmoHandL[i].Visible = false;
  4553. gizmoFootR[i].Visible = false;
  4554. }
  4555. else
  4556. {
  4557. bool fieldValue4 = GetFieldValue<GizmoRender, bool>(gizmoHandL[i], "is_drag_");
  4558. bool fieldValue5 = GetFieldValue<GizmoRender, bool>(gizmoHandR[i], "is_drag_");
  4559. bool fieldValue6 = GetFieldValue<GizmoRender, bool>(gizmoFootL[i], "is_drag_");
  4560. bool fieldValue7 = GetFieldValue<GizmoRender, bool>(gizmoFootR[i], "is_drag_");
  4561. if (ikMode[i] == 3)
  4562. {
  4563. gizmoHandL[i].transform.position = HandL1[i].transform.position;
  4564. gizmoHandR[i].transform.position = HandR1[i].transform.position;
  4565. gizmoFootL[i].transform.position = HandL2[i].transform.position;
  4566. gizmoFootR[i].transform.position = HandR2[i].transform.position;
  4567. if (fieldValue4 || fieldValue5 || fieldValue6 || fieldValue7)
  4568. {
  4569. HandL1[i].transform.rotation = gizmoHandL[i].transform.rotation;
  4570. HandR1[i].transform.rotation = gizmoHandR[i].transform.rotation;
  4571. HandL2[i].transform.rotation = gizmoFootL[i].transform.rotation;
  4572. HandR2[i].transform.rotation = gizmoFootR[i].transform.rotation;
  4573. }
  4574. else
  4575. {
  4576. gizmoHandL[i].transform.rotation = HandL1[i].transform.rotation;
  4577. gizmoHandR[i].transform.rotation = HandR1[i].transform.rotation;
  4578. gizmoFootL[i].transform.rotation = HandL2[i].transform.rotation;
  4579. gizmoFootR[i].transform.rotation = HandR2[i].transform.rotation;
  4580. }
  4581. }
  4582. else if (ikMode[i] == 5)
  4583. {
  4584. gizmoHandL[i].transform.position = UpperArmL1[i].transform.position;
  4585. gizmoHandR[i].transform.position = UpperArmR1[i].transform.position;
  4586. gizmoFootL[i].transform.position = UpperArmL2[i].transform.position;
  4587. gizmoFootR[i].transform.position = UpperArmR2[i].transform.position;
  4588. if (fieldValue4 || fieldValue5 || fieldValue6 || fieldValue7)
  4589. {
  4590. UpperArmL1[i].transform.rotation = gizmoHandL[i].transform.rotation;
  4591. UpperArmR1[i].transform.rotation = gizmoHandR[i].transform.rotation;
  4592. UpperArmL2[i].transform.rotation = gizmoFootL[i].transform.rotation;
  4593. UpperArmR2[i].transform.rotation = gizmoFootR[i].transform.rotation;
  4594. flag13 = true;
  4595. }
  4596. else
  4597. {
  4598. gizmoHandL[i].transform.rotation = UpperArmL1[i].transform.rotation;
  4599. gizmoHandR[i].transform.rotation = UpperArmR1[i].transform.rotation;
  4600. gizmoFootL[i].transform.rotation = UpperArmL2[i].transform.rotation;
  4601. gizmoFootR[i].transform.rotation = UpperArmR2[i].transform.rotation;
  4602. }
  4603. }
  4604. else if (ikMode[i] == 8)
  4605. {
  4606. gizmoHandL[i].transform.position = ForearmL1[i].transform.position;
  4607. gizmoHandR[i].transform.position = ForearmR1[i].transform.position;
  4608. gizmoFootL[i].transform.position = ForearmL2[i].transform.position;
  4609. gizmoFootR[i].transform.position = ForearmR2[i].transform.position;
  4610. if (fieldValue4 || fieldValue5 || fieldValue6 || fieldValue7)
  4611. {
  4612. ForearmL1[i].transform.rotation = gizmoHandL[i].transform.rotation;
  4613. ForearmR1[i].transform.rotation = gizmoHandR[i].transform.rotation;
  4614. ForearmL2[i].transform.rotation = gizmoFootL[i].transform.rotation;
  4615. ForearmR2[i].transform.rotation = gizmoFootR[i].transform.rotation;
  4616. flag13 = true;
  4617. }
  4618. else
  4619. {
  4620. gizmoHandL[i].transform.rotation = ForearmL1[i].transform.rotation;
  4621. gizmoHandR[i].transform.rotation = ForearmR1[i].transform.rotation;
  4622. gizmoFootL[i].transform.rotation = ForearmL2[i].transform.rotation;
  4623. gizmoFootR[i].transform.rotation = ForearmR2[i].transform.rotation;
  4624. }
  4625. }
  4626. gizmoHandL[i].Visible = true;
  4627. gizmoHandR[i].Visible = true;
  4628. gizmoFootL[i].Visible = true;
  4629. gizmoFootR[i].Visible = true;
  4630. gHandL[i].SetActive(false);
  4631. gFootL[i].SetActive(false);
  4632. gHandR[i].SetActive(false);
  4633. gFootR[i].SetActive(false);
  4634. if (!isLock[i])
  4635. {
  4636. if (fieldValue4 || fieldValue5 || fieldValue6 || fieldValue7)
  4637. {
  4638. isStop[i] = true;
  4639. isLock[i] = true;
  4640. }
  4641. }
  4642. }
  4643. if (isChange[i])
  4644. {
  4645. isChange[i] = false;
  4646. gHandL[i].transform.localScale = new Vector3(0.07f, 0.07f, 0.07f);
  4647. gHandR[i].transform.localScale = new Vector3(0.07f, 0.07f, 0.07f);
  4648. gArmL[i].transform.localScale = new Vector3(0.07f, 0.07f, 0.07f);
  4649. gArmR[i].transform.localScale = new Vector3(0.07f, 0.07f, 0.07f);
  4650. gFootL[i].transform.localScale = new Vector3(0.07f, 0.07f, 0.07f);
  4651. gFootR[i].transform.localScale = new Vector3(0.07f, 0.07f, 0.07f);
  4652. gHizaL[i].transform.localScale = new Vector3(0.07f, 0.07f, 0.07f);
  4653. gHizaR[i].transform.localScale = new Vector3(0.07f, 0.07f, 0.07f);
  4654. gClavicleL[i].transform.localScale = new Vector3(0.07f, 0.07f, 0.07f);
  4655. gClavicleR[i].transform.localScale = new Vector3(0.07f, 0.07f, 0.07f);
  4656. gHandL[i].GetComponent<Renderer>().enabled = true;
  4657. gHandR[i].GetComponent<Renderer>().enabled = true;
  4658. gArmL[i].GetComponent<Renderer>().enabled = true;
  4659. gArmR[i].GetComponent<Renderer>().enabled = true;
  4660. gFootL[i].GetComponent<Renderer>().enabled = true;
  4661. gFootR[i].GetComponent<Renderer>().enabled = true;
  4662. gHizaL[i].GetComponent<Renderer>().enabled = true;
  4663. gHizaR[i].GetComponent<Renderer>().enabled = true;
  4664. gClavicleL[i].GetComponent<Renderer>().enabled = true;
  4665. gClavicleR[i].GetComponent<Renderer>().enabled = true;
  4666. gHandL[i].GetComponent<Renderer>().material = m_material2;
  4667. gHandR[i].GetComponent<Renderer>().material = m_material2;
  4668. gArmL[i].GetComponent<Renderer>().material = m_material2;
  4669. gArmR[i].GetComponent<Renderer>().material = m_material2;
  4670. gFootL[i].GetComponent<Renderer>().material = m_material2;
  4671. gFootR[i].GetComponent<Renderer>().material = m_material2;
  4672. gHizaL[i].GetComponent<Renderer>().material = m_material2;
  4673. gHizaR[i].GetComponent<Renderer>().material = m_material2;
  4674. gClavicleL[i].GetComponent<Renderer>().material = m_material2;
  4675. gClavicleR[i].GetComponent<Renderer>().material = m_material2;
  4676. }
  4677. if (ikMode[i] == 0 && (ikModeOld[i] == 1 || ikModeOld[i] == 2) && gNeck[i])
  4678. {
  4679. mNeck[i].ido = 1;
  4680. mNeck[i].reset = true;
  4681. mSpine[i].ido = 1;
  4682. mSpine[i].reset = true;
  4683. mSpine0a[i].ido = 1;
  4684. mSpine0a[i].reset = true;
  4685. mSpine1a[i].ido = 1;
  4686. mSpine1a[i].reset = true;
  4687. mSpine1[i].ido = 1;
  4688. mSpine1[i].reset = true;
  4689. mPelvis[i].ido = 1;
  4690. mPelvis[i].reset = true;
  4691. }
  4692. else if (ikMode[i] == 0)
  4693. {
  4694. gNeck[i].SetActive(true);
  4695. gSpine[i].SetActive(true);
  4696. gSpine0a[i].SetActive(true);
  4697. gSpine1a[i].SetActive(true);
  4698. gSpine1[i].SetActive(true);
  4699. gPelvis[i].SetActive(true);
  4700. if (mNeck[i].isHead)
  4701. {
  4702. mNeck[i].isHead = false;
  4703. isLookn[i] = isLook[i];
  4704. isLook[i] = !isLook[i];
  4705. }
  4706. mNeck[i].maid = maid;
  4707. mNeck[i].head = Neck[i];
  4708. mNeck[i].no = i;
  4709. mNeck[i].ido = 1;
  4710. gNeck[i].transform.position = Neck[i].position;
  4711. gNeck[i].transform.localEulerAngles = Neck[i].localEulerAngles;
  4712. mSpine[i].maid = maid;
  4713. mSpine[i].head = Spine2[i];
  4714. mSpine[i].no = i;
  4715. mSpine[i].ido = 1;
  4716. gSpine[i].transform.position = Spine2[i].position;
  4717. gSpine[i].transform.eulerAngles =
  4718. new Vector3(Spine2[i].localEulerAngles.z,
  4719. Spine2[i].localEulerAngles.y,
  4720. Spine2[i].localEulerAngles.x);
  4721. mSpine0a[i].maid = maid;
  4722. mSpine0a[i].head = Spine0a2[i];
  4723. mSpine0a[i].no = i;
  4724. mSpine0a[i].ido = 1;
  4725. gSpine0a[i].transform.position = Spine0a2[i].position;
  4726. gSpine0a[i].transform.eulerAngles =
  4727. new Vector3(-Spine0a2[i].localEulerAngles.z,
  4728. Spine0a2[i].localEulerAngles.x,
  4729. Spine0a2[i].localEulerAngles.y);
  4730. mSpine1a[i].maid = maid;
  4731. mSpine1a[i].head = Spine1a2[i];
  4732. mSpine1a[i].no = i;
  4733. mSpine1a[i].ido = 1;
  4734. gSpine1a[i].transform.position = Spine1a2[i].position;
  4735. gSpine1a[i].transform.localEulerAngles =
  4736. new Vector3(-Spine1a2[i].localEulerAngles.z,
  4737. Spine1a2[i].localEulerAngles.x,
  4738. Spine1a2[i].localEulerAngles.y);
  4739. mSpine1[i].maid = maid;
  4740. mSpine1[i].head = Spine12[i];
  4741. mSpine1[i].no = i;
  4742. mSpine1[i].ido = 1;
  4743. gSpine1[i].transform.position = Spine12[i].position;
  4744. gSpine1[i].transform.localEulerAngles =
  4745. new Vector3(-Spine12[i].localEulerAngles.z,
  4746. Spine12[i].localEulerAngles.x,
  4747. Spine12[i].localEulerAngles.y);
  4748. mPelvis[i].maid = maid;
  4749. mPelvis[i].head = Pelvis2[i];
  4750. mPelvis[i].no = i;
  4751. mPelvis[i].ido = 1;
  4752. gPelvis[i].transform.position = Pelvis2[i].position;
  4753. gPelvis[i].transform.localEulerAngles = Pelvis2[i].localEulerAngles;
  4754. if (mNeck[i].isIdo)
  4755. {
  4756. mNeck[i].isIdo = false;
  4757. isLock[i] = true;
  4758. }
  4759. if (mSpine[i].isIdo)
  4760. {
  4761. mSpine[i].isIdo = false;
  4762. flag13 = true;
  4763. isLock[i] = true;
  4764. }
  4765. if (mSpine0a[i].isIdo)
  4766. {
  4767. mSpine0a[i].isIdo = false;
  4768. flag13 = true;
  4769. isLock[i] = true;
  4770. }
  4771. if (mSpine1a[i].isIdo)
  4772. {
  4773. mSpine1a[i].isIdo = false;
  4774. flag13 = true;
  4775. isLock[i] = true;
  4776. }
  4777. if (mSpine1[i].isIdo)
  4778. {
  4779. mSpine1[i].isIdo = false;
  4780. flag13 = true;
  4781. isLock[i] = true;
  4782. }
  4783. if (mPelvis[i].isIdo)
  4784. {
  4785. mPelvis[i].isIdo = false;
  4786. flag13 = true;
  4787. isLock[i] = true;
  4788. }
  4789. if (mClavicleL[i].isIdo)
  4790. {
  4791. mClavicleL[i].isIdo = false;
  4792. flag13 = true;
  4793. isLock[i] = true;
  4794. }
  4795. if (mClavicleR[i].isIdo)
  4796. {
  4797. mClavicleR[i].isIdo = false;
  4798. flag13 = true;
  4799. isLock[i] = true;
  4800. }
  4801. }
  4802. }
  4803. else if (isChange[i])
  4804. {
  4805. isChange[i] = false;
  4806. gHandL[i].GetComponent<Renderer>().enabled = false;
  4807. gArmL[i].GetComponent<Renderer>().enabled = false;
  4808. gFootL[i].GetComponent<Renderer>().enabled = false;
  4809. gHizaL[i].GetComponent<Renderer>().enabled = false;
  4810. gHandR[i].GetComponent<Renderer>().enabled = false;
  4811. gArmR[i].GetComponent<Renderer>().enabled = false;
  4812. gFootR[i].GetComponent<Renderer>().enabled = false;
  4813. gHizaR[i].GetComponent<Renderer>().enabled = false;
  4814. gClavicleL[i].GetComponent<Renderer>().enabled = false;
  4815. gClavicleR[i].GetComponent<Renderer>().enabled = false;
  4816. gHandL[i].transform.localScale = new Vector3(0.12f, 0.12f, 0.12f);
  4817. gHandR[i].transform.localScale = new Vector3(0.12f, 0.12f, 0.12f);
  4818. gArmL[i].transform.localScale = new Vector3(0.12f, 0.12f, 0.12f);
  4819. gArmR[i].transform.localScale = new Vector3(0.12f, 0.12f, 0.12f);
  4820. gFootL[i].transform.localScale = new Vector3(0.15f, 0.15f, 0.15f);
  4821. gFootR[i].transform.localScale = new Vector3(0.15f, 0.15f, 0.15f);
  4822. gHizaL[i].transform.localScale = new Vector3(0.15f, 0.15f, 0.15f);
  4823. gHizaR[i].transform.localScale = new Vector3(0.15f, 0.15f, 0.15f);
  4824. gClavicleL[i].transform.localScale = new Vector3(0.13f, 0.13f, 0.13f);
  4825. mClavicleR[i].transform.localScale = new Vector3(0.13f, 0.13f, 0.13f);
  4826. gNeck[i].SetActive(false);
  4827. gSpine[i].SetActive(false);
  4828. gSpine0a[i].SetActive(false);
  4829. gSpine1a[i].SetActive(false);
  4830. gSpine1[i].SetActive(false);
  4831. gPelvis[i].SetActive(false);
  4832. gizmoHandL[i].Visible = false;
  4833. gizmoHandR[i].Visible = false;
  4834. gizmoFootL[i].Visible = false;
  4835. gizmoFootR[i].Visible = false;
  4836. }
  4837. if (flag13)
  4838. {
  4839. mHandL[i].initFlg = false;
  4840. mHandR[i].initFlg = false;
  4841. mFootL[i].initFlg = false;
  4842. mFootR[i].initFlg = false;
  4843. }
  4844. }
  4845. ikModeOld[i] = ikMode[i];
  4846. bool flag14 = false;
  4847. if (!Input.GetKey(KeyCode.A) && !Input.GetKey(KeyCode.Q) && i == ikMaid)
  4848. {
  4849. if (Input.GetKey(KeyCode.X) && Input.GetKey(KeyCode.BackQuote))
  4850. {
  4851. for (int k = 0; k < 10; k++)
  4852. {
  4853. maid.transform.RotateAround(maid.transform.position,
  4854. Vector3.right,
  4855. -maid.transform.rotation.eulerAngles.x);
  4856. maid.transform.RotateAround(maid.transform.position,
  4857. Vector3.forward,
  4858. -maid.transform.rotation.eulerAngles.z);
  4859. }
  4860. flag14 = true;
  4861. }
  4862. else if (Input.GetKey(KeyCode.X) && Input.GetKey(KeyCode.I) && Input.GetKey(KeyCode.J))
  4863. {
  4864. maid.transform.RotateAround(maid.transform.position,
  4865. new Vector3(vector3.x, 0f, vector3.z),
  4866. 0.3f);
  4867. maid.transform.RotateAround(maid.transform.position,
  4868. new Vector3(vector2.x, 0f, vector2.z),
  4869. 0.3f);
  4870. flag14 = true;
  4871. }
  4872. else if (Input.GetKey(KeyCode.X) && Input.GetKey(KeyCode.I) && Input.GetKey(KeyCode.L))
  4873. {
  4874. maid.transform.RotateAround(maid.transform.position,
  4875. new Vector3(vector3.x, 0f, vector3.z),
  4876. 0.3f);
  4877. maid.transform.RotateAround(maid.transform.position,
  4878. new Vector3(vector2.x, 0f, vector2.z),
  4879. -0.3f);
  4880. flag14 = true;
  4881. }
  4882. else if (Input.GetKey(KeyCode.X) && Input.GetKey(KeyCode.K) && Input.GetKey(KeyCode.J))
  4883. {
  4884. maid.transform.RotateAround(maid.transform.position,
  4885. new Vector3(vector3.x, 0f, vector3.z),
  4886. -0.3f);
  4887. maid.transform.RotateAround(maid.transform.position,
  4888. new Vector3(vector2.x, 0f, vector2.z),
  4889. 0.3f);
  4890. flag14 = true;
  4891. }
  4892. else if (Input.GetKey(KeyCode.X) && Input.GetKey(KeyCode.K) && Input.GetKey(KeyCode.L))
  4893. {
  4894. maid.transform.RotateAround(maid.transform.position,
  4895. new Vector3(vector3.x, 0f, vector3.z),
  4896. -0.3f);
  4897. maid.transform.RotateAround(maid.transform.position,
  4898. new Vector3(vector2.x, 0f, vector2.z),
  4899. -0.3f);
  4900. flag14 = true;
  4901. }
  4902. else if (Input.GetKey(KeyCode.X) && Input.GetKey(KeyCode.I))
  4903. {
  4904. maid.transform.RotateAround(maid.transform.position,
  4905. new Vector3(vector3.x, 0f, vector3.z),
  4906. 0.4f);
  4907. flag14 = true;
  4908. }
  4909. else if (Input.GetKey(KeyCode.X) && Input.GetKey(KeyCode.K))
  4910. {
  4911. maid.transform.RotateAround(maid.transform.position,
  4912. new Vector3(vector3.x, 0f, vector3.z),
  4913. -0.4f);
  4914. flag14 = true;
  4915. }
  4916. else if (Input.GetKey(KeyCode.X) && Input.GetKey(KeyCode.J))
  4917. {
  4918. maid.transform.RotateAround(maid.transform.position,
  4919. new Vector3(vector2.x, 0f, vector2.z),
  4920. 0.4f);
  4921. flag14 = true;
  4922. }
  4923. else if (Input.GetKey(KeyCode.X) && Input.GetKey(KeyCode.L))
  4924. {
  4925. maid.transform.RotateAround(maid.transform.position,
  4926. new Vector3(vector2.x, 0f, vector2.z),
  4927. -0.4f);
  4928. flag14 = true;
  4929. }
  4930. else if (Input.GetKey(KeyCode.X) && Input.GetKey(KeyCode.U))
  4931. {
  4932. maid.body0.transform.localRotation =
  4933. Quaternion.Euler(maid.body0.transform.localEulerAngles)
  4934. * Quaternion.AngleAxis(-1.5f, Vector3.up);
  4935. flag14 = true;
  4936. }
  4937. else if (Input.GetKey(KeyCode.X) && Input.GetKey(KeyCode.O))
  4938. {
  4939. maid.body0.transform.localRotation =
  4940. Quaternion.Euler(maid.body0.transform.localEulerAngles)
  4941. * Quaternion.AngleAxis(1.5f, Vector3.up);
  4942. flag14 = true;
  4943. }
  4944. else if (Input.GetKey(KeyCode.Z) && Input.GetKey(KeyCode.U))
  4945. {
  4946. maid.body0.transform.RotateAround(maid.transform.position, Vector3.up, -1.5f);
  4947. flag14 = true;
  4948. }
  4949. else if (Input.GetKey(KeyCode.Z) && Input.GetKey(KeyCode.O))
  4950. {
  4951. maid.body0.transform.RotateAround(maid.transform.position, Vector3.up, 1.5f);
  4952. flag14 = true;
  4953. }
  4954. else if (Input.GetKey(KeyCode.Z) && Input.GetKey(KeyCode.I) && Input.GetKey(KeyCode.J))
  4955. {
  4956. Vector3 vector = maid.transform.position;
  4957. vector += new Vector3(vector2.x, 0f, vector2.z) * 0.0075f * speed;
  4958. vector += new Vector3(vector3.x, 0f, vector3.z) * -0.0075f * speed;
  4959. maid.SetPos(vector);
  4960. flag14 = true;
  4961. }
  4962. else if (Input.GetKey(KeyCode.Z) && Input.GetKey(KeyCode.I) && Input.GetKey(KeyCode.L))
  4963. {
  4964. Vector3 vector = maid.transform.position;
  4965. vector += new Vector3(vector2.x, 0f, vector2.z) * 0.0075f * speed;
  4966. vector += new Vector3(vector3.x, 0f, vector3.z) * 0.0075f * speed;
  4967. maid.SetPos(vector);
  4968. flag14 = true;
  4969. }
  4970. else if (Input.GetKey(KeyCode.Z) && Input.GetKey(KeyCode.K) && Input.GetKey(KeyCode.J))
  4971. {
  4972. Vector3 vector = maid.transform.position;
  4973. vector += new Vector3(vector2.x, 0f, vector2.z) * -0.0075f * speed;
  4974. vector += new Vector3(vector3.x, 0f, vector3.z) * -0.0075f * speed;
  4975. maid.SetPos(vector);
  4976. flag14 = true;
  4977. }
  4978. else if (Input.GetKey(KeyCode.Z) && Input.GetKey(KeyCode.K) && Input.GetKey(KeyCode.L))
  4979. {
  4980. Vector3 vector = maid.transform.position;
  4981. vector += new Vector3(vector2.x, 0f, vector2.z) * -0.0075f * speed;
  4982. vector += new Vector3(vector3.x, 0f, vector3.z) * 0.0075f * speed;
  4983. maid.SetPos(vector);
  4984. flag14 = true;
  4985. }
  4986. else if (Input.GetKey(KeyCode.Z) && Input.GetKey(KeyCode.I))
  4987. {
  4988. Vector3 vector = maid.transform.position;
  4989. vector += new Vector3(vector2.x, 0f, vector2.z) * 0.0075f * speed;
  4990. maid.SetPos(vector);
  4991. flag14 = true;
  4992. }
  4993. else if (Input.GetKey(KeyCode.Z) && Input.GetKey(KeyCode.K))
  4994. {
  4995. Vector3 vector = maid.transform.position;
  4996. vector += new Vector3(vector2.x, 0f, vector2.z) * -0.0075f * speed;
  4997. maid.SetPos(vector);
  4998. flag14 = true;
  4999. }
  5000. else if (Input.GetKey(KeyCode.Z) && Input.GetKey(KeyCode.J))
  5001. {
  5002. Vector3 vector = maid.transform.position;
  5003. vector += new Vector3(vector3.x, 0f, vector3.z) * -0.0075f * speed;
  5004. maid.SetPos(vector);
  5005. flag14 = true;
  5006. }
  5007. else if (Input.GetKey(KeyCode.Z) && Input.GetKey(KeyCode.L))
  5008. {
  5009. Vector3 vector = maid.transform.position;
  5010. vector += new Vector3(vector3.x, 0f, vector3.z) * 0.0075f * speed;
  5011. maid.SetPos(vector);
  5012. flag14 = true;
  5013. }
  5014. else if ((Input.GetKey(KeyCode.Z) || Input.GetKey(KeyCode.X)) && Input.GetKey(KeyCode.Alpha0))
  5015. {
  5016. Vector3 vector = maid.transform.position;
  5017. vector.y += 0.0075f * speed;
  5018. maid.SetPos(vector);
  5019. flag14 = true;
  5020. }
  5021. else if ((Input.GetKey(KeyCode.Z) || Input.GetKey(KeyCode.X)) && Input.GetKey(KeyCode.P))
  5022. {
  5023. Vector3 vector = maid.transform.position;
  5024. vector.y -= 0.0075f * speed;
  5025. maid.SetPos(vector);
  5026. flag14 = true;
  5027. }
  5028. else if (Input.GetKey(KeyCode.C) && Input.GetKey(KeyCode.I))
  5029. {
  5030. maid.transform.localScale =
  5031. new Vector3(maid.transform.localScale.x * 1.005f,
  5032. maid.transform.localScale.y * 1.005f,
  5033. maid.transform.localScale.z * 1.005f);
  5034. flag14 = true;
  5035. }
  5036. else if (Input.GetKey(KeyCode.C) && Input.GetKey(KeyCode.K))
  5037. {
  5038. maid.transform.localScale =
  5039. new Vector3(maid.transform.localScale.x * 0.995f,
  5040. maid.transform.localScale.y * 0.995f,
  5041. maid.transform.localScale.z * 0.995f);
  5042. flag14 = true;
  5043. }
  5044. else if (Input.GetKey(KeyCode.C) && Input.GetKey(KeyCode.BackQuote))
  5045. {
  5046. maid.transform.localScale = new Vector3(1f, 1f, 1f);
  5047. flag14 = true;
  5048. }
  5049. }
  5050. if (!flag14 && (ikBui != 5 || (ikBui == 5 && (ikMode[i] == 4 || ikMode[i] == 6 || ikMode[i] == 7)))
  5051. && !Input.GetKey(KeyCode.V) && !Input.GetKey(KeyCode.A) && !Input.GetKey(KeyCode.Q)
  5052. && i == ikMaid)
  5053. {
  5054. if (Input.GetKey(KeyCode.I))
  5055. {
  5056. if (ikMode[i] == 0)
  5057. {
  5058. Vector3 vector5 = HandL.position;
  5059. vector5 += new Vector3(vector2.x, 0f, vector2.z) * 0.004f;
  5060. ikLeftArm.Init(UpperArmL, ForearmL, HandL, maidArray[i].body0);
  5061. ikLeftArm.Porc(UpperArmL, ForearmL, HandL, vector5, default(Vector3));
  5062. }
  5063. else if (ikMode[i] == 2)
  5064. {
  5065. Vector3 vector5 = HandL.position;
  5066. vector5 += new Vector3(vector2.x, 0f, vector2.z) * 0.004f;
  5067. ikLeftArm.Init(ForearmL, ForearmL, HandL, maidArray[i].body0);
  5068. ikLeftArm.Porc(ForearmL, ForearmL, HandL, vector5, default(Vector3));
  5069. }
  5070. else if (ikMode[i] == 3)
  5071. {
  5072. if (ikBui == 1 || ikBui == 2)
  5073. {
  5074. HandL.RotateAround(HandL.position, new Vector3(vector3.x, 0f, vector3.z), 0.8f);
  5075. }
  5076. else
  5077. {
  5078. HandL.RotateAround(HandL.position, new Vector3(vector3.x, 0f, vector3.z), -0.8f);
  5079. }
  5080. }
  5081. else if (ikMode[i] == 4)
  5082. {
  5083. Head.RotateAround(Head.position, new Vector3(vector3.x, 0f, vector3.z), 0.4f);
  5084. }
  5085. else if (ikMode[i] == 8)
  5086. {
  5087. IK_hand.RotateAround(IK_hand.position, new Vector3(vector3.x, 0f, vector3.z), 0.6f);
  5088. }
  5089. else if (ikMode[i] == 6)
  5090. {
  5091. Spine1a.RotateAround(Spine1a.position, new Vector3(vector3.x, 0f, vector3.z), 0.03f);
  5092. Spine1.RotateAround(Spine1.position, new Vector3(vector3.x, 0f, vector3.z), 0.1f);
  5093. Spine0a.RotateAround(Spine0a.position, new Vector3(vector3.x, 0f, vector3.z), 0.09f);
  5094. Spine.RotateAround(Spine.position, new Vector3(vector3.x, 0f, vector3.z), 0.07f);
  5095. }
  5096. else if (ikMode[i] == 7)
  5097. {
  5098. Pelvis.RotateAround(Pelvis.position, new Vector3(vector3.x, 0f, vector3.z), -0.2f);
  5099. }
  5100. else if (ikMode[i] == 5)
  5101. {
  5102. Vector3 vector5 = ForearmL.position;
  5103. vector5 += new Vector3(vector2.x, 0f, vector2.z) * 0.0035f;
  5104. ikLeftArm.Init(Clavicle, UpperArmL, ForearmL, maidArray[i].body0);
  5105. ikLeftArm.Porc(Clavicle, UpperArmL, ForearmL, vector5, default(Vector3));
  5106. }
  5107. else
  5108. {
  5109. Vector3 vector5 = ForearmL.position;
  5110. vector5 += new Vector3(vector2.x, 0f, vector2.z) * 0.0035f;
  5111. ikLeftArm.Init(UpperArmL, UpperArmL, ForearmL, maidArray[i].body0);
  5112. ikLeftArm.Porc(UpperArmL, UpperArmL, ForearmL, vector5, default(Vector3));
  5113. }
  5114. isStop[i] = true;
  5115. isLock[i] = true;
  5116. }
  5117. else if (Input.GetKey(KeyCode.K))
  5118. {
  5119. if (ikMode[i] == 0)
  5120. {
  5121. Vector3 vector5 = HandL.position;
  5122. vector5 += new Vector3(vector2.x, 0f, vector2.z) * -0.004f;
  5123. ikLeftArm.Init(UpperArmL, ForearmL, HandL, maidArray[i].body0);
  5124. ikLeftArm.Porc(UpperArmL, ForearmL, HandL, vector5, default(Vector3));
  5125. }
  5126. else if (ikMode[i] == 2)
  5127. {
  5128. Vector3 vector5 = HandL.position;
  5129. vector5 += new Vector3(vector2.x, 0f, vector2.z) * -0.004f;
  5130. ikLeftArm.Init(ForearmL, ForearmL, HandL, maidArray[i].body0);
  5131. ikLeftArm.Porc(ForearmL, ForearmL, HandL, vector5, default(Vector3));
  5132. }
  5133. else if (ikMode[i] == 3)
  5134. {
  5135. if (ikBui == 1 || ikBui == 2)
  5136. {
  5137. HandL.RotateAround(HandL.position, new Vector3(vector3.x, 0f, vector3.z), -0.8f);
  5138. }
  5139. else
  5140. {
  5141. HandL.RotateAround(HandL.position, new Vector3(vector3.x, 0f, vector3.z), 0.8f);
  5142. }
  5143. }
  5144. else if (ikMode[i] == 4)
  5145. {
  5146. Head.RotateAround(Head.position, new Vector3(vector3.x, 0f, vector3.z), -0.4f);
  5147. }
  5148. else if (ikMode[i] == 8)
  5149. {
  5150. IK_hand.RotateAround(IK_hand.position, new Vector3(vector3.x, 0f, vector3.z), -0.6f);
  5151. }
  5152. else if (ikMode[i] == 6)
  5153. {
  5154. Spine1a.RotateAround(Spine1a.position, new Vector3(vector3.x, 0f, vector3.z), -0.03f);
  5155. Spine1.RotateAround(Spine1.position, new Vector3(vector3.x, 0f, vector3.z), -0.1f);
  5156. Spine0a.RotateAround(Spine0a.position, new Vector3(vector3.x, 0f, vector3.z), -0.09f);
  5157. Spine.RotateAround(Spine.position, new Vector3(vector3.x, 0f, vector3.z), -0.07f);
  5158. }
  5159. else if (ikMode[i] == 7)
  5160. {
  5161. Pelvis.RotateAround(Pelvis.position, new Vector3(vector3.x, 0f, vector3.z), 0.2f);
  5162. }
  5163. else if (ikMode[i] == 5)
  5164. {
  5165. Vector3 vector5 = ForearmL.position;
  5166. vector5 += new Vector3(vector2.x, 0f, vector2.z) * -0.0035f;
  5167. ikLeftArm.Init(Clavicle, UpperArmL, ForearmL, maidArray[i].body0);
  5168. ikLeftArm.Porc(Clavicle, UpperArmL, ForearmL, vector5, default(Vector3));
  5169. }
  5170. else
  5171. {
  5172. Vector3 vector5 = ForearmL.position;
  5173. vector5 += new Vector3(vector2.x, 0f, vector2.z) * -0.0035f;
  5174. ikLeftArm.Init(UpperArmL, UpperArmL, ForearmL, maidArray[i].body0);
  5175. ikLeftArm.Porc(UpperArmL, UpperArmL, ForearmL, vector5, default(Vector3));
  5176. }
  5177. isStop[i] = true;
  5178. isLock[i] = true;
  5179. }
  5180. else if (Input.GetKey(KeyCode.J))
  5181. {
  5182. if (ikMode[i] == 0)
  5183. {
  5184. Vector3 vector5 = HandL.position;
  5185. vector5 += new Vector3(vector3.x, 0f, vector3.z) * -0.004f;
  5186. ikLeftArm.Init(UpperArmL, ForearmL, HandL, maidArray[i].body0);
  5187. ikLeftArm.Porc(UpperArmL, ForearmL, HandL, vector5, default(Vector3));
  5188. }
  5189. else if (ikMode[i] == 2)
  5190. {
  5191. Vector3 vector5 = HandL.position;
  5192. vector5 += new Vector3(vector3.x, 0f, vector3.z) * -0.004f;
  5193. ikLeftArm.Init(ForearmL, ForearmL, HandL, maidArray[i].body0);
  5194. ikLeftArm.Porc(ForearmL, ForearmL, HandL, vector5, default(Vector3));
  5195. }
  5196. else if (ikMode[i] == 3)
  5197. {
  5198. if (ikBui == 1 || ikBui == 2)
  5199. {
  5200. HandL.RotateAround(HandL.position, new Vector3(vector2.x, 0f, vector2.z), 0.8f);
  5201. }
  5202. else
  5203. {
  5204. HandL.RotateAround(HandL.position, new Vector3(vector2.x, 0f, vector2.z), -0.8f);
  5205. }
  5206. }
  5207. else if (ikMode[i] == 4)
  5208. {
  5209. Head.RotateAround(Head.position, new Vector3(vector2.x, 0f, vector2.z), 0.4f);
  5210. }
  5211. else if (ikMode[i] == 8)
  5212. {
  5213. IK_hand.RotateAround(IK_hand.position, new Vector3(vector2.x, 0f, vector2.z), 0.6f);
  5214. }
  5215. else if (ikMode[i] == 6)
  5216. {
  5217. Spine1a.RotateAround(Spine1a.position, new Vector3(vector2.x, 0f, vector2.z), 0.03f);
  5218. Spine1.RotateAround(Spine1.position, new Vector3(vector2.x, 0f, vector2.z), 0.1f);
  5219. Spine0a.RotateAround(Spine0a.position, new Vector3(vector2.x, 0f, vector2.z), 0.09f);
  5220. Spine.RotateAround(Spine.position, new Vector3(vector2.x, 0f, vector2.z), 0.07f);
  5221. }
  5222. else if (ikMode[i] == 7)
  5223. {
  5224. Pelvis.RotateAround(Pelvis.position, new Vector3(vector2.x, 0f, vector2.z), -0.2f);
  5225. }
  5226. else if (ikMode[i] == 5)
  5227. {
  5228. Vector3 vector5 = ForearmL.position;
  5229. vector5 += new Vector3(vector3.x, 0f, vector3.z) * -0.0035f;
  5230. ikLeftArm.Init(Clavicle, UpperArmL, ForearmL, maidArray[i].body0);
  5231. ikLeftArm.Porc(Clavicle, UpperArmL, ForearmL, vector5, default(Vector3));
  5232. }
  5233. else
  5234. {
  5235. Vector3 vector5 = ForearmL.position;
  5236. vector5 += new Vector3(vector3.x, 0f, vector3.z) * -0.0035f;
  5237. ikLeftArm.Init(UpperArmL, UpperArmL, ForearmL, maidArray[i].body0);
  5238. ikLeftArm.Porc(UpperArmL, UpperArmL, ForearmL, vector5, default(Vector3));
  5239. }
  5240. isStop[i] = true;
  5241. isLock[i] = true;
  5242. }
  5243. else if (Input.GetKey(KeyCode.L))
  5244. {
  5245. if (ikMode[i] == 0)
  5246. {
  5247. Vector3 vector5 = HandL.position;
  5248. vector5 += new Vector3(vector3.x, 0f, vector3.z) * 0.004f;
  5249. ikLeftArm.Init(UpperArmL, ForearmL, HandL, maidArray[i].body0);
  5250. ikLeftArm.Porc(UpperArmL, ForearmL, HandL, vector5, default(Vector3));
  5251. }
  5252. else if (ikMode[i] == 2)
  5253. {
  5254. Vector3 vector5 = HandL.position;
  5255. vector5 += new Vector3(vector3.x, 0f, vector3.z) * 0.004f;
  5256. ikLeftArm.Init(ForearmL, ForearmL, HandL, maidArray[i].body0);
  5257. ikLeftArm.Porc(ForearmL, ForearmL, HandL, vector5, default(Vector3));
  5258. }
  5259. else if (ikMode[i] == 3)
  5260. {
  5261. if (ikBui == 1 || ikBui == 2)
  5262. {
  5263. HandL.RotateAround(HandL.position, new Vector3(vector2.x, 0f, vector2.z), -0.8f);
  5264. }
  5265. else
  5266. {
  5267. HandL.RotateAround(HandL.position, new Vector3(vector2.x, 0f, vector2.z), 0.8f);
  5268. }
  5269. }
  5270. else if (ikMode[i] == 4)
  5271. {
  5272. Head.RotateAround(Head.position, new Vector3(vector2.x, 0f, vector2.z), -0.4f);
  5273. }
  5274. else if (ikMode[i] == 8)
  5275. {
  5276. IK_hand.RotateAround(IK_hand.position, new Vector3(vector2.x, 0f, vector2.z), -0.6f);
  5277. }
  5278. else if (ikMode[i] == 6)
  5279. {
  5280. Spine1a.RotateAround(Spine1a.position, new Vector3(vector2.x, 0f, vector2.z), -0.03f);
  5281. Spine1.RotateAround(Spine1.position, new Vector3(vector2.x, 0f, vector2.z), -0.1f);
  5282. Spine0a.RotateAround(Spine0a.position, new Vector3(vector2.x, 0f, vector2.z), -0.09f);
  5283. Spine.RotateAround(Spine.position, new Vector3(vector2.x, 0f, vector2.z), -0.07f);
  5284. }
  5285. else if (ikMode[i] == 7)
  5286. {
  5287. Pelvis.RotateAround(Pelvis.position, new Vector3(vector2.x, 0f, vector2.z), 0.2f);
  5288. }
  5289. else if (ikMode[i] == 5)
  5290. {
  5291. Vector3 vector5 = ForearmL.position;
  5292. vector5 += new Vector3(vector3.x, 0f, vector3.z) * 0.0035f;
  5293. ikLeftArm.Init(Clavicle, UpperArmL, ForearmL, maidArray[i].body0);
  5294. ikLeftArm.Porc(Clavicle, UpperArmL, ForearmL, vector5, default(Vector3));
  5295. }
  5296. else
  5297. {
  5298. Vector3 vector5 = ForearmL.position;
  5299. vector5 += new Vector3(vector3.x, 0f, vector3.z) * 0.0035f;
  5300. ikLeftArm.Init(UpperArmL, UpperArmL, ForearmL, maidArray[i].body0);
  5301. ikLeftArm.Porc(UpperArmL, UpperArmL, ForearmL, vector5, default(Vector3));
  5302. }
  5303. isStop[i] = true;
  5304. isLock[i] = true;
  5305. }
  5306. else if (Input.GetKey(KeyCode.U))
  5307. {
  5308. if (ikMode[i] == 3)
  5309. {
  5310. HandL.localRotation =
  5311. Quaternion.Euler(HandL.localEulerAngles)
  5312. * Quaternion.AngleAxis(1f, Vector3.right);
  5313. isStop[i] = true;
  5314. isLock[i] = true;
  5315. }
  5316. else if (ikMode[i] == 4)
  5317. {
  5318. Head.RotateAround(Head.position, Vector3.up, -0.7f);
  5319. isStop[i] = true;
  5320. isLock[i] = true;
  5321. }
  5322. else if (ikMode[i] == 8)
  5323. {
  5324. IK_hand.RotateAround(IK_hand.position, Vector3.up, -0.7f);
  5325. isStop[i] = true;
  5326. isLock[i] = true;
  5327. }
  5328. else if (ikMode[i] == 6)
  5329. {
  5330. Spine1a.RotateAround(Spine1a.position, Vector3.up, -0.084f);
  5331. Spine0a.RotateAround(Spine0a.position, Vector3.up, -0.156f);
  5332. Spine.RotateAround(Spine.position, Vector3.up, -0.156f);
  5333. isStop[i] = true;
  5334. isLock[i] = true;
  5335. }
  5336. else if (ikMode[i] == 7)
  5337. {
  5338. Pelvis.RotateAround(Pelvis.position, Vector3.up, 0.4f);
  5339. isStop[i] = true;
  5340. isLock[i] = true;
  5341. }
  5342. else if ((ikMode[i] == 0 || ikMode[i] == 1 || ikMode[i] == 2) && (ikBui == 3 || ikBui == 4))
  5343. {
  5344. UpperArmL.localRotation =
  5345. Quaternion.Euler(UpperArmL.localEulerAngles)
  5346. * Quaternion.AngleAxis(0.5f, Vector3.right);
  5347. isStop[i] = true;
  5348. isLock[i] = true;
  5349. }
  5350. else if ((ikMode[i] == 0 || ikMode[i] == 1 || ikMode[i] == 2) && (ikBui == 1 || ikBui == 2))
  5351. {
  5352. UpperArmL.RotateAround(UpperArmL.position, Vector3.right, 0.5f);
  5353. isStop[i] = true;
  5354. isLock[i] = true;
  5355. }
  5356. }
  5357. else if (Input.GetKey(KeyCode.O))
  5358. {
  5359. if (ikMode[i] == 3)
  5360. {
  5361. HandL.localRotation =
  5362. Quaternion.Euler(HandL.localEulerAngles)
  5363. * Quaternion.AngleAxis(-1f, Vector3.right);
  5364. isStop[i] = true;
  5365. isLock[i] = true;
  5366. }
  5367. else if (ikMode[i] == 4)
  5368. {
  5369. Head.RotateAround(Head.position, Vector3.up, 0.7f);
  5370. isStop[i] = true;
  5371. isLock[i] = true;
  5372. }
  5373. else if (ikMode[i] == 8)
  5374. {
  5375. IK_hand.RotateAround(IK_hand.position, Vector3.up, 0.7f);
  5376. isStop[i] = true;
  5377. isLock[i] = true;
  5378. }
  5379. else if (ikMode[i] == 6)
  5380. {
  5381. Spine1a.RotateAround(Spine1a.position, Vector3.up, 0.084f);
  5382. Spine0a.RotateAround(Spine0a.position, Vector3.up, 0.156f);
  5383. Spine.RotateAround(Spine.position, Vector3.up, 0.156f);
  5384. isStop[i] = true;
  5385. isLock[i] = true;
  5386. }
  5387. else if (ikMode[i] == 7)
  5388. {
  5389. Pelvis.RotateAround(Pelvis.position, Vector3.up, -0.4f);
  5390. isStop[i] = true;
  5391. isLock[i] = true;
  5392. }
  5393. else if ((ikMode[i] == 0 || ikMode[i] == 1 || ikMode[i] == 2) && (ikBui == 3 || ikBui == 4))
  5394. {
  5395. UpperArmL.localRotation =
  5396. Quaternion.Euler(UpperArmL.localEulerAngles)
  5397. * Quaternion.AngleAxis(-0.5f, Vector3.right);
  5398. isStop[i] = true;
  5399. isLock[i] = true;
  5400. }
  5401. else if ((ikMode[i] == 0 || ikMode[i] == 1 || ikMode[i] == 2) && (ikBui == 1 || ikBui == 2))
  5402. {
  5403. UpperArmL.RotateAround(UpperArmL.position, Vector3.right, -0.5f);
  5404. isStop[i] = true;
  5405. isLock[i] = true;
  5406. }
  5407. }
  5408. else if (Input.GetKey(KeyCode.Alpha0))
  5409. {
  5410. if (ikMode[i] == 0)
  5411. {
  5412. Vector3 vector5 = HandL.position;
  5413. vector5.y += 0.005f;
  5414. ikLeftArm.Init(UpperArmL, HandL, HandL, maidArray[i].body0);
  5415. ikLeftArm.Porc(UpperArmL, HandL, HandL, vector5, default(Vector3));
  5416. }
  5417. else if (ikMode[i] == 2)
  5418. {
  5419. Vector3 vector5 = HandL.position;
  5420. vector5.y += 0.005f;
  5421. ikLeftArm.Init(ForearmL, ForearmL, HandL, maidArray[i].body0);
  5422. ikLeftArm.Porc(ForearmL, ForearmL, HandL, vector5, default(Vector3));
  5423. }
  5424. else if (ikMode[i] == 5)
  5425. {
  5426. Vector3 vector5 = ForearmL.position;
  5427. vector5.y += 0.0035f;
  5428. ikLeftArm.Init(Clavicle, UpperArmL, ForearmL, maidArray[i].body0);
  5429. ikLeftArm.Porc(Clavicle, UpperArmL, ForearmL, vector5, default(Vector3));
  5430. }
  5431. else
  5432. {
  5433. Vector3 vector5 = ForearmL.position;
  5434. vector5.y += 0.0035f;
  5435. ikLeftArm.Init(UpperArmL, UpperArmL, ForearmL, maidArray[i].body0);
  5436. ikLeftArm.Porc(UpperArmL, UpperArmL, ForearmL, vector5, default(Vector3));
  5437. }
  5438. isStop[i] = true;
  5439. isLock[i] = true;
  5440. }
  5441. else if (Input.GetKey(KeyCode.P))
  5442. {
  5443. if (ikMode[i] == 0)
  5444. {
  5445. Vector3 vector5 = HandL.position;
  5446. vector5.y -= 0.005f;
  5447. ikLeftArm.Init(UpperArmL, HandL, HandL, maidArray[i].body0);
  5448. ikLeftArm.Porc(UpperArmL, HandL, HandL, vector5, default(Vector3));
  5449. }
  5450. else if (ikMode[i] == 2)
  5451. {
  5452. Vector3 vector5 = HandL.position;
  5453. vector5.y -= 0.005f;
  5454. ikLeftArm.Init(ForearmL, ForearmL, HandL, maidArray[i].body0);
  5455. ikLeftArm.Porc(ForearmL, ForearmL, HandL, vector5, default(Vector3));
  5456. }
  5457. else if (ikMode[i] == 5)
  5458. {
  5459. Vector3 vector5 = ForearmL.position;
  5460. vector5.y -= 0.0035f;
  5461. ikLeftArm.Init(Clavicle, UpperArmL, ForearmL, maidArray[i].body0);
  5462. ikLeftArm.Porc(Clavicle, UpperArmL, ForearmL, vector5, default(Vector3));
  5463. }
  5464. else
  5465. {
  5466. Vector3 vector5 = ForearmL.position;
  5467. vector5.y -= 0.0035f;
  5468. ikLeftArm.Init(UpperArmL, UpperArmL, ForearmL, maidArray[i].body0);
  5469. ikLeftArm.Porc(UpperArmL, UpperArmL, ForearmL, vector5, default(Vector3));
  5470. }
  5471. isStop[i] = true;
  5472. isLock[i] = true;
  5473. }
  5474. }
  5475. }
  5476. }
  5477. }
  5478. }
  5479. else if (Input.GetKey(key) && Input.GetKey(KeyCode.LeftBracket) && this.getModKeyPressing(modKey.Shift))
  5480. {
  5481. maid.transform.RotateAround(maid.transform.position, Vector3.up, -0.75f);
  5482. idoFlg[i] = true;
  5483. }
  5484. else if (Input.GetKey(key) && Input.GetKey(KeyCode.LeftBracket))
  5485. {
  5486. maid.transform.RotateAround(maid.transform.position, Vector3.up, 0.75f);
  5487. idoFlg[i] = true;
  5488. }
  5489. else if (Input.GetKey(key) && Input.GetKeyDown(KeyCode.DownArrow) && this.getModKeyPressing(modKey.Shift))
  5490. {
  5491. if (!xFlg[i])
  5492. {
  5493. xFlg[i] = true;
  5494. zFlg[i] = false;
  5495. if (maid.status.personal.uniqueName == "Pride")
  5496. {
  5497. string text = "s0_";
  5498. Random random = new Random();
  5499. int num4 = random.Next(10000);
  5500. bool flag7 = false;
  5501. for (int k = 0; k < tunArray.Length; k++)
  5502. {
  5503. if (tunArray[k] == num4)
  5504. {
  5505. flag7 = true;
  5506. break;
  5507. }
  5508. }
  5509. if (!flag7)
  5510. {
  5511. text = text + "0" + num4.ToString() + ".ogg";
  5512. if (GameUty.FileSystem.IsExistentFile(text))
  5513. {
  5514. maid.AudioMan.LoadPlay(text, 0f, false, false);
  5515. }
  5516. }
  5517. }
  5518. if (maid.status.personal.uniqueName == "Cool")
  5519. {
  5520. string text = "s1_";
  5521. Random random = new Random();
  5522. int num4 = random.Next(10000);
  5523. bool flag7 = false;
  5524. for (int k = 0; k < coolArray.Length; k++)
  5525. {
  5526. if (coolArray[k] == num4)
  5527. {
  5528. flag7 = true;
  5529. break;
  5530. }
  5531. }
  5532. if (!flag7)
  5533. {
  5534. text = text + "0" + num4.ToString() + ".ogg";
  5535. if (GameUty.FileSystem.IsExistentFile(text))
  5536. {
  5537. maid.AudioMan.LoadPlay(text, 0f, false, false);
  5538. }
  5539. }
  5540. }
  5541. if (maid.status.personal.uniqueName == "Pure")
  5542. {
  5543. string text = "s2_";
  5544. Random random = new Random();
  5545. int num4 = random.Next(10000);
  5546. bool flag7 = false;
  5547. for (int k = 0; k < pureArray.Length; k++)
  5548. {
  5549. if (pureArray[k] == num4)
  5550. {
  5551. flag7 = true;
  5552. break;
  5553. }
  5554. }
  5555. if (!flag7)
  5556. {
  5557. text = text + "0" + num4.ToString() + ".ogg";
  5558. if (GameUty.FileSystem.IsExistentFile(text))
  5559. {
  5560. maid.AudioMan.LoadPlay(text, 0f, false, false);
  5561. }
  5562. }
  5563. }
  5564. if (maid.status.personal.uniqueName == "Yandere")
  5565. {
  5566. string text = "s3_";
  5567. Random random = new Random();
  5568. int num4 = random.Next(10000);
  5569. bool flag7 = false;
  5570. for (int k = 0; k < yanArray.Length; k++)
  5571. {
  5572. if (yanArray[k] == num4)
  5573. {
  5574. flag7 = true;
  5575. break;
  5576. }
  5577. }
  5578. if (!flag7)
  5579. {
  5580. text = text + string.Format("{0:00000}", num4) + ".ogg";
  5581. if (GameUty.FileSystem.IsExistentFile(text))
  5582. {
  5583. maid.AudioMan.LoadPlay(text, 0f, false, false);
  5584. }
  5585. }
  5586. }
  5587. if (maid.status.personal.uniqueName == "Muku")
  5588. {
  5589. string text = "h0_";
  5590. Random random = new Random();
  5591. int num4 = random.Next(10000);
  5592. bool flag7 = false;
  5593. for (int k = 0; k < h0Array.Length; k++)
  5594. {
  5595. if (h0Array[k] == num4)
  5596. {
  5597. flag7 = true;
  5598. break;
  5599. }
  5600. }
  5601. if (flag7)
  5602. {
  5603. text = text + string.Format("{0:00000}", num4) + ".ogg";
  5604. if (GameUty.FileSystem.IsExistentFile(text))
  5605. {
  5606. maid.AudioMan.LoadPlay(text, 0f, false, false);
  5607. }
  5608. }
  5609. }
  5610. if (maid.status.personal.uniqueName == "Majime")
  5611. {
  5612. string text = "h1_";
  5613. Random random = new Random();
  5614. int num4 = random.Next(10000);
  5615. bool flag7 = false;
  5616. for (int k = 0; k < h1Array.Length; k++)
  5617. {
  5618. if (h1Array[k] == num4)
  5619. {
  5620. flag7 = true;
  5621. break;
  5622. }
  5623. }
  5624. if (flag7)
  5625. {
  5626. text = text + string.Format("{0:00000}", num4) + ".ogg";
  5627. if (GameUty.FileSystem.IsExistentFile(text))
  5628. {
  5629. maid.AudioMan.LoadPlay(text, 0f, false, false);
  5630. }
  5631. }
  5632. }
  5633. if (maid.status.personal.uniqueName == "Rindere")
  5634. {
  5635. string text = "h2_";
  5636. Random random = new Random();
  5637. int num4 = random.Next(10000);
  5638. bool flag7 = false;
  5639. for (int k = 0; k < h2Array.Length; k++)
  5640. {
  5641. if (h2Array[k] == num4)
  5642. {
  5643. flag7 = true;
  5644. break;
  5645. }
  5646. }
  5647. if (flag7)
  5648. {
  5649. text = text + string.Format("{0:00000}", num4) + ".ogg";
  5650. if (GameUty.FileSystem.IsExistentFile(text))
  5651. {
  5652. maid.AudioMan.LoadPlay(text, 0f, false, false);
  5653. }
  5654. }
  5655. }
  5656. }
  5657. else
  5658. {
  5659. xFlg[i] = false;
  5660. maid.AudioMan.Clear();
  5661. }
  5662. idoFlg[i] = true;
  5663. }
  5664. else if (Input.GetKey(key) && Input.GetKeyDown(KeyCode.UpArrow) && this.getModKeyPressing(modKey.Shift))
  5665. {
  5666. if (!zFlg[i])
  5667. {
  5668. zFlg[i] = true;
  5669. xFlg[i] = false;
  5670. string text = "";
  5671. if (maid.status.personal.uniqueName == "Pride")
  5672. {
  5673. text = "s0_";
  5674. Random random = new Random();
  5675. int num4 = random.Next(tunArray.Length);
  5676. object obj = text;
  5677. text = string.Concat(new object[] {obj, "0", tunArray[num4], ".ogg"});
  5678. }
  5679. if (maid.status.personal.uniqueName == "Cool")
  5680. {
  5681. text = "s1_";
  5682. Random random = new Random();
  5683. int num4 = random.Next(coolArray.Length);
  5684. object obj = text;
  5685. text = string.Concat(new object[] {obj, "0", coolArray[num4], ".ogg"});
  5686. }
  5687. if (maid.status.personal.uniqueName == "Pure")
  5688. {
  5689. text = "s2_";
  5690. Random random = new Random();
  5691. int num4 = random.Next(pureArray.Length);
  5692. object obj = text;
  5693. text = string.Concat(new object[] {obj, "0", pureArray[num4], ".ogg"});
  5694. }
  5695. if (maid.status.personal.uniqueName == "Yandere")
  5696. {
  5697. text = "s3_";
  5698. Random random = new Random();
  5699. int num4 = random.Next(yanArray.Length);
  5700. text = text + string.Format("{0:00000}", yanArray[num4]) + ".ogg";
  5701. }
  5702. if (maid.status.personal.uniqueName == "Muku")
  5703. {
  5704. text = "h0_";
  5705. Random random = new Random();
  5706. int num4 = random.Next(h0tArray.Length);
  5707. text = text + string.Format("{0:00000}", h0tArray[num4]) + ".ogg";
  5708. }
  5709. if (maid.status.personal.uniqueName == "Majime")
  5710. {
  5711. text = "h1_";
  5712. Random random = new Random();
  5713. int num4 = random.Next(h1tArray.Length);
  5714. text = text + string.Format("{0:00000}", h1tArray[num4]) + ".ogg";
  5715. }
  5716. if (maid.status.personal.uniqueName == "Rindere")
  5717. {
  5718. text = "h2_";
  5719. Random random = new Random();
  5720. int num4 = random.Next(h2tArray.Length);
  5721. text = text + string.Format("{0:00000}", h2tArray[num4]) + ".ogg";
  5722. }
  5723. maid.AudioMan.LoadPlay(text, 0f, false, false);
  5724. }
  5725. else
  5726. {
  5727. zFlg[i] = false;
  5728. maid.AudioMan.Clear();
  5729. }
  5730. idoFlg[i] = true;
  5731. }
  5732. else if (Input.GetKey(key) && Input.GetKeyDown(KeyCode.UpArrow))
  5733. {
  5734. string text = "";
  5735. if (maid.status.personal.uniqueName == "Pride")
  5736. {
  5737. text = "s0_";
  5738. Random random = new Random();
  5739. int num4 = random.Next(tunArray.Length);
  5740. object obj = text;
  5741. text = string.Concat(new object[] {obj, "0", tunArray[num4], ".ogg"});
  5742. }
  5743. if (maid.status.personal.uniqueName == "Cool")
  5744. {
  5745. text = "s1_";
  5746. Random random = new Random();
  5747. int num4 = random.Next(coolArray.Length);
  5748. object obj = text;
  5749. text = string.Concat(new object[] {obj, "0", coolArray[num4], ".ogg"});
  5750. }
  5751. if (maid.status.personal.uniqueName == "Pure")
  5752. {
  5753. text = "s2_";
  5754. Random random = new Random();
  5755. int num4 = random.Next(pureArray.Length);
  5756. object obj = text;
  5757. text = string.Concat(new object[] {obj, "0", pureArray[num4], ".ogg"});
  5758. }
  5759. if (maid.status.personal.uniqueName == "Yandere")
  5760. {
  5761. text = "s3_";
  5762. Random random = new Random();
  5763. int num4 = random.Next(yanArray.Length);
  5764. text = text + string.Format("{0:00000}", yanArray[num4]) + ".ogg";
  5765. }
  5766. if (maid.status.personal.uniqueName == "Muku")
  5767. {
  5768. text = "h0_";
  5769. Random random = new Random();
  5770. int num4 = random.Next(h0tArray.Length);
  5771. text = text + string.Format("{0:00000}", h0tArray[num4]) + ".ogg";
  5772. }
  5773. if (maid.status.personal.uniqueName == "Majime")
  5774. {
  5775. text = "h1_";
  5776. Random random = new Random();
  5777. int num4 = random.Next(h1tArray.Length);
  5778. text = text + string.Format("{0:00000}", h1tArray[num4]) + ".ogg";
  5779. }
  5780. if (maid.status.personal.uniqueName == "Rindere")
  5781. {
  5782. text = "h2_";
  5783. Random random = new Random();
  5784. int num4 = random.Next(h2tArray.Length);
  5785. text = text + string.Format("{0:00000}", h2tArray[num4]) + ".ogg";
  5786. }
  5787. maid.AudioMan.LoadPlay(text, 0f, false, false);
  5788. idoFlg[i] = true;
  5789. }
  5790. else if (Input.GetKey(key) && Input.GetKey(KeyCode.DownArrow))
  5791. {
  5792. if (maid.status.personal.uniqueName == "Pride")
  5793. {
  5794. string text = "s0_";
  5795. Random random = new Random();
  5796. int num4 = random.Next(10000);
  5797. bool flag7 = false;
  5798. for (int k = 0; k < tunArray.Length; k++)
  5799. {
  5800. if (tunArray[k] == num4)
  5801. {
  5802. flag7 = true;
  5803. break;
  5804. }
  5805. }
  5806. if (!flag7)
  5807. {
  5808. text = text + "0" + num4.ToString() + ".ogg";
  5809. if (GameUty.FileSystem.IsExistentFile(text))
  5810. {
  5811. maid.AudioMan.LoadPlay(text, 0f, false, false);
  5812. }
  5813. }
  5814. }
  5815. if (maid.status.personal.uniqueName == "Cool")
  5816. {
  5817. string text = "s1_";
  5818. Random random = new Random();
  5819. int num4 = random.Next(10000);
  5820. bool flag7 = false;
  5821. for (int k = 0; k < coolArray.Length; k++)
  5822. {
  5823. if (coolArray[k] == num4)
  5824. {
  5825. flag7 = true;
  5826. break;
  5827. }
  5828. }
  5829. if (!flag7)
  5830. {
  5831. text = text + "0" + num4.ToString() + ".ogg";
  5832. if (GameUty.FileSystem.IsExistentFile(text))
  5833. {
  5834. maid.AudioMan.LoadPlay(text, 0f, false, false);
  5835. }
  5836. }
  5837. }
  5838. if (maid.status.personal.uniqueName == "Pure")
  5839. {
  5840. string text = "s2_";
  5841. Random random = new Random();
  5842. int num4 = random.Next(10000);
  5843. bool flag7 = false;
  5844. for (int k = 0; k < pureArray.Length; k++)
  5845. {
  5846. if (pureArray[k] == num4)
  5847. {
  5848. flag7 = true;
  5849. break;
  5850. }
  5851. }
  5852. if (!flag7)
  5853. {
  5854. text = text + "0" + num4.ToString() + ".ogg";
  5855. if (GameUty.FileSystem.IsExistentFile(text))
  5856. {
  5857. maid.AudioMan.LoadPlay(text, 0f, false, false);
  5858. }
  5859. }
  5860. }
  5861. if (maid.status.personal.uniqueName == "Yandere")
  5862. {
  5863. string text = "s3_";
  5864. Random random = new Random();
  5865. int num4 = random.Next(10000);
  5866. bool flag7 = false;
  5867. for (int k = 0; k < yanArray.Length; k++)
  5868. {
  5869. if (yanArray[k] == num4)
  5870. {
  5871. flag7 = true;
  5872. break;
  5873. }
  5874. }
  5875. if (!flag7)
  5876. {
  5877. text = text + string.Format("{0:00000}", num4) + ".ogg";
  5878. if (GameUty.FileSystem.IsExistentFile(text))
  5879. {
  5880. maid.AudioMan.LoadPlay(text, 0f, false, false);
  5881. }
  5882. }
  5883. }
  5884. if (maid.status.personal.uniqueName == "Muku")
  5885. {
  5886. string text = "h0_";
  5887. Random random = new Random();
  5888. int num4 = random.Next(10000);
  5889. bool flag7 = false;
  5890. for (int k = 0; k < h0Array.Length; k++)
  5891. {
  5892. if (h0Array[k] == num4)
  5893. {
  5894. flag7 = true;
  5895. break;
  5896. }
  5897. }
  5898. if (flag7)
  5899. {
  5900. text = text + string.Format("{0:00000}", num4) + ".ogg";
  5901. if (GameUty.FileSystem.IsExistentFile(text))
  5902. {
  5903. maid.AudioMan.LoadPlay(text, 0f, false, false);
  5904. }
  5905. }
  5906. }
  5907. if (maid.status.personal.uniqueName == "Majime")
  5908. {
  5909. string text = "h1_";
  5910. Random random = new Random();
  5911. int num4 = random.Next(10000);
  5912. bool flag7 = false;
  5913. for (int k = 0; k < h1Array.Length; k++)
  5914. {
  5915. if (h1Array[k] == num4)
  5916. {
  5917. flag7 = true;
  5918. break;
  5919. }
  5920. }
  5921. if (flag7)
  5922. {
  5923. text = text + string.Format("{0:00000}", num4) + ".ogg";
  5924. if (GameUty.FileSystem.IsExistentFile(text))
  5925. {
  5926. maid.AudioMan.LoadPlay(text, 0f, false, false);
  5927. }
  5928. }
  5929. }
  5930. if (maid.status.personal.uniqueName == "Rindere")
  5931. {
  5932. string text = "h2_";
  5933. Random random = new Random();
  5934. int num4 = random.Next(10000);
  5935. bool flag7 = false;
  5936. for (int k = 0; k < h2Array.Length; k++)
  5937. {
  5938. if (h2Array[k] == num4)
  5939. {
  5940. flag7 = true;
  5941. break;
  5942. }
  5943. }
  5944. if (flag7)
  5945. {
  5946. text = text + string.Format("{0:00000}", num4) + ".ogg";
  5947. if (GameUty.FileSystem.IsExistentFile(text))
  5948. {
  5949. maid.AudioMan.LoadPlay(text, 0f, false, false);
  5950. }
  5951. }
  5952. }
  5953. idoFlg[i] = true;
  5954. }
  5955. else if (Input.GetKey(key) && Input.GetKey(KeyCode.Insert) && Input.GetKey(KeyCode.Home))
  5956. {
  5957. Vector3 vector = maid.transform.position;
  5958. vector += new Vector3(vector2.x, 0f, vector2.z) * 0.0075f * speed;
  5959. vector += new Vector3(vector3.x, 0f, vector3.z) * -0.0075f * speed;
  5960. maid.SetPos(vector);
  5961. idoFlg[i] = true;
  5962. }
  5963. else if (Input.GetKey(key) && Input.GetKey(KeyCode.Insert) && Input.GetKey(KeyCode.End))
  5964. {
  5965. Vector3 vector = maid.transform.position;
  5966. vector += new Vector3(vector2.x, 0f, vector2.z) * 0.0075f * speed;
  5967. vector += new Vector3(vector3.x, 0f, vector3.z) * 0.0075f * speed;
  5968. maid.SetPos(vector);
  5969. idoFlg[i] = true;
  5970. }
  5971. else if (Input.GetKey(key) && Input.GetKey(KeyCode.Delete) && Input.GetKey(KeyCode.Home))
  5972. {
  5973. Vector3 vector = maid.transform.position;
  5974. vector += new Vector3(vector2.x, 0f, vector2.z) * -0.0075f * speed;
  5975. vector += new Vector3(vector3.x, 0f, vector3.z) * -0.0075f * speed;
  5976. maid.SetPos(vector);
  5977. idoFlg[i] = true;
  5978. }
  5979. else if (Input.GetKey(key) && Input.GetKey(KeyCode.Delete) && Input.GetKey(KeyCode.End))
  5980. {
  5981. Vector3 vector = maid.transform.position;
  5982. vector += new Vector3(vector2.x, 0f, vector2.z) * -0.0075f * speed;
  5983. vector += new Vector3(vector3.x, 0f, vector3.z) * 0.0075f * speed;
  5984. maid.SetPos(vector);
  5985. idoFlg[i] = true;
  5986. }
  5987. else if (Input.GetKey(key) && Input.GetKey(KeyCode.Insert))
  5988. {
  5989. Vector3 vector = maid.transform.position;
  5990. vector += new Vector3(vector2.x, 0f, vector2.z) * 0.0075f * speed;
  5991. maid.SetPos(vector);
  5992. idoFlg[i] = true;
  5993. }
  5994. else if (Input.GetKey(key) && Input.GetKey(KeyCode.Delete))
  5995. {
  5996. Vector3 vector = maid.transform.position;
  5997. vector += new Vector3(vector2.x, 0f, vector2.z) * -0.0075f * speed;
  5998. maid.SetPos(vector);
  5999. idoFlg[i] = true;
  6000. }
  6001. else if (Input.GetKey(key) && Input.GetKey(KeyCode.Home))
  6002. {
  6003. Vector3 vector = maid.transform.position;
  6004. vector += new Vector3(vector3.x, 0f, vector3.z) * -0.0075f * speed;
  6005. maid.SetPos(vector);
  6006. idoFlg[i] = true;
  6007. }
  6008. else if (Input.GetKey(key) && Input.GetKey(KeyCode.End))
  6009. {
  6010. Vector3 vector = maid.transform.position;
  6011. vector += new Vector3(vector3.x, 0f, vector3.z) * 0.0075f * speed;
  6012. maid.SetPos(vector);
  6013. idoFlg[i] = true;
  6014. }
  6015. else if (Input.GetKey(key) && Input.GetKey(KeyCode.PageUp))
  6016. {
  6017. Vector3 vector = maid.transform.position;
  6018. vector.y += 0.0075f * speed;
  6019. maid.SetPos(vector);
  6020. idoFlg[i] = true;
  6021. }
  6022. else if (Input.GetKey(key) && Input.GetKey(KeyCode.PageDown))
  6023. {
  6024. Vector3 vector = maid.transform.position;
  6025. vector.y -= 0.0075f * speed;
  6026. maid.SetPos(vector);
  6027. idoFlg[i] = true;
  6028. }
  6029. else if (Input.GetKey(key) && Input.GetKeyDown(KeyCode.Minus) && this.getModKeyPressing(modKey.Shift))
  6030. {
  6031. faceIndex[i]--;
  6032. if (faceIndex[i] <= -1)
  6033. {
  6034. faceIndex[i] = faceArray.Length - 1;
  6035. }
  6036. maid.FaceAnime(faceArray[faceIndex[i]], 1f, 0);
  6037. idoFlg[i] = true;
  6038. }
  6039. else if (Input.GetKey(key) && Input.GetKeyDown(KeyCode.Minus))
  6040. {
  6041. faceIndex[i]++;
  6042. if (faceIndex[i] == faceArray.Length)
  6043. {
  6044. faceIndex[i] = 0;
  6045. }
  6046. maid.FaceAnime(faceArray[faceIndex[i]], 1f, 0);
  6047. idoFlg[i] = true;
  6048. }
  6049. else if (Input.GetKey(key) && Input.GetKeyDown(KeyCode.Quote))
  6050. {
  6051. faceBlendIndex[i]++;
  6052. if (faceBlendIndex[i] == faceBlendArray.Length)
  6053. {
  6054. faceBlendIndex[i] = 0;
  6055. }
  6056. maid.FaceBlend(faceBlendArray[faceBlendIndex[i]]);
  6057. idoFlg[i] = true;
  6058. }
  6059. if (Input.GetKey(key) && Input.GetKey(KeyCode.E))
  6060. {
  6061. idoFlg[i] = true;
  6062. if (i >= 7)
  6063. {
  6064. idoFlg[i - 7] = true;
  6065. }
  6066. maid.transform.localScale = new Vector3(maid.transform.localScale.x * 1.005f,
  6067. maid.transform.localScale.y * 1.005f,
  6068. maid.transform.localScale.z * 1.005f);
  6069. }
  6070. else if (Input.GetKey(key) && Input.GetKey(KeyCode.D))
  6071. {
  6072. idoFlg[i] = true;
  6073. if (i >= 7)
  6074. {
  6075. idoFlg[i - 7] = true;
  6076. }
  6077. maid.transform.localScale = new Vector3(maid.transform.localScale.x * 0.995f,
  6078. maid.transform.localScale.y * 0.995f,
  6079. maid.transform.localScale.z * 0.995f);
  6080. }
  6081. else if (Input.GetKey(key) && Input.GetKeyDown(KeyCode.C))
  6082. {
  6083. idoFlg[i] = true;
  6084. if (i >= 7)
  6085. {
  6086. idoFlg[i - 7] = true;
  6087. }
  6088. maid.transform.localScale = new Vector3(1f, 1f, 1f);
  6089. }
  6090. else if (Input.GetKey(key) && Input.GetKeyDown(KeyCode.H))
  6091. {
  6092. if (!isVR)
  6093. {
  6094. if (goSlot[(int) selectList[i]] != null)
  6095. {
  6096. maidArray[i].body0.goSlot = new List<TBodySkin>(goSlot[(int) selectList[i]]);
  6097. for (int l = 0; l < bodyHit[(int) selectList[i]].Count; l++)
  6098. {
  6099. maidArray[i].body0.goSlot[l].bonehair.bodyhit = bodyHit[(int) selectList[i]][l];
  6100. }
  6101. }
  6102. }
  6103. maid.body0.SetMask(TBody.SlotID.wear, true);
  6104. maid.body0.SetMask(TBody.SlotID.skirt, true);
  6105. maid.body0.SetMask(TBody.SlotID.bra, true);
  6106. maid.body0.SetMask(TBody.SlotID.panz, true);
  6107. maid.body0.SetMask(TBody.SlotID.mizugi, true);
  6108. maid.body0.SetMask(TBody.SlotID.onepiece, true);
  6109. isWear = true;
  6110. isSkirt = true;
  6111. isBra = true;
  6112. isPanz = true;
  6113. Random random = new Random();
  6114. int num4 = random.Next(2);
  6115. if (num4 == 1)
  6116. {
  6117. maid.body0.SetMask(TBody.SlotID.wear, false);
  6118. }
  6119. if (num4 == 1)
  6120. {
  6121. isWear = false;
  6122. }
  6123. num4 = random.Next(2);
  6124. if (num4 == 1)
  6125. {
  6126. maid.body0.SetMask(TBody.SlotID.skirt, false);
  6127. }
  6128. if (num4 == 1)
  6129. {
  6130. isSkirt = false;
  6131. }
  6132. num4 = random.Next(2);
  6133. if (num4 == 1)
  6134. {
  6135. maid.body0.SetMask(TBody.SlotID.bra, false);
  6136. }
  6137. if (num4 == 1)
  6138. {
  6139. isBra = false;
  6140. }
  6141. num4 = random.Next(2);
  6142. if (num4 == 1)
  6143. {
  6144. maid.body0.SetMask(TBody.SlotID.panz, false);
  6145. }
  6146. if (num4 == 1)
  6147. {
  6148. isPanz = false;
  6149. }
  6150. num4 = random.Next(2);
  6151. if (num4 == 1)
  6152. {
  6153. maid.body0.SetMask(TBody.SlotID.mizugi, false);
  6154. }
  6155. num4 = random.Next(2);
  6156. if (num4 == 1)
  6157. {
  6158. maid.body0.SetMask(TBody.SlotID.onepiece, false);
  6159. }
  6160. hFlg = true;
  6161. idoFlg[i] = true;
  6162. if (i >= 7)
  6163. {
  6164. idoFlg[i - 7] = true;
  6165. }
  6166. }
  6167. else if (Input.GetKeyDown(key) && Input.GetKey(KeyCode.LeftShift) && !isLock[i])
  6168. {
  6169. poseIndex[i]--;
  6170. if (poseIndex[i] <= -1)
  6171. {
  6172. poseIndex[i] = poseArray.Length - 1;
  6173. }
  6174. if (maid && maid.Visible)
  6175. {
  6176. string[] array = poseArray[poseIndex[i]].Split(new char[] {','});
  6177. isStop[i] = false;
  6178. poseCount[i] = 20;
  6179. if (array[0].Contains("_momi") || array[0].Contains("paizuri_"))
  6180. {
  6181. maid.body0.MuneYureL(0f);
  6182. maid.body0.MuneYureR(0f);
  6183. }
  6184. else
  6185. {
  6186. maid.body0.MuneYureL(1f);
  6187. maid.body0.MuneYureR(1f);
  6188. }
  6189. int num6;
  6190. if (array[0].Contains("MultipleMaidsPose"))
  6191. {
  6192. string path = array[0].Split(new char[] {'/'})[1];
  6193. byte[] array2 = new byte[0];
  6194. try
  6195. {
  6196. using (FileStream fileStream = new FileStream(path, FileMode.Open, FileAccess.Read))
  6197. {
  6198. array2 = new byte[fileStream.Length];
  6199. fileStream.Read(array2, 0, array2.Length);
  6200. }
  6201. }
  6202. catch { }
  6203. if (0 < array2.Length)
  6204. {
  6205. string text = Path.GetFileName(path);
  6206. long num5 = (long) text.GetHashCode();
  6207. maid.body0.CrossFade(num5.ToString(), array2, false, false, false, 0f, 1f);
  6208. Maid.AutoTwist[] array3 = new Maid.AutoTwist[]
  6209. {
  6210. Maid.AutoTwist.ShoulderL, Maid.AutoTwist.ShoulderR, Maid.AutoTwist.WristL,
  6211. Maid.AutoTwist.WristR, Maid.AutoTwist.ThighL, Maid.AutoTwist.ThighR
  6212. };
  6213. for (int m = 0; m < array3.Length; m++)
  6214. {
  6215. maid.SetAutoTwist(array3[m], true);
  6216. }
  6217. }
  6218. }
  6219. else if (array[0].StartsWith("p") && int.TryParse(array[0].Substring(1), out num6))
  6220. {
  6221. loadPose[i] = array[0];
  6222. }
  6223. else if (!array[0].StartsWith("dance_"))
  6224. {
  6225. maidArray[i].CrossFade(array[0] + ".anm", false, true, false, 0f, 1f);
  6226. }
  6227. else
  6228. {
  6229. if (!maid.body0.m_Bones.GetComponent<Animation>().GetClip(array[0] + ".anm"))
  6230. {
  6231. maid.body0.LoadAnime(array[0] + ".anm", GameUty.FileSystem, array[0] + ".anm", false, false);
  6232. }
  6233. maid.body0.m_Bones.GetComponent<Animation>().Play(array[0] + ".anm");
  6234. }
  6235. if (array.Length > 1)
  6236. {
  6237. maid.body0.m_Bones.GetComponent<Animation>()[array[0] + ".anm"].time = float.Parse(array[1]);
  6238. isStop[i] = true;
  6239. if (array.Length > 2)
  6240. {
  6241. Transform transform2 = CMT.SearchObjName(maidArray[i].body0.m_Bones.transform, "Bip01", true);
  6242. isPoseIti[i] = true;
  6243. poseIti[i] = maidArray[i].transform.position;
  6244. maidArray[i].transform.position = new Vector3(100f, 100f, 100f);
  6245. }
  6246. }
  6247. }
  6248. idoFlg[i] = true;
  6249. if (i >= 7)
  6250. {
  6251. idoFlg[i - 7] = true;
  6252. }
  6253. }
  6254. else if (Input.GetKeyDown(key) && Input.GetKey(KeyCode.RightAlt) && !isLock[i])
  6255. {
  6256. int num7 = poseIndex[i];
  6257. for (int k = 0; k < groupList.Count; k++)
  6258. {
  6259. if (poseIndex[i] < (int) groupList[k])
  6260. {
  6261. poseIndex[i] = (int) groupList[k];
  6262. break;
  6263. }
  6264. }
  6265. if (num7 == poseIndex[i] && poseIndex[i] >= (int) groupList[groupList.Count - 1])
  6266. {
  6267. poseIndex[i] = 0;
  6268. }
  6269. if (maid && maid.Visible)
  6270. {
  6271. string[] array = poseArray[poseIndex[i]].Split(new char[] {','});
  6272. isStop[i] = false;
  6273. poseCount[i] = 20;
  6274. if (array[0].Contains("_momi") || array[0].Contains("paizuri_"))
  6275. {
  6276. maid.body0.MuneYureL(0f);
  6277. maid.body0.MuneYureR(0f);
  6278. }
  6279. else
  6280. {
  6281. maid.body0.MuneYureL(1f);
  6282. maid.body0.MuneYureR(1f);
  6283. }
  6284. int num6;
  6285. if (array[0].Contains("MultipleMaidsPose"))
  6286. {
  6287. string path = array[0].Split(new char[] {'/'})[1];
  6288. byte[] array2 = new byte[0];
  6289. try
  6290. {
  6291. using (FileStream fileStream = new FileStream(path, FileMode.Open, FileAccess.Read))
  6292. {
  6293. array2 = new byte[fileStream.Length];
  6294. fileStream.Read(array2, 0, array2.Length);
  6295. }
  6296. }
  6297. catch { }
  6298. if (0 < array2.Length)
  6299. {
  6300. string text = Path.GetFileName(path);
  6301. long num5 = (long) text.GetHashCode();
  6302. maid.body0.CrossFade(num5.ToString(), array2, false, false, false, 0f, 1f);
  6303. Maid.AutoTwist[] array3 = new Maid.AutoTwist[]
  6304. {
  6305. Maid.AutoTwist.ShoulderL, Maid.AutoTwist.ShoulderR, Maid.AutoTwist.WristL,
  6306. Maid.AutoTwist.WristR, Maid.AutoTwist.ThighL, Maid.AutoTwist.ThighR
  6307. };
  6308. for (int m = 0; m < array3.Length; m++)
  6309. {
  6310. maid.SetAutoTwist(array3[m], true);
  6311. }
  6312. }
  6313. }
  6314. else if (array[0].StartsWith("p") && int.TryParse(array[0].Substring(1), out num6))
  6315. {
  6316. loadPose[i] = array[0];
  6317. }
  6318. else if (!array[0].StartsWith("dance_"))
  6319. {
  6320. maid.CrossFade(array[0] + ".anm", false, true, false, 0f, 1f);
  6321. }
  6322. else
  6323. {
  6324. if (!maid.body0.m_Bones.GetComponent<Animation>().GetClip(array[0] + ".anm"))
  6325. {
  6326. maid.body0.LoadAnime(array[0] + ".anm", GameUty.FileSystem, array[0] + ".anm", false, false);
  6327. }
  6328. maid.body0.m_Bones.GetComponent<Animation>().Play(array[0] + ".anm");
  6329. }
  6330. if (array.Length > 1)
  6331. {
  6332. maid.body0.m_Bones.GetComponent<Animation>()[array[0] + ".anm"].time = float.Parse(array[1]);
  6333. isStop[i] = true;
  6334. if (array.Length > 2)
  6335. {
  6336. Transform transform2 = CMT.SearchObjName(maidArray[i].body0.m_Bones.transform, "Bip01", true);
  6337. isPoseIti[i] = true;
  6338. poseIti[i] = maidArray[i].transform.position;
  6339. maidArray[i].transform.position = new Vector3(100f, 100f, 100f);
  6340. }
  6341. }
  6342. }
  6343. idoFlg[i] = true;
  6344. if (i >= 7)
  6345. {
  6346. idoFlg[i - 7] = true;
  6347. }
  6348. }
  6349. else if (Input.GetKeyDown(key) && Input.GetKey(KeyCode.LeftAlt) && !isLock[i])
  6350. {
  6351. for (int k = 0; k < groupList.Count; k++)
  6352. {
  6353. if (k == 0 && poseIndex[i] <= (int) groupList[k])
  6354. {
  6355. if (poseIndex[i] == 0)
  6356. {
  6357. poseIndex[i] = (int) groupList[groupList.Count - 1];
  6358. }
  6359. else
  6360. {
  6361. poseIndex[i] = 0;
  6362. }
  6363. break;
  6364. }
  6365. if (k > 0 && poseIndex[i] > (int) groupList[k - 1] && poseIndex[i] <= (int) groupList[k])
  6366. {
  6367. poseIndex[i] = (int) groupList[k - 1];
  6368. break;
  6369. }
  6370. }
  6371. if (poseIndex[i] > (int) groupList[groupList.Count - 1])
  6372. {
  6373. poseIndex[i] = (int) groupList[groupList.Count - 1];
  6374. }
  6375. if (maid && maid.Visible)
  6376. {
  6377. string[] array = poseArray[poseIndex[i]].Split(new char[] {','});
  6378. isStop[i] = false;
  6379. poseCount[i] = 20;
  6380. if (array[0].Contains("_momi") || array[0].Contains("paizuri_"))
  6381. {
  6382. maid.body0.MuneYureL(0f);
  6383. maid.body0.MuneYureR(0f);
  6384. }
  6385. else
  6386. {
  6387. maid.body0.MuneYureL(1f);
  6388. maid.body0.MuneYureR(1f);
  6389. }
  6390. int num6;
  6391. if (array[0].Contains("MultipleMaidsPose"))
  6392. {
  6393. string path = array[0].Split(new char[] {'/'})[1];
  6394. byte[] array2 = new byte[0];
  6395. try
  6396. {
  6397. using (FileStream fileStream = new FileStream(path, FileMode.Open, FileAccess.Read))
  6398. {
  6399. array2 = new byte[fileStream.Length];
  6400. fileStream.Read(array2, 0, array2.Length);
  6401. }
  6402. }
  6403. catch { }
  6404. if (0 < array2.Length)
  6405. {
  6406. string text = Path.GetFileName(path);
  6407. long num5 = (long) text.GetHashCode();
  6408. maid.body0.CrossFade(num5.ToString(), array2, false, false, false, 0f, 1f);
  6409. Maid.AutoTwist[] array3 = new Maid.AutoTwist[]
  6410. {
  6411. Maid.AutoTwist.ShoulderL, Maid.AutoTwist.ShoulderR, Maid.AutoTwist.WristL,
  6412. Maid.AutoTwist.WristR, Maid.AutoTwist.ThighL, Maid.AutoTwist.ThighR
  6413. };
  6414. for (int m = 0; m < array3.Length; m++)
  6415. {
  6416. maid.SetAutoTwist(array3[m], true);
  6417. }
  6418. }
  6419. }
  6420. else if (array[0].StartsWith("p") && int.TryParse(array[0].Substring(1), out num6))
  6421. {
  6422. loadPose[i] = array[0];
  6423. }
  6424. else if (!array[0].StartsWith("dance_"))
  6425. {
  6426. maid.CrossFade(array[0] + ".anm", false, true, false, 0f, 1f);
  6427. }
  6428. else
  6429. {
  6430. if (!maid.body0.m_Bones.GetComponent<Animation>().GetClip(array[0] + ".anm"))
  6431. {
  6432. maid.body0.LoadAnime(array[0] + ".anm", GameUty.FileSystem, array[0] + ".anm", false, false);
  6433. }
  6434. maid.body0.m_Bones.GetComponent<Animation>().Play(array[0] + ".anm");
  6435. }
  6436. if (array.Length > 1)
  6437. {
  6438. maid.body0.m_Bones.GetComponent<Animation>()[array[0] + ".anm"].time = float.Parse(array[1]);
  6439. isStop[i] = true;
  6440. if (array.Length > 2)
  6441. {
  6442. Transform transform2 = CMT.SearchObjName(maidArray[i].body0.m_Bones.transform, "Bip01", true);
  6443. isPoseIti[i] = true;
  6444. poseIti[i] = maidArray[i].transform.position;
  6445. maidArray[i].transform.position = new Vector3(100f, 100f, 100f);
  6446. }
  6447. }
  6448. }
  6449. idoFlg[i] = true;
  6450. if (i >= 7)
  6451. {
  6452. idoFlg[i - 7] = true;
  6453. }
  6454. }
  6455. else if (Input.GetKey(key) && Input.GetKeyDown(KeyCode.BackQuote) && !atFlg)
  6456. {
  6457. headEyeIndex[i]++;
  6458. if (headEyeIndex[i] == headEyeArray.Length)
  6459. {
  6460. headEyeIndex[i] = 0;
  6461. }
  6462. maid.body0.trsLookTarget = GameMain.Instance.MainCamera.transform;
  6463. maid.body0.boHeadToCam = true;
  6464. maid.body0.boEyeToCam = true;
  6465. if (headEyeIndex[i] == 0)
  6466. {
  6467. maid.body0.trsLookTarget = GameMain.Instance.MainCamera.transform;
  6468. maid.body0.boHeadToCam = true;
  6469. maid.body0.boEyeToCam = true;
  6470. }
  6471. else
  6472. {
  6473. maid.body0.trsLookTarget = null;
  6474. CameraMain cameraMain = GameMain.Instance.MainCamera;
  6475. if (headEyeIndex[i] == 1)
  6476. {
  6477. maid.body0.offsetLookTarget = new Vector3(-0.35f, 1f, -0.3f);
  6478. }
  6479. if (headEyeIndex[i] == 2)
  6480. {
  6481. maid.body0.offsetLookTarget = new Vector3(-0.4f, 1f, 0f);
  6482. }
  6483. if (headEyeIndex[i] == 3)
  6484. {
  6485. maid.body0.offsetLookTarget = new Vector3(-0.35f, 1f, 0.3f);
  6486. }
  6487. if (headEyeIndex[i] == 4)
  6488. {
  6489. maid.body0.offsetLookTarget = new Vector3(0f, 1f, -0.4f);
  6490. }
  6491. if (headEyeIndex[i] == 5)
  6492. {
  6493. maid.body0.offsetLookTarget = new Vector3(0f, 1f, 0f);
  6494. }
  6495. if (headEyeIndex[i] == 6)
  6496. {
  6497. maid.body0.offsetLookTarget = new Vector3(0f, 1f, 0.4f);
  6498. }
  6499. if (headEyeIndex[i] == 7)
  6500. {
  6501. maid.body0.offsetLookTarget = new Vector3(0.4f, 1f, -0.4f);
  6502. }
  6503. if (headEyeIndex[i] == 8)
  6504. {
  6505. maid.body0.offsetLookTarget = new Vector3(0.4f, 1f, 0f);
  6506. }
  6507. if (headEyeIndex[i] == 9)
  6508. {
  6509. maid.body0.offsetLookTarget = new Vector3(0.4f, 1f, 0.4f);
  6510. }
  6511. }
  6512. idoFlg[i] = true;
  6513. if (i >= 7)
  6514. {
  6515. idoFlg[i - 7] = true;
  6516. }
  6517. }
  6518. else if (Input.GetKey(key) && Input.GetKey(KeyCode.Return))
  6519. {
  6520. idoFlg[i] = true;
  6521. if (i >= 7)
  6522. {
  6523. idoFlg[i - 7] = true;
  6524. }
  6525. }
  6526. else if (Input.GetKeyUp(key))
  6527. {
  6528. if (idoFlg[i])
  6529. {
  6530. idoFlg[i] = false;
  6531. }
  6532. else if (!this.getModKeyPressing(modKey.Ctrl) || i >= 7)
  6533. {
  6534. if (!isLock[i])
  6535. {
  6536. poseIndex[i]++;
  6537. if (poseIndex[i] == poseArray.Length)
  6538. {
  6539. poseIndex[i] = 0;
  6540. }
  6541. if (maid && maid.Visible)
  6542. {
  6543. string[] array = poseArray[poseIndex[i]].Split(new char[] {','});
  6544. isStop[i] = false;
  6545. poseCount[i] = 20;
  6546. if (array[0].Contains("_momi") || array[0].Contains("paizuri_"))
  6547. {
  6548. maid.body0.MuneYureL(0f);
  6549. maid.body0.MuneYureR(0f);
  6550. }
  6551. else
  6552. {
  6553. maid.body0.MuneYureL(1f);
  6554. maid.body0.MuneYureR(1f);
  6555. }
  6556. int num6;
  6557. if (array[0].Contains("MultipleMaidsPose"))
  6558. {
  6559. string path = array[0].Split(new char[] {'/'})[1];
  6560. byte[] array2 = new byte[0];
  6561. try
  6562. {
  6563. using (FileStream fileStream = new FileStream(path, FileMode.Open, FileAccess.Read))
  6564. {
  6565. array2 = new byte[fileStream.Length];
  6566. fileStream.Read(array2, 0, array2.Length);
  6567. }
  6568. }
  6569. catch { }
  6570. if (0 < array2.Length)
  6571. {
  6572. string text = Path.GetFileName(path);
  6573. long num5 = (long) text.GetHashCode();
  6574. maid.body0.CrossFade(num5.ToString(), array2, false, false, false, 0f, 1f);
  6575. Maid.AutoTwist[] array3 = new Maid.AutoTwist[]
  6576. {
  6577. Maid.AutoTwist.ShoulderL, Maid.AutoTwist.ShoulderR, Maid.AutoTwist.WristL,
  6578. Maid.AutoTwist.WristR, Maid.AutoTwist.ThighL, Maid.AutoTwist.ThighR
  6579. };
  6580. for (int m = 0; m < array3.Length; m++)
  6581. {
  6582. maid.SetAutoTwist(array3[m], true);
  6583. }
  6584. }
  6585. }
  6586. else if (array[0].StartsWith("p") && int.TryParse(array[0].Substring(1), out num6))
  6587. {
  6588. loadPose[i] = array[0];
  6589. }
  6590. else if (!array[0].StartsWith("dance_"))
  6591. {
  6592. maidArray[i].CrossFade(array[0] + ".anm", false, true, false, 0f, 1f);
  6593. }
  6594. else
  6595. {
  6596. if (!maid.body0.m_Bones.GetComponent<Animation>().GetClip(array[0] + ".anm"))
  6597. {
  6598. maid.body0.LoadAnime(array[0] + ".anm",
  6599. GameUty.FileSystem,
  6600. array[0] + ".anm",
  6601. false,
  6602. false);
  6603. }
  6604. maid.body0.m_Bones.GetComponent<Animation>().Play(array[0] + ".anm");
  6605. }
  6606. if (array.Length > 1)
  6607. {
  6608. maid.body0.m_Bones.GetComponent<Animation>()[array[0] + ".anm"].time = float.Parse(array[1]);
  6609. isStop[i] = true;
  6610. if (array.Length > 2)
  6611. {
  6612. Transform transform2 =
  6613. CMT.SearchObjName(maidArray[i].body0.m_Bones.transform, "Bip01", true);
  6614. isPoseIti[i] = true;
  6615. poseIti[i] = maidArray[i].transform.position;
  6616. maidArray[i].transform.position = new Vector3(100f, 100f, 100f);
  6617. }
  6618. }
  6619. }
  6620. }
  6621. }
  6622. }
  6623. goto IL_1688E;
  6624. }
  6625. }
  6626. if (Input.GetKeyDown(KeyCode.E)) { }
  6627. if (!isVR && Input.GetKeyDown(KeyCode.F8) && sceneFlg && bGui)
  6628. {
  6629. bGui = false;
  6630. }
  6631. else if (!isVR && Input.GetKeyDown(KeyCode.F8))
  6632. {
  6633. sceneFlg = true;
  6634. faceFlg = false;
  6635. poseFlg = false;
  6636. kankyoFlg = false;
  6637. kankyo2Flg = false;
  6638. bGui = true;
  6639. int i = 0;
  6640. while (i < 10)
  6641. {
  6642. date[i] = "未保存";
  6643. ninzu[i] = "";
  6644. IniKey iniKey = base.Preferences["scene"]["s" + (page * 10 + i + 1)];
  6645. if (iniKey.Value != null && iniKey.Value.ToString() != "")
  6646. {
  6647. string[] array4 = iniKey.Value.Split(new char[] {'_'});
  6648. if (array4.Length >= 2)
  6649. {
  6650. string[] array5 = array4[0].Split(new char[] {','});
  6651. date[i] = array5[0];
  6652. ninzu[i] = array5[1] + "人";
  6653. }
  6654. }
  6655. IL_16A2F:
  6656. i++;
  6657. continue;
  6658. goto IL_16A2F;
  6659. }
  6660. }
  6661. if (Input.GetKeyDown(KeyCode.F) && this.getModKeyPressing(modKey.Shift) && !fFlg)
  6662. {
  6663. bgmIndex--;
  6664. if (bgmIndex <= -1)
  6665. {
  6666. bgmIndex = bgmArray.Length - 1;
  6667. }
  6668. GameMain.Instance.SoundMgr.PlayBGM(bgmArray[bgmIndex] + ".ogg", 0f, true);
  6669. bgmCombo.selectedItemIndex = bgmIndex;
  6670. }
  6671. else if (Input.GetKeyDown(KeyCode.F) && !fFlg)
  6672. {
  6673. bgmIndex++;
  6674. if (bgmIndex == bgmArray.Length)
  6675. {
  6676. bgmIndex = 0;
  6677. }
  6678. GameMain.Instance.SoundMgr.PlayBGM(bgmArray[bgmIndex] + ".ogg", 0f, true);
  6679. bgmCombo.selectedItemIndex = bgmIndex;
  6680. }
  6681. if (!isVR && Input.GetKeyDown(KeyCode.M) && !mFlg)
  6682. {
  6683. GameObject gameObject4 = GameObject.Find("__GameMain__/SystemUI Root");
  6684. GameObject gameObject5 = gameObject4.transform.Find("MessageWindowPanel").gameObject;
  6685. MessageWindowMgr messageWindowMgr = GameMain.Instance.ScriptMgr.adv_kag.MessageWindowMgr;
  6686. if (isMessage)
  6687. {
  6688. isMessage = false;
  6689. messageWindowMgr.CloseMessageWindowPanel();
  6690. }
  6691. else if (!bGuiMessage)
  6692. {
  6693. bGuiMessage = true;
  6694. }
  6695. else
  6696. {
  6697. bGuiMessage = false;
  6698. isMessage = false;
  6699. messageWindowMgr.CloseMessageWindowPanel();
  6700. }
  6701. }
  6702. if (isDanceChu && Input.GetKey(KeyCode.Return) && Input.GetKeyDown(KeyCode.Escape))
  6703. {
  6704. escFlg = true;
  6705. for (int j = 0; j < maidCnt; j++)
  6706. {
  6707. if (maidArray[j] && maidArray[j].Visible)
  6708. {
  6709. maidArray[j].StopKuchipakuPattern();
  6710. if (isDanceStart7V)
  6711. {
  6712. maidArray[j].SetPos(dancePos[j]);
  6713. maidArray[j].body0.transform.localRotation = danceRot[j];
  6714. }
  6715. if (isDanceStart8V)
  6716. {
  6717. maidArray[j].SetPos(dancePos[j]);
  6718. maidArray[j].body0.transform.localRotation = danceRot[j];
  6719. }
  6720. if (isDanceStart11V)
  6721. {
  6722. maidArray[j].SetPos(dancePos[j]);
  6723. maidArray[j].body0.transform.localRotation = danceRot[j];
  6724. }
  6725. if (isDanceStart1K || isDanceStart3K || isDanceStart4K || isDanceStart5K || isDanceStart6K || isDanceStart9K
  6726. || isDanceStart13K)
  6727. {
  6728. maidArray[j].SetPos(dancePos[j]);
  6729. maidArray[j].body0.transform.localRotation = danceRot[j];
  6730. int i = j;
  6731. if (!isVR)
  6732. {
  6733. delCount[i] = 20;
  6734. if (goSlot[(int) selectList[i]] != null)
  6735. {
  6736. maidArray[i].body0.goSlot = new List<TBodySkin>(goSlot[(int) selectList[i]]);
  6737. for (int l = 0; l < bodyHit[(int) selectList[i]].Count; l++)
  6738. {
  6739. maidArray[i].body0.goSlot[l].bonehair.bodyhit = bodyHit[(int) selectList[i]][l];
  6740. }
  6741. }
  6742. }
  6743. Maid maid = maidArray[j];
  6744. maid.DelProp(MPN.handitem, true);
  6745. maid.DelProp(MPN.accvag, true);
  6746. maid.DelProp(MPN.accanl, true);
  6747. maid.DelProp(MPN.kousoku_upper, true);
  6748. maid.DelProp(MPN.kousoku_lower, true);
  6749. maid.AllProcPropSeqStart();
  6750. }
  6751. if (isDanceStart14V)
  6752. {
  6753. maidArray[j].SetPos(dancePos[j]);
  6754. maidArray[j].body0.transform.localRotation = danceRot[j];
  6755. }
  6756. if (isDanceStart15V)
  6757. {
  6758. maidArray[j].SetPos(dancePos[j]);
  6759. maidArray[j].body0.transform.localRotation = danceRot[j];
  6760. }
  6761. }
  6762. }
  6763. isDanceStart1F = false;
  6764. isDanceStart1K = false;
  6765. isDanceStart2F = false;
  6766. isDanceStart3F = false;
  6767. isDanceStart3K = false;
  6768. isDanceStart4F = false;
  6769. isDanceStart4K = false;
  6770. isDanceStart5F = false;
  6771. isDanceStart5K = false;
  6772. isDanceStart6F = false;
  6773. isDanceStart6K = false;
  6774. isDanceStart7F = false;
  6775. isDanceStart7V = false;
  6776. isDanceStart8F = false;
  6777. isDanceStart8V = false;
  6778. isDanceStart8P = false;
  6779. isDanceStart9F = false;
  6780. isDanceStart9K = false;
  6781. isDanceStart10F = false;
  6782. isDanceStart11F = false;
  6783. isDanceStart11V = false;
  6784. isDanceStart12F = false;
  6785. isDanceStart13F = false;
  6786. isDanceStart13K = false;
  6787. isDanceStart14F = false;
  6788. isDanceStart14V = false;
  6789. isDanceStart15F = false;
  6790. isDanceStart15V = false;
  6791. for (int j = 0; j < maidCnt; j++)
  6792. {
  6793. danceFace[j] = 0f;
  6794. maidArray[j].CrossFade(poseArray[0] + ".anm", false, true, false, 0f, 1f);
  6795. maidArray[j].SetAutoTwistAll(true);
  6796. }
  6797. danceCheckIndex = 0;
  6798. for (int k = 0; k < danceCheck.Length; k++)
  6799. {
  6800. danceCheck[danceCheckIndex] = 1f;
  6801. }
  6802. isDance = false;
  6803. isDanceChu = false;
  6804. if (maidArray[1] && maidArray[1].Visible)
  6805. {
  6806. if (maidArray[0].transform.position == maidArray[1].transform.position)
  6807. {
  6808. Vector3 vector = Vector3.zero;
  6809. vector.x = 0.6f;
  6810. maidArray[1].SetPos(vector);
  6811. if (maidArray[2] && maidArray[2].Visible)
  6812. {
  6813. vector.x = -0.6f;
  6814. maidArray[2].SetPos(vector);
  6815. }
  6816. if (maidArray[3] && maidArray[3].Visible)
  6817. {
  6818. vector.x = 1.2f;
  6819. maidArray[3].SetPos(vector);
  6820. }
  6821. if (maidArray[4] && maidArray[4].Visible)
  6822. {
  6823. vector.x = -1.2f;
  6824. maidArray[4].SetPos(vector);
  6825. }
  6826. if (maidArray[5] && maidArray[5].Visible)
  6827. {
  6828. vector.x = 1.8f;
  6829. maidArray[5].SetPos(vector);
  6830. }
  6831. if (maidArray[6] && maidArray[6].Visible)
  6832. {
  6833. vector.x = -1.8f;
  6834. maidArray[6].SetPos(vector);
  6835. }
  6836. if (maidArray[7] && maidArray[7].Visible)
  6837. {
  6838. vector.x = 2.4f;
  6839. maidArray[7].SetPos(vector);
  6840. }
  6841. if (maidArray[8] && maidArray[8].Visible)
  6842. {
  6843. vector.x = -2.4f;
  6844. maidArray[8].SetPos(vector);
  6845. }
  6846. if (maidArray[9] && maidArray[9].Visible)
  6847. {
  6848. vector.x = 3f;
  6849. maidArray[9].SetPos(vector);
  6850. }
  6851. if (maidArray[10] && maidArray[10].Visible)
  6852. {
  6853. vector.x = -3f;
  6854. maidArray[10].SetPos(vector);
  6855. }
  6856. if (maidArray[11] && maidArray[11].Visible)
  6857. {
  6858. vector.x = 3.6f;
  6859. maidArray[11].SetPos(vector);
  6860. }
  6861. if (maidArray[12] && maidArray[12].Visible)
  6862. {
  6863. vector.x = -3.6f;
  6864. maidArray[12].SetPos(vector);
  6865. }
  6866. if (maidArray[13] && maidArray[13].Visible)
  6867. {
  6868. vector.x = 4.2f;
  6869. maidArray[13].SetPos(vector);
  6870. }
  6871. }
  6872. }
  6873. GameMain.Instance.SoundMgr.PlayBGM(bgmArray[bgmIndex] + ".ogg", 0f, true);
  6874. }
  6875. if (Input.GetKeyDown(KeyCode.Tab) || (!escFlg && Input.GetKeyDown(KeyCode.Escape)))
  6876. {
  6877. if (isScript)
  6878. {
  6879. GameObject gameObject4 = GameObject.Find("__GameMain__/SystemUI Root");
  6880. GameObject gameObject5 = gameObject4.transform.Find("MessageWindowPanel").gameObject;
  6881. if (isPanel)
  6882. {
  6883. isPanel = false;
  6884. }
  6885. else
  6886. {
  6887. isPanel = true;
  6888. }
  6889. gameObject5.SetActive(isPanel);
  6890. }
  6891. else
  6892. {
  6893. bGui = !bGui;
  6894. }
  6895. }
  6896. if (Input.GetKeyDown(KeyCode.Y) && this.getModKeyPressing(modKey.Shift))
  6897. {
  6898. keyFlg = true;
  6899. bgIndex--;
  6900. if (bgIndex <= -1)
  6901. {
  6902. bgIndex = bgArray.Length - 1;
  6903. }
  6904. if (!moveBg)
  6905. {
  6906. bg.localScale = new Vector3(1f, 1f, 1f);
  6907. if (bgArray[bgIndex].Length == 36)
  6908. {
  6909. GameMain.Instance.BgMgr.ChangeBgMyRoom(bgArray[bgIndex]);
  6910. }
  6911. else
  6912. {
  6913. GameMain.Instance.BgMgr.ChangeBg(bgArray[bgIndex]);
  6914. }
  6915. bgCombo.selectedItemIndex = bgIndex;
  6916. if (bgArray[bgIndex] == "karaokeroom")
  6917. {
  6918. bg.transform.position = bgObject.transform.position;
  6919. Vector3 vector = Vector3.zero;
  6920. Vector3 zero3 = Vector3.zero;
  6921. zero3.y = 90f;
  6922. vector.z = 4f;
  6923. vector.x = 1f;
  6924. bg.transform.localPosition = vector;
  6925. bg.transform.localRotation = Quaternion.Euler(zero3);
  6926. }
  6927. }
  6928. }
  6929. else if (Input.GetKey(KeyCode.Y) && Input.GetKey(KeyCode.E))
  6930. {
  6931. keyFlg = true;
  6932. bg.localScale = new Vector3(bg.localScale.x * 1.005f, bg.localScale.y * 1.005f, bg.localScale.z * 1.005f);
  6933. }
  6934. else if (Input.GetKey(KeyCode.Y) && Input.GetKey(KeyCode.D))
  6935. {
  6936. keyFlg = true;
  6937. bg.localScale = new Vector3(bg.localScale.x * 0.995f, bg.localScale.y * 0.995f, bg.localScale.z * 0.995f);
  6938. }
  6939. else if (Input.GetKey(KeyCode.Y) && Input.GetKeyDown(KeyCode.C))
  6940. {
  6941. keyFlg = true;
  6942. bg.localScale = new Vector3(1f, 1f, 1f);
  6943. }
  6944. else if ((Input.GetKey(KeyCode.Y) || Input.GetKey(KeyCode.V)) && Input.GetKey(KeyCode.I) && Input.GetKey(KeyCode.J))
  6945. {
  6946. Vector3 vector2 = mainCameraTransform.TransformDirection(Vector3.forward);
  6947. Vector3 vector3 = mainCameraTransform.TransformDirection(Vector3.right);
  6948. Vector3 vector4 = mainCameraTransform.TransformDirection(Vector3.up);
  6949. Vector3 vector = bg.position;
  6950. vector += new Vector3(vector2.x, 0f, vector2.z) * -0.025f * speed;
  6951. vector += new Vector3(vector3.x, 0f, vector3.z) * 0.025f * speed;
  6952. bg.localPosition = vector;
  6953. if (Input.GetKey(KeyCode.Y))
  6954. {
  6955. keyFlg = true;
  6956. }
  6957. }
  6958. else if ((Input.GetKey(KeyCode.Y) || Input.GetKey(KeyCode.V)) && Input.GetKey(KeyCode.I) && Input.GetKey(KeyCode.L))
  6959. {
  6960. Vector3 vector2 = mainCameraTransform.TransformDirection(Vector3.forward);
  6961. Vector3 vector3 = mainCameraTransform.TransformDirection(Vector3.right);
  6962. Vector3 vector4 = mainCameraTransform.TransformDirection(Vector3.up);
  6963. Vector3 vector = bg.position;
  6964. vector += new Vector3(vector2.x, 0f, vector2.z) * -0.025f * speed;
  6965. vector += new Vector3(vector3.x, 0f, vector3.z) * -0.025f * speed;
  6966. bg.localPosition = vector;
  6967. if (Input.GetKey(KeyCode.Y))
  6968. {
  6969. keyFlg = true;
  6970. }
  6971. }
  6972. else if ((Input.GetKey(KeyCode.Y) || Input.GetKey(KeyCode.V)) && Input.GetKey(KeyCode.K) && Input.GetKey(KeyCode.J))
  6973. {
  6974. Vector3 vector2 = mainCameraTransform.TransformDirection(Vector3.forward);
  6975. Vector3 vector3 = mainCameraTransform.TransformDirection(Vector3.right);
  6976. Vector3 vector4 = mainCameraTransform.TransformDirection(Vector3.up);
  6977. Vector3 vector = bg.position;
  6978. vector += new Vector3(vector2.x, 0f, vector2.z) * 0.025f * speed;
  6979. vector += new Vector3(vector3.x, 0f, vector3.z) * 0.025f * speed;
  6980. bg.localPosition = vector;
  6981. if (Input.GetKey(KeyCode.Y))
  6982. {
  6983. keyFlg = true;
  6984. }
  6985. }
  6986. else if ((Input.GetKey(KeyCode.Y) || Input.GetKey(KeyCode.V)) && Input.GetKey(KeyCode.K) && Input.GetKey(KeyCode.L))
  6987. {
  6988. Vector3 vector2 = mainCameraTransform.TransformDirection(Vector3.forward);
  6989. Vector3 vector3 = mainCameraTransform.TransformDirection(Vector3.right);
  6990. Vector3 vector4 = mainCameraTransform.TransformDirection(Vector3.up);
  6991. Vector3 vector = bg.position;
  6992. vector += new Vector3(vector2.x, 0f, vector2.z) * 0.025f * speed;
  6993. vector += new Vector3(vector3.x, 0f, vector3.z) * -0.025f * speed;
  6994. bg.localPosition = vector;
  6995. if (Input.GetKey(KeyCode.Y))
  6996. {
  6997. keyFlg = true;
  6998. }
  6999. }
  7000. else if ((Input.GetKey(KeyCode.Y) || Input.GetKey(KeyCode.V)) && Input.GetKey(KeyCode.I))
  7001. {
  7002. Vector3 vector2 = mainCameraTransform.TransformDirection(Vector3.forward);
  7003. Vector3 vector3 = mainCameraTransform.TransformDirection(Vector3.right);
  7004. Vector3 vector4 = mainCameraTransform.TransformDirection(Vector3.up);
  7005. Vector3 vector = bg.position;
  7006. vector += new Vector3(vector2.x, 0f, vector2.z) * -0.025f * speed;
  7007. bg.localPosition = vector;
  7008. if (Input.GetKey(KeyCode.Y))
  7009. {
  7010. keyFlg = true;
  7011. }
  7012. }
  7013. else if ((Input.GetKey(KeyCode.Y) || Input.GetKey(KeyCode.V)) && Input.GetKey(KeyCode.K))
  7014. {
  7015. Vector3 vector2 = mainCameraTransform.TransformDirection(Vector3.forward);
  7016. Vector3 vector3 = mainCameraTransform.TransformDirection(Vector3.right);
  7017. Vector3 vector4 = mainCameraTransform.TransformDirection(Vector3.up);
  7018. Vector3 vector = bg.position;
  7019. vector += new Vector3(vector2.x, 0f, vector2.z) * 0.025f * speed;
  7020. bg.localPosition = vector;
  7021. if (Input.GetKey(KeyCode.Y))
  7022. {
  7023. keyFlg = true;
  7024. }
  7025. }
  7026. else if ((Input.GetKey(KeyCode.Y) || Input.GetKey(KeyCode.V)) && Input.GetKey(KeyCode.J))
  7027. {
  7028. Vector3 vector2 = mainCameraTransform.TransformDirection(Vector3.forward);
  7029. Vector3 vector3 = mainCameraTransform.TransformDirection(Vector3.right);
  7030. Vector3 vector4 = mainCameraTransform.TransformDirection(Vector3.up);
  7031. Vector3 vector = bg.position;
  7032. vector += new Vector3(vector3.x, 0f, vector3.z) * 0.025f * speed;
  7033. bg.localPosition = vector;
  7034. if (Input.GetKey(KeyCode.Y))
  7035. {
  7036. keyFlg = true;
  7037. }
  7038. }
  7039. else if ((Input.GetKey(KeyCode.Y) || Input.GetKey(KeyCode.V)) && Input.GetKey(KeyCode.L))
  7040. {
  7041. Vector3 vector2 = mainCameraTransform.TransformDirection(Vector3.forward);
  7042. Vector3 vector3 = mainCameraTransform.TransformDirection(Vector3.right);
  7043. Vector3 vector4 = mainCameraTransform.TransformDirection(Vector3.up);
  7044. Vector3 vector = bg.position;
  7045. vector += new Vector3(vector3.x, 0f, vector3.z) * -0.025f * speed;
  7046. bg.localPosition = vector;
  7047. if (Input.GetKey(KeyCode.Y))
  7048. {
  7049. keyFlg = true;
  7050. }
  7051. }
  7052. else if ((Input.GetKey(KeyCode.Y) || Input.GetKey(KeyCode.V)) && Input.GetKey(KeyCode.Alpha0))
  7053. {
  7054. Vector3 vector = bg.position;
  7055. vector.y -= 0.015f * speed;
  7056. bg.localPosition = vector;
  7057. if (Input.GetKey(KeyCode.Y))
  7058. {
  7059. keyFlg = true;
  7060. }
  7061. }
  7062. else if ((Input.GetKey(KeyCode.Y) || Input.GetKey(KeyCode.V)) && Input.GetKey(KeyCode.P))
  7063. {
  7064. Vector3 vector = bg.position;
  7065. vector.y += 0.015f * speed;
  7066. bg.localPosition = vector;
  7067. if (Input.GetKey(KeyCode.Y))
  7068. {
  7069. keyFlg = true;
  7070. }
  7071. }
  7072. else if ((Input.GetKey(KeyCode.Y) || Input.GetKey(KeyCode.V)) && Input.GetKey(KeyCode.U))
  7073. {
  7074. bg.RotateAround(maidArray[0].transform.position, Vector3.up, 0.7f);
  7075. if (Input.GetKey(KeyCode.Y))
  7076. {
  7077. keyFlg = true;
  7078. }
  7079. }
  7080. else if ((Input.GetKey(KeyCode.Y) || Input.GetKey(KeyCode.V)) && Input.GetKey(KeyCode.O))
  7081. {
  7082. bg.RotateAround(maidArray[0].transform.position, Vector3.up, -0.7f);
  7083. if (Input.GetKey(KeyCode.Y))
  7084. {
  7085. keyFlg = true;
  7086. }
  7087. }
  7088. else if (Input.GetKeyDown(KeyCode.Y) && Input.GetKey(KeyCode.Return))
  7089. {
  7090. if (Input.GetKey(KeyCode.Y))
  7091. {
  7092. keyFlg = true;
  7093. }
  7094. }
  7095. else if (Input.GetKeyUp(KeyCode.Y) && !yFlg)
  7096. {
  7097. if (keyFlg)
  7098. {
  7099. keyFlg = false;
  7100. }
  7101. else
  7102. {
  7103. bgIndex++;
  7104. if (bgIndex == bgArray.Length)
  7105. {
  7106. bgIndex = 0;
  7107. }
  7108. if (!moveBg)
  7109. {
  7110. bg.localScale = new Vector3(1f, 1f, 1f);
  7111. if (bgArray[bgIndex].Length == 36)
  7112. {
  7113. GameMain.Instance.BgMgr.ChangeBgMyRoom(bgArray[bgIndex]);
  7114. }
  7115. else
  7116. {
  7117. GameMain.Instance.BgMgr.ChangeBg(bgArray[bgIndex]);
  7118. }
  7119. bgCombo.selectedItemIndex = bgIndex;
  7120. if (bgArray[bgIndex] == "karaokeroom")
  7121. {
  7122. bg.transform.position = bgObject.transform.position;
  7123. Vector3 vector = Vector3.zero;
  7124. Vector3 zero3 = Vector3.zero;
  7125. zero3.y = 90f;
  7126. vector.z = 4f;
  7127. vector.x = 1f;
  7128. bg.transform.localPosition = vector;
  7129. bg.transform.localRotation = Quaternion.Euler(zero3);
  7130. }
  7131. }
  7132. }
  7133. }
  7134. if (maidArray[0] != null && maidArray[0].Visible)
  7135. {
  7136. if (Input.GetKeyDown(KeyCode.Comma) && this.getModKeyPressing(modKey.Shift))
  7137. {
  7138. int[] array6 = new int[1];
  7139. int[] array7 = array6;
  7140. if (maidCnt == 2)
  7141. {
  7142. array7 = new int[] {0, 1};
  7143. }
  7144. if (maidCnt == 3)
  7145. {
  7146. array7 = new int[] {0, 1, 2};
  7147. }
  7148. if (maidCnt == 4)
  7149. {
  7150. array7 = new int[] {0, 1, 2, 3};
  7151. }
  7152. if (maidCnt == 5)
  7153. {
  7154. array7 = new int[] {0, 1, 2, 3, 4};
  7155. }
  7156. if (maidCnt == 6)
  7157. {
  7158. array7 = new int[] {0, 1, 2, 3, 4, 5};
  7159. }
  7160. if (maidCnt == 7)
  7161. {
  7162. array7 = new int[] {0, 1, 2, 3, 4, 5, 6};
  7163. }
  7164. if (maidCnt == 8)
  7165. {
  7166. array7 = new int[] {0, 1, 2, 3, 4, 5, 6, 7};
  7167. }
  7168. if (maidCnt == 9)
  7169. {
  7170. array7 = new int[] {0, 1, 2, 3, 4, 5, 6, 7, 8};
  7171. }
  7172. if (maidCnt == 10)
  7173. {
  7174. array7 = new int[] {0, 1, 2, 3, 4, 5, 6, 7, 8, 9};
  7175. }
  7176. if (maidCnt == 11)
  7177. {
  7178. array7 = new int[] {0, 1, 2, 3, 4, 5, 6, 7, 8, 9, 10};
  7179. }
  7180. if (maidCnt == 12)
  7181. {
  7182. array7 = new int[] {0, 1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11};
  7183. }
  7184. Random random = new Random();
  7185. int n = array7.Length;
  7186. while (n > 1)
  7187. {
  7188. n--;
  7189. int j = random.Next(n + 1);
  7190. int num8 = array7[j];
  7191. array7[j] = array7[n];
  7192. array7[n] = num8;
  7193. }
  7194. int[] array8 = new int[maidCnt];
  7195. Vector3[] array9 = new Vector3[maidCnt];
  7196. Vector3[] array10 = new Vector3[maidCnt];
  7197. int[] array11 = new int[maidCnt];
  7198. for (int i = 0; i < maidCnt; i++)
  7199. {
  7200. array8[array7[i]] = poseIndex[array7[i]];
  7201. array9[array7[i]] = maidArray[array7[i]].transform.localRotation.eulerAngles;
  7202. array10[array7[i]] = maidArray[array7[i]].transform.position;
  7203. array11[array7[i]] = headEyeIndex[array7[i]];
  7204. }
  7205. for (int i = 0; i < maidCnt; i++)
  7206. {
  7207. if (maidArray[i] && maidArray[i].Visible && !isLock[i])
  7208. {
  7209. string[] array12 = poseArray[array8[array7[i]]].Split(new char[] {','});
  7210. isStop[i] = false;
  7211. poseCount[i] = 20;
  7212. Maid maid = maidArray[i];
  7213. if (array12[0].Contains("_momi") || array12[0].Contains("paizuri_"))
  7214. {
  7215. maid.body0.MuneYureL(0f);
  7216. maid.body0.MuneYureR(0f);
  7217. }
  7218. else
  7219. {
  7220. maid.body0.MuneYureL(1f);
  7221. maid.body0.MuneYureR(1f);
  7222. }
  7223. int num6;
  7224. if (array12[0].Contains("MultipleMaidsPose"))
  7225. {
  7226. string path = array12[0].Split(new char[] {'/'})[1];
  7227. byte[] array2 = new byte[0];
  7228. try
  7229. {
  7230. using (FileStream fileStream = new FileStream(path, FileMode.Open, FileAccess.Read))
  7231. {
  7232. array2 = new byte[fileStream.Length];
  7233. fileStream.Read(array2, 0, array2.Length);
  7234. }
  7235. }
  7236. catch { }
  7237. if (0 < array2.Length)
  7238. {
  7239. string text = Path.GetFileName(path);
  7240. long num5 = (long) text.GetHashCode();
  7241. maid.body0.CrossFade(num5.ToString(), array2, false, false, false, 0f, 1f);
  7242. Maid.AutoTwist[] array3 = new Maid.AutoTwist[]
  7243. {
  7244. Maid.AutoTwist.ShoulderL, Maid.AutoTwist.ShoulderR, Maid.AutoTwist.WristL,
  7245. Maid.AutoTwist.WristR, Maid.AutoTwist.ThighL, Maid.AutoTwist.ThighR
  7246. };
  7247. for (int m = 0; m < array3.Length; m++)
  7248. {
  7249. maid.SetAutoTwist(array3[m], true);
  7250. }
  7251. }
  7252. }
  7253. else if (array12[0].StartsWith("p") && int.TryParse(array12[0].Substring(1), out num6))
  7254. {
  7255. loadPose[i] = array12[0];
  7256. }
  7257. else if (!array12[0].StartsWith("dance_"))
  7258. {
  7259. maidArray[i].CrossFade(array12[0] + ".anm", false, true, false, 0f, 1f);
  7260. }
  7261. else
  7262. {
  7263. if (!maidArray[i].body0.m_Bones.GetComponent<Animation>().GetClip(array12[0] + ".anm"))
  7264. {
  7265. maidArray[i].body0.LoadAnime(array12[0] + ".anm",
  7266. GameUty.FileSystem,
  7267. array12[0] + ".anm",
  7268. false,
  7269. false);
  7270. }
  7271. maidArray[i].body0.m_Bones.GetComponent<Animation>().Play(array12[0] + ".anm");
  7272. }
  7273. if (array12.Length > 1)
  7274. {
  7275. maidArray[i].body0.m_Bones.GetComponent<Animation>()[array12[0] + ".anm"].time =
  7276. float.Parse(array12[1]);
  7277. isStop[i] = true;
  7278. if (array12.Length > 2)
  7279. {
  7280. Transform transform2 = CMT.SearchObjName(maidArray[i].body0.m_Bones.transform, "Bip01", true);
  7281. isPoseIti[i] = true;
  7282. poseIti[i] = maidArray[i].transform.position;
  7283. maidArray[i].transform.position = new Vector3(100f, 100f, 100f);
  7284. }
  7285. }
  7286. }
  7287. poseIndex[i] = array8[array7[i]];
  7288. maidArray[i].SetRot(array9[array7[i]]);
  7289. maidArray[i].SetPos(array10[array7[i]]);
  7290. headEyeIndex[i] = array11[array7[i]];
  7291. maidArray[i].body0.trsLookTarget = GameMain.Instance.MainCamera.transform;
  7292. maidArray[i].body0.boHeadToCam = true;
  7293. maidArray[i].body0.boEyeToCam = true;
  7294. if (headEyeIndex[i] == 0)
  7295. {
  7296. maidArray[i].body0.trsLookTarget = GameMain.Instance.MainCamera.transform;
  7297. maidArray[i].body0.boHeadToCam = true;
  7298. maidArray[i].body0.boEyeToCam = true;
  7299. }
  7300. else
  7301. {
  7302. maidArray[i].body0.trsLookTarget = null;
  7303. if (headEyeIndex[i] == 1)
  7304. {
  7305. maidArray[i].body0.offsetLookTarget = new Vector3(-0.7f, 1f, -0.6f);
  7306. }
  7307. if (headEyeIndex[i] == 2)
  7308. {
  7309. maidArray[i].body0.offsetLookTarget = new Vector3(-0.6f, 1f, 0f);
  7310. }
  7311. if (headEyeIndex[i] == 3)
  7312. {
  7313. maidArray[i].body0.offsetLookTarget = new Vector3(-0.7f, 1f, 0.6f);
  7314. }
  7315. if (headEyeIndex[i] == 4)
  7316. {
  7317. maidArray[i].body0.offsetLookTarget = new Vector3(-0.1f, 1f, -0.4f);
  7318. }
  7319. if (headEyeIndex[i] == 5)
  7320. {
  7321. maidArray[i].body0.offsetLookTarget = new Vector3(0f, 1f, 0f);
  7322. }
  7323. if (headEyeIndex[i] == 6)
  7324. {
  7325. maidArray[i].body0.offsetLookTarget = new Vector3(-0.1f, 1f, 0.4f);
  7326. }
  7327. if (headEyeIndex[i] == 7)
  7328. {
  7329. maidArray[i].body0.offsetLookTarget = new Vector3(0.4f, 1f, -0.5f);
  7330. }
  7331. if (headEyeIndex[i] == 8)
  7332. {
  7333. maidArray[i].body0.offsetLookTarget = new Vector3(0.3f, 1f, 0f);
  7334. }
  7335. if (headEyeIndex[i] == 9)
  7336. {
  7337. maidArray[i].body0.offsetLookTarget = new Vector3(0.4f, 1f, 0.5f);
  7338. }
  7339. }
  7340. }
  7341. }
  7342. else if (Input.GetKeyDown(KeyCode.Comma))
  7343. {
  7344. int[] array8 = new int[maidCnt];
  7345. Vector3[] array9 = new Vector3[maidCnt];
  7346. Vector3[] array10 = new Vector3[maidCnt];
  7347. int[] array11 = new int[maidCnt];
  7348. for (int i = 0; i < maidCnt; i++)
  7349. {
  7350. array8[i] = poseIndex[i];
  7351. array9[i] = maidArray[i].transform.localRotation.eulerAngles;
  7352. array10[i] = maidArray[i].transform.position;
  7353. array11[i] = headEyeIndex[i];
  7354. }
  7355. for (int i = 0; i < maidCnt; i++)
  7356. {
  7357. if (i == 0)
  7358. {
  7359. if (!isLock[i])
  7360. {
  7361. if (maidArray[i] && maidArray[i].Visible)
  7362. {
  7363. string[] array12 = poseArray[array8[maidCnt - i - 1]].Split(new char[] {','});
  7364. isStop[i] = false;
  7365. poseCount[i] = 20;
  7366. Maid maid = maidArray[i];
  7367. if (array12[0].Contains("_momi") || array12[0].Contains("paizuri_"))
  7368. {
  7369. maid.body0.MuneYureL(0f);
  7370. maid.body0.MuneYureR(0f);
  7371. }
  7372. else
  7373. {
  7374. maid.body0.MuneYureL(1f);
  7375. maid.body0.MuneYureR(1f);
  7376. }
  7377. int num6;
  7378. if (array12[0].Contains("MultipleMaidsPose"))
  7379. {
  7380. string path = array12[0].Split(new char[] {'/'})[1];
  7381. byte[] array2 = new byte[0];
  7382. try
  7383. {
  7384. using (FileStream fileStream = new FileStream(path, FileMode.Open, FileAccess.Read))
  7385. {
  7386. array2 = new byte[fileStream.Length];
  7387. fileStream.Read(array2, 0, array2.Length);
  7388. }
  7389. }
  7390. catch { }
  7391. if (0 < array2.Length)
  7392. {
  7393. string text = Path.GetFileName(path);
  7394. long num5 = (long) text.GetHashCode();
  7395. maid.body0.CrossFade(num5.ToString(), array2, false, false, false, 0f, 1f);
  7396. Maid.AutoTwist[] array3 = new Maid.AutoTwist[]
  7397. {
  7398. Maid.AutoTwist.ShoulderL, Maid.AutoTwist.ShoulderR, Maid.AutoTwist.WristL,
  7399. Maid.AutoTwist.WristR, Maid.AutoTwist.ThighL, Maid.AutoTwist.ThighR
  7400. };
  7401. for (int m = 0; m < array3.Length; m++)
  7402. {
  7403. maid.SetAutoTwist(array3[m], true);
  7404. }
  7405. }
  7406. }
  7407. else if (array12[0].StartsWith("p") && int.TryParse(array12[0].Substring(1), out num6))
  7408. {
  7409. loadPose[i] = array12[0];
  7410. }
  7411. else if (!array12[0].StartsWith("dance_"))
  7412. {
  7413. maidArray[i].CrossFade(array12[0] + ".anm", false, true, false, 0f, 1f);
  7414. }
  7415. else
  7416. {
  7417. if (!maidArray[i].body0.m_Bones.GetComponent<Animation>().GetClip(array12[0] + ".anm"))
  7418. {
  7419. maidArray[i].body0.LoadAnime(array12[0] + ".anm",
  7420. GameUty.FileSystem,
  7421. array12[0] + ".anm",
  7422. false,
  7423. false);
  7424. }
  7425. maidArray[i].body0.m_Bones.GetComponent<Animation>().Play(array12[0] + ".anm");
  7426. }
  7427. if (array12.Length > 1)
  7428. {
  7429. maidArray[i].body0.m_Bones.GetComponent<Animation>()[array12[0] + ".anm"].time =
  7430. float.Parse(array12[1]);
  7431. isStop[i] = true;
  7432. if (array12.Length > 2)
  7433. {
  7434. Transform transform2 =
  7435. CMT.SearchObjName(maidArray[i].body0.m_Bones.transform, "Bip01", true);
  7436. isPoseIti[i] = true;
  7437. poseIti[i] = maidArray[i].transform.position;
  7438. maidArray[i].transform.position = new Vector3(100f, 100f, 100f);
  7439. }
  7440. }
  7441. }
  7442. }
  7443. poseIndex[i] = array8[maidCnt - i - 1];
  7444. headEyeIndex[i] = array11[maidCnt - i - 1];
  7445. }
  7446. else
  7447. {
  7448. if (!isLock[i])
  7449. {
  7450. if (maidArray[i] && maidArray[i].Visible)
  7451. {
  7452. string[] array12 = poseArray[array8[i - 1]].Split(new char[] {','});
  7453. isStop[i] = false;
  7454. poseCount[i] = 20;
  7455. Maid maid = maidArray[i];
  7456. if (array12[0].Contains("_momi") || array12[0].Contains("paizuri_"))
  7457. {
  7458. maid.body0.MuneYureL(0f);
  7459. maid.body0.MuneYureR(0f);
  7460. }
  7461. else
  7462. {
  7463. maid.body0.MuneYureL(1f);
  7464. maid.body0.MuneYureR(1f);
  7465. }
  7466. int num6;
  7467. if (array12[0].Contains("MultipleMaidsPose"))
  7468. {
  7469. string path = array12[0].Split(new char[] {'/'})[1];
  7470. byte[] array2 = new byte[0];
  7471. try
  7472. {
  7473. using (FileStream fileStream = new FileStream(path, FileMode.Open, FileAccess.Read))
  7474. {
  7475. array2 = new byte[fileStream.Length];
  7476. fileStream.Read(array2, 0, array2.Length);
  7477. }
  7478. }
  7479. catch { }
  7480. if (0 < array2.Length)
  7481. {
  7482. string text = Path.GetFileName(path);
  7483. long num5 = (long) text.GetHashCode();
  7484. maid.body0.CrossFade(num5.ToString(), array2, false, false, false, 0f, 1f);
  7485. Maid.AutoTwist[] array3 = new Maid.AutoTwist[]
  7486. {
  7487. Maid.AutoTwist.ShoulderL, Maid.AutoTwist.ShoulderR, Maid.AutoTwist.WristL,
  7488. Maid.AutoTwist.WristR, Maid.AutoTwist.ThighL, Maid.AutoTwist.ThighR
  7489. };
  7490. for (int m = 0; m < array3.Length; m++)
  7491. {
  7492. maid.SetAutoTwist(array3[m], true);
  7493. }
  7494. }
  7495. }
  7496. else if (array12[0].StartsWith("p") && int.TryParse(array12[0].Substring(1), out num6))
  7497. {
  7498. loadPose[i] = array12[0];
  7499. }
  7500. else if (!array12[0].StartsWith("dance_"))
  7501. {
  7502. maidArray[i].CrossFade(array12[0] + ".anm", false, true, false, 0f, 1f);
  7503. }
  7504. else
  7505. {
  7506. if (!maidArray[i].body0.m_Bones.GetComponent<Animation>().GetClip(array12[0] + ".anm"))
  7507. {
  7508. maidArray[i].body0.LoadAnime(array12[0] + ".anm",
  7509. GameUty.FileSystem,
  7510. array12[0] + ".anm",
  7511. false,
  7512. false);
  7513. }
  7514. maidArray[i].body0.m_Bones.GetComponent<Animation>().Play(array12[0] + ".anm");
  7515. }
  7516. if (array12.Length > 1)
  7517. {
  7518. maidArray[i].body0.m_Bones.GetComponent<Animation>()[array12[0] + ".anm"].time =
  7519. float.Parse(array12[1]);
  7520. isStop[i] = true;
  7521. if (array12.Length > 2)
  7522. {
  7523. Transform transform2 =
  7524. CMT.SearchObjName(maidArray[i].body0.m_Bones.transform, "Bip01", true);
  7525. isPoseIti[i] = true;
  7526. poseIti[i] = maidArray[i].transform.position;
  7527. maidArray[i].transform.position = new Vector3(100f, 100f, 100f);
  7528. }
  7529. }
  7530. }
  7531. }
  7532. poseIndex[i] = array8[i - 1];
  7533. headEyeIndex[i] = array11[i - 1];
  7534. }
  7535. maidArray[i].body0.trsLookTarget = GameMain.Instance.MainCamera.transform;
  7536. maidArray[i].body0.boHeadToCam = true;
  7537. maidArray[i].body0.boEyeToCam = true;
  7538. if (headEyeIndex[i] == 0)
  7539. {
  7540. maidArray[i].body0.trsLookTarget = GameMain.Instance.MainCamera.transform;
  7541. maidArray[i].body0.boHeadToCam = true;
  7542. maidArray[i].body0.boEyeToCam = true;
  7543. }
  7544. else
  7545. {
  7546. maidArray[i].body0.trsLookTarget = null;
  7547. if (headEyeIndex[i] == 1)
  7548. {
  7549. maidArray[i].body0.offsetLookTarget = new Vector3(-0.7f, 1f, -0.6f);
  7550. }
  7551. if (headEyeIndex[i] == 2)
  7552. {
  7553. maidArray[i].body0.offsetLookTarget = new Vector3(-0.6f, 1f, 0f);
  7554. }
  7555. if (headEyeIndex[i] == 3)
  7556. {
  7557. maidArray[i].body0.offsetLookTarget = new Vector3(-0.7f, 1f, 0.6f);
  7558. }
  7559. if (headEyeIndex[i] == 4)
  7560. {
  7561. maidArray[i].body0.offsetLookTarget = new Vector3(-0.1f, 1f, -0.4f);
  7562. }
  7563. if (headEyeIndex[i] == 5)
  7564. {
  7565. maidArray[i].body0.offsetLookTarget = new Vector3(0f, 1f, 0f);
  7566. }
  7567. if (headEyeIndex[i] == 6)
  7568. {
  7569. maidArray[i].body0.offsetLookTarget = new Vector3(-0.1f, 1f, 0.4f);
  7570. }
  7571. if (headEyeIndex[i] == 7)
  7572. {
  7573. maidArray[i].body0.offsetLookTarget = new Vector3(0.4f, 1f, -0.5f);
  7574. }
  7575. if (headEyeIndex[i] == 8)
  7576. {
  7577. maidArray[i].body0.offsetLookTarget = new Vector3(0.3f, 1f, 0f);
  7578. }
  7579. if (headEyeIndex[i] == 9)
  7580. {
  7581. maidArray[i].body0.offsetLookTarget = new Vector3(0.4f, 1f, 0.5f);
  7582. }
  7583. }
  7584. if (i == 0)
  7585. {
  7586. maidArray[i].SetRot(array9[maidCnt - i - 1]);
  7587. maidArray[i].SetPos(array10[maidCnt - i - 1]);
  7588. }
  7589. else
  7590. {
  7591. maidArray[i].SetRot(array9[i - 1]);
  7592. maidArray[i].SetPos(array10[i - 1]);
  7593. }
  7594. }
  7595. }
  7596. for (int i = 0; i < maidCnt; i++)
  7597. {
  7598. if (Input.GetKey(KeyCode.B) && this.getModKeyPressing(modKey.Shift))
  7599. {
  7600. if (maidArray[i] && maidArray[i].Visible)
  7601. {
  7602. maidArray[i].body0.transform.localRotation =
  7603. Quaternion.Euler(maidArray[i].body0.transform.localEulerAngles)
  7604. * Quaternion.AngleAxis(-1.5f, Vector3.up);
  7605. }
  7606. }
  7607. else if (Input.GetKey(KeyCode.B))
  7608. {
  7609. if (maidArray[i] && maidArray[i].Visible)
  7610. {
  7611. maidArray[i].body0.transform.localRotation =
  7612. Quaternion.Euler(maidArray[i].body0.transform.localEulerAngles)
  7613. * Quaternion.AngleAxis(1.5f, Vector3.up);
  7614. }
  7615. }
  7616. if (Input.GetKeyDown(KeyCode.N) && Input.GetKey(KeyCode.LeftAlt) && !isLock[i])
  7617. {
  7618. if (maidArray[1] && maidArray[1].Visible)
  7619. {
  7620. if (maidArray[0].transform.position == maidArray[1].transform.position
  7621. || (maidArray[2] && maidArray[0].transform.position == maidArray[2].transform.position))
  7622. {
  7623. Vector3 vector = Vector3.zero;
  7624. vector.x = 0.6f;
  7625. maidArray[1].SetPos(vector);
  7626. if (maidArray[2] && maidArray[2].Visible)
  7627. {
  7628. vector.x = -0.6f;
  7629. maidArray[2].SetPos(vector);
  7630. }
  7631. if (maidArray[3] && maidArray[3].Visible)
  7632. {
  7633. vector.x = 1.2f;
  7634. maidArray[3].SetPos(vector);
  7635. }
  7636. if (maidArray[4] && maidArray[4].Visible)
  7637. {
  7638. vector.x = -1.2f;
  7639. maidArray[4].SetPos(vector);
  7640. }
  7641. if (maidArray[5] && maidArray[5].Visible)
  7642. {
  7643. vector.x = 1.8f;
  7644. maidArray[5].SetPos(vector);
  7645. }
  7646. if (maidArray[6] && maidArray[6].Visible)
  7647. {
  7648. vector.x = -1.8f;
  7649. maidArray[6].SetPos(vector);
  7650. }
  7651. if (maidArray[7] && maidArray[7].Visible)
  7652. {
  7653. vector.x = 2.4f;
  7654. maidArray[7].SetPos(vector);
  7655. }
  7656. if (maidArray[8] && maidArray[8].Visible)
  7657. {
  7658. vector.x = -2.4f;
  7659. maidArray[8].SetPos(vector);
  7660. }
  7661. if (maidArray[9] && maidArray[9].Visible)
  7662. {
  7663. vector.x = 3f;
  7664. maidArray[9].SetPos(vector);
  7665. }
  7666. if (maidArray[10] && maidArray[10].Visible)
  7667. {
  7668. vector.x = -3f;
  7669. maidArray[10].SetPos(vector);
  7670. }
  7671. if (maidArray[11] && maidArray[11].Visible)
  7672. {
  7673. vector.x = 3.6f;
  7674. maidArray[11].SetPos(vector);
  7675. }
  7676. if (maidArray[12] && maidArray[12].Visible)
  7677. {
  7678. vector.x = -3.6f;
  7679. maidArray[12].SetPos(vector);
  7680. }
  7681. if (maidArray[13] && maidArray[13].Visible)
  7682. {
  7683. vector.x = 4.2f;
  7684. maidArray[13].SetPos(vector);
  7685. }
  7686. }
  7687. }
  7688. for (int k = 0; k < groupList.Count; k++)
  7689. {
  7690. if (k == 0 && poseIndex[i] <= (int) groupList[k])
  7691. {
  7692. if (poseIndex[i] == 0)
  7693. {
  7694. poseIndex[i] = (int) groupList[groupList.Count - 1];
  7695. }
  7696. else
  7697. {
  7698. poseIndex[i] = 0;
  7699. }
  7700. break;
  7701. }
  7702. if (k > 0 && poseIndex[i] > (int) groupList[k - 1] && poseIndex[i] <= (int) groupList[k])
  7703. {
  7704. poseIndex[i] = (int) groupList[k - 1];
  7705. break;
  7706. }
  7707. }
  7708. if (poseIndex[i] > (int) groupList[groupList.Count - 1])
  7709. {
  7710. poseIndex[i] = (int) groupList[groupList.Count - 1];
  7711. }
  7712. if (maidArray[i] && maidArray[i].Visible)
  7713. {
  7714. string[] array = poseArray[poseIndex[i]].Split(new char[] {','});
  7715. isStop[i] = false;
  7716. poseCount[i] = 20;
  7717. Maid maid = maidArray[i];
  7718. if (array[0].Contains("_momi") || array[0].Contains("paizuri_"))
  7719. {
  7720. maid.body0.MuneYureL(0f);
  7721. maid.body0.MuneYureR(0f);
  7722. }
  7723. else
  7724. {
  7725. maid.body0.MuneYureL(1f);
  7726. maid.body0.MuneYureR(1f);
  7727. }
  7728. int num6;
  7729. if (array[0].Contains("MultipleMaidsPose"))
  7730. {
  7731. string path = array[0].Split(new char[] {'/'})[1];
  7732. byte[] array2 = new byte[0];
  7733. try
  7734. {
  7735. using (FileStream fileStream = new FileStream(path, FileMode.Open, FileAccess.Read))
  7736. {
  7737. array2 = new byte[fileStream.Length];
  7738. fileStream.Read(array2, 0, array2.Length);
  7739. }
  7740. }
  7741. catch { }
  7742. if (0 < array2.Length)
  7743. {
  7744. string text = Path.GetFileName(path);
  7745. long num5 = (long) text.GetHashCode();
  7746. maid.body0.CrossFade(num5.ToString(), array2, false, false, false, 0f, 1f);
  7747. Maid.AutoTwist[] array3 = new Maid.AutoTwist[]
  7748. {
  7749. Maid.AutoTwist.ShoulderL, Maid.AutoTwist.ShoulderR, Maid.AutoTwist.WristL,
  7750. Maid.AutoTwist.WristR, Maid.AutoTwist.ThighL, Maid.AutoTwist.ThighR
  7751. };
  7752. for (int m = 0; m < array3.Length; m++)
  7753. {
  7754. maid.SetAutoTwist(array3[m], true);
  7755. }
  7756. }
  7757. }
  7758. else if (array[0].StartsWith("p") && int.TryParse(array[0].Substring(1), out num6))
  7759. {
  7760. loadPose[i] = array[0];
  7761. }
  7762. else if (!array[0].StartsWith("dance_"))
  7763. {
  7764. maidArray[i].CrossFade(array[0] + ".anm", false, true, false, 0f, 1f);
  7765. }
  7766. else
  7767. {
  7768. if (!maidArray[i].body0.m_Bones.GetComponent<Animation>().GetClip(array[0] + ".anm"))
  7769. {
  7770. maidArray[i].body0.LoadAnime(array[0] + ".anm",
  7771. GameUty.FileSystem,
  7772. array[0] + ".anm",
  7773. false,
  7774. false);
  7775. }
  7776. maidArray[i].body0.m_Bones.GetComponent<Animation>().Play(array[0] + ".anm");
  7777. }
  7778. if (array.Length > 1)
  7779. {
  7780. maidArray[i].body0.m_Bones.GetComponent<Animation>()[array[0] + ".anm"].time = float.Parse(array[1]);
  7781. isStop[i] = true;
  7782. if (array.Length > 2)
  7783. {
  7784. Transform transform2 = CMT.SearchObjName(maidArray[i].body0.m_Bones.transform, "Bip01", true);
  7785. isPoseIti[i] = true;
  7786. poseIti[i] = maidArray[i].transform.position;
  7787. maidArray[i].transform.position = new Vector3(100f, 100f, 100f);
  7788. }
  7789. }
  7790. }
  7791. }
  7792. else if (Input.GetKeyDown(KeyCode.N) && Input.GetKey(KeyCode.RightAlt) && !isLock[i])
  7793. {
  7794. if (maidArray[1] && maidArray[1].Visible)
  7795. {
  7796. if (maidArray[0].transform.position == maidArray[1].transform.position
  7797. || (maidArray[2] && maidArray[0].transform.position == maidArray[2].transform.position))
  7798. {
  7799. Vector3 vector = Vector3.zero;
  7800. vector.x = 0.6f;
  7801. maidArray[1].SetPos(vector);
  7802. if (maidArray[2] && maidArray[2].Visible)
  7803. {
  7804. vector.x = -0.6f;
  7805. maidArray[2].SetPos(vector);
  7806. }
  7807. if (maidArray[3] && maidArray[3].Visible)
  7808. {
  7809. vector.x = 1.2f;
  7810. maidArray[3].SetPos(vector);
  7811. }
  7812. if (maidArray[4] && maidArray[4].Visible)
  7813. {
  7814. vector.x = -1.2f;
  7815. maidArray[4].SetPos(vector);
  7816. }
  7817. if (maidArray[5] && maidArray[5].Visible)
  7818. {
  7819. vector.x = 1.8f;
  7820. maidArray[5].SetPos(vector);
  7821. }
  7822. if (maidArray[6] && maidArray[6].Visible)
  7823. {
  7824. vector.x = -1.8f;
  7825. maidArray[6].SetPos(vector);
  7826. }
  7827. if (maidArray[7] && maidArray[7].Visible)
  7828. {
  7829. vector.x = 2.4f;
  7830. maidArray[7].SetPos(vector);
  7831. }
  7832. if (maidArray[8] && maidArray[8].Visible)
  7833. {
  7834. vector.x = -2.4f;
  7835. maidArray[8].SetPos(vector);
  7836. }
  7837. if (maidArray[9] && maidArray[9].Visible)
  7838. {
  7839. vector.x = 3f;
  7840. maidArray[9].SetPos(vector);
  7841. }
  7842. if (maidArray[10] && maidArray[10].Visible)
  7843. {
  7844. vector.x = -3f;
  7845. maidArray[10].SetPos(vector);
  7846. }
  7847. if (maidArray[11] && maidArray[11].Visible)
  7848. {
  7849. vector.x = 3.6f;
  7850. maidArray[11].SetPos(vector);
  7851. }
  7852. if (maidArray[12] && maidArray[12].Visible)
  7853. {
  7854. vector.x = -3.6f;
  7855. maidArray[12].SetPos(vector);
  7856. }
  7857. if (maidArray[13] && maidArray[13].Visible)
  7858. {
  7859. vector.x = 4.2f;
  7860. maidArray[13].SetPos(vector);
  7861. }
  7862. }
  7863. }
  7864. int num7 = poseIndex[i];
  7865. for (int k = 0; k < groupList.Count; k++)
  7866. {
  7867. if (poseIndex[i] < (int) groupList[k])
  7868. {
  7869. poseIndex[i] = (int) groupList[k];
  7870. break;
  7871. }
  7872. }
  7873. if (num7 == poseIndex[i] && poseIndex[i] >= (int) groupList[groupList.Count - 1])
  7874. {
  7875. poseIndex[i] = 0;
  7876. }
  7877. if (maidArray[i] && maidArray[i].Visible)
  7878. {
  7879. string[] array = poseArray[poseIndex[i]].Split(new char[] {','});
  7880. isStop[i] = false;
  7881. poseCount[i] = 20;
  7882. Maid maid = maidArray[i];
  7883. if (array[0].Contains("_momi") || array[0].Contains("paizuri_"))
  7884. {
  7885. maid.body0.MuneYureL(0f);
  7886. maid.body0.MuneYureR(0f);
  7887. }
  7888. else
  7889. {
  7890. maid.body0.MuneYureL(1f);
  7891. maid.body0.MuneYureR(1f);
  7892. }
  7893. int num6;
  7894. if (array[0].Contains("MultipleMaidsPose"))
  7895. {
  7896. string path = array[0].Split(new char[] {'/'})[1];
  7897. byte[] array2 = new byte[0];
  7898. try
  7899. {
  7900. using (FileStream fileStream = new FileStream(path, FileMode.Open, FileAccess.Read))
  7901. {
  7902. array2 = new byte[fileStream.Length];
  7903. fileStream.Read(array2, 0, array2.Length);
  7904. }
  7905. }
  7906. catch { }
  7907. if (0 < array2.Length)
  7908. {
  7909. string text = Path.GetFileName(path);
  7910. long num5 = (long) text.GetHashCode();
  7911. maid.body0.CrossFade(num5.ToString(), array2, false, false, false, 0f, 1f);
  7912. Maid.AutoTwist[] array3 = new Maid.AutoTwist[]
  7913. {
  7914. Maid.AutoTwist.ShoulderL, Maid.AutoTwist.ShoulderR, Maid.AutoTwist.WristL,
  7915. Maid.AutoTwist.WristR, Maid.AutoTwist.ThighL, Maid.AutoTwist.ThighR
  7916. };
  7917. for (int m = 0; m < array3.Length; m++)
  7918. {
  7919. maid.SetAutoTwist(array3[m], true);
  7920. }
  7921. }
  7922. }
  7923. else if (array[0].StartsWith("p") && int.TryParse(array[0].Substring(1), out num6))
  7924. {
  7925. loadPose[i] = array[0];
  7926. }
  7927. else if (!array[0].StartsWith("dance_"))
  7928. {
  7929. maidArray[i].CrossFade(array[0] + ".anm", false, true, false, 0f, 1f);
  7930. }
  7931. else
  7932. {
  7933. if (!maidArray[i].body0.m_Bones.GetComponent<Animation>().GetClip(array[0] + ".anm"))
  7934. {
  7935. maidArray[i].body0.LoadAnime(array[0] + ".anm",
  7936. GameUty.FileSystem,
  7937. array[0] + ".anm",
  7938. false,
  7939. false);
  7940. }
  7941. maidArray[i].body0.m_Bones.GetComponent<Animation>().Play(array[0] + ".anm");
  7942. }
  7943. if (array.Length > 1)
  7944. {
  7945. maidArray[i].body0.m_Bones.GetComponent<Animation>()[array[0] + ".anm"].time = float.Parse(array[1]);
  7946. isStop[i] = true;
  7947. if (array.Length > 2)
  7948. {
  7949. Transform transform2 = CMT.SearchObjName(maidArray[i].body0.m_Bones.transform, "Bip01", true);
  7950. isPoseIti[i] = true;
  7951. poseIti[i] = maidArray[i].transform.position;
  7952. maidArray[i].transform.position = new Vector3(100f, 100f, 100f);
  7953. }
  7954. }
  7955. }
  7956. }
  7957. else if (Input.GetKeyDown(KeyCode.N) && this.getModKeyPressing(modKey.Shift) && !isLock[i])
  7958. {
  7959. if (maidArray[1] && maidArray[1].Visible)
  7960. {
  7961. if (maidArray[0].transform.position == maidArray[1].transform.position
  7962. || (maidArray[2] && maidArray[0].transform.position == maidArray[2].transform.position))
  7963. {
  7964. Vector3 vector = Vector3.zero;
  7965. vector.x = 0.6f;
  7966. maidArray[1].SetPos(vector);
  7967. if (maidArray[2] && maidArray[2].Visible)
  7968. {
  7969. vector.x = -0.6f;
  7970. maidArray[2].SetPos(vector);
  7971. }
  7972. if (maidArray[3] && maidArray[3].Visible)
  7973. {
  7974. vector.x = 1.2f;
  7975. maidArray[3].SetPos(vector);
  7976. }
  7977. if (maidArray[4] && maidArray[4].Visible)
  7978. {
  7979. vector.x = -1.2f;
  7980. maidArray[4].SetPos(vector);
  7981. }
  7982. if (maidArray[5] && maidArray[5].Visible)
  7983. {
  7984. vector.x = 1.8f;
  7985. maidArray[5].SetPos(vector);
  7986. }
  7987. if (maidArray[6] && maidArray[6].Visible)
  7988. {
  7989. vector.x = -1.8f;
  7990. maidArray[6].SetPos(vector);
  7991. }
  7992. if (maidArray[7] && maidArray[7].Visible)
  7993. {
  7994. vector.x = 2.4f;
  7995. maidArray[7].SetPos(vector);
  7996. }
  7997. if (maidArray[8] && maidArray[8].Visible)
  7998. {
  7999. vector.x = -2.4f;
  8000. maidArray[8].SetPos(vector);
  8001. }
  8002. if (maidArray[9] && maidArray[9].Visible)
  8003. {
  8004. vector.x = 3f;
  8005. maidArray[9].SetPos(vector);
  8006. }
  8007. if (maidArray[10] && maidArray[10].Visible)
  8008. {
  8009. vector.x = -3f;
  8010. maidArray[10].SetPos(vector);
  8011. }
  8012. if (maidArray[11] && maidArray[11].Visible)
  8013. {
  8014. vector.x = 3.6f;
  8015. maidArray[11].SetPos(vector);
  8016. }
  8017. if (maidArray[12] && maidArray[12].Visible)
  8018. {
  8019. vector.x = -3.6f;
  8020. maidArray[12].SetPos(vector);
  8021. }
  8022. if (maidArray[13] && maidArray[13].Visible)
  8023. {
  8024. vector.x = 4.2f;
  8025. maidArray[13].SetPos(vector);
  8026. }
  8027. }
  8028. }
  8029. poseIndex[i]--;
  8030. if (poseIndex[i] <= -1)
  8031. {
  8032. poseIndex[i] = poseArray.Length - 1;
  8033. }
  8034. if (maidArray[i] && maidArray[i].Visible)
  8035. {
  8036. string[] array = poseArray[poseIndex[i]].Split(new char[] {','});
  8037. isStop[i] = false;
  8038. poseCount[i] = 20;
  8039. Maid maid = maidArray[i];
  8040. if (array[0].Contains("_momi") || array[0].Contains("paizuri_"))
  8041. {
  8042. maid.body0.MuneYureL(0f);
  8043. maid.body0.MuneYureR(0f);
  8044. }
  8045. else
  8046. {
  8047. maid.body0.MuneYureL(1f);
  8048. maid.body0.MuneYureR(1f);
  8049. }
  8050. int num6;
  8051. if (array[0].Contains("MultipleMaidsPose"))
  8052. {
  8053. string path = array[0].Split(new char[] {'/'})[1];
  8054. byte[] array2 = new byte[0];
  8055. try
  8056. {
  8057. using (FileStream fileStream = new FileStream(path, FileMode.Open, FileAccess.Read))
  8058. {
  8059. array2 = new byte[fileStream.Length];
  8060. fileStream.Read(array2, 0, array2.Length);
  8061. }
  8062. }
  8063. catch { }
  8064. if (0 < array2.Length)
  8065. {
  8066. string text = Path.GetFileName(path);
  8067. long num5 = (long) text.GetHashCode();
  8068. maid.body0.CrossFade(num5.ToString(), array2, false, false, false, 0f, 1f);
  8069. Maid.AutoTwist[] array3 = new Maid.AutoTwist[]
  8070. {
  8071. Maid.AutoTwist.ShoulderL, Maid.AutoTwist.ShoulderR, Maid.AutoTwist.WristL,
  8072. Maid.AutoTwist.WristR, Maid.AutoTwist.ThighL, Maid.AutoTwist.ThighR
  8073. };
  8074. for (int m = 0; m < array3.Length; m++)
  8075. {
  8076. maid.SetAutoTwist(array3[m], true);
  8077. }
  8078. }
  8079. }
  8080. else if (array[0].StartsWith("p") && int.TryParse(array[0].Substring(1), out num6))
  8081. {
  8082. loadPose[i] = array[0];
  8083. }
  8084. else if (!array[0].StartsWith("dance_"))
  8085. {
  8086. maidArray[i].CrossFade(array[0] + ".anm", false, true, false, 0f, 1f);
  8087. }
  8088. else
  8089. {
  8090. if (!maidArray[i].body0.m_Bones.GetComponent<Animation>().GetClip(array[0] + ".anm"))
  8091. {
  8092. maidArray[i].body0.LoadAnime(array[0] + ".anm",
  8093. GameUty.FileSystem,
  8094. array[0] + ".anm",
  8095. false,
  8096. false);
  8097. }
  8098. maidArray[i].body0.m_Bones.GetComponent<Animation>().Play(array[0] + ".anm");
  8099. }
  8100. if (array.Length > 1)
  8101. {
  8102. maidArray[i].body0.m_Bones.GetComponent<Animation>()[array[0] + ".anm"].time = float.Parse(array[1]);
  8103. isStop[i] = true;
  8104. if (array.Length > 2)
  8105. {
  8106. Transform transform2 = CMT.SearchObjName(maidArray[i].body0.m_Bones.transform, "Bip01", true);
  8107. isPoseIti[i] = true;
  8108. poseIti[i] = maidArray[i].transform.position;
  8109. maidArray[i].transform.position = new Vector3(100f, 100f, 100f);
  8110. }
  8111. }
  8112. }
  8113. }
  8114. else if (Input.GetKeyDown(KeyCode.N) && !isLock[i])
  8115. {
  8116. if (maidArray[1] && maidArray[1].Visible)
  8117. {
  8118. if (maidArray[0].transform.position == maidArray[1].transform.position
  8119. || (maidArray[2] && maidArray[0].transform.position == maidArray[2].transform.position))
  8120. {
  8121. Vector3 vector = Vector3.zero;
  8122. vector.x = 0.6f;
  8123. maidArray[1].SetPos(vector);
  8124. if (maidArray[2] && maidArray[2].Visible)
  8125. {
  8126. vector.x = -0.6f;
  8127. maidArray[2].SetPos(vector);
  8128. }
  8129. if (maidArray[3] && maidArray[3].Visible)
  8130. {
  8131. vector.x = 1.2f;
  8132. maidArray[3].SetPos(vector);
  8133. }
  8134. if (maidArray[4] && maidArray[4].Visible)
  8135. {
  8136. vector.x = -1.2f;
  8137. maidArray[4].SetPos(vector);
  8138. }
  8139. if (maidArray[5] && maidArray[5].Visible)
  8140. {
  8141. vector.x = 1.8f;
  8142. maidArray[5].SetPos(vector);
  8143. }
  8144. if (maidArray[6] && maidArray[6].Visible)
  8145. {
  8146. vector.x = -1.8f;
  8147. maidArray[6].SetPos(vector);
  8148. }
  8149. if (maidArray[7] && maidArray[7].Visible)
  8150. {
  8151. vector.x = 2.4f;
  8152. maidArray[7].SetPos(vector);
  8153. }
  8154. if (maidArray[8] && maidArray[8].Visible)
  8155. {
  8156. vector.x = -2.4f;
  8157. maidArray[8].SetPos(vector);
  8158. }
  8159. if (maidArray[9] && maidArray[9].Visible)
  8160. {
  8161. vector.x = 3f;
  8162. maidArray[9].SetPos(vector);
  8163. }
  8164. if (maidArray[10] && maidArray[10].Visible)
  8165. {
  8166. vector.x = -3f;
  8167. maidArray[10].SetPos(vector);
  8168. }
  8169. if (maidArray[11] && maidArray[11].Visible)
  8170. {
  8171. vector.x = 3.6f;
  8172. maidArray[11].SetPos(vector);
  8173. }
  8174. if (maidArray[12] && maidArray[12].Visible)
  8175. {
  8176. vector.x = -3.6f;
  8177. maidArray[12].SetPos(vector);
  8178. }
  8179. if (maidArray[13] && maidArray[13].Visible)
  8180. {
  8181. vector.x = 4.2f;
  8182. maidArray[13].SetPos(vector);
  8183. }
  8184. }
  8185. }
  8186. poseIndex[i]++;
  8187. if (poseIndex[i] == poseArray.Length)
  8188. {
  8189. poseIndex[i] = 0;
  8190. }
  8191. if (maidArray[i] && maidArray[i].Visible)
  8192. {
  8193. string[] array = poseArray[poseIndex[i]].Split(new char[] {','});
  8194. isStop[i] = false;
  8195. poseCount[i] = 20;
  8196. Maid maid = maidArray[i];
  8197. if (array[0].Contains("_momi") || array[0].Contains("paizuri_"))
  8198. {
  8199. maid.body0.MuneYureL(0f);
  8200. maid.body0.MuneYureR(0f);
  8201. }
  8202. else
  8203. {
  8204. maid.body0.MuneYureL(1f);
  8205. maid.body0.MuneYureR(1f);
  8206. }
  8207. int num6;
  8208. if (array[0].Contains("MultipleMaidsPose"))
  8209. {
  8210. string path = array[0].Split(new char[] {'/'})[1];
  8211. byte[] array2 = new byte[0];
  8212. try
  8213. {
  8214. using (FileStream fileStream = new FileStream(path, FileMode.Open, FileAccess.Read))
  8215. {
  8216. array2 = new byte[fileStream.Length];
  8217. fileStream.Read(array2, 0, array2.Length);
  8218. }
  8219. }
  8220. catch { }
  8221. if (0 < array2.Length)
  8222. {
  8223. string text = Path.GetFileName(path);
  8224. long num5 = (long) text.GetHashCode();
  8225. maid.body0.CrossFade(num5.ToString(), array2, false, false, false, 0f, 1f);
  8226. Maid.AutoTwist[] array3 = new Maid.AutoTwist[]
  8227. {
  8228. Maid.AutoTwist.ShoulderL, Maid.AutoTwist.ShoulderR, Maid.AutoTwist.WristL,
  8229. Maid.AutoTwist.WristR, Maid.AutoTwist.ThighL, Maid.AutoTwist.ThighR
  8230. };
  8231. for (int m = 0; m < array3.Length; m++)
  8232. {
  8233. maid.SetAutoTwist(array3[m], true);
  8234. }
  8235. }
  8236. }
  8237. else if (array[0].StartsWith("p") && int.TryParse(array[0].Substring(1), out num6))
  8238. {
  8239. loadPose[i] = array[0];
  8240. }
  8241. else if (!array[0].StartsWith("dance_"))
  8242. {
  8243. maidArray[i].CrossFade(array[0] + ".anm", false, true, false, 0f, 1f);
  8244. }
  8245. else
  8246. {
  8247. if (!maidArray[i].body0.m_Bones.GetComponent<Animation>().GetClip(array[0] + ".anm"))
  8248. {
  8249. maidArray[i].body0.LoadAnime(array[0] + ".anm",
  8250. GameUty.FileSystem,
  8251. array[0] + ".anm",
  8252. false,
  8253. false);
  8254. }
  8255. maidArray[i].body0.m_Bones.GetComponent<Animation>().Play(array[0] + ".anm");
  8256. }
  8257. if (array.Length > 1)
  8258. {
  8259. maidArray[i].body0.m_Bones.GetComponent<Animation>()[array[0] + ".anm"].time = float.Parse(array[1]);
  8260. isStop[i] = true;
  8261. if (array.Length > 2)
  8262. {
  8263. Transform transform2 = CMT.SearchObjName(maidArray[i].body0.m_Bones.transform, "Bip01", true);
  8264. isPoseIti[i] = true;
  8265. poseIti[i] = maidArray[i].transform.position;
  8266. maidArray[i].transform.position = new Vector3(100f, 100f, 100f);
  8267. }
  8268. }
  8269. }
  8270. }
  8271. }
  8272. }
  8273. if (isDanceChu)
  8274. {
  8275. int j = 0;
  8276. while (j < maidCnt)
  8277. {
  8278. if (maidArray[j] && maidArray[j].Visible)
  8279. {
  8280. string text2 = danceName[j];
  8281. float num = 0f;
  8282. if (text2 == "dance_cmo_002_sd_f1.anm" || text2 == "dance_cmo_002_sd_f2.anm"
  8283. || text2 == "dance_cm3d_004_kano_f1.anm")
  8284. {
  8285. num = 0.166666f;
  8286. }
  8287. if (text2 == "dance_cm3d21_kara_001_nmf_f1.anm")
  8288. {
  8289. num = -0.35f;
  8290. }
  8291. if (text2 != null)
  8292. {
  8293. if (danceCount > 0)
  8294. {
  8295. danceCount--;
  8296. maidArray[j].body0.m_Bones.GetComponent<Animation>()[text2].time = audioSourceBgm.time - 0.03333f - num;
  8297. }
  8298. if (maidArray[j].body0.m_Bones.GetComponent<Animation>()[text2].time + num < audioSourceBgm.time - 0.1f)
  8299. {
  8300. danceCount = 20;
  8301. }
  8302. }
  8303. }
  8304. IL_1C205:
  8305. j++;
  8306. continue;
  8307. goto IL_1C205;
  8308. }
  8309. }
  8310. if (isDanceStart1)
  8311. {
  8312. for (int j = 0; j < maidCnt; j++)
  8313. {
  8314. if (maidArray[j] && maidArray[j].Visible)
  8315. {
  8316. maidArray[j].CrossFade(poseArray[0] + ".anm", false, true, false, 0f, 1f);
  8317. if (!isShift)
  8318. {
  8319. if (j == 0)
  8320. {
  8321. maidArray[j].body0.m_Bones.GetComponent<Animation>().Play("dance_cm3d2_001_f1.anm");
  8322. maidArray[j].body0.m_Bones.GetComponent<Animation>()["dance_cm3d2_001_f1.anm"].time = 0f;
  8323. danceName[j] = "dance_cm3d2_001_f1.anm";
  8324. }
  8325. else if (j == 1 || j == 3 || j == 5 || j == 7 || j == 9 || j == 11 || j == 13)
  8326. {
  8327. maidArray[j].body0.m_Bones.GetComponent<Animation>().Play("dance_cm3d2_001_f2.anm");
  8328. maidArray[j].body0.m_Bones.GetComponent<Animation>()["dance_cm3d2_001_f2.anm"].time = 0f;
  8329. danceName[j] = "dance_cm3d2_001_f2.anm";
  8330. }
  8331. else
  8332. {
  8333. maidArray[j].body0.m_Bones.GetComponent<Animation>().Play("dance_cm3d2_001_f3.anm");
  8334. maidArray[j].body0.m_Bones.GetComponent<Animation>()["dance_cm3d2_001_f3.anm"].time = 0f;
  8335. danceName[j] = "dance_cm3d2_001_f3.anm";
  8336. }
  8337. }
  8338. else
  8339. {
  8340. maidArray[j].body0.m_Bones.GetComponent<Animation>().Play("dance_cm3d2_kara_003_ddfl_f1.anm");
  8341. maidArray[j].body0.m_Bones.GetComponent<Animation>()["dance_cm3d2_kara_003_ddfl_f1.anm"].time = 0f;
  8342. danceName[j] = "dance_cm3d2_kara_003_ddfl_f1.anm";
  8343. }
  8344. }
  8345. }
  8346. isDanceStart1 = false;
  8347. isDanceStart1F = true;
  8348. isShift = false;
  8349. }
  8350. if (isDanceStart2)
  8351. {
  8352. for (int j = 0; j < maidCnt; j++)
  8353. {
  8354. if (maidArray[j] && maidArray[j].Visible)
  8355. {
  8356. maidArray[j].CrossFade(poseArray[0] + ".anm", false, true, false, 0f, 1f);
  8357. maidArray[j].body0.m_Bones.GetComponent<Animation>().Play("dance_cm3d_001_f1.anm");
  8358. maidArray[j].body0.m_Bones.GetComponent<Animation>()["dance_cm3d_001_f1.anm"].time = 0f;
  8359. danceName[j] = "dance_cm3d_001_f1.anm";
  8360. }
  8361. }
  8362. isDanceStart2 = false;
  8363. isDanceStart2F = true;
  8364. }
  8365. if (isDanceStart3)
  8366. {
  8367. for (int j = 0; j < maidCnt; j++)
  8368. {
  8369. if (maidArray[j] && maidArray[j].Visible)
  8370. {
  8371. maidArray[j].CrossFade(poseArray[0] + ".anm", false, true, false, 0f, 1f);
  8372. if (!isShift)
  8373. {
  8374. maidArray[j].body0.m_Bones.GetComponent<Animation>().Play("dance_cm3d_002_end_f1.anm");
  8375. maidArray[j].body0.m_Bones.GetComponent<Animation>()["dance_cm3d_002_end_f1.anm"].time = 0f;
  8376. danceName[j] = "dance_cm3d_002_end_f1.anm";
  8377. }
  8378. else
  8379. {
  8380. maidArray[j].body0.m_Bones.GetComponent<Animation>().Play("dance_cm3d2_kara_001_sl_f1.anm");
  8381. maidArray[j].body0.m_Bones.GetComponent<Animation>()["dance_cm3d2_kara_001_sl_f1.anm"].time = 0f;
  8382. danceName[j] = "dance_cm3d2_kara_001_sl_f1.anm";
  8383. }
  8384. }
  8385. }
  8386. isDanceStart3 = false;
  8387. isDanceStart3F = true;
  8388. isShift = false;
  8389. }
  8390. if (isDanceStart4)
  8391. {
  8392. for (int j = 0; j < maidCnt; j++)
  8393. {
  8394. if (maidArray[j] && maidArray[j].Visible)
  8395. {
  8396. maidArray[j].CrossFade(poseArray[0] + ".anm", false, true, false, 0f, 1f);
  8397. if (!isShift)
  8398. {
  8399. maidArray[j].body0.m_Bones.GetComponent<Animation>().Play("dance_cm3d2_002_smt_f.anm");
  8400. maidArray[j].body0.m_Bones.GetComponent<Animation>()["dance_cm3d2_002_smt_f.anm"].time = 0f;
  8401. danceName[j] = "dance_cm3d2_002_smt_f.anm";
  8402. }
  8403. else
  8404. {
  8405. maidArray[j].body0.m_Bones.GetComponent<Animation>().Play("dance_cm3d2_kara02_001_smt_f1.anm");
  8406. maidArray[j].body0.m_Bones.GetComponent<Animation>()["dance_cm3d2_kara02_001_smt_f1.anm"].time = 0f;
  8407. danceName[j] = "dance_cm3d2_kara02_001_smt_f1.anm";
  8408. }
  8409. }
  8410. }
  8411. isDanceStart4 = false;
  8412. isDanceStart4F = true;
  8413. isShift = false;
  8414. }
  8415. if (isDanceStart5)
  8416. {
  8417. for (int j = 0; j < maidCnt; j++)
  8418. {
  8419. if (maidArray[j] && maidArray[j].Visible)
  8420. {
  8421. maidArray[j].CrossFade(poseArray[0] + ".anm", false, true, false, 0f, 1f);
  8422. if (!isShift)
  8423. {
  8424. maidArray[j].body0.m_Bones.GetComponent<Animation>().Play("dance_cm3d_003_sp2_f1.anm");
  8425. maidArray[j].body0.m_Bones.GetComponent<Animation>()["dance_cm3d_003_sp2_f1.anm"].time = 0f;
  8426. danceName[j] = "dance_cm3d_003_sp2_f1.anm";
  8427. }
  8428. else
  8429. {
  8430. maidArray[j].body0.m_Bones.GetComponent<Animation>().Play("dance_cm3d2_kara02_002_rty_f1.anm");
  8431. maidArray[j].body0.m_Bones.GetComponent<Animation>()["dance_cm3d2_kara02_002_rty_f1.anm"].time = 0f;
  8432. danceName[j] = "dance_cm3d2_kara02_002_rty_f1.anm";
  8433. }
  8434. }
  8435. }
  8436. isDanceStart5 = false;
  8437. isDanceStart5F = true;
  8438. isShift = false;
  8439. }
  8440. if (isDanceStart6)
  8441. {
  8442. for (int j = 0; j < maidCnt; j++)
  8443. {
  8444. if (maidArray[j] && maidArray[j].Visible)
  8445. {
  8446. maidArray[j].CrossFade(poseArray[0] + ".anm", false, true, false, 0f, 1f);
  8447. if (!isShift)
  8448. {
  8449. maidArray[j].body0.m_Bones.GetComponent<Animation>().Play("dance_cm3d2_003_hs_f1.anm");
  8450. maidArray[j].body0.m_Bones.GetComponent<Animation>()["dance_cm3d2_003_hs_f1.anm"].time = 0f;
  8451. danceName[j] = "dance_cm3d2_003_hs_f1.anm";
  8452. }
  8453. else
  8454. {
  8455. maidArray[j].body0.m_Bones.GetComponent<Animation>().Play("dance_cm3d2_kara02_003_hs_f1.anm");
  8456. maidArray[j].body0.m_Bones.GetComponent<Animation>()["dance_cm3d2_kara02_003_hs_f1.anm"].time = 0f;
  8457. danceName[j] = "dance_cm3d2_kara02_003_hs_f1.anm";
  8458. }
  8459. }
  8460. }
  8461. isDanceStart6 = false;
  8462. isDanceStart6F = true;
  8463. isShift = false;
  8464. }
  8465. if (isDanceStart7)
  8466. {
  8467. for (int j = 0; j < maidCnt; j++)
  8468. {
  8469. if (maidArray[j] && maidArray[j].Visible)
  8470. {
  8471. maidArray[j].CrossFade(poseArray[0] + ".anm", false, true, false, 0f, 1f);
  8472. if (j == 1 || j == 3 || j == 5 || j == 7 || j == 9 || j == 11 || j == 13)
  8473. {
  8474. maidArray[j].body0.m_Bones.GetComponent<Animation>().Play("dance_cm3d2_003_hs_f2.anm");
  8475. maidArray[j].body0.m_Bones.GetComponent<Animation>()["dance_cm3d2_003_hs_f2.anm"].time = 0f;
  8476. danceName[j] = "dance_cm3d2_003_hs_f2.anm";
  8477. }
  8478. else
  8479. {
  8480. maidArray[j].body0.m_Bones.GetComponent<Animation>().Play("dance_cm3d2_003_hs_f1.anm");
  8481. maidArray[j].body0.m_Bones.GetComponent<Animation>()["dance_cm3d2_003_hs_f1.anm"].time = 0f;
  8482. danceName[j] = "dance_cm3d2_003_hs_f1.anm";
  8483. }
  8484. }
  8485. }
  8486. isDanceStart7 = false;
  8487. isDanceStart7V = true;
  8488. isDanceStart7F = true;
  8489. }
  8490. if (isDanceStart8)
  8491. {
  8492. for (int j = 0; j < maidCnt; j++)
  8493. {
  8494. if (maidArray[j] && maidArray[j].Visible)
  8495. {
  8496. maidArray[j].CrossFade(poseArray[0] + ".anm", false, true, false, 0f, 1f);
  8497. if (j == 0 || j == 4 || j == 8 || j == 12)
  8498. {
  8499. maidArray[j].body0.m_Bones.GetComponent<Animation>().Play("dance_cm3d2_003_hs_f1.anm");
  8500. maidArray[j].body0.m_Bones.GetComponent<Animation>()["dance_cm3d2_003_hs_f1.anm"].time = 0f;
  8501. danceName[j] = "dance_cm3d2_003_hs_f1.anm";
  8502. }
  8503. else if (j == 1 || j == 5 || j == 9 || j == 13)
  8504. {
  8505. maidArray[j].body0.m_Bones.GetComponent<Animation>().Play("dance_cm3d2_003_hs_f2.anm");
  8506. maidArray[j].body0.m_Bones.GetComponent<Animation>()["dance_cm3d2_003_hs_f2.anm"].time = 0f;
  8507. danceName[j] = "dance_cm3d2_003_hs_f2.anm";
  8508. }
  8509. else if (j == 2 || j == 6 || j == 10)
  8510. {
  8511. maidArray[j].body0.m_Bones.GetComponent<Animation>().Play("dance_cm3d2_003_hs_f3.anm");
  8512. maidArray[j].body0.m_Bones.GetComponent<Animation>()["dance_cm3d2_003_hs_f3.anm"].time = 0f;
  8513. danceName[j] = "dance_cm3d2_003_hs_f3.anm";
  8514. }
  8515. else
  8516. {
  8517. maidArray[j].body0.m_Bones.GetComponent<Animation>().Play("dance_cm3d2_003_hs_f4.anm");
  8518. maidArray[j].body0.m_Bones.GetComponent<Animation>()["dance_cm3d2_003_hs_f4.anm"].time = 0f;
  8519. danceName[j] = "dance_cm3d2_003_hs_f4.anm";
  8520. }
  8521. }
  8522. }
  8523. isDanceStart8 = false;
  8524. isDanceStart8V = true;
  8525. isDanceStart8F = true;
  8526. }
  8527. if (isDanceStart9)
  8528. {
  8529. isDanceStart9Count++;
  8530. if (isShift)
  8531. {
  8532. for (int j = 0; j < maidCnt; j++)
  8533. {
  8534. if (maidArray[j] && maidArray[j].Visible)
  8535. {
  8536. maidArray[j].CrossFade(poseArray[0] + ".anm", false, true, false, 0f, 1f);
  8537. maidArray[j].body0.m_Bones.GetComponent<Animation>().Play("dance_cm3d2_kara_002_cktc_f1.anm");
  8538. maidArray[j].body0.m_Bones.GetComponent<Animation>()["dance_cm3d2_kara_002_cktc_f1.anm"].time = 0f;
  8539. danceName[j] = "dance_cm3d2_kara_002_cktc_f1.anm";
  8540. }
  8541. }
  8542. isDanceStart9 = false;
  8543. isDanceStart9F = true;
  8544. isDanceStart9Count = 0;
  8545. isShift = false;
  8546. }
  8547. if (isDanceStart9Count == 10)
  8548. {
  8549. for (int j = 0; j < maidCnt; j++)
  8550. {
  8551. if (maidArray[j] && maidArray[j].Visible)
  8552. {
  8553. maidArray[j].CrossFade(poseArray[0] + ".anm", false, true, false, 0f, 1f);
  8554. maidArray[j].body0.m_Bones.GetComponent<Animation>().Play("dance_cm3d_004_kano_f1.anm");
  8555. maidArray[j].body0.m_Bones.GetComponent<Animation>()["dance_cm3d_004_kano_f1.anm"].time = 0f;
  8556. danceName[j] = "dance_cm3d_004_kano_f1.anm";
  8557. }
  8558. }
  8559. isDanceStart9 = false;
  8560. isDanceStart9F = true;
  8561. isDanceStart9Count = 0;
  8562. }
  8563. }
  8564. if (isDanceStart10)
  8565. {
  8566. for (int j = 0; j < maidCnt; j++)
  8567. {
  8568. if (maidArray[j] && maidArray[j].Visible)
  8569. {
  8570. maidArray[j].CrossFade(poseArray[0] + ".anm", false, true, false, 0f, 1f);
  8571. maidArray[j].body0.m_Bones.GetComponent<Animation>().Play("dance_cm3d2_004_sse_f1.anm");
  8572. maidArray[j].body0.m_Bones.GetComponent<Animation>()["dance_cm3d2_004_sse_f1.anm"].time = 0f;
  8573. danceName[j] = "dance_cm3d2_004_sse_f1.anm";
  8574. }
  8575. }
  8576. isDanceStart10 = false;
  8577. isDanceStart10F = true;
  8578. }
  8579. if (isDanceStart11)
  8580. {
  8581. for (int j = 0; j < maidCnt; j++)
  8582. {
  8583. if (maidArray[j] && maidArray[j].Visible)
  8584. {
  8585. maidArray[j].CrossFade(poseArray[0] + ".anm", false, true, false, 0f, 1f);
  8586. if (j == 1 || j == 4 || j == 7 || j == 10 || j == 13)
  8587. {
  8588. maidArray[j].body0.m_Bones.GetComponent<Animation>().Play(nameA + danceNo2 + ".anm");
  8589. maidArray[j].body0.m_Bones.GetComponent<Animation>()[nameA + danceNo2 + ".anm"].time = 0f;
  8590. danceName[j] = nameA + danceNo2 + ".anm";
  8591. }
  8592. else if (j == 2 || j == 5 || j == 8 || j == 11)
  8593. {
  8594. maidArray[j].body0.m_Bones.GetComponent<Animation>().Play(nameA + danceNo3 + ".anm");
  8595. maidArray[j].body0.m_Bones.GetComponent<Animation>()[nameA + danceNo3 + ".anm"].time = 0f;
  8596. danceName[j] = nameA + danceNo3 + ".anm";
  8597. }
  8598. else
  8599. {
  8600. maidArray[j].body0.m_Bones.GetComponent<Animation>().Play(nameA + danceNo1 + ".anm");
  8601. maidArray[j].body0.m_Bones.GetComponent<Animation>()[nameA + danceNo1 + ".anm"].time = 0f;
  8602. danceName[j] = nameA + danceNo1 + ".anm";
  8603. }
  8604. }
  8605. }
  8606. isDanceStart11 = false;
  8607. isDanceStart11V = true;
  8608. isDanceStart11F = true;
  8609. }
  8610. if (isDanceStart12)
  8611. {
  8612. for (int j = 0; j < maidCnt; j++)
  8613. {
  8614. if (maidArray[j] && maidArray[j].Visible)
  8615. {
  8616. maidArray[j].CrossFade(poseArray[0] + ".anm", false, true, false, 0f, 1f);
  8617. maidArray[j].body0.m_Bones.GetComponent<Animation>().Play("dance_cm3d2_005_khg_f.anm");
  8618. maidArray[j].body0.m_Bones.GetComponent<Animation>()["dance_cm3d2_005_khg_f.anm"].time = 0f;
  8619. danceName[j] = "dance_cm3d2_005_khg_f.anm";
  8620. }
  8621. }
  8622. isDanceStart12 = false;
  8623. isDanceStart12F = true;
  8624. }
  8625. if (isDanceStart13)
  8626. {
  8627. for (int j = 0; j < maidCnt; j++)
  8628. {
  8629. if (maidArray[j] && maidArray[j].Visible)
  8630. {
  8631. maidArray[j].CrossFade(poseArray[0] + ".anm", false, true, false, 0f, 1f);
  8632. if (!isShift)
  8633. {
  8634. maidArray[j].body0.m_Bones.GetComponent<Animation>().Play("dance_cm3d2_006_ssn_f1.anm");
  8635. maidArray[j].body0.m_Bones.GetComponent<Animation>()["dance_cm3d2_006_ssn_f1.anm"].time = 0f;
  8636. danceName[j] = "dance_cm3d2_006_ssn_f1.anm";
  8637. }
  8638. else
  8639. {
  8640. maidArray[j].body0.m_Bones.GetComponent<Animation>().Play("dance_cm3d21_kara_001_nmf_f1.anm");
  8641. maidArray[j].body0.m_Bones.GetComponent<Animation>()["dance_cm3d21_kara_001_nmf_f1.anm"].time = 0f;
  8642. danceName[j] = "dance_cm3d21_kara_001_nmf_f1.anm";
  8643. }
  8644. }
  8645. }
  8646. isDanceStart13 = false;
  8647. isDanceStart13F = true;
  8648. isShift = false;
  8649. }
  8650. if (isDanceStart14)
  8651. {
  8652. for (int j = 0; j < maidCnt; j++)
  8653. {
  8654. if (maidArray[j] && maidArray[j].Visible)
  8655. {
  8656. maidArray[j].CrossFade(poseArray[0] + ".anm", false, true, false, 0f, 1f);
  8657. if (j == 1 || j == 4 || j == 7 || j == 10 || j == 13)
  8658. {
  8659. maidArray[j].body0.m_Bones.GetComponent<Animation>().Play("dance_cm3d2_006_ssn_f2.anm");
  8660. maidArray[j].body0.m_Bones.GetComponent<Animation>()["dance_cm3d2_006_ssn_f2.anm"].time = 0f;
  8661. danceName[j] = "dance_cm3d2_006_ssn_f2.anm";
  8662. }
  8663. else if (j == 2 || j == 5 || j == 8 || j == 11)
  8664. {
  8665. maidArray[j].body0.m_Bones.GetComponent<Animation>().Play("dance_cm3d2_006_ssn_f3.anm");
  8666. maidArray[j].body0.m_Bones.GetComponent<Animation>()["dance_cm3d2_006_ssn_f3.anm"].time = 0f;
  8667. danceName[j] = "dance_cm3d2_006_ssn_f3.anm";
  8668. }
  8669. else
  8670. {
  8671. maidArray[j].body0.m_Bones.GetComponent<Animation>().Play("dance_cm3d2_006_ssn_f1.anm");
  8672. maidArray[j].body0.m_Bones.GetComponent<Animation>()["dance_cm3d2_006_ssn_f1.anm"].time = 0f;
  8673. danceName[j] = "dance_cm3d2_006_ssn_f1.anm";
  8674. }
  8675. }
  8676. }
  8677. isDanceStart14 = false;
  8678. isDanceStart14V = true;
  8679. isDanceStart14F = true;
  8680. }
  8681. if (isDanceStart15)
  8682. {
  8683. isDanceStart15Count++;
  8684. }
  8685. if (isDanceStart15Count == 10)
  8686. {
  8687. for (int j = 0; j < maidCnt; j++)
  8688. {
  8689. if (maidArray[j] && maidArray[j].Visible)
  8690. {
  8691. maidArray[j].CrossFade(poseArray[0] + ".anm", false, true, false, 0f, 1f);
  8692. if (j == 1 || j == 3 || j == 5 || j == 7 || j == 9 || j == 11 || j == 13)
  8693. {
  8694. maidArray[j].body0.m_Bones.GetComponent<Animation>().Play("dance_cmo_002_sd_f2.anm");
  8695. maidArray[j].body0.m_Bones.GetComponent<Animation>()["dance_cmo_002_sd_f2.anm"].time = 0f;
  8696. danceName[j] = "dance_cmo_002_sd_f2.anm";
  8697. }
  8698. else
  8699. {
  8700. maidArray[j].body0.m_Bones.GetComponent<Animation>().Play("dance_cmo_002_sd_f1.anm");
  8701. maidArray[j].body0.m_Bones.GetComponent<Animation>()["dance_cmo_002_sd_f1.anm"].time = 0f;
  8702. danceName[j] = "dance_cmo_002_sd_f1.anm";
  8703. }
  8704. }
  8705. }
  8706. isDanceStart15 = false;
  8707. isDanceStart15V = true;
  8708. isDanceStart15F = true;
  8709. isDanceStart15Count = 0;
  8710. }
  8711. if (isDance)
  8712. {
  8713. for (int j = 0; j < maidCnt; j++)
  8714. {
  8715. if (maidArray[j].Visible)
  8716. {
  8717. if (isDanceStart1F)
  8718. {
  8719. if (isDanceStart1K)
  8720. {
  8721. foreach (string text3 in dance1KArray)
  8722. {
  8723. string[] array = text3.Split(new char[] {','});
  8724. float num10 = float.Parse(array[0]);
  8725. if (danceFace[j] < num10 && num10 < audioSourceBgm.time)
  8726. {
  8727. danceFace[j] = num10;
  8728. FaceName[j] = FaceName2[j];
  8729. FaceName2[j] = array[1];
  8730. FaceName3[j] = array[2];
  8731. FaceTime[j] = 0.0166666675f;
  8732. break;
  8733. }
  8734. }
  8735. }
  8736. else if (j == 0)
  8737. {
  8738. foreach (string text3 in dance1Array)
  8739. {
  8740. string[] array = text3.Split(new char[] {','});
  8741. float num10 = float.Parse(array[0]);
  8742. if (danceFace[j] < num10 && num10 < audioSourceBgm.time)
  8743. {
  8744. danceFace[j] = num10;
  8745. FaceName[j] = FaceName2[j];
  8746. FaceName2[j] = array[1];
  8747. FaceName3[j] = array[2];
  8748. FaceTime[j] = 0.0166666675f;
  8749. break;
  8750. }
  8751. }
  8752. }
  8753. else if (j == 1 || j == 3 || j == 5 || j == 7 || j == 9 || j == 11 || j == 13)
  8754. {
  8755. foreach (string text3 in dance1BArray)
  8756. {
  8757. string[] array = text3.Split(new char[] {','});
  8758. float num10 = float.Parse(array[0]);
  8759. if (danceFace[j] < num10 && num10 < audioSourceBgm.time)
  8760. {
  8761. danceFace[j] = num10;
  8762. FaceName[j] = FaceName2[j];
  8763. FaceName2[j] = array[1];
  8764. FaceName3[j] = array[2];
  8765. FaceTime[j] = 0.0166666675f;
  8766. break;
  8767. }
  8768. }
  8769. }
  8770. else
  8771. {
  8772. foreach (string text3 in dance1CArray)
  8773. {
  8774. string[] array = text3.Split(new char[] {','});
  8775. float num10 = float.Parse(array[0]);
  8776. if (danceFace[j] < num10 && num10 < audioSourceBgm.time)
  8777. {
  8778. danceFace[j] = num10;
  8779. FaceName[j] = FaceName2[j];
  8780. FaceName2[j] = array[1];
  8781. FaceName3[j] = array[2];
  8782. FaceTime[j] = 0.0166666675f;
  8783. break;
  8784. }
  8785. }
  8786. }
  8787. }
  8788. if (isDanceStart2F)
  8789. {
  8790. foreach (string text3 in dance2Array)
  8791. {
  8792. string[] array = text3.Split(new char[] {','});
  8793. float num10 = float.Parse(array[0]);
  8794. if (danceFace[j] < num10 && num10 < audioSourceBgm.time)
  8795. {
  8796. danceFace[j] = num10;
  8797. FaceName[j] = FaceName2[j];
  8798. FaceName2[j] = array[1];
  8799. FaceName3[j] = array[2];
  8800. FaceTime[j] = 0.0166666675f;
  8801. break;
  8802. }
  8803. }
  8804. }
  8805. if (isDanceStart3F)
  8806. {
  8807. if (isDanceStart3K)
  8808. {
  8809. foreach (string text3 in dance3KArray)
  8810. {
  8811. string[] array = text3.Split(new char[] {','});
  8812. float num10 = float.Parse(array[0]);
  8813. if (danceFace[j] < num10 && num10 < audioSourceBgm.time)
  8814. {
  8815. danceFace[j] = num10;
  8816. FaceName[j] = FaceName2[j];
  8817. FaceName2[j] = array[1];
  8818. FaceName3[j] = array[2];
  8819. FaceTime[j] = 0.0166666675f;
  8820. break;
  8821. }
  8822. }
  8823. }
  8824. else
  8825. {
  8826. foreach (string text3 in dance3Array)
  8827. {
  8828. string[] array = text3.Split(new char[] {','});
  8829. float num10 = float.Parse(array[0]);
  8830. if (danceFace[j] < num10 && num10 < audioSourceBgm.time)
  8831. {
  8832. danceFace[j] = num10;
  8833. FaceName[j] = FaceName2[j];
  8834. FaceName2[j] = array[1];
  8835. FaceName3[j] = array[2];
  8836. FaceTime[j] = 0.0166666675f;
  8837. break;
  8838. }
  8839. }
  8840. }
  8841. }
  8842. if (isDanceStart4F)
  8843. {
  8844. if (isDanceStart4K)
  8845. {
  8846. foreach (string text3 in dance4KArray)
  8847. {
  8848. string[] array = text3.Split(new char[] {','});
  8849. float num10 = float.Parse(array[0]);
  8850. if (danceFace[j] < num10 && num10 < audioSourceBgm.time)
  8851. {
  8852. danceFace[j] = num10;
  8853. FaceName[j] = FaceName2[j];
  8854. FaceName2[j] = array[1];
  8855. FaceName3[j] = array[2];
  8856. FaceTime[j] = 0.0166666675f;
  8857. break;
  8858. }
  8859. }
  8860. }
  8861. else
  8862. {
  8863. foreach (string text3 in dance4Array)
  8864. {
  8865. string[] array = text3.Split(new char[] {','});
  8866. float num10 = float.Parse(array[0]);
  8867. if (danceFace[j] < num10 && num10 < audioSourceBgm.time)
  8868. {
  8869. danceFace[j] = num10;
  8870. FaceName[j] = FaceName2[j];
  8871. FaceName2[j] = array[1];
  8872. FaceName3[j] = array[2];
  8873. FaceTime[j] = 0.0166666675f;
  8874. break;
  8875. }
  8876. }
  8877. }
  8878. }
  8879. if (isDanceStart5F)
  8880. {
  8881. if (isDanceStart5K)
  8882. {
  8883. foreach (string text3 in dance5KArray)
  8884. {
  8885. string[] array = text3.Split(new char[] {','});
  8886. float num10 = float.Parse(array[0]);
  8887. if (danceFace[j] < num10 && num10 < audioSourceBgm.time)
  8888. {
  8889. danceFace[j] = num10;
  8890. FaceName[j] = FaceName2[j];
  8891. FaceName2[j] = array[1];
  8892. FaceName3[j] = array[2];
  8893. FaceTime[j] = 0.0166666675f;
  8894. break;
  8895. }
  8896. }
  8897. }
  8898. else
  8899. {
  8900. foreach (string text3 in dance5Array)
  8901. {
  8902. string[] array = text3.Split(new char[] {','});
  8903. float num10 = float.Parse(array[0]);
  8904. if (danceFace[j] < num10 && num10 < audioSourceBgm.time)
  8905. {
  8906. danceFace[j] = num10;
  8907. FaceName[j] = FaceName2[j];
  8908. FaceName2[j] = array[1];
  8909. FaceName3[j] = array[2];
  8910. FaceTime[j] = 0.0166666675f;
  8911. break;
  8912. }
  8913. }
  8914. }
  8915. }
  8916. if (isDanceStart6F)
  8917. {
  8918. if (isDanceStart6K)
  8919. {
  8920. foreach (string text3 in dance6KArray)
  8921. {
  8922. string[] array = text3.Split(new char[] {','});
  8923. float num10 = float.Parse(array[0]);
  8924. if (danceFace[j] < num10 && num10 < audioSourceBgm.time)
  8925. {
  8926. danceFace[j] = num10;
  8927. FaceName[j] = FaceName2[j];
  8928. FaceName2[j] = array[1];
  8929. FaceName3[j] = array[2];
  8930. FaceTime[j] = 0.0166666675f;
  8931. break;
  8932. }
  8933. }
  8934. }
  8935. else
  8936. {
  8937. foreach (string text3 in dance6Array)
  8938. {
  8939. string[] array = text3.Split(new char[] {','});
  8940. float num10 = float.Parse(array[0]);
  8941. if (danceFace[j] < num10 && num10 < audioSourceBgm.time)
  8942. {
  8943. danceFace[j] = num10;
  8944. FaceName[j] = FaceName2[j];
  8945. FaceName2[j] = array[1];
  8946. FaceName3[j] = array[2];
  8947. FaceTime[j] = 0.0166666675f;
  8948. break;
  8949. }
  8950. }
  8951. }
  8952. }
  8953. if (isDanceStart7F)
  8954. {
  8955. if (j == 1 || j == 3 || j == 5 || j == 7 || j == 9 || j == 11 || j == 13)
  8956. {
  8957. foreach (string text3 in dance6BArray)
  8958. {
  8959. string[] array = text3.Split(new char[] {','});
  8960. float num10 = float.Parse(array[0]);
  8961. if (danceFace[j] < num10 && num10 < audioSourceBgm.time)
  8962. {
  8963. danceFace[j] = num10;
  8964. FaceName[j] = FaceName2[j];
  8965. FaceName2[j] = array[1];
  8966. FaceName3[j] = array[2];
  8967. FaceTime[j] = 0.0166666675f;
  8968. break;
  8969. }
  8970. }
  8971. }
  8972. else
  8973. {
  8974. foreach (string text3 in dance6Array)
  8975. {
  8976. string[] array = text3.Split(new char[] {','});
  8977. float num10 = float.Parse(array[0]);
  8978. if (danceFace[j] < num10 && num10 < audioSourceBgm.time)
  8979. {
  8980. danceFace[j] = num10;
  8981. FaceName[j] = FaceName2[j];
  8982. FaceName2[j] = array[1];
  8983. FaceName3[j] = array[2];
  8984. FaceTime[j] = 0.0166666675f;
  8985. break;
  8986. }
  8987. }
  8988. }
  8989. }
  8990. if (isDanceStart7V && (j == 1 || j == 3 || j == 5 || j == 7 || j == 9 || j == 11 || j == 13))
  8991. {
  8992. if (audioSourceBgm.time > 42f && audioSourceBgm.time < 43f)
  8993. {
  8994. maidArray[j].SetPos(maidArray[j - 1].transform.position);
  8995. }
  8996. if (audioSourceBgm.time > 58.17f && audioSourceBgm.time < 60f)
  8997. {
  8998. maidArray[j].SetPos(new Vector3(maidArray[j - 1].transform.position.x,
  8999. 100f,
  9000. maidArray[j - 1].transform.position.z));
  9001. }
  9002. }
  9003. if (isDanceStart8F)
  9004. {
  9005. if (j == 1 || j == 5 || j == 9 || j == 13)
  9006. {
  9007. foreach (string text3 in dance6BArray)
  9008. {
  9009. string[] array = text3.Split(new char[] {','});
  9010. float num10 = float.Parse(array[0]);
  9011. if (danceFace[j] < num10 && num10 < audioSourceBgm.time)
  9012. {
  9013. danceFace[j] = num10;
  9014. FaceName[j] = FaceName2[j];
  9015. FaceName2[j] = array[1];
  9016. FaceName3[j] = array[2];
  9017. FaceTime[j] = 0.0166666675f;
  9018. break;
  9019. }
  9020. }
  9021. }
  9022. else if (j == 2 || j == 6 || j == 10)
  9023. {
  9024. foreach (string text3 in dance6CArray)
  9025. {
  9026. string[] array = text3.Split(new char[] {','});
  9027. float num10 = float.Parse(array[0]);
  9028. if (danceFace[j] < num10 && num10 < audioSourceBgm.time)
  9029. {
  9030. danceFace[j] = num10;
  9031. FaceName[j] = FaceName2[j];
  9032. FaceName2[j] = array[1];
  9033. FaceName3[j] = array[2];
  9034. FaceTime[j] = 0.0166666675f;
  9035. break;
  9036. }
  9037. }
  9038. }
  9039. else if (j == 3 || j == 9 || j == 11)
  9040. {
  9041. foreach (string text3 in dance6DArray)
  9042. {
  9043. string[] array = text3.Split(new char[] {','});
  9044. float num10 = float.Parse(array[0]);
  9045. if (danceFace[j] < num10 && num10 < audioSourceBgm.time)
  9046. {
  9047. danceFace[j] = num10;
  9048. FaceName[j] = FaceName2[j];
  9049. FaceName2[j] = array[1];
  9050. FaceName3[j] = array[2];
  9051. FaceTime[j] = 0.0166666675f;
  9052. break;
  9053. }
  9054. }
  9055. }
  9056. else
  9057. {
  9058. foreach (string text3 in dance6Array)
  9059. {
  9060. string[] array = text3.Split(new char[] {','});
  9061. float num10 = float.Parse(array[0]);
  9062. if (danceFace[j] < num10 && num10 < audioSourceBgm.time)
  9063. {
  9064. danceFace[j] = num10;
  9065. FaceName[j] = FaceName2[j];
  9066. FaceName2[j] = array[1];
  9067. FaceName3[j] = array[2];
  9068. FaceTime[j] = 0.0166666675f;
  9069. break;
  9070. }
  9071. }
  9072. }
  9073. }
  9074. if (isDanceStart8V && (j == 1 || j == 5 || j == 9 || j == 13))
  9075. {
  9076. if (audioSourceBgm.time > 42f && audioSourceBgm.time < 43f)
  9077. {
  9078. maidArray[j].SetPos(maidArray[j - 1].transform.position);
  9079. }
  9080. if (audioSourceBgm.time > 58.17f && audioSourceBgm.time < 60f)
  9081. {
  9082. maidArray[j].SetPos(new Vector3(maidArray[j - 1].transform.position.x,
  9083. 100f,
  9084. maidArray[j - 1].transform.position.z));
  9085. }
  9086. }
  9087. if (isDanceStart8V)
  9088. {
  9089. if (!isDanceStart8P && audioSourceBgm.time > 40f && audioSourceBgm.time < 41f)
  9090. {
  9091. isDanceStart8P = true;
  9092. for (int num11 = 0; num11 < maidCnt; num11++)
  9093. {
  9094. if (maidArray[num11].Visible)
  9095. {
  9096. if (num11 == 0 || num11 == 4 || num11 == 8 || num11 == 12)
  9097. {
  9098. Object @object = Resources.Load("Prefab/Particle/pHeart01");
  9099. GameObject gameObject6 = Instantiate(@object) as GameObject;
  9100. gameObject6.transform.position =
  9101. CMT.SearchObjName(maidArray[num11].body0.m_Bones.transform, "Bip01 Spine", true)
  9102. .position;
  9103. }
  9104. }
  9105. }
  9106. }
  9107. }
  9108. if (isDanceStart9F)
  9109. {
  9110. if (isDanceStart9K)
  9111. {
  9112. foreach (string text3 in dance9KArray)
  9113. {
  9114. string[] array = text3.Split(new char[] {','});
  9115. float num10 = float.Parse(array[0]);
  9116. if (danceFace[j] < num10 && num10 < audioSourceBgm.time)
  9117. {
  9118. danceFace[j] = num10;
  9119. FaceName[j] = FaceName2[j];
  9120. FaceName2[j] = array[1];
  9121. FaceName3[j] = array[2];
  9122. FaceTime[j] = 0.0166666675f;
  9123. break;
  9124. }
  9125. }
  9126. }
  9127. else
  9128. {
  9129. foreach (string text3 in dance7Array)
  9130. {
  9131. string[] array = text3.Split(new char[] {','});
  9132. float num10 = float.Parse(array[0]);
  9133. if (danceFace[j] < num10 && num10 < audioSourceBgm.time)
  9134. {
  9135. danceFace[j] = num10;
  9136. FaceName[j] = FaceName2[j];
  9137. FaceName2[j] = array[1];
  9138. FaceName3[j] = array[2];
  9139. FaceTime[j] = 0.0166666675f;
  9140. break;
  9141. }
  9142. }
  9143. }
  9144. }
  9145. if (isDanceStart10F)
  9146. {
  9147. foreach (string text3 in danceO1Array)
  9148. {
  9149. string[] array = text3.Split(new char[] {','});
  9150. float num10 = float.Parse(array[0]);
  9151. if (danceFace[j] < num10 && num10 < audioSourceBgm.time)
  9152. {
  9153. danceFace[j] = num10;
  9154. FaceName[j] = FaceName2[j];
  9155. FaceName2[j] = array[1];
  9156. FaceName3[j] = array[2];
  9157. FaceTime[j] = 0.0166666675f;
  9158. break;
  9159. }
  9160. }
  9161. }
  9162. if (isDanceStart11F)
  9163. {
  9164. string[] array14 = null;
  9165. string[] array12 = null;
  9166. string[] array15 = null;
  9167. if (isSS1)
  9168. {
  9169. array14 = danceO1Array;
  9170. array12 = danceO1CArray;
  9171. array15 = danceO1BArray;
  9172. }
  9173. if (isSS2)
  9174. {
  9175. array14 = danceO2Array;
  9176. array12 = danceO2BArray;
  9177. array15 = danceO2CArray;
  9178. }
  9179. if (isSS3)
  9180. {
  9181. array14 = danceO3CArray;
  9182. array12 = danceO3Array;
  9183. array15 = danceO3BArray;
  9184. }
  9185. if (isSS4)
  9186. {
  9187. array14 = danceO5BArray;
  9188. array12 = danceO5Array;
  9189. array15 = danceO5CArray;
  9190. }
  9191. if (isSS5)
  9192. {
  9193. array14 = danceO4Array;
  9194. array12 = danceO4BArray;
  9195. array15 = danceO4CArray;
  9196. }
  9197. if (j == 1 || j == 4 || j == 7 || j == 10 || j == 13)
  9198. {
  9199. foreach (string text3 in array12)
  9200. {
  9201. string[] array = text3.Split(new char[] {','});
  9202. float num10 = float.Parse(array[0]) - 0.03f;
  9203. if (danceFace[j] < num10 && num10 < audioSourceBgm.time)
  9204. {
  9205. danceFace[j] = num10;
  9206. FaceName[j] = FaceName2[j];
  9207. FaceName2[j] = array[1];
  9208. FaceName3[j] = array[2];
  9209. FaceTime[j] = 0.0166666675f;
  9210. break;
  9211. }
  9212. }
  9213. }
  9214. else if (j == 2 || j == 5 || j == 8 || j == 11)
  9215. {
  9216. foreach (string text3 in array15)
  9217. {
  9218. string[] array = text3.Split(new char[] {','});
  9219. float num10 = float.Parse(array[0]) - 0.03f;
  9220. if (danceFace[j] < num10 && num10 < audioSourceBgm.time)
  9221. {
  9222. danceFace[j] = num10;
  9223. FaceName[j] = FaceName2[j];
  9224. FaceName2[j] = array[1];
  9225. FaceName3[j] = array[2];
  9226. FaceTime[j] = 0.0166666675f;
  9227. break;
  9228. }
  9229. }
  9230. }
  9231. else
  9232. {
  9233. foreach (string text3 in array14)
  9234. {
  9235. string[] array = text3.Split(new char[] {','});
  9236. float num10 = float.Parse(array[0]) - 0.03f;
  9237. if (danceFace[j] < num10 && num10 < audioSourceBgm.time)
  9238. {
  9239. danceFace[j] = num10;
  9240. FaceName[j] = FaceName2[j];
  9241. FaceName2[j] = array[1];
  9242. FaceName3[j] = array[2];
  9243. FaceTime[j] = 0.0166666675f;
  9244. break;
  9245. }
  9246. }
  9247. }
  9248. }
  9249. if (isDanceStart12F)
  9250. {
  9251. foreach (string text3 in dance12Array)
  9252. {
  9253. string[] array = text3.Split(new char[] {','});
  9254. float num10 = float.Parse(array[0]);
  9255. if (danceFace[j] < num10 && num10 < audioSourceBgm.time)
  9256. {
  9257. danceFace[j] = num10;
  9258. FaceName[j] = FaceName2[j];
  9259. FaceName2[j] = array[1];
  9260. FaceName3[j] = array[2];
  9261. FaceTime[j] = 0.0166666675f;
  9262. break;
  9263. }
  9264. }
  9265. }
  9266. if (isDanceStart13F)
  9267. {
  9268. if (!isDanceStart13K)
  9269. {
  9270. foreach (string text3 in dance13Array)
  9271. {
  9272. string[] array = text3.Split(new char[] {','});
  9273. float num10 = float.Parse(array[0]);
  9274. if (danceFace[j] < num10 && num10 < audioSourceBgm.time)
  9275. {
  9276. danceFace[j] = num10;
  9277. FaceName[j] = FaceName2[j];
  9278. FaceName2[j] = array[1];
  9279. FaceName3[j] = array[2];
  9280. FaceTime[j] = 0.0166666675f;
  9281. break;
  9282. }
  9283. }
  9284. }
  9285. }
  9286. if (isDanceStart14F)
  9287. {
  9288. if (j == 1 || j == 4 || j == 7 || j == 10 || j == 13)
  9289. {
  9290. foreach (string text3 in dance13BArray)
  9291. {
  9292. string[] array = text3.Split(new char[] {','});
  9293. float num10 = float.Parse(array[0]);
  9294. if (danceFace[j] < num10 && num10 < audioSourceBgm.time)
  9295. {
  9296. danceFace[j] = num10;
  9297. FaceName[j] = FaceName2[j];
  9298. FaceName2[j] = array[1];
  9299. FaceName3[j] = array[2];
  9300. FaceTime[j] = 0.0166666675f;
  9301. break;
  9302. }
  9303. }
  9304. }
  9305. else if (j == 2 || j == 5 || j == 8 || j == 11)
  9306. {
  9307. foreach (string text3 in dance13CArray)
  9308. {
  9309. string[] array = text3.Split(new char[] {','});
  9310. float num10 = float.Parse(array[0]);
  9311. if (danceFace[j] < num10 && num10 < audioSourceBgm.time)
  9312. {
  9313. danceFace[j] = num10;
  9314. FaceName[j] = FaceName2[j];
  9315. FaceName2[j] = array[1];
  9316. FaceName3[j] = array[2];
  9317. FaceTime[j] = 0.0166666675f;
  9318. break;
  9319. }
  9320. }
  9321. }
  9322. else
  9323. {
  9324. foreach (string text3 in dance13Array)
  9325. {
  9326. string[] array = text3.Split(new char[] {','});
  9327. float num10 = float.Parse(array[0]);
  9328. if (danceFace[j] < num10 && num10 < audioSourceBgm.time)
  9329. {
  9330. danceFace[j] = num10;
  9331. FaceName[j] = FaceName2[j];
  9332. FaceName2[j] = array[1];
  9333. FaceName3[j] = array[2];
  9334. FaceTime[j] = 0.0166666675f;
  9335. break;
  9336. }
  9337. }
  9338. }
  9339. }
  9340. if (isDanceStart15F)
  9341. {
  9342. if (j == 1 || j == 3 || j == 5 || j == 7 || j == 9 || j == 11 || j == 13)
  9343. {
  9344. foreach (string text3 in dance15BArray)
  9345. {
  9346. string[] array = text3.Split(new char[] {','});
  9347. float num10 = float.Parse(array[0]);
  9348. if (danceFace[j] < num10 && num10 < audioSourceBgm.time)
  9349. {
  9350. danceFace[j] = num10;
  9351. FaceName[j] = FaceName2[j];
  9352. FaceName2[j] = array[1];
  9353. FaceName3[j] = array[2];
  9354. FaceTime[j] = 0.0166666675f;
  9355. break;
  9356. }
  9357. }
  9358. }
  9359. else
  9360. {
  9361. foreach (string text3 in dance15Array)
  9362. {
  9363. string[] array = text3.Split(new char[] {','});
  9364. float num10 = float.Parse(array[0]);
  9365. if (danceFace[j] < num10 && num10 < audioSourceBgm.time)
  9366. {
  9367. danceFace[j] = num10;
  9368. FaceName[j] = FaceName2[j];
  9369. FaceName2[j] = array[1];
  9370. FaceName3[j] = array[2];
  9371. FaceTime[j] = 0.0166666675f;
  9372. break;
  9373. }
  9374. }
  9375. }
  9376. }
  9377. if (!isFadeOut)
  9378. {
  9379. Maid maid = maidArray[j];
  9380. if (maid && maid.Visible)
  9381. {
  9382. if (maid.transform.position.y != 100f)
  9383. {
  9384. FaceTime[j] += Time.deltaTime;
  9385. if (FaceTime[j] < 1f)
  9386. {
  9387. TMorph morph = maid.body0.Face.morph;
  9388. maid.boMabataki = false;
  9389. maid.body0.Face.morph.EyeMabataki = 0f;
  9390. if (FaceName[j] != string.Empty)
  9391. {
  9392. maid.body0.Face.morph.MulBlendValues(FaceName[j], 1f);
  9393. }
  9394. if (FaceName2[j] != "")
  9395. {
  9396. maid.body0.Face.morph.MulBlendValues(FaceName2[j],
  9397. UTY.COSS2(Mathf.Pow(FaceTime[j], 0.4f), 4f));
  9398. }
  9399. if (FaceName3[j] != string.Empty)
  9400. {
  9401. maid.body0.Face.morph.AddBlendValues(FaceName3[j], 1f);
  9402. }
  9403. maid.body0.Face.morph.FixBlendValues_Face();
  9404. }
  9405. else
  9406. {
  9407. FaceName[j] = FaceName2[j];
  9408. }
  9409. if (isHenkou)
  9410. {
  9411. TMorph morph = maid.body0.Face.morph;
  9412. float[] fieldValue = GetFieldValue<TMorph, float[]>(morph, "BlendValues");
  9413. maid.boMabataki = false;
  9414. if (isNamidaH)
  9415. {
  9416. fieldValue[(int) morph.hash["namida"]] = 1f;
  9417. }
  9418. else
  9419. {
  9420. fieldValue[(int) morph.hash["namida"]] = 0f;
  9421. }
  9422. if (isSekimenH)
  9423. {
  9424. fieldValue[(int) morph.hash["hohol"]] = 1f;
  9425. }
  9426. else
  9427. {
  9428. fieldValue[(int) morph.hash["hohol"]] = 0f;
  9429. }
  9430. if (isHohoH)
  9431. {
  9432. fieldValue[(int) morph.hash["hoho2"]] = 1f;
  9433. }
  9434. else
  9435. {
  9436. fieldValue[(int) morph.hash["hoho2"]] = 0f;
  9437. }
  9438. maid.body0.Face.morph.FixBlendValues_Face();
  9439. }
  9440. }
  9441. }
  9442. }
  9443. this.FoceKuchipakuUpdate2(audioSourceBgm.time, maidArray[j], j);
  9444. }
  9445. }
  9446. if (Input.GetKey(KeyCode.H) || isVR)
  9447. {
  9448. if (Input.GetKeyDown(KeyCode.KeypadPeriod))
  9449. {
  9450. h2Flg = true;
  9451. isNamidaH = !isNamidaH;
  9452. isHenkou = true;
  9453. }
  9454. if (Input.GetKeyDown(KeyCode.KeypadPlus))
  9455. {
  9456. h2Flg = true;
  9457. isSekimenH = !isSekimenH;
  9458. isHenkou = true;
  9459. }
  9460. if (Input.GetKeyDown(KeyCode.KeypadEnter))
  9461. {
  9462. h2Flg = true;
  9463. isHohoH = !isHohoH;
  9464. isHenkou = true;
  9465. }
  9466. }
  9467. danceCheckIndex++;
  9468. if (danceCheckIndex == 10)
  9469. {
  9470. danceCheckIndex = 0;
  9471. }
  9472. danceCheck[danceCheckIndex] = audioSourceBgm.time;
  9473. isDanceChu = false;
  9474. for (int k = 0; k < danceCheck.Length; k++)
  9475. {
  9476. if (danceCheck[k] > 0f)
  9477. {
  9478. isDanceChu = true;
  9479. break;
  9480. }
  9481. }
  9482. if (!isDanceChu)
  9483. {
  9484. danceWait--;
  9485. if (danceWait > 0)
  9486. {
  9487. isDanceChu = true;
  9488. }
  9489. }
  9490. if (!isDanceChu)
  9491. {
  9492. for (int j = 0; j < maidCnt; j++)
  9493. {
  9494. if (maidArray[j] && maidArray[j].Visible)
  9495. {
  9496. maidArray[j].StopKuchipakuPattern();
  9497. if (isDanceStart7V)
  9498. {
  9499. maidArray[j].SetPos(dancePos[j]);
  9500. maidArray[j].body0.transform.localRotation = danceRot[j];
  9501. }
  9502. if (isDanceStart8V && (j == 1 || j == 5 || j == 9 || j == 13))
  9503. {
  9504. maidArray[j].SetPos(dancePos[j]);
  9505. maidArray[j].body0.transform.localRotation = danceRot[j];
  9506. }
  9507. if (isDanceStart11V)
  9508. {
  9509. maidArray[j].SetPos(dancePos[j]);
  9510. maidArray[j].body0.transform.localRotation = danceRot[j];
  9511. }
  9512. if (isDanceStart1K || isDanceStart3K || isDanceStart4K || isDanceStart5K || isDanceStart6K || isDanceStart9K
  9513. || isDanceStart13K)
  9514. {
  9515. maidArray[j].SetPos(dancePos[j]);
  9516. maidArray[j].body0.transform.localRotation = danceRot[j];
  9517. int i = j;
  9518. if (!isVR)
  9519. {
  9520. delCount[i] = 20;
  9521. if (goSlot[(int) selectList[i]] != null)
  9522. {
  9523. maidArray[i].body0.goSlot = new List<TBodySkin>(goSlot[(int) selectList[i]]);
  9524. for (int l = 0; l < bodyHit[(int) selectList[i]].Count; l++)
  9525. {
  9526. maidArray[i].body0.goSlot[l].bonehair.bodyhit = bodyHit[(int) selectList[i]][l];
  9527. }
  9528. }
  9529. }
  9530. Maid maid = maidArray[j];
  9531. maid.DelProp(MPN.handitem, true);
  9532. maid.DelProp(MPN.accvag, true);
  9533. maid.DelProp(MPN.accanl, true);
  9534. maid.DelProp(MPN.kousoku_upper, true);
  9535. maid.DelProp(MPN.kousoku_lower, true);
  9536. maid.AllProcPropSeqStart();
  9537. isStop[i] = true;
  9538. Transform transform2 = CMT.SearchObjName(maidArray[i].body0.m_Bones.transform, "Bip01", true);
  9539. isPoseIti[i] = true;
  9540. poseIti[i] = maidArray[i].transform.position;
  9541. maidArray[i].transform.position = new Vector3(100f, 100f, 100f);
  9542. }
  9543. if (isDanceStart14V)
  9544. {
  9545. maidArray[j].SetPos(dancePos[j]);
  9546. maidArray[j].body0.transform.localRotation = danceRot[j];
  9547. }
  9548. if (isDanceStart15V)
  9549. {
  9550. maidArray[j].SetPos(dancePos[j]);
  9551. maidArray[j].body0.transform.localRotation = danceRot[j];
  9552. }
  9553. }
  9554. }
  9555. isDanceStart1F = false;
  9556. isDanceStart1K = false;
  9557. isDanceStart2F = false;
  9558. isDanceStart3F = false;
  9559. isDanceStart3K = false;
  9560. isDanceStart4F = false;
  9561. isDanceStart4K = false;
  9562. isDanceStart5F = false;
  9563. isDanceStart5K = false;
  9564. isDanceStart6F = false;
  9565. isDanceStart6K = false;
  9566. isDanceStart7F = false;
  9567. isDanceStart7V = false;
  9568. isDanceStart8F = false;
  9569. isDanceStart8V = false;
  9570. isDanceStart8P = false;
  9571. isDanceStart9F = false;
  9572. isDanceStart9K = false;
  9573. isDanceStart10F = false;
  9574. isDanceStart11F = false;
  9575. isDanceStart11V = false;
  9576. isDanceStart12F = false;
  9577. isDanceStart13F = false;
  9578. isDanceStart13K = false;
  9579. isDanceStart14F = false;
  9580. isDanceStart14V = false;
  9581. isDanceStart15F = false;
  9582. isDanceStart15V = false;
  9583. for (int j = 0; j < maidCnt; j++)
  9584. {
  9585. danceFace[j] = 0f;
  9586. }
  9587. danceCheckIndex = 0;
  9588. for (int k = 0; k < danceCheck.Length; k++)
  9589. {
  9590. danceCheck[danceCheckIndex] = 1f;
  9591. }
  9592. isDance = false;
  9593. }
  9594. }
  9595. if ((Input.GetKey(KeyCode.Return) && Input.GetKeyDown(KeyCode.Alpha1))
  9596. || (Input.GetKey(KeyCode.KeypadEnter) && Input.GetKeyDown(KeyCode.Keypad1)))
  9597. {
  9598. if (this.getModKeyPressing(modKey.Shift))
  9599. {
  9600. isShift = true;
  9601. }
  9602. TextAsset textAsset = Resources.Load("SceneDance/dance_kp_m0") as TextAsset;
  9603. string text4 = Regex.Replace(textAsset.text, "(\\r|\\n| )", string.Empty);
  9604. audioSourceBgm = GameMain.Instance.SoundMgr.GetAudioSourceBgm();
  9605. GameMain.Instance.SoundMgr.PlayBGM("se002.ogg", 0f, false);
  9606. if (!isShift)
  9607. {
  9608. GameMain.Instance.CharacterMgr.ResetCharaPosAll();
  9609. }
  9610. for (int j = 0; j < maidCnt; j++)
  9611. {
  9612. string text5 = "dance_cm3d2_001_f1.anm";
  9613. switch (j)
  9614. {
  9615. case 1:
  9616. case 3:
  9617. case 5:
  9618. case 7:
  9619. case 9:
  9620. case 11:
  9621. case 13:
  9622. text5 = "dance_cm3d2_001_f2.anm";
  9623. break;
  9624. case 2:
  9625. case 4:
  9626. case 6:
  9627. case 8:
  9628. case 10:
  9629. case 12:
  9630. text5 = "dance_cm3d2_001_f3.anm";
  9631. break;
  9632. }
  9633. if (!isShift)
  9634. {
  9635. if (!maidArray[j].body0.m_Bones.GetComponent<Animation>().GetClip(text5))
  9636. {
  9637. maidArray[j].body0.LoadAnime(text5, GameUty.FileSystem, text5, false, false);
  9638. }
  9639. }
  9640. else
  9641. {
  9642. if (!maidArray[j].body0.m_Bones.GetComponent<Animation>().GetClip("dance_cm3d2_kara_003_ddfl_f1.anm"))
  9643. {
  9644. maidArray[j].body0.LoadAnime("dance_cm3d2_kara_003_ddfl_f1.anm",
  9645. GameUty.FileSystem,
  9646. "dance_cm3d2_kara_003_ddfl_f1.anm",
  9647. false,
  9648. false);
  9649. }
  9650. textAsset = (Resources.Load("SceneDance/DDF_kara_voice_2") as TextAsset);
  9651. text4 = textAsset.text;
  9652. text4 = Regex.Replace(text4, "(\\r|\\n| )", string.Empty);
  9653. if (!isDanceStart1K && !isDanceStart3K && !isDanceStart4K && !isDanceStart5K && !isDanceStart6K
  9654. && !isDanceStart9K && !isDanceStart13K)
  9655. {
  9656. dancePos[j] = maidArray[j].transform.position;
  9657. danceRot[j] = maidArray[j].transform.localRotation;
  9658. }
  9659. }
  9660. m_baKuchipakuPattern[j] = Convert.FromBase64String(text4);
  9661. }
  9662. if (!isShift)
  9663. {
  9664. GameMain.Instance.SoundMgr.PlayDanceBGM("dokidokifallinlove_short.ogg", 0f, false);
  9665. sw = new Stopwatch();
  9666. sw.Start();
  9667. }
  9668. else if (this.getModKeyPressing(modKey.Ctrl))
  9669. {
  9670. GameMain.Instance.SoundMgr.PlayDanceBGM("dokidokifallinlove_short_sasaki_kara.ogg", 0f, false);
  9671. }
  9672. else
  9673. {
  9674. GameMain.Instance.SoundMgr.PlayDanceBGM("dokidokifallinlove_short_nao_kara.ogg", 0f, false);
  9675. }
  9676. for (int j = 0; j < maidCnt; j++)
  9677. {
  9678. maidArray[j].StartKuchipakuPattern(0f, text4, true);
  9679. Vector3 vector = Vector3.zero;
  9680. switch (j)
  9681. {
  9682. case 3:
  9683. vector.x = 1f;
  9684. break;
  9685. case 4:
  9686. vector.x = -1f;
  9687. break;
  9688. case 5:
  9689. vector.x = 2f;
  9690. break;
  9691. case 6:
  9692. vector.x = -2f;
  9693. break;
  9694. case 7:
  9695. vector.x = 3f;
  9696. break;
  9697. case 8:
  9698. vector.x = -3f;
  9699. break;
  9700. case 9:
  9701. vector.x = 4f;
  9702. break;
  9703. case 10:
  9704. vector.x = -4f;
  9705. break;
  9706. case 11:
  9707. vector.x = 5f;
  9708. break;
  9709. case 12:
  9710. vector.x = -5f;
  9711. break;
  9712. case 13:
  9713. vector.x = 6f;
  9714. break;
  9715. }
  9716. if (!isShift)
  9717. {
  9718. maidArray[j].SetPos(vector);
  9719. }
  9720. isStop[j] = false;
  9721. isLock[j] = false;
  9722. pHandL[j] = 0;
  9723. pHandR[j] = 0;
  9724. muneIKL[j] = false;
  9725. muneIKR[j] = false;
  9726. if (!isVR)
  9727. {
  9728. maidArray[j].body0.quaDefEyeL.eulerAngles = eyeL[(int) selectList[j]];
  9729. maidArray[j].body0.quaDefEyeR.eulerAngles = eyeR[(int) selectList[j]];
  9730. }
  9731. }
  9732. ikBui = 5;
  9733. isDanceStart1F = false;
  9734. isDanceStart2F = false;
  9735. isDanceStart3F = false;
  9736. isDanceStart4F = false;
  9737. isDanceStart5F = false;
  9738. isDanceStart6F = false;
  9739. isDanceStart7F = false;
  9740. isDanceStart8F = false;
  9741. isDanceStart9F = false;
  9742. isDanceStart10F = false;
  9743. isDanceStart11F = false;
  9744. isDanceStart12F = false;
  9745. isDanceStart13F = false;
  9746. isDanceStart14F = false;
  9747. isDanceStart15F = false;
  9748. for (int j = 0; j < maidCnt; j++)
  9749. {
  9750. danceFace[j] = 0f;
  9751. }
  9752. if (isDanceStart7V)
  9753. {
  9754. for (int j = 0; j < maidCnt; j++)
  9755. {
  9756. if (maidArray[j] && maidArray[j].Visible)
  9757. {
  9758. if (isDanceStart7V)
  9759. {
  9760. maidArray[j].SetPos(dancePos[j]);
  9761. maidArray[j].body0.transform.localRotation = danceRot[j];
  9762. }
  9763. }
  9764. }
  9765. isDanceStart7V = false;
  9766. }
  9767. if (isDanceStart8V)
  9768. {
  9769. for (int j = 0; j < maidCnt; j++)
  9770. {
  9771. if (maidArray[j] && maidArray[j].Visible)
  9772. {
  9773. if (isDanceStart8V)
  9774. {
  9775. maidArray[j].SetPos(dancePos[j]);
  9776. maidArray[j].body0.transform.localRotation = danceRot[j];
  9777. }
  9778. }
  9779. }
  9780. isDanceStart8V = false;
  9781. isDanceStart8P = false;
  9782. }
  9783. if (isDanceStart11V)
  9784. {
  9785. for (int j = 0; j < maidCnt; j++)
  9786. {
  9787. if (maidArray[j] && maidArray[j].Visible)
  9788. {
  9789. if (isDanceStart11V)
  9790. {
  9791. maidArray[j].SetPos(dancePos[j]);
  9792. maidArray[j].body0.transform.localRotation = danceRot[j];
  9793. }
  9794. }
  9795. }
  9796. isDanceStart11V = false;
  9797. }
  9798. if (isDanceStart1K || isDanceStart3K || isDanceStart4K || isDanceStart5K || isDanceStart6K || isDanceStart9K
  9799. || isDanceStart13K)
  9800. {
  9801. for (int j = 0; j < maidCnt; j++)
  9802. {
  9803. if (maidArray[j] && maidArray[j].Visible)
  9804. {
  9805. if (isDanceStart1K || isDanceStart3K || isDanceStart4K || isDanceStart5K || isDanceStart6K || isDanceStart9K
  9806. || isDanceStart13K)
  9807. {
  9808. maidArray[j].SetPos(dancePos[j]);
  9809. maidArray[j].body0.transform.localRotation = danceRot[j];
  9810. int i = j;
  9811. if (!isVR)
  9812. {
  9813. delCount[i] = 20;
  9814. if (goSlot[(int) selectList[i]] != null)
  9815. {
  9816. maidArray[i].body0.goSlot = new List<TBodySkin>(goSlot[(int) selectList[i]]);
  9817. for (int l = 0; l < bodyHit[(int) selectList[i]].Count; l++)
  9818. {
  9819. maidArray[i].body0.goSlot[l].bonehair.bodyhit = bodyHit[(int) selectList[i]][l];
  9820. }
  9821. }
  9822. }
  9823. Maid maid = maidArray[j];
  9824. maid.DelProp(MPN.handitem, true);
  9825. maid.DelProp(MPN.accvag, true);
  9826. maid.DelProp(MPN.accanl, true);
  9827. maid.DelProp(MPN.kousoku_upper, true);
  9828. maid.DelProp(MPN.kousoku_lower, true);
  9829. maid.AllProcPropSeqStart();
  9830. }
  9831. }
  9832. }
  9833. isDanceStart1K = false;
  9834. isDanceStart3K = false;
  9835. isDanceStart4K = false;
  9836. isDanceStart5K = false;
  9837. isDanceStart6K = false;
  9838. isDanceStart9K = false;
  9839. isDanceStart13K = false;
  9840. }
  9841. if (isDanceStart14V)
  9842. {
  9843. for (int j = 0; j < maidCnt; j++)
  9844. {
  9845. if (maidArray[j] && maidArray[j].Visible)
  9846. {
  9847. if (isDanceStart14V)
  9848. {
  9849. maidArray[j].SetPos(dancePos[j]);
  9850. maidArray[j].body0.transform.localRotation = danceRot[j];
  9851. }
  9852. }
  9853. }
  9854. isDanceStart14V = false;
  9855. }
  9856. if (isDanceStart15V)
  9857. {
  9858. for (int j = 0; j < maidCnt; j++)
  9859. {
  9860. if (maidArray[j] && maidArray[j].Visible)
  9861. {
  9862. if (isDanceStart15V)
  9863. {
  9864. maidArray[j].SetPos(dancePos[j]);
  9865. maidArray[j].body0.transform.localRotation = danceRot[j];
  9866. }
  9867. }
  9868. }
  9869. isDanceStart15V = false;
  9870. }
  9871. if (isShift)
  9872. {
  9873. if (maidArray[1] && maidArray[1].Visible)
  9874. {
  9875. if (maidArray[0].transform.position == maidArray[1].transform.position)
  9876. {
  9877. Vector3 vector = Vector3.zero;
  9878. vector.x = 0.6f;
  9879. maidArray[1].SetPos(vector);
  9880. if (maidArray[2] && maidArray[2].Visible)
  9881. {
  9882. vector.x = -0.6f;
  9883. maidArray[2].SetPos(vector);
  9884. }
  9885. if (maidArray[3] && maidArray[3].Visible)
  9886. {
  9887. vector.x = 1.2f;
  9888. maidArray[3].SetPos(vector);
  9889. }
  9890. if (maidArray[4] && maidArray[4].Visible)
  9891. {
  9892. vector.x = -1.2f;
  9893. maidArray[4].SetPos(vector);
  9894. }
  9895. if (maidArray[5] && maidArray[5].Visible)
  9896. {
  9897. vector.x = 1.8f;
  9898. maidArray[5].SetPos(vector);
  9899. }
  9900. if (maidArray[6] && maidArray[6].Visible)
  9901. {
  9902. vector.x = -1.8f;
  9903. maidArray[6].SetPos(vector);
  9904. }
  9905. if (maidArray[7] && maidArray[7].Visible)
  9906. {
  9907. vector.x = 2.4f;
  9908. maidArray[7].SetPos(vector);
  9909. }
  9910. if (maidArray[8] && maidArray[8].Visible)
  9911. {
  9912. vector.x = -2.4f;
  9913. maidArray[8].SetPos(vector);
  9914. }
  9915. if (maidArray[9] && maidArray[9].Visible)
  9916. {
  9917. vector.x = 3f;
  9918. maidArray[9].SetPos(vector);
  9919. }
  9920. if (maidArray[10] && maidArray[10].Visible)
  9921. {
  9922. vector.x = -3f;
  9923. maidArray[10].SetPos(vector);
  9924. }
  9925. if (maidArray[11] && maidArray[11].Visible)
  9926. {
  9927. vector.x = 3.6f;
  9928. maidArray[11].SetPos(vector);
  9929. }
  9930. if (maidArray[12] && maidArray[12].Visible)
  9931. {
  9932. vector.x = -3.6f;
  9933. maidArray[12].SetPos(vector);
  9934. }
  9935. if (maidArray[13] && maidArray[13].Visible)
  9936. {
  9937. vector.x = 4.2f;
  9938. maidArray[13].SetPos(vector);
  9939. }
  9940. }
  9941. }
  9942. isDanceStart1K = true;
  9943. for (int j = 0; j < maidCnt; j++)
  9944. {
  9945. maidArray[j].SetRot(new Vector3(maidArray[j].body0.transform.localRotation.x,
  9946. maidArray[j].body0.transform.localRotation.y + 90f,
  9947. maidArray[j].body0.transform.localRotation.z));
  9948. maidArray[j].SetPos(new Vector3(maidArray[j].body0.transform.position.x + 1f,
  9949. maidArray[j].body0.transform.position.y,
  9950. maidArray[j].body0.transform.position.z + 4f));
  9951. string text2 = "handitem,HanditemL_Karaoke_Mike_I_.menu";
  9952. int i = j;
  9953. Maid maid = maidArray[j];
  9954. if (!isVR)
  9955. {
  9956. delCount[i] = 20;
  9957. if (goSlot[(int) selectList[i]] != null)
  9958. {
  9959. maidArray[i].body0.goSlot = new List<TBodySkin>(goSlot[(int) selectList[i]]);
  9960. for (int l = 0; l < bodyHit[(int) selectList[i]].Count; l++)
  9961. {
  9962. maidArray[i].body0.goSlot[l].bonehair.bodyhit = bodyHit[(int) selectList[i]][l];
  9963. }
  9964. }
  9965. }
  9966. string[] array = new string[2];
  9967. array = text2.Split(new char[] {','});
  9968. maid.DelProp(MPN.handitem, true);
  9969. maid.DelProp(MPN.accvag, true);
  9970. maid.DelProp(MPN.accanl, true);
  9971. maid.DelProp(MPN.kousoku_upper, true);
  9972. maid.DelProp(MPN.kousoku_lower, true);
  9973. if (array[0] != "")
  9974. {
  9975. maid.SetProp(array[0], array[1], 0, true, false);
  9976. }
  9977. maid.AllProcPropSeqStart();
  9978. }
  9979. }
  9980. isDance = true;
  9981. isDanceStart1 = true;
  9982. }
  9983. if (isF2)
  9984. {
  9985. TextAsset textAsset = Resources.Load("SceneDance/dance_EtY_m0") as TextAsset;
  9986. string text4 = textAsset.text;
  9987. text4 = Regex.Replace(text4, "(\\r|\\n| )", string.Empty);
  9988. audioSourceBgm = GameMain.Instance.SoundMgr.GetAudioSourceBgm();
  9989. GameMain.Instance.SoundMgr.PlayBGM("se002.ogg", 0f, false);
  9990. for (int j = 0; j < maidCnt; j++)
  9991. {
  9992. if (!maidArray[j].body0.m_Bones.GetComponent<Animation>().GetClip("dance_cm3d_001_f1.anm"))
  9993. {
  9994. maidArray[j].body0.LoadAnime("dance_cm3d_001_f1.anm",
  9995. GameUty.FileSystem,
  9996. "dance_cm3d_001_f1.anm",
  9997. false,
  9998. false);
  9999. }
  10000. m_baKuchipakuPattern[j] = Convert.FromBase64String(text4);
  10001. }
  10002. GameMain.Instance.SoundMgr.PlayDanceBGM("entrancetoyou_short.ogg", 0f, false);
  10003. for (int j = 0; j < maidCnt; j++)
  10004. {
  10005. maidArray[j].StartKuchipakuPattern(0f, text4, true);
  10006. isStop[j] = false;
  10007. isLock[j] = false;
  10008. pHandL[j] = 0;
  10009. pHandR[j] = 0;
  10010. muneIKL[j] = false;
  10011. muneIKR[j] = false;
  10012. if (!isVR)
  10013. {
  10014. maidArray[j].body0.quaDefEyeL.eulerAngles = eyeL[(int) selectList[j]];
  10015. maidArray[j].body0.quaDefEyeR.eulerAngles = eyeR[(int) selectList[j]];
  10016. }
  10017. }
  10018. ikBui = 5;
  10019. isDanceStart1F = false;
  10020. isDanceStart2F = false;
  10021. isDanceStart3F = false;
  10022. isDanceStart4F = false;
  10023. isDanceStart5F = false;
  10024. isDanceStart6F = false;
  10025. isDanceStart7F = false;
  10026. isDanceStart8F = false;
  10027. isDanceStart9F = false;
  10028. isDanceStart10F = false;
  10029. isDanceStart11F = false;
  10030. isDanceStart12F = false;
  10031. isDanceStart13F = false;
  10032. isDanceStart14F = false;
  10033. isDanceStart15F = false;
  10034. for (int j = 0; j < maidCnt; j++)
  10035. {
  10036. danceFace[j] = 0f;
  10037. }
  10038. if (isDanceStart7V)
  10039. {
  10040. for (int j = 0; j < maidCnt; j++)
  10041. {
  10042. if (maidArray[j] && maidArray[j].Visible)
  10043. {
  10044. if (isDanceStart7V)
  10045. {
  10046. maidArray[j].SetPos(dancePos[j]);
  10047. maidArray[j].body0.transform.localRotation = danceRot[j];
  10048. }
  10049. }
  10050. }
  10051. isDanceStart7V = false;
  10052. }
  10053. if (isDanceStart8V)
  10054. {
  10055. for (int j = 0; j < maidCnt; j++)
  10056. {
  10057. if (maidArray[j] && maidArray[j].Visible)
  10058. {
  10059. if (isDanceStart8V)
  10060. {
  10061. maidArray[j].SetPos(dancePos[j]);
  10062. maidArray[j].body0.transform.localRotation = danceRot[j];
  10063. }
  10064. }
  10065. }
  10066. isDanceStart8V = false;
  10067. isDanceStart8P = false;
  10068. }
  10069. if (isDanceStart11V)
  10070. {
  10071. for (int j = 0; j < maidCnt; j++)
  10072. {
  10073. if (maidArray[j] && maidArray[j].Visible)
  10074. {
  10075. if (isDanceStart11V)
  10076. {
  10077. maidArray[j].SetPos(dancePos[j]);
  10078. maidArray[j].body0.transform.localRotation = danceRot[j];
  10079. }
  10080. }
  10081. }
  10082. isDanceStart11V = false;
  10083. }
  10084. if (isDanceStart1K || isDanceStart3K || isDanceStart4K || isDanceStart5K || isDanceStart6K || isDanceStart9K
  10085. || isDanceStart13K)
  10086. {
  10087. for (int j = 0; j < maidCnt; j++)
  10088. {
  10089. if (maidArray[j] && maidArray[j].Visible)
  10090. {
  10091. if (isDanceStart1K || isDanceStart3K || isDanceStart4K || isDanceStart5K || isDanceStart6K || isDanceStart9K
  10092. || isDanceStart13K)
  10093. {
  10094. maidArray[j].SetPos(dancePos[j]);
  10095. maidArray[j].body0.transform.localRotation = danceRot[j];
  10096. int i = j;
  10097. if (!isVR)
  10098. {
  10099. delCount[i] = 20;
  10100. if (goSlot[(int) selectList[i]] != null)
  10101. {
  10102. maidArray[i].body0.goSlot = new List<TBodySkin>(goSlot[(int) selectList[i]]);
  10103. for (int l = 0; l < bodyHit[(int) selectList[i]].Count; l++)
  10104. {
  10105. maidArray[i].body0.goSlot[l].bonehair.bodyhit = bodyHit[(int) selectList[i]][l];
  10106. }
  10107. }
  10108. }
  10109. Maid maid = maidArray[j];
  10110. maid.DelProp(MPN.handitem, true);
  10111. maid.DelProp(MPN.accvag, true);
  10112. maid.DelProp(MPN.accanl, true);
  10113. maid.DelProp(MPN.kousoku_upper, true);
  10114. maid.DelProp(MPN.kousoku_lower, true);
  10115. maid.AllProcPropSeqStart();
  10116. }
  10117. }
  10118. }
  10119. isDanceStart1K = false;
  10120. isDanceStart3K = false;
  10121. isDanceStart4K = false;
  10122. isDanceStart5K = false;
  10123. isDanceStart6K = false;
  10124. isDanceStart9K = false;
  10125. isDanceStart13K = false;
  10126. }
  10127. if (isDanceStart14V)
  10128. {
  10129. for (int j = 0; j < maidCnt; j++)
  10130. {
  10131. if (maidArray[j] && maidArray[j].Visible)
  10132. {
  10133. if (isDanceStart14V)
  10134. {
  10135. maidArray[j].SetPos(dancePos[j]);
  10136. maidArray[j].body0.transform.localRotation = danceRot[j];
  10137. }
  10138. }
  10139. }
  10140. isDanceStart14V = false;
  10141. }
  10142. if (isDanceStart15V)
  10143. {
  10144. for (int j = 0; j < maidCnt; j++)
  10145. {
  10146. if (maidArray[j] && maidArray[j].Visible)
  10147. {
  10148. if (isDanceStart15V)
  10149. {
  10150. maidArray[j].SetPos(dancePos[j]);
  10151. maidArray[j].body0.transform.localRotation = danceRot[j];
  10152. }
  10153. }
  10154. }
  10155. isDanceStart15V = false;
  10156. }
  10157. if (maidArray[1] && maidArray[1].Visible)
  10158. {
  10159. if (maidArray[0].transform.position == maidArray[1].transform.position)
  10160. {
  10161. Vector3 vector = Vector3.zero;
  10162. vector.x = 0.6f;
  10163. maidArray[1].SetPos(vector);
  10164. if (maidArray[2] && maidArray[2].Visible)
  10165. {
  10166. vector.x = -0.6f;
  10167. maidArray[2].SetPos(vector);
  10168. }
  10169. if (maidArray[3] && maidArray[3].Visible)
  10170. {
  10171. vector.x = 1.2f;
  10172. maidArray[3].SetPos(vector);
  10173. }
  10174. if (maidArray[4] && maidArray[4].Visible)
  10175. {
  10176. vector.x = -1.2f;
  10177. maidArray[4].SetPos(vector);
  10178. }
  10179. if (maidArray[5] && maidArray[5].Visible)
  10180. {
  10181. vector.x = 1.8f;
  10182. maidArray[5].SetPos(vector);
  10183. }
  10184. if (maidArray[6] && maidArray[6].Visible)
  10185. {
  10186. vector.x = -1.8f;
  10187. maidArray[6].SetPos(vector);
  10188. }
  10189. if (maidArray[7] && maidArray[7].Visible)
  10190. {
  10191. vector.x = 2.4f;
  10192. maidArray[7].SetPos(vector);
  10193. }
  10194. if (maidArray[8] && maidArray[8].Visible)
  10195. {
  10196. vector.x = -2.4f;
  10197. maidArray[8].SetPos(vector);
  10198. }
  10199. if (maidArray[9] && maidArray[9].Visible)
  10200. {
  10201. vector.x = 3f;
  10202. maidArray[9].SetPos(vector);
  10203. }
  10204. if (maidArray[10] && maidArray[10].Visible)
  10205. {
  10206. vector.x = -3f;
  10207. maidArray[10].SetPos(vector);
  10208. }
  10209. if (maidArray[11] && maidArray[11].Visible)
  10210. {
  10211. vector.x = 3.6f;
  10212. maidArray[11].SetPos(vector);
  10213. }
  10214. if (maidArray[12] && maidArray[12].Visible)
  10215. {
  10216. vector.x = -3.6f;
  10217. maidArray[12].SetPos(vector);
  10218. }
  10219. if (maidArray[13] && maidArray[13].Visible)
  10220. {
  10221. vector.x = 4.2f;
  10222. maidArray[13].SetPos(vector);
  10223. }
  10224. }
  10225. }
  10226. isDance = true;
  10227. isDanceStart2 = true;
  10228. isF2 = false;
  10229. }
  10230. if ((Input.GetKey(KeyCode.Return) && Input.GetKeyDown(KeyCode.Alpha2))
  10231. || (Input.GetKey(KeyCode.KeypadEnter) && Input.GetKeyDown(KeyCode.Keypad2)))
  10232. {
  10233. GameMain.Instance.SoundMgr.StopBGM(0f);
  10234. isF2 = true;
  10235. }
  10236. if (isF3)
  10237. {
  10238. TextAsset textAsset = Resources.Load("SceneDance/dance_Scl_m0") as TextAsset;
  10239. string text4 = textAsset.text;
  10240. text4 = Regex.Replace(text4, "(\\r|\\n| )", string.Empty);
  10241. audioSourceBgm = GameMain.Instance.SoundMgr.GetAudioSourceBgm();
  10242. GameMain.Instance.SoundMgr.PlayBGM("se002.ogg", 0f, false);
  10243. for (int j = 0; j < maidCnt; j++)
  10244. {
  10245. if (!isShift)
  10246. {
  10247. if (!maidArray[j].body0.m_Bones.GetComponent<Animation>().GetClip("dance_cm3d_002_end_f1.anm"))
  10248. {
  10249. maidArray[j].body0.LoadAnime("dance_cm3d_002_end_f1.anm",
  10250. GameUty.FileSystem,
  10251. "dance_cm3d_002_end_f1.anm",
  10252. false,
  10253. false);
  10254. }
  10255. }
  10256. else
  10257. {
  10258. if (!maidArray[j].body0.m_Bones.GetComponent<Animation>().GetClip("dance_cm3d2_kara_001_sl_f1.anm"))
  10259. {
  10260. maidArray[j].body0.LoadAnime("dance_cm3d2_kara_001_sl_f1.anm",
  10261. GameUty.FileSystem,
  10262. "dance_cm3d2_kara_001_sl_f1.anm",
  10263. false,
  10264. false);
  10265. }
  10266. textAsset = (Resources.Load("SceneDance/scaret_kara_voice_2") as TextAsset);
  10267. text4 = textAsset.text;
  10268. text4 = Regex.Replace(text4, "(\\r|\\n| )", string.Empty);
  10269. if (!isDanceStart1K && !isDanceStart3K && !isDanceStart4K && !isDanceStart5K && !isDanceStart6K
  10270. && !isDanceStart9K && !isDanceStart13K)
  10271. {
  10272. dancePos[j] = maidArray[j].transform.position;
  10273. danceRot[j] = maidArray[j].transform.localRotation;
  10274. }
  10275. }
  10276. m_baKuchipakuPattern[j] = Convert.FromBase64String(text4);
  10277. }
  10278. if (!isShift)
  10279. {
  10280. GameMain.Instance.SoundMgr.PlayDanceBGM("scarlet leap_short.ogg", 0f, false);
  10281. }
  10282. else
  10283. {
  10284. GameMain.Instance.SoundMgr.PlayDanceBGM("scarlet leap_short_kara_1.ogg", 0f, false);
  10285. }
  10286. for (int j = 0; j < maidCnt; j++)
  10287. {
  10288. maidArray[j].StartKuchipakuPattern(0f, text4, true);
  10289. isStop[j] = false;
  10290. isLock[j] = false;
  10291. pHandL[j] = 0;
  10292. pHandR[j] = 0;
  10293. muneIKL[j] = false;
  10294. muneIKR[j] = false;
  10295. if (!isVR)
  10296. {
  10297. maidArray[j].body0.quaDefEyeL.eulerAngles = eyeL[(int) selectList[j]];
  10298. maidArray[j].body0.quaDefEyeR.eulerAngles = eyeR[(int) selectList[j]];
  10299. }
  10300. }
  10301. ikBui = 5;
  10302. isDanceStart1F = false;
  10303. isDanceStart2F = false;
  10304. isDanceStart3F = false;
  10305. isDanceStart4F = false;
  10306. isDanceStart5F = false;
  10307. isDanceStart6F = false;
  10308. isDanceStart7F = false;
  10309. isDanceStart8F = false;
  10310. isDanceStart9F = false;
  10311. isDanceStart10F = false;
  10312. isDanceStart11F = false;
  10313. isDanceStart12F = false;
  10314. isDanceStart13F = false;
  10315. isDanceStart14F = false;
  10316. isDanceStart15F = false;
  10317. for (int j = 0; j < maidCnt; j++)
  10318. {
  10319. danceFace[j] = 0f;
  10320. }
  10321. if (isDanceStart7V)
  10322. {
  10323. for (int j = 0; j < maidCnt; j++)
  10324. {
  10325. if (maidArray[j] && maidArray[j].Visible)
  10326. {
  10327. if (isDanceStart7V)
  10328. {
  10329. maidArray[j].SetPos(dancePos[j]);
  10330. maidArray[j].body0.transform.localRotation = danceRot[j];
  10331. }
  10332. }
  10333. }
  10334. isDanceStart7V = false;
  10335. }
  10336. if (isDanceStart8V)
  10337. {
  10338. for (int j = 0; j < maidCnt; j++)
  10339. {
  10340. if (maidArray[j] && maidArray[j].Visible)
  10341. {
  10342. if (isDanceStart8V)
  10343. {
  10344. maidArray[j].SetPos(dancePos[j]);
  10345. maidArray[j].body0.transform.localRotation = danceRot[j];
  10346. }
  10347. }
  10348. }
  10349. isDanceStart8V = false;
  10350. isDanceStart8P = false;
  10351. }
  10352. if (isDanceStart11V)
  10353. {
  10354. for (int j = 0; j < maidCnt; j++)
  10355. {
  10356. if (maidArray[j] && maidArray[j].Visible)
  10357. {
  10358. if (isDanceStart11V)
  10359. {
  10360. maidArray[j].SetPos(dancePos[j]);
  10361. maidArray[j].body0.transform.localRotation = danceRot[j];
  10362. }
  10363. }
  10364. }
  10365. isDanceStart11V = false;
  10366. }
  10367. if (isDanceStart1K || isDanceStart3K || isDanceStart4K || isDanceStart5K || isDanceStart6K || isDanceStart9K
  10368. || isDanceStart13K)
  10369. {
  10370. for (int j = 0; j < maidCnt; j++)
  10371. {
  10372. if (maidArray[j] && maidArray[j].Visible)
  10373. {
  10374. if (isDanceStart1K || isDanceStart3K || isDanceStart4K || isDanceStart5K || isDanceStart6K || isDanceStart9K
  10375. || isDanceStart13K)
  10376. {
  10377. maidArray[j].SetPos(dancePos[j]);
  10378. maidArray[j].body0.transform.localRotation = danceRot[j];
  10379. int i = j;
  10380. if (!isVR)
  10381. {
  10382. delCount[i] = 20;
  10383. if (goSlot[(int) selectList[i]] != null)
  10384. {
  10385. maidArray[i].body0.goSlot = new List<TBodySkin>(goSlot[(int) selectList[i]]);
  10386. for (int l = 0; l < bodyHit[(int) selectList[i]].Count; l++)
  10387. {
  10388. maidArray[i].body0.goSlot[l].bonehair.bodyhit = bodyHit[(int) selectList[i]][l];
  10389. }
  10390. }
  10391. }
  10392. Maid maid = maidArray[j];
  10393. maid.DelProp(MPN.handitem, true);
  10394. maid.DelProp(MPN.accvag, true);
  10395. maid.DelProp(MPN.accanl, true);
  10396. maid.DelProp(MPN.kousoku_upper, true);
  10397. maid.DelProp(MPN.kousoku_lower, true);
  10398. maid.AllProcPropSeqStart();
  10399. }
  10400. }
  10401. }
  10402. isDanceStart1K = false;
  10403. isDanceStart3K = false;
  10404. isDanceStart4K = false;
  10405. isDanceStart5K = false;
  10406. isDanceStart6K = false;
  10407. isDanceStart9K = false;
  10408. isDanceStart13K = false;
  10409. }
  10410. if (isDanceStart14V)
  10411. {
  10412. for (int j = 0; j < maidCnt; j++)
  10413. {
  10414. if (maidArray[j] && maidArray[j].Visible)
  10415. {
  10416. if (isDanceStart14V)
  10417. {
  10418. maidArray[j].SetPos(dancePos[j]);
  10419. maidArray[j].body0.transform.localRotation = danceRot[j];
  10420. }
  10421. }
  10422. }
  10423. isDanceStart14V = false;
  10424. }
  10425. if (isDanceStart15V)
  10426. {
  10427. for (int j = 0; j < maidCnt; j++)
  10428. {
  10429. if (maidArray[j] && maidArray[j].Visible)
  10430. {
  10431. if (isDanceStart15V)
  10432. {
  10433. maidArray[j].SetPos(dancePos[j]);
  10434. maidArray[j].body0.transform.localRotation = danceRot[j];
  10435. }
  10436. }
  10437. }
  10438. isDanceStart15V = false;
  10439. }
  10440. if (maidArray[1] && maidArray[1].Visible)
  10441. {
  10442. if (maidArray[0].transform.position == maidArray[1].transform.position)
  10443. {
  10444. Vector3 vector = Vector3.zero;
  10445. vector.x = 0.6f;
  10446. maidArray[1].SetPos(vector);
  10447. if (maidArray[2] && maidArray[2].Visible)
  10448. {
  10449. vector.x = -0.6f;
  10450. maidArray[2].SetPos(vector);
  10451. }
  10452. if (maidArray[3] && maidArray[3].Visible)
  10453. {
  10454. vector.x = 1.2f;
  10455. maidArray[3].SetPos(vector);
  10456. }
  10457. if (maidArray[4] && maidArray[4].Visible)
  10458. {
  10459. vector.x = -1.2f;
  10460. maidArray[4].SetPos(vector);
  10461. }
  10462. if (maidArray[5] && maidArray[5].Visible)
  10463. {
  10464. vector.x = 1.8f;
  10465. maidArray[5].SetPos(vector);
  10466. }
  10467. if (maidArray[6] && maidArray[6].Visible)
  10468. {
  10469. vector.x = -1.8f;
  10470. maidArray[6].SetPos(vector);
  10471. }
  10472. if (maidArray[7] && maidArray[7].Visible)
  10473. {
  10474. vector.x = 2.4f;
  10475. maidArray[7].SetPos(vector);
  10476. }
  10477. if (maidArray[8] && maidArray[8].Visible)
  10478. {
  10479. vector.x = -2.4f;
  10480. maidArray[8].SetPos(vector);
  10481. }
  10482. if (maidArray[9] && maidArray[9].Visible)
  10483. {
  10484. vector.x = 3f;
  10485. maidArray[9].SetPos(vector);
  10486. }
  10487. if (maidArray[10] && maidArray[10].Visible)
  10488. {
  10489. vector.x = -3f;
  10490. maidArray[10].SetPos(vector);
  10491. }
  10492. if (maidArray[11] && maidArray[11].Visible)
  10493. {
  10494. vector.x = 3.6f;
  10495. maidArray[11].SetPos(vector);
  10496. }
  10497. if (maidArray[12] && maidArray[12].Visible)
  10498. {
  10499. vector.x = -3.6f;
  10500. maidArray[12].SetPos(vector);
  10501. }
  10502. if (maidArray[13] && maidArray[13].Visible)
  10503. {
  10504. vector.x = 4.2f;
  10505. maidArray[13].SetPos(vector);
  10506. }
  10507. }
  10508. }
  10509. if (isShift)
  10510. {
  10511. isDanceStart3K = true;
  10512. for (int j = 0; j < maidCnt; j++)
  10513. {
  10514. maidArray[j].SetRot(new Vector3(maidArray[j].body0.transform.localRotation.x,
  10515. maidArray[j].body0.transform.localRotation.y + 90f,
  10516. maidArray[j].body0.transform.localRotation.z));
  10517. maidArray[j].SetPos(new Vector3(maidArray[j].body0.transform.position.x + 1f,
  10518. maidArray[j].body0.transform.position.y,
  10519. maidArray[j].body0.transform.position.z + 4f));
  10520. string text2 = "handitem,HanditemL_Karaoke_Mike_I_.menu";
  10521. int i = j;
  10522. Maid maid = maidArray[j];
  10523. if (!isVR)
  10524. {
  10525. delCount[i] = 20;
  10526. if (goSlot[(int) selectList[i]] != null)
  10527. {
  10528. maidArray[i].body0.goSlot = new List<TBodySkin>(goSlot[(int) selectList[i]]);
  10529. for (int l = 0; l < bodyHit[(int) selectList[i]].Count; l++)
  10530. {
  10531. maidArray[i].body0.goSlot[l].bonehair.bodyhit = bodyHit[(int) selectList[i]][l];
  10532. }
  10533. }
  10534. }
  10535. string[] array = new string[2];
  10536. array = text2.Split(new char[] {','});
  10537. maid.DelProp(MPN.handitem, true);
  10538. maid.DelProp(MPN.accvag, true);
  10539. maid.DelProp(MPN.accanl, true);
  10540. maid.DelProp(MPN.kousoku_upper, true);
  10541. maid.DelProp(MPN.kousoku_lower, true);
  10542. if (array[0] != "")
  10543. {
  10544. maid.SetProp(array[0], array[1], 0, true, false);
  10545. }
  10546. maid.AllProcPropSeqStart();
  10547. }
  10548. }
  10549. isDance = true;
  10550. isDanceStart3 = true;
  10551. isF3 = false;
  10552. }
  10553. if ((Input.GetKey(KeyCode.Return) && Input.GetKeyDown(KeyCode.Alpha3))
  10554. || (Input.GetKey(KeyCode.KeypadEnter) && Input.GetKeyDown(KeyCode.Keypad3)))
  10555. {
  10556. GameMain.Instance.SoundMgr.StopBGM(0f);
  10557. isF3 = true;
  10558. if (this.getModKeyPressing(modKey.Shift))
  10559. {
  10560. isShift = true;
  10561. }
  10562. }
  10563. if (isSF1 || isSF2 || isSF3)
  10564. {
  10565. TextAsset textAsset = Resources.Load("SceneDance/dance_SmT_m0") as TextAsset;
  10566. string text4 = textAsset.text;
  10567. text4 = Regex.Replace(text4, "(\\r|\\n| )", string.Empty);
  10568. audioSourceBgm = GameMain.Instance.SoundMgr.GetAudioSourceBgm();
  10569. GameMain.Instance.SoundMgr.PlayBGM("se002.ogg", 0f, false);
  10570. for (int j = 0; j < maidCnt; j++)
  10571. {
  10572. if (!isShift)
  10573. {
  10574. if (!maidArray[j].body0.m_Bones.GetComponent<Animation>().GetClip("dance_cm3d2_002_smt_f.anm"))
  10575. {
  10576. maidArray[j].body0.LoadAnime("dance_cm3d2_002_smt_f.anm",
  10577. GameUty.FileSystem,
  10578. "dance_cm3d2_002_smt_f.anm",
  10579. false,
  10580. false);
  10581. }
  10582. }
  10583. else
  10584. {
  10585. if (!maidArray[j].body0.m_Bones.GetComponent<Animation>().GetClip("dance_cm3d2_kara02_001_smt_f1.anm"))
  10586. {
  10587. maidArray[j].body0.LoadAnime("dance_cm3d2_kara02_001_smt_f1.anm",
  10588. GameUty.FileSystem,
  10589. "dance_cm3d2_kara02_001_smt_f1.anm",
  10590. false,
  10591. false);
  10592. }
  10593. textAsset = (Resources.Load("SceneDance/stellar my tears_kara_voice") as TextAsset);
  10594. text4 = textAsset.text;
  10595. text4 = Regex.Replace(text4, "(\\r|\\n| )", string.Empty);
  10596. if (!isDanceStart1K && !isDanceStart3K && !isDanceStart4K && !isDanceStart5K && !isDanceStart6K
  10597. && !isDanceStart9K && !isDanceStart13K)
  10598. {
  10599. dancePos[j] = maidArray[j].transform.position;
  10600. danceRot[j] = maidArray[j].transform.localRotation;
  10601. }
  10602. }
  10603. m_baKuchipakuPattern[j] = Convert.FromBase64String(text4);
  10604. }
  10605. if (!isShift)
  10606. {
  10607. if (isSF1)
  10608. {
  10609. GameMain.Instance.SoundMgr.PlayDanceBGM("stellarmytears_short.ogg", 0f, false);
  10610. }
  10611. if (isSF2)
  10612. {
  10613. GameMain.Instance.SoundMgr.PlayDanceBGM("stellarmytears_short2.ogg", 0f, false);
  10614. }
  10615. if (isSF3)
  10616. {
  10617. GameMain.Instance.SoundMgr.PlayDanceBGM("stellarmytears_short3.ogg", 0f, false);
  10618. }
  10619. }
  10620. else
  10621. {
  10622. if (isSF1)
  10623. {
  10624. GameMain.Instance.SoundMgr.PlayDanceBGM("stellarmytears_short_nao_kara.ogg", 0f, false);
  10625. }
  10626. if (isSF2)
  10627. {
  10628. GameMain.Instance.SoundMgr.PlayDanceBGM("stellarmytears_short_sasaki_kara.ogg", 0f, false);
  10629. }
  10630. if (isSF3)
  10631. {
  10632. GameMain.Instance.SoundMgr.PlayDanceBGM("stellarmytears_short_misato_kara.ogg", 0f, false);
  10633. }
  10634. }
  10635. for (int j = 0; j < maidCnt; j++)
  10636. {
  10637. maidArray[j].StartKuchipakuPattern(0f, text4, true);
  10638. isStop[j] = false;
  10639. isLock[j] = false;
  10640. pHandL[j] = 0;
  10641. pHandR[j] = 0;
  10642. muneIKL[j] = false;
  10643. muneIKR[j] = false;
  10644. if (!isVR)
  10645. {
  10646. maidArray[j].body0.quaDefEyeL.eulerAngles = eyeL[(int) selectList[j]];
  10647. maidArray[j].body0.quaDefEyeR.eulerAngles = eyeR[(int) selectList[j]];
  10648. }
  10649. }
  10650. ikBui = 5;
  10651. isDanceStart1F = false;
  10652. isDanceStart2F = false;
  10653. isDanceStart3F = false;
  10654. isDanceStart4F = false;
  10655. isDanceStart5F = false;
  10656. isDanceStart6F = false;
  10657. isDanceStart7F = false;
  10658. isDanceStart8F = false;
  10659. isDanceStart9F = false;
  10660. isDanceStart10F = false;
  10661. isDanceStart11F = false;
  10662. isDanceStart12F = false;
  10663. isDanceStart13F = false;
  10664. isDanceStart14F = false;
  10665. isDanceStart15F = false;
  10666. for (int j = 0; j < maidCnt; j++)
  10667. {
  10668. danceFace[j] = 0f;
  10669. }
  10670. if (isDanceStart7V)
  10671. {
  10672. for (int j = 0; j < maidCnt; j++)
  10673. {
  10674. if (maidArray[j] && maidArray[j].Visible)
  10675. {
  10676. if (isDanceStart7V)
  10677. {
  10678. maidArray[j].SetPos(dancePos[j]);
  10679. maidArray[j].body0.transform.localRotation = danceRot[j];
  10680. }
  10681. }
  10682. }
  10683. isDanceStart7V = false;
  10684. }
  10685. if (isDanceStart8V)
  10686. {
  10687. for (int j = 0; j < maidCnt; j++)
  10688. {
  10689. if (maidArray[j] && maidArray[j].Visible)
  10690. {
  10691. if (isDanceStart8V)
  10692. {
  10693. maidArray[j].SetPos(dancePos[j]);
  10694. maidArray[j].body0.transform.localRotation = danceRot[j];
  10695. }
  10696. }
  10697. }
  10698. isDanceStart8V = false;
  10699. isDanceStart8P = false;
  10700. }
  10701. if (isDanceStart11V)
  10702. {
  10703. for (int j = 0; j < maidCnt; j++)
  10704. {
  10705. if (maidArray[j] && maidArray[j].Visible)
  10706. {
  10707. if (isDanceStart11V)
  10708. {
  10709. maidArray[j].SetPos(dancePos[j]);
  10710. maidArray[j].body0.transform.localRotation = danceRot[j];
  10711. }
  10712. }
  10713. }
  10714. isDanceStart11V = false;
  10715. }
  10716. if (isDanceStart1K || isDanceStart3K || isDanceStart4K || isDanceStart5K || isDanceStart6K || isDanceStart9K
  10717. || isDanceStart13K)
  10718. {
  10719. for (int j = 0; j < maidCnt; j++)
  10720. {
  10721. if (maidArray[j] && maidArray[j].Visible)
  10722. {
  10723. if (isDanceStart1K || isDanceStart3K || isDanceStart4K || isDanceStart5K || isDanceStart6K || isDanceStart9K
  10724. || isDanceStart13K)
  10725. {
  10726. maidArray[j].SetPos(dancePos[j]);
  10727. maidArray[j].body0.transform.localRotation = danceRot[j];
  10728. int i = j;
  10729. if (!isVR)
  10730. {
  10731. delCount[i] = 20;
  10732. if (goSlot[(int) selectList[i]] != null)
  10733. {
  10734. maidArray[i].body0.goSlot = new List<TBodySkin>(goSlot[(int) selectList[i]]);
  10735. for (int l = 0; l < bodyHit[(int) selectList[i]].Count; l++)
  10736. {
  10737. maidArray[i].body0.goSlot[l].bonehair.bodyhit = bodyHit[(int) selectList[i]][l];
  10738. }
  10739. }
  10740. }
  10741. Maid maid = maidArray[j];
  10742. maid.DelProp(MPN.handitem, true);
  10743. maid.DelProp(MPN.accvag, true);
  10744. maid.DelProp(MPN.accanl, true);
  10745. maid.DelProp(MPN.kousoku_upper, true);
  10746. maid.DelProp(MPN.kousoku_lower, true);
  10747. maid.AllProcPropSeqStart();
  10748. }
  10749. }
  10750. }
  10751. isDanceStart1K = false;
  10752. isDanceStart3K = false;
  10753. isDanceStart4K = false;
  10754. isDanceStart5K = false;
  10755. isDanceStart6K = false;
  10756. isDanceStart9K = false;
  10757. isDanceStart13K = false;
  10758. }
  10759. if (isDanceStart14V)
  10760. {
  10761. for (int j = 0; j < maidCnt; j++)
  10762. {
  10763. if (maidArray[j] && maidArray[j].Visible)
  10764. {
  10765. if (isDanceStart14V)
  10766. {
  10767. maidArray[j].SetPos(dancePos[j]);
  10768. maidArray[j].body0.transform.localRotation = danceRot[j];
  10769. }
  10770. }
  10771. }
  10772. isDanceStart14V = false;
  10773. }
  10774. if (isDanceStart15V)
  10775. {
  10776. for (int j = 0; j < maidCnt; j++)
  10777. {
  10778. if (maidArray[j] && maidArray[j].Visible)
  10779. {
  10780. if (isDanceStart15V)
  10781. {
  10782. maidArray[j].SetPos(dancePos[j]);
  10783. maidArray[j].body0.transform.localRotation = danceRot[j];
  10784. }
  10785. }
  10786. }
  10787. isDanceStart15V = false;
  10788. }
  10789. if (maidArray[1] && maidArray[1].Visible)
  10790. {
  10791. if (maidArray[0].transform.position == maidArray[1].transform.position)
  10792. {
  10793. Vector3 vector = Vector3.zero;
  10794. vector.x = 0.6f;
  10795. maidArray[1].SetPos(vector);
  10796. if (maidArray[2] && maidArray[2].Visible)
  10797. {
  10798. vector.x = -0.6f;
  10799. maidArray[2].SetPos(vector);
  10800. }
  10801. if (maidArray[3] && maidArray[3].Visible)
  10802. {
  10803. vector.x = 1.2f;
  10804. maidArray[3].SetPos(vector);
  10805. }
  10806. if (maidArray[4] && maidArray[4].Visible)
  10807. {
  10808. vector.x = -1.2f;
  10809. maidArray[4].SetPos(vector);
  10810. }
  10811. if (maidArray[5] && maidArray[5].Visible)
  10812. {
  10813. vector.x = 1.8f;
  10814. maidArray[5].SetPos(vector);
  10815. }
  10816. if (maidArray[6] && maidArray[6].Visible)
  10817. {
  10818. vector.x = -1.8f;
  10819. maidArray[6].SetPos(vector);
  10820. }
  10821. if (maidArray[7] && maidArray[7].Visible)
  10822. {
  10823. vector.x = 2.4f;
  10824. maidArray[7].SetPos(vector);
  10825. }
  10826. if (maidArray[8] && maidArray[8].Visible)
  10827. {
  10828. vector.x = -2.4f;
  10829. maidArray[8].SetPos(vector);
  10830. }
  10831. if (maidArray[9] && maidArray[9].Visible)
  10832. {
  10833. vector.x = 3f;
  10834. maidArray[9].SetPos(vector);
  10835. }
  10836. if (maidArray[10] && maidArray[10].Visible)
  10837. {
  10838. vector.x = -3f;
  10839. maidArray[10].SetPos(vector);
  10840. }
  10841. if (maidArray[11] && maidArray[11].Visible)
  10842. {
  10843. vector.x = 3.6f;
  10844. maidArray[11].SetPos(vector);
  10845. }
  10846. if (maidArray[12] && maidArray[12].Visible)
  10847. {
  10848. vector.x = -3.6f;
  10849. maidArray[12].SetPos(vector);
  10850. }
  10851. if (maidArray[13] && maidArray[13].Visible)
  10852. {
  10853. vector.x = 4.2f;
  10854. maidArray[13].SetPos(vector);
  10855. }
  10856. }
  10857. }
  10858. if (isShift)
  10859. {
  10860. isDanceStart4K = true;
  10861. for (int j = 0; j < maidCnt; j++)
  10862. {
  10863. maidArray[j].SetRot(new Vector3(maidArray[j].body0.transform.localRotation.x,
  10864. maidArray[j].body0.transform.localRotation.y + 90f,
  10865. maidArray[j].body0.transform.localRotation.z));
  10866. maidArray[j].SetPos(new Vector3(maidArray[j].body0.transform.position.x + 1f,
  10867. maidArray[j].body0.transform.position.y,
  10868. maidArray[j].body0.transform.position.z + 4f));
  10869. string text2 = "handitem,HanditemL_Karaoke_Mike_I_.menu";
  10870. int i = j;
  10871. Maid maid = maidArray[j];
  10872. if (!isVR)
  10873. {
  10874. delCount[i] = 20;
  10875. if (goSlot[(int) selectList[i]] != null)
  10876. {
  10877. maidArray[i].body0.goSlot = new List<TBodySkin>(goSlot[(int) selectList[i]]);
  10878. for (int l = 0; l < bodyHit[(int) selectList[i]].Count; l++)
  10879. {
  10880. maidArray[i].body0.goSlot[l].bonehair.bodyhit = bodyHit[(int) selectList[i]][l];
  10881. }
  10882. }
  10883. }
  10884. string[] array = new string[2];
  10885. array = text2.Split(new char[] {','});
  10886. maid.DelProp(MPN.handitem, true);
  10887. maid.DelProp(MPN.accvag, true);
  10888. maid.DelProp(MPN.accanl, true);
  10889. maid.DelProp(MPN.kousoku_upper, true);
  10890. maid.DelProp(MPN.kousoku_lower, true);
  10891. if (array[0] != "")
  10892. {
  10893. maid.SetProp(array[0], array[1], 0, true, false);
  10894. }
  10895. maid.AllProcPropSeqStart();
  10896. }
  10897. }
  10898. isDance = true;
  10899. isDanceStart4 = true;
  10900. isSF1 = false;
  10901. isSF2 = false;
  10902. isSF3 = false;
  10903. }
  10904. if (isHS1 || isHS2 || isHS3)
  10905. {
  10906. TextAsset textAsset = Resources.Load("SceneDance/dance_Hhs_m0") as TextAsset;
  10907. string text4 = textAsset.text;
  10908. text4 = Regex.Replace(text4, "(\\r|\\n| )", string.Empty);
  10909. audioSourceBgm = GameMain.Instance.SoundMgr.GetAudioSourceBgm();
  10910. GameMain.Instance.SoundMgr.PlayBGM("se002.ogg", 0f, false);
  10911. for (int j = 0; j < maidCnt; j++)
  10912. {
  10913. if (!isShift)
  10914. {
  10915. if (!maidArray[j].body0.m_Bones.GetComponent<Animation>().GetClip("dance_cm3d2_003_hs_f1.anm"))
  10916. {
  10917. maidArray[j].body0.LoadAnime("dance_cm3d2_003_hs_f1.anm",
  10918. GameUty.FileSystem,
  10919. "dance_cm3d2_003_hs_f1.anm",
  10920. false,
  10921. false);
  10922. }
  10923. }
  10924. else
  10925. {
  10926. if (!maidArray[j].body0.m_Bones.GetComponent<Animation>().GetClip("dance_cm3d2_kara02_003_hs_f1.anm"))
  10927. {
  10928. maidArray[j].body0.LoadAnime("dance_cm3d2_kara02_003_hs_f1.anm",
  10929. GameUty.FileSystem,
  10930. "dance_cm3d2_kara02_003_hs_f1.anm",
  10931. false,
  10932. false);
  10933. }
  10934. textAsset = (Resources.Load("SceneDance/happy_happy_scandal_kara_voice") as TextAsset);
  10935. text4 = textAsset.text;
  10936. text4 = Regex.Replace(text4, "(\\r|\\n| )", string.Empty);
  10937. if (!isDanceStart1K && !isDanceStart3K && !isDanceStart4K && !isDanceStart5K && !isDanceStart6K
  10938. && !isDanceStart9K && !isDanceStart13K)
  10939. {
  10940. dancePos[j] = maidArray[j].transform.position;
  10941. danceRot[j] = maidArray[j].transform.localRotation;
  10942. }
  10943. }
  10944. m_baKuchipakuPattern[j] = Convert.FromBase64String(text4);
  10945. }
  10946. if (!isShift)
  10947. {
  10948. if (isHS1)
  10949. {
  10950. GameMain.Instance.SoundMgr.PlayDanceBGM("happy_happy_scandal1.ogg", 0f, false);
  10951. }
  10952. if (isHS2)
  10953. {
  10954. GameMain.Instance.SoundMgr.PlayDanceBGM("happy_happy_scandal2.ogg", 0f, false);
  10955. }
  10956. if (isHS3)
  10957. {
  10958. GameMain.Instance.SoundMgr.PlayDanceBGM("happy_happy_scandal3.ogg", 0f, false);
  10959. }
  10960. }
  10961. else
  10962. {
  10963. if (isHS1)
  10964. {
  10965. GameMain.Instance.SoundMgr.PlayDanceBGM("happyhappyscandal_short_nao_kara.ogg", 0f, false);
  10966. }
  10967. if (isHS2)
  10968. {
  10969. GameMain.Instance.SoundMgr.PlayDanceBGM("happy_happy_scandal_sasaki_kara.ogg", 0f, false);
  10970. }
  10971. if (isHS3)
  10972. {
  10973. GameMain.Instance.SoundMgr.PlayDanceBGM("happy_happy_scandal_misato_kara.ogg", 0f, false);
  10974. }
  10975. }
  10976. for (int j = 0; j < maidCnt; j++)
  10977. {
  10978. maidArray[j].StartKuchipakuPattern(0f, text4, true);
  10979. isStop[j] = false;
  10980. isLock[j] = false;
  10981. pHandL[j] = 0;
  10982. pHandR[j] = 0;
  10983. muneIKL[j] = false;
  10984. muneIKR[j] = false;
  10985. if (!isVR)
  10986. {
  10987. maidArray[j].body0.quaDefEyeL.eulerAngles = eyeL[(int) selectList[j]];
  10988. maidArray[j].body0.quaDefEyeR.eulerAngles = eyeR[(int) selectList[j]];
  10989. }
  10990. }
  10991. ikBui = 5;
  10992. isDanceStart1F = false;
  10993. isDanceStart2F = false;
  10994. isDanceStart3F = false;
  10995. isDanceStart4F = false;
  10996. isDanceStart5F = false;
  10997. isDanceStart6F = false;
  10998. isDanceStart7F = false;
  10999. isDanceStart8F = false;
  11000. isDanceStart9F = false;
  11001. isDanceStart10F = false;
  11002. isDanceStart11F = false;
  11003. isDanceStart12F = false;
  11004. isDanceStart13F = false;
  11005. isDanceStart14F = false;
  11006. isDanceStart15F = false;
  11007. for (int j = 0; j < maidCnt; j++)
  11008. {
  11009. danceFace[j] = 0f;
  11010. }
  11011. if (isDanceStart7V)
  11012. {
  11013. for (int j = 0; j < maidCnt; j++)
  11014. {
  11015. if (maidArray[j] && maidArray[j].Visible)
  11016. {
  11017. if (isDanceStart7V)
  11018. {
  11019. maidArray[j].SetPos(dancePos[j]);
  11020. maidArray[j].body0.transform.localRotation = danceRot[j];
  11021. }
  11022. }
  11023. }
  11024. isDanceStart7V = false;
  11025. }
  11026. if (isDanceStart8V)
  11027. {
  11028. for (int j = 0; j < maidCnt; j++)
  11029. {
  11030. if (maidArray[j] && maidArray[j].Visible)
  11031. {
  11032. if (isDanceStart8V)
  11033. {
  11034. maidArray[j].SetPos(dancePos[j]);
  11035. maidArray[j].body0.transform.localRotation = danceRot[j];
  11036. }
  11037. }
  11038. }
  11039. isDanceStart8V = false;
  11040. isDanceStart8P = false;
  11041. }
  11042. if (isDanceStart11V)
  11043. {
  11044. for (int j = 0; j < maidCnt; j++)
  11045. {
  11046. if (maidArray[j] && maidArray[j].Visible)
  11047. {
  11048. if (isDanceStart11V)
  11049. {
  11050. maidArray[j].SetPos(dancePos[j]);
  11051. maidArray[j].body0.transform.localRotation = danceRot[j];
  11052. }
  11053. }
  11054. }
  11055. isDanceStart11V = false;
  11056. }
  11057. if (isDanceStart1K || isDanceStart3K || isDanceStart4K || isDanceStart5K || isDanceStart6K || isDanceStart9K
  11058. || isDanceStart13K)
  11059. {
  11060. for (int j = 0; j < maidCnt; j++)
  11061. {
  11062. if (maidArray[j] && maidArray[j].Visible)
  11063. {
  11064. if (isDanceStart1K || isDanceStart3K || isDanceStart4K || isDanceStart5K || isDanceStart6K || isDanceStart9K
  11065. || isDanceStart13K)
  11066. {
  11067. maidArray[j].SetPos(dancePos[j]);
  11068. maidArray[j].body0.transform.localRotation = danceRot[j];
  11069. int i = j;
  11070. if (!isVR)
  11071. {
  11072. delCount[i] = 20;
  11073. if (goSlot[(int) selectList[i]] != null)
  11074. {
  11075. maidArray[i].body0.goSlot = new List<TBodySkin>(goSlot[(int) selectList[i]]);
  11076. for (int l = 0; l < bodyHit[(int) selectList[i]].Count; l++)
  11077. {
  11078. maidArray[i].body0.goSlot[l].bonehair.bodyhit = bodyHit[(int) selectList[i]][l];
  11079. }
  11080. }
  11081. }
  11082. Maid maid = maidArray[j];
  11083. maid.DelProp(MPN.handitem, true);
  11084. maid.DelProp(MPN.accvag, true);
  11085. maid.DelProp(MPN.accanl, true);
  11086. maid.DelProp(MPN.kousoku_upper, true);
  11087. maid.DelProp(MPN.kousoku_lower, true);
  11088. maid.AllProcPropSeqStart();
  11089. }
  11090. }
  11091. }
  11092. isDanceStart1K = false;
  11093. isDanceStart3K = false;
  11094. isDanceStart4K = false;
  11095. isDanceStart5K = false;
  11096. isDanceStart6K = false;
  11097. isDanceStart9K = false;
  11098. isDanceStart13K = false;
  11099. }
  11100. if (isDanceStart14V)
  11101. {
  11102. for (int j = 0; j < maidCnt; j++)
  11103. {
  11104. if (maidArray[j] && maidArray[j].Visible)
  11105. {
  11106. if (isDanceStart14V)
  11107. {
  11108. maidArray[j].SetPos(dancePos[j]);
  11109. maidArray[j].body0.transform.localRotation = danceRot[j];
  11110. }
  11111. }
  11112. }
  11113. isDanceStart14V = false;
  11114. }
  11115. if (isDanceStart15V)
  11116. {
  11117. for (int j = 0; j < maidCnt; j++)
  11118. {
  11119. if (maidArray[j] && maidArray[j].Visible)
  11120. {
  11121. if (isDanceStart15V)
  11122. {
  11123. maidArray[j].SetPos(dancePos[j]);
  11124. maidArray[j].body0.transform.localRotation = danceRot[j];
  11125. }
  11126. }
  11127. }
  11128. isDanceStart15V = false;
  11129. }
  11130. if (maidArray[1] && maidArray[1].Visible)
  11131. {
  11132. if (maidArray[0].transform.position == maidArray[1].transform.position)
  11133. {
  11134. Vector3 vector = Vector3.zero;
  11135. vector.x = 0.6f;
  11136. maidArray[1].SetPos(vector);
  11137. if (maidArray[2] && maidArray[2].Visible)
  11138. {
  11139. vector.x = -0.6f;
  11140. maidArray[2].SetPos(vector);
  11141. }
  11142. if (maidArray[3] && maidArray[3].Visible)
  11143. {
  11144. vector.x = 1.2f;
  11145. maidArray[3].SetPos(vector);
  11146. }
  11147. if (maidArray[4] && maidArray[4].Visible)
  11148. {
  11149. vector.x = -1.2f;
  11150. maidArray[4].SetPos(vector);
  11151. }
  11152. if (maidArray[5] && maidArray[5].Visible)
  11153. {
  11154. vector.x = 1.8f;
  11155. maidArray[5].SetPos(vector);
  11156. }
  11157. if (maidArray[6] && maidArray[6].Visible)
  11158. {
  11159. vector.x = -1.8f;
  11160. maidArray[6].SetPos(vector);
  11161. }
  11162. if (maidArray[7] && maidArray[7].Visible)
  11163. {
  11164. vector.x = 2.4f;
  11165. maidArray[7].SetPos(vector);
  11166. }
  11167. if (maidArray[8] && maidArray[8].Visible)
  11168. {
  11169. vector.x = -2.4f;
  11170. maidArray[8].SetPos(vector);
  11171. }
  11172. if (maidArray[9] && maidArray[9].Visible)
  11173. {
  11174. vector.x = 3f;
  11175. maidArray[9].SetPos(vector);
  11176. }
  11177. if (maidArray[10] && maidArray[10].Visible)
  11178. {
  11179. vector.x = -3f;
  11180. maidArray[10].SetPos(vector);
  11181. }
  11182. if (maidArray[11] && maidArray[11].Visible)
  11183. {
  11184. vector.x = 3.6f;
  11185. maidArray[11].SetPos(vector);
  11186. }
  11187. if (maidArray[12] && maidArray[12].Visible)
  11188. {
  11189. vector.x = -3.6f;
  11190. maidArray[12].SetPos(vector);
  11191. }
  11192. if (maidArray[13] && maidArray[13].Visible)
  11193. {
  11194. vector.x = 4.2f;
  11195. maidArray[13].SetPos(vector);
  11196. }
  11197. }
  11198. }
  11199. if (isShift)
  11200. {
  11201. isDanceStart6K = true;
  11202. for (int j = 0; j < maidCnt; j++)
  11203. {
  11204. maidArray[j].SetRot(new Vector3(maidArray[j].body0.transform.localRotation.x,
  11205. maidArray[j].body0.transform.localRotation.y + 90f,
  11206. maidArray[j].body0.transform.localRotation.z));
  11207. maidArray[j].SetPos(new Vector3(maidArray[j].body0.transform.position.x + 1f,
  11208. maidArray[j].body0.transform.position.y,
  11209. maidArray[j].body0.transform.position.z + 4f));
  11210. string text2 = "handitem,HanditemL_Karaoke_Mike_I_.menu";
  11211. int i = j;
  11212. Maid maid = maidArray[j];
  11213. if (!isVR)
  11214. {
  11215. delCount[i] = 20;
  11216. if (goSlot[(int) selectList[i]] != null)
  11217. {
  11218. maidArray[i].body0.goSlot = new List<TBodySkin>(goSlot[(int) selectList[i]]);
  11219. for (int l = 0; l < bodyHit[(int) selectList[i]].Count; l++)
  11220. {
  11221. maidArray[i].body0.goSlot[l].bonehair.bodyhit = bodyHit[(int) selectList[i]][l];
  11222. }
  11223. }
  11224. }
  11225. string[] array = new string[2];
  11226. array = text2.Split(new char[] {','});
  11227. maid.DelProp(MPN.handitem, true);
  11228. maid.DelProp(MPN.accvag, true);
  11229. maid.DelProp(MPN.accanl, true);
  11230. maid.DelProp(MPN.kousoku_upper, true);
  11231. maid.DelProp(MPN.kousoku_lower, true);
  11232. if (array[0] != "")
  11233. {
  11234. maid.SetProp(array[0], array[1], 0, true, false);
  11235. }
  11236. maid.AllProcPropSeqStart();
  11237. }
  11238. }
  11239. isDance = true;
  11240. isDanceStart6 = true;
  11241. isHS1 = false;
  11242. isHS2 = false;
  11243. isHS3 = false;
  11244. }
  11245. if (isHS4 || isHS5 || isHS6)
  11246. {
  11247. audioSourceBgm = GameMain.Instance.SoundMgr.GetAudioSourceBgm();
  11248. GameMain.Instance.SoundMgr.PlayBGM("se002.ogg", 0f, false);
  11249. for (int j = 0; j < maidCnt; j++)
  11250. {
  11251. TextAsset textAsset = Resources.Load("SceneDance/dance_Hhs_m0") as TextAsset;
  11252. string text5 = "dance_cm3d2_003_hs_f1.anm";
  11253. switch (j)
  11254. {
  11255. case 1:
  11256. case 3:
  11257. case 5:
  11258. case 7:
  11259. case 9:
  11260. case 11:
  11261. case 13:
  11262. text5 = "dance_cm3d2_003_hs_f2.anm";
  11263. textAsset = (Resources.Load("SceneDance/dance_Hhs_m1") as TextAsset);
  11264. break;
  11265. }
  11266. if (maidArray[j] && maidArray[j].Visible)
  11267. {
  11268. if (!maidArray[j].body0.m_Bones.GetComponent<Animation>().GetClip(text5))
  11269. {
  11270. maidArray[j].body0.LoadAnime(text5, GameUty.FileSystem, text5, false, false);
  11271. }
  11272. string text4 = textAsset.text;
  11273. text4 = Regex.Replace(text4, "(\\r|\\n| )", string.Empty);
  11274. maidArray[j].StartKuchipakuPattern(0f, text4, true);
  11275. m_baKuchipakuPattern[j] = Convert.FromBase64String(text4);
  11276. }
  11277. }
  11278. if (isHS4)
  11279. {
  11280. GameMain.Instance.SoundMgr.PlayDanceBGM("happy_happy_scandal1.ogg", 0f, false);
  11281. }
  11282. if (isHS5)
  11283. {
  11284. GameMain.Instance.SoundMgr.PlayDanceBGM("happy_happy_scandal2.ogg", 0f, false);
  11285. }
  11286. if (isHS6)
  11287. {
  11288. GameMain.Instance.SoundMgr.PlayDanceBGM("happy_happy_scandal3.ogg", 0f, false);
  11289. }
  11290. ikBui = 5;
  11291. isDanceStart1F = false;
  11292. isDanceStart2F = false;
  11293. isDanceStart3F = false;
  11294. isDanceStart4F = false;
  11295. isDanceStart5F = false;
  11296. isDanceStart6F = false;
  11297. isDanceStart7F = false;
  11298. isDanceStart8F = false;
  11299. isDanceStart9F = false;
  11300. isDanceStart10F = false;
  11301. isDanceStart11F = false;
  11302. isDanceStart12F = false;
  11303. isDanceStart13F = false;
  11304. isDanceStart14F = false;
  11305. isDanceStart15F = false;
  11306. for (int j = 0; j < maidCnt; j++)
  11307. {
  11308. danceFace[j] = 0f;
  11309. }
  11310. if (isDanceStart7V)
  11311. {
  11312. for (int j = 0; j < maidCnt; j++)
  11313. {
  11314. if (maidArray[j] && maidArray[j].Visible)
  11315. {
  11316. if (isDanceStart7V)
  11317. {
  11318. maidArray[j].SetPos(dancePos[j]);
  11319. maidArray[j].body0.transform.localRotation = danceRot[j];
  11320. }
  11321. }
  11322. }
  11323. isDanceStart7V = false;
  11324. }
  11325. if (isDanceStart8V)
  11326. {
  11327. for (int j = 0; j < maidCnt; j++)
  11328. {
  11329. if (maidArray[j] && maidArray[j].Visible)
  11330. {
  11331. if (isDanceStart8V)
  11332. {
  11333. maidArray[j].SetPos(dancePos[j]);
  11334. maidArray[j].body0.transform.localRotation = danceRot[j];
  11335. }
  11336. }
  11337. }
  11338. isDanceStart8V = false;
  11339. isDanceStart8P = false;
  11340. }
  11341. if (isDanceStart11V)
  11342. {
  11343. for (int j = 0; j < maidCnt; j++)
  11344. {
  11345. if (maidArray[j] && maidArray[j].Visible)
  11346. {
  11347. if (isDanceStart11V)
  11348. {
  11349. maidArray[j].SetPos(dancePos[j]);
  11350. maidArray[j].body0.transform.localRotation = danceRot[j];
  11351. }
  11352. }
  11353. }
  11354. isDanceStart11V = false;
  11355. }
  11356. if (isDanceStart1K || isDanceStart3K || isDanceStart4K || isDanceStart5K || isDanceStart6K || isDanceStart9K
  11357. || isDanceStart13K)
  11358. {
  11359. for (int j = 0; j < maidCnt; j++)
  11360. {
  11361. if (maidArray[j] && maidArray[j].Visible)
  11362. {
  11363. if (isDanceStart1K || isDanceStart3K || isDanceStart4K || isDanceStart5K || isDanceStart6K || isDanceStart9K
  11364. || isDanceStart13K)
  11365. {
  11366. maidArray[j].SetPos(dancePos[j]);
  11367. maidArray[j].body0.transform.localRotation = danceRot[j];
  11368. int i = j;
  11369. if (!isVR)
  11370. {
  11371. delCount[i] = 20;
  11372. if (goSlot[(int) selectList[i]] != null)
  11373. {
  11374. maidArray[i].body0.goSlot = new List<TBodySkin>(goSlot[(int) selectList[i]]);
  11375. for (int l = 0; l < bodyHit[(int) selectList[i]].Count; l++)
  11376. {
  11377. maidArray[i].body0.goSlot[l].bonehair.bodyhit = bodyHit[(int) selectList[i]][l];
  11378. }
  11379. }
  11380. }
  11381. Maid maid = maidArray[j];
  11382. maid.DelProp(MPN.handitem, true);
  11383. maid.DelProp(MPN.accvag, true);
  11384. maid.DelProp(MPN.accanl, true);
  11385. maid.DelProp(MPN.kousoku_upper, true);
  11386. maid.DelProp(MPN.kousoku_lower, true);
  11387. maid.AllProcPropSeqStart();
  11388. }
  11389. }
  11390. }
  11391. isDanceStart1K = false;
  11392. isDanceStart3K = false;
  11393. isDanceStart4K = false;
  11394. isDanceStart5K = false;
  11395. isDanceStart6K = false;
  11396. isDanceStart9K = false;
  11397. isDanceStart13K = false;
  11398. }
  11399. if (isDanceStart14V)
  11400. {
  11401. for (int j = 0; j < maidCnt; j++)
  11402. {
  11403. if (maidArray[j] && maidArray[j].Visible)
  11404. {
  11405. if (isDanceStart14V)
  11406. {
  11407. maidArray[j].SetPos(dancePos[j]);
  11408. maidArray[j].body0.transform.localRotation = danceRot[j];
  11409. }
  11410. }
  11411. }
  11412. isDanceStart14V = false;
  11413. }
  11414. if (isDanceStart15V)
  11415. {
  11416. for (int j = 0; j < maidCnt; j++)
  11417. {
  11418. if (maidArray[j] && maidArray[j].Visible)
  11419. {
  11420. if (isDanceStart15V)
  11421. {
  11422. maidArray[j].SetPos(dancePos[j]);
  11423. maidArray[j].body0.transform.localRotation = danceRot[j];
  11424. }
  11425. }
  11426. }
  11427. isDanceStart15V = false;
  11428. }
  11429. for (int j = 0; j < maidCnt; j++)
  11430. {
  11431. isStop[j] = false;
  11432. isLock[j] = false;
  11433. pHandL[j] = 0;
  11434. pHandR[j] = 0;
  11435. muneIKL[j] = false;
  11436. muneIKR[j] = false;
  11437. if (!isVR)
  11438. {
  11439. maidArray[j].body0.quaDefEyeL.eulerAngles = eyeL[(int) selectList[j]];
  11440. maidArray[j].body0.quaDefEyeR.eulerAngles = eyeR[(int) selectList[j]];
  11441. }
  11442. if (maidArray[j].transform.position.y != 100f)
  11443. {
  11444. dancePos[j] = maidArray[j].transform.position;
  11445. }
  11446. else
  11447. {
  11448. dancePos[j] = new Vector3(maidArray[j].transform.position.x, 0f, maidArray[j].transform.position.z);
  11449. }
  11450. danceRot[j] = maidArray[j].transform.localRotation;
  11451. }
  11452. if (maidArray[1] && maidArray[1].Visible)
  11453. {
  11454. maidArray[1].SetPos(new Vector3(maidArray[0].transform.position.x, 100f, maidArray[0].transform.position.z));
  11455. maidArray[1].body0.transform.localRotation = maidArray[0].body0.transform.localRotation;
  11456. }
  11457. if (maidArray[3] && maidArray[3].Visible)
  11458. {
  11459. maidArray[3].SetPos(new Vector3(maidArray[2].transform.position.x, 100f, maidArray[2].transform.position.z));
  11460. maidArray[3].body0.transform.localRotation = maidArray[2].body0.transform.localRotation;
  11461. }
  11462. if (maidArray[5] && maidArray[5].Visible)
  11463. {
  11464. maidArray[5].SetPos(new Vector3(maidArray[4].transform.position.x, 100f, maidArray[4].transform.position.z));
  11465. maidArray[5].body0.transform.localRotation = maidArray[4].body0.transform.localRotation;
  11466. }
  11467. if (maidArray[7] && maidArray[7].Visible)
  11468. {
  11469. maidArray[7].SetPos(new Vector3(maidArray[6].transform.position.x, 100f, maidArray[6].transform.position.z));
  11470. maidArray[7].body0.transform.localRotation = maidArray[6].body0.transform.localRotation;
  11471. }
  11472. if (maidArray[9] && maidArray[9].Visible)
  11473. {
  11474. maidArray[9].SetPos(new Vector3(maidArray[8].transform.position.x, 100f, maidArray[8].transform.position.z));
  11475. maidArray[9].body0.transform.localRotation = maidArray[8].body0.transform.localRotation;
  11476. }
  11477. if (maidArray[11] && maidArray[11].Visible)
  11478. {
  11479. maidArray[11].SetPos(new Vector3(maidArray[10].transform.position.x, 100f, maidArray[10].transform.position.z));
  11480. maidArray[11].body0.transform.localRotation = maidArray[10].body0.transform.localRotation;
  11481. }
  11482. if (maidArray[13] && maidArray[13].Visible)
  11483. {
  11484. maidArray[13].SetPos(new Vector3(maidArray[12].transform.position.x, 100f, maidArray[12].transform.position.z));
  11485. maidArray[13].body0.transform.localRotation = maidArray[12].body0.transform.localRotation;
  11486. }
  11487. if (maidArray[2] && maidArray[2].Visible)
  11488. {
  11489. if (maidArray[0].transform.position == maidArray[2].transform.position)
  11490. {
  11491. Vector3 vector = Vector3.zero;
  11492. vector.x = 0.6f;
  11493. maidArray[1].SetPos(vector);
  11494. if (maidArray[2] && maidArray[2].Visible)
  11495. {
  11496. vector.x = -0.6f;
  11497. maidArray[2].SetPos(vector);
  11498. }
  11499. if (maidArray[3] && maidArray[3].Visible)
  11500. {
  11501. vector.x = 1.2f;
  11502. maidArray[3].SetPos(vector);
  11503. }
  11504. if (maidArray[4] && maidArray[4].Visible)
  11505. {
  11506. vector.x = -1.2f;
  11507. maidArray[4].SetPos(vector);
  11508. }
  11509. if (maidArray[5] && maidArray[5].Visible)
  11510. {
  11511. vector.x = 1.8f;
  11512. maidArray[5].SetPos(vector);
  11513. }
  11514. if (maidArray[6] && maidArray[6].Visible)
  11515. {
  11516. vector.x = -1.8f;
  11517. maidArray[6].SetPos(vector);
  11518. }
  11519. if (maidArray[7] && maidArray[7].Visible)
  11520. {
  11521. vector.x = 2.4f;
  11522. maidArray[7].SetPos(vector);
  11523. }
  11524. if (maidArray[8] && maidArray[8].Visible)
  11525. {
  11526. vector.x = -2.4f;
  11527. maidArray[8].SetPos(vector);
  11528. }
  11529. if (maidArray[9] && maidArray[9].Visible)
  11530. {
  11531. vector.x = 3f;
  11532. maidArray[9].SetPos(vector);
  11533. }
  11534. if (maidArray[10] && maidArray[10].Visible)
  11535. {
  11536. vector.x = -3f;
  11537. maidArray[10].SetPos(vector);
  11538. }
  11539. if (maidArray[11] && maidArray[11].Visible)
  11540. {
  11541. vector.x = 3.6f;
  11542. maidArray[11].SetPos(vector);
  11543. }
  11544. if (maidArray[12] && maidArray[12].Visible)
  11545. {
  11546. vector.x = -3.6f;
  11547. maidArray[12].SetPos(vector);
  11548. }
  11549. if (maidArray[13] && maidArray[13].Visible)
  11550. {
  11551. vector.x = 4.2f;
  11552. maidArray[13].SetPos(vector);
  11553. }
  11554. }
  11555. }
  11556. isDance = true;
  11557. isDanceStart7 = true;
  11558. isHS4 = false;
  11559. isHS5 = false;
  11560. isHS6 = false;
  11561. }
  11562. if (isHS7 || isHS8 || isHS9)
  11563. {
  11564. audioSourceBgm = GameMain.Instance.SoundMgr.GetAudioSourceBgm();
  11565. GameMain.Instance.SoundMgr.PlayBGM("se002.ogg", 0f, false);
  11566. for (int j = 0; j < maidCnt; j++)
  11567. {
  11568. string text5 = "dance_cm3d2_003_hs_f1.anm";
  11569. TextAsset textAsset = Resources.Load("SceneDance/dance_Hhs_m0") as TextAsset;
  11570. switch (j)
  11571. {
  11572. case 1:
  11573. case 5:
  11574. case 9:
  11575. case 13:
  11576. text5 = "dance_cm3d2_003_hs_f2.anm";
  11577. textAsset = (Resources.Load("SceneDance/dance_Hhs_m1") as TextAsset);
  11578. break;
  11579. case 2:
  11580. case 6:
  11581. case 10:
  11582. text5 = "dance_cm3d2_003_hs_f3.anm";
  11583. textAsset = (Resources.Load("SceneDance/dance_Hhs_m2") as TextAsset);
  11584. break;
  11585. case 3:
  11586. case 7:
  11587. case 11:
  11588. text5 = "dance_cm3d2_003_hs_f4.anm";
  11589. textAsset = (Resources.Load("SceneDance/dance_Hhs_m2") as TextAsset);
  11590. break;
  11591. }
  11592. if (maidArray[j] && maidArray[j].Visible)
  11593. {
  11594. if (!maidArray[j].body0.m_Bones.GetComponent<Animation>().GetClip(text5))
  11595. {
  11596. maidArray[j].body0.LoadAnime(text5, GameUty.FileSystem, text5, false, false);
  11597. }
  11598. }
  11599. string text4 = textAsset.text;
  11600. text4 = Regex.Replace(text4, "(\\r|\\n| )", string.Empty);
  11601. maidArray[j].StartKuchipakuPattern(0f, text4, true);
  11602. m_baKuchipakuPattern[j] = Convert.FromBase64String(text4);
  11603. }
  11604. if (isHS7)
  11605. {
  11606. GameMain.Instance.SoundMgr.PlayDanceBGM("happy_happy_scandal1.ogg", 0f, false);
  11607. }
  11608. if (isHS8)
  11609. {
  11610. GameMain.Instance.SoundMgr.PlayDanceBGM("happy_happy_scandal2.ogg", 0f, false);
  11611. }
  11612. if (isHS9)
  11613. {
  11614. GameMain.Instance.SoundMgr.PlayDanceBGM("happy_happy_scandal3.ogg", 0f, false);
  11615. }
  11616. ikBui = 5;
  11617. isDanceStart1F = false;
  11618. isDanceStart2F = false;
  11619. isDanceStart3F = false;
  11620. isDanceStart4F = false;
  11621. isDanceStart5F = false;
  11622. isDanceStart6F = false;
  11623. isDanceStart7F = false;
  11624. isDanceStart8F = false;
  11625. isDanceStart9F = false;
  11626. isDanceStart10F = false;
  11627. isDanceStart11F = false;
  11628. isDanceStart12F = false;
  11629. isDanceStart13F = false;
  11630. isDanceStart14F = false;
  11631. isDanceStart15F = false;
  11632. for (int j = 0; j < maidCnt; j++)
  11633. {
  11634. danceFace[j] = 0f;
  11635. }
  11636. if (isDanceStart8V)
  11637. {
  11638. for (int j = 0; j < maidCnt; j++)
  11639. {
  11640. if (maidArray[j] && maidArray[j].Visible)
  11641. {
  11642. if (isDanceStart8V)
  11643. {
  11644. maidArray[j].SetPos(dancePos[j]);
  11645. maidArray[j].body0.transform.localRotation = danceRot[j];
  11646. }
  11647. }
  11648. }
  11649. isDanceStart8V = false;
  11650. isDanceStart8P = false;
  11651. }
  11652. for (int j = 0; j < maidCnt; j++)
  11653. {
  11654. isStop[j] = false;
  11655. isLock[j] = false;
  11656. pHandL[j] = 0;
  11657. pHandR[j] = 0;
  11658. muneIKL[j] = false;
  11659. muneIKR[j] = false;
  11660. if (!isVR)
  11661. {
  11662. maidArray[j].body0.quaDefEyeL.eulerAngles = eyeL[(int) selectList[j]];
  11663. maidArray[j].body0.quaDefEyeR.eulerAngles = eyeR[(int) selectList[j]];
  11664. }
  11665. if (maidArray[j].transform.position.y != 100f)
  11666. {
  11667. dancePos[j] = maidArray[j].transform.position;
  11668. }
  11669. else
  11670. {
  11671. dancePos[j] = new Vector3(maidArray[j].transform.position.x, 0f, maidArray[j].transform.position.z);
  11672. }
  11673. danceRot[j] = maidArray[j].transform.localRotation;
  11674. }
  11675. if ((maidArray[0].transform.position.x == 0.3f || maidArray[0].transform.position.x == -0.3f)
  11676. && maidArray[0].transform.position.y == 0f && maidArray[0].transform.position.z == 0f)
  11677. {
  11678. maidArray[0].SetPos(Vector3.zero);
  11679. maidArray[0].SetRot(Vector3.zero);
  11680. }
  11681. if (maidArray[1] && maidArray[1].Visible)
  11682. {
  11683. maidArray[1].SetPos(new Vector3(maidArray[0].transform.position.x, 100f, maidArray[0].transform.position.z));
  11684. maidArray[1].body0.transform.localRotation = maidArray[0].body0.transform.localRotation;
  11685. }
  11686. if (maidArray[2] && maidArray[2].Visible)
  11687. {
  11688. maidArray[2].SetPos(maidArray[0].transform.position);
  11689. maidArray[2].body0.transform.localRotation = maidArray[0].body0.transform.localRotation;
  11690. }
  11691. if (maidArray[3] && maidArray[3].Visible)
  11692. {
  11693. maidArray[3].SetPos(maidArray[0].transform.position);
  11694. maidArray[3].body0.transform.localRotation = maidArray[0].body0.transform.localRotation;
  11695. }
  11696. if (maidArray[5] && maidArray[5].Visible)
  11697. {
  11698. maidArray[5].SetPos(new Vector3(maidArray[4].transform.position.x, 100f, maidArray[4].transform.position.z));
  11699. maidArray[5].body0.transform.localRotation = maidArray[4].body0.transform.localRotation;
  11700. }
  11701. if (maidArray[6] && maidArray[6].Visible)
  11702. {
  11703. maidArray[6].SetPos(maidArray[4].transform.position);
  11704. maidArray[6].body0.transform.localRotation = maidArray[4].body0.transform.localRotation;
  11705. }
  11706. if (maidArray[7] && maidArray[7].Visible)
  11707. {
  11708. maidArray[7].SetPos(maidArray[4].transform.position);
  11709. maidArray[7].body0.transform.localRotation = maidArray[4].body0.transform.localRotation;
  11710. }
  11711. if (maidArray[9] && maidArray[9].Visible)
  11712. {
  11713. maidArray[9].SetPos(new Vector3(maidArray[8].transform.position.x, 100f, maidArray[8].transform.position.z));
  11714. maidArray[9].body0.transform.localRotation = maidArray[8].body0.transform.localRotation;
  11715. }
  11716. if (maidArray[10] && maidArray[10].Visible)
  11717. {
  11718. maidArray[10].SetPos(maidArray[8].transform.position);
  11719. maidArray[10].body0.transform.localRotation = maidArray[8].body0.transform.localRotation;
  11720. }
  11721. if (maidArray[11] && maidArray[11].Visible)
  11722. {
  11723. maidArray[11].SetPos(maidArray[8].transform.position);
  11724. maidArray[11].body0.transform.localRotation = maidArray[8].body0.transform.localRotation;
  11725. }
  11726. if (maidArray[13] && maidArray[13].Visible)
  11727. {
  11728. maidArray[13].SetPos(new Vector3(maidArray[12].transform.position.x, 100f, maidArray[12].transform.position.z));
  11729. maidArray[13].body0.transform.localRotation = maidArray[12].body0.transform.localRotation;
  11730. }
  11731. if (maidArray[4] && maidArray[4].Visible)
  11732. {
  11733. if (maidArray[0].transform.position == maidArray[4].transform.position)
  11734. {
  11735. Vector3 vector = Vector3.zero;
  11736. vector.x = 0.6f;
  11737. maidArray[1].SetPos(vector);
  11738. if (maidArray[2] && maidArray[2].Visible)
  11739. {
  11740. vector.x = -0.6f;
  11741. maidArray[2].SetPos(vector);
  11742. }
  11743. if (maidArray[3] && maidArray[3].Visible)
  11744. {
  11745. vector.x = 1.2f;
  11746. maidArray[3].SetPos(vector);
  11747. }
  11748. if (maidArray[4] && maidArray[4].Visible)
  11749. {
  11750. vector.x = -1.2f;
  11751. maidArray[4].SetPos(vector);
  11752. }
  11753. if (maidArray[5] && maidArray[5].Visible)
  11754. {
  11755. vector.x = 1.8f;
  11756. maidArray[5].SetPos(vector);
  11757. }
  11758. if (maidArray[6] && maidArray[6].Visible)
  11759. {
  11760. vector.x = -1.8f;
  11761. maidArray[6].SetPos(vector);
  11762. }
  11763. if (maidArray[7] && maidArray[7].Visible)
  11764. {
  11765. vector.x = 2.4f;
  11766. maidArray[7].SetPos(vector);
  11767. }
  11768. if (maidArray[8] && maidArray[8].Visible)
  11769. {
  11770. vector.x = -2.4f;
  11771. maidArray[8].SetPos(vector);
  11772. }
  11773. if (maidArray[9] && maidArray[9].Visible)
  11774. {
  11775. vector.x = 3f;
  11776. maidArray[9].SetPos(vector);
  11777. }
  11778. if (maidArray[10] && maidArray[10].Visible)
  11779. {
  11780. vector.x = -3f;
  11781. maidArray[10].SetPos(vector);
  11782. }
  11783. if (maidArray[11] && maidArray[11].Visible)
  11784. {
  11785. vector.x = 3.6f;
  11786. maidArray[11].SetPos(vector);
  11787. }
  11788. if (maidArray[12] && maidArray[12].Visible)
  11789. {
  11790. vector.x = -3.6f;
  11791. maidArray[12].SetPos(vector);
  11792. }
  11793. if (maidArray[13] && maidArray[13].Visible)
  11794. {
  11795. vector.x = 4.2f;
  11796. maidArray[13].SetPos(vector);
  11797. }
  11798. }
  11799. }
  11800. isDance = true;
  11801. isDanceStart8 = true;
  11802. isHS7 = false;
  11803. isHS8 = false;
  11804. isHS9 = false;
  11805. }
  11806. if (isCF1)
  11807. {
  11808. TextAsset textAsset = Resources.Load("SceneDance/dance_RtY_m0") as TextAsset;
  11809. string text4 = textAsset.text;
  11810. text4 = Regex.Replace(text4, "(\\r|\\n| )", string.Empty);
  11811. audioSourceBgm = GameMain.Instance.SoundMgr.GetAudioSourceBgm();
  11812. GameMain.Instance.SoundMgr.PlayBGM("se002.ogg", 0f, false);
  11813. for (int j = 0; j < maidCnt; j++)
  11814. {
  11815. if (!isShift)
  11816. {
  11817. if (!maidArray[j].body0.m_Bones.GetComponent<Animation>().GetClip("dance_cm3d_003_sp2_f1.anm"))
  11818. {
  11819. maidArray[j].body0.LoadAnime("dance_cm3d_003_sp2_f1.anm",
  11820. GameUty.FileSystem,
  11821. "dance_cm3d_003_sp2_f1.anm",
  11822. false,
  11823. false);
  11824. }
  11825. }
  11826. else
  11827. {
  11828. if (!maidArray[j].body0.m_Bones.GetComponent<Animation>().GetClip("dance_cm3d2_kara02_002_rty_f1.anm"))
  11829. {
  11830. maidArray[j].body0.LoadAnime("dance_cm3d2_kara02_002_rty_f1.anm",
  11831. GameUty.FileSystem,
  11832. "dance_cm3d2_kara02_002_rty_f1.anm",
  11833. false,
  11834. false);
  11835. }
  11836. textAsset = (Resources.Load("SceneDance/rhythmix to you_kara_voice") as TextAsset);
  11837. text4 = textAsset.text;
  11838. text4 = Regex.Replace(text4, "(\\r|\\n| )", string.Empty);
  11839. if (!isDanceStart1K && !isDanceStart3K && !isDanceStart4K && !isDanceStart5K && !isDanceStart6K
  11840. && !isDanceStart9K && !isDanceStart13K)
  11841. {
  11842. dancePos[j] = maidArray[j].transform.position;
  11843. danceRot[j] = maidArray[j].transform.localRotation;
  11844. }
  11845. }
  11846. m_baKuchipakuPattern[j] = Convert.FromBase64String(text4);
  11847. }
  11848. if (!isShift)
  11849. {
  11850. GameMain.Instance.SoundMgr.PlayDanceBGM("RhythmixToYou.ogg", 0f, false);
  11851. }
  11852. else
  11853. {
  11854. GameMain.Instance.SoundMgr.PlayDanceBGM("rhythmixtoyou_kara.ogg", 0f, false);
  11855. }
  11856. for (int j = 0; j < maidCnt; j++)
  11857. {
  11858. maidArray[j].StartKuchipakuPattern(0f, text4, true);
  11859. isStop[j] = false;
  11860. isLock[j] = false;
  11861. pHandL[j] = 0;
  11862. pHandR[j] = 0;
  11863. muneIKL[j] = false;
  11864. muneIKR[j] = false;
  11865. if (!isVR)
  11866. {
  11867. maidArray[j].body0.quaDefEyeL.eulerAngles = eyeL[(int) selectList[j]];
  11868. maidArray[j].body0.quaDefEyeR.eulerAngles = eyeR[(int) selectList[j]];
  11869. }
  11870. }
  11871. ikBui = 5;
  11872. isDanceStart1F = false;
  11873. isDanceStart2F = false;
  11874. isDanceStart3F = false;
  11875. isDanceStart4F = false;
  11876. isDanceStart5F = false;
  11877. isDanceStart6F = false;
  11878. isDanceStart7F = false;
  11879. isDanceStart8F = false;
  11880. isDanceStart9F = false;
  11881. isDanceStart10F = false;
  11882. isDanceStart11F = false;
  11883. isDanceStart12F = false;
  11884. isDanceStart13F = false;
  11885. isDanceStart14F = false;
  11886. isDanceStart15F = false;
  11887. for (int j = 0; j < maidCnt; j++)
  11888. {
  11889. danceFace[j] = 0f;
  11890. }
  11891. if (isDanceStart7V)
  11892. {
  11893. for (int j = 0; j < maidCnt; j++)
  11894. {
  11895. if (maidArray[j] && maidArray[j].Visible)
  11896. {
  11897. if (isDanceStart7V)
  11898. {
  11899. maidArray[j].SetPos(dancePos[j]);
  11900. maidArray[j].body0.transform.localRotation = danceRot[j];
  11901. }
  11902. }
  11903. }
  11904. isDanceStart7V = false;
  11905. }
  11906. if (isDanceStart8V)
  11907. {
  11908. for (int j = 0; j < maidCnt; j++)
  11909. {
  11910. if (maidArray[j] && maidArray[j].Visible)
  11911. {
  11912. if (isDanceStart8V)
  11913. {
  11914. maidArray[j].SetPos(dancePos[j]);
  11915. maidArray[j].body0.transform.localRotation = danceRot[j];
  11916. }
  11917. }
  11918. }
  11919. isDanceStart8V = false;
  11920. isDanceStart8P = false;
  11921. }
  11922. if (isDanceStart11V)
  11923. {
  11924. for (int j = 0; j < maidCnt; j++)
  11925. {
  11926. if (maidArray[j] && maidArray[j].Visible)
  11927. {
  11928. if (isDanceStart11V)
  11929. {
  11930. maidArray[j].SetPos(dancePos[j]);
  11931. maidArray[j].body0.transform.localRotation = danceRot[j];
  11932. }
  11933. }
  11934. }
  11935. isDanceStart11V = false;
  11936. }
  11937. if (isDanceStart1K || isDanceStart3K || isDanceStart4K || isDanceStart5K || isDanceStart6K || isDanceStart9K
  11938. || isDanceStart13K)
  11939. {
  11940. for (int j = 0; j < maidCnt; j++)
  11941. {
  11942. if (maidArray[j] && maidArray[j].Visible)
  11943. {
  11944. if (isDanceStart1K || isDanceStart3K || isDanceStart4K || isDanceStart5K || isDanceStart6K || isDanceStart9K
  11945. || isDanceStart13K)
  11946. {
  11947. maidArray[j].SetPos(dancePos[j]);
  11948. maidArray[j].body0.transform.localRotation = danceRot[j];
  11949. int i = j;
  11950. if (!isVR)
  11951. {
  11952. delCount[i] = 20;
  11953. if (goSlot[(int) selectList[i]] != null)
  11954. {
  11955. maidArray[i].body0.goSlot = new List<TBodySkin>(goSlot[(int) selectList[i]]);
  11956. for (int l = 0; l < bodyHit[(int) selectList[i]].Count; l++)
  11957. {
  11958. maidArray[i].body0.goSlot[l].bonehair.bodyhit = bodyHit[(int) selectList[i]][l];
  11959. }
  11960. }
  11961. }
  11962. Maid maid = maidArray[j];
  11963. maid.DelProp(MPN.handitem, true);
  11964. maid.DelProp(MPN.accvag, true);
  11965. maid.DelProp(MPN.accanl, true);
  11966. maid.DelProp(MPN.kousoku_upper, true);
  11967. maid.DelProp(MPN.kousoku_lower, true);
  11968. maid.AllProcPropSeqStart();
  11969. }
  11970. }
  11971. }
  11972. isDanceStart1K = false;
  11973. isDanceStart3K = false;
  11974. isDanceStart4K = false;
  11975. isDanceStart5K = false;
  11976. isDanceStart6K = false;
  11977. isDanceStart9K = false;
  11978. isDanceStart13K = false;
  11979. }
  11980. if (isDanceStart14V)
  11981. {
  11982. for (int j = 0; j < maidCnt; j++)
  11983. {
  11984. if (maidArray[j] && maidArray[j].Visible)
  11985. {
  11986. if (isDanceStart14V)
  11987. {
  11988. maidArray[j].SetPos(dancePos[j]);
  11989. maidArray[j].body0.transform.localRotation = danceRot[j];
  11990. }
  11991. }
  11992. }
  11993. isDanceStart14V = false;
  11994. }
  11995. if (isDanceStart15V)
  11996. {
  11997. for (int j = 0; j < maidCnt; j++)
  11998. {
  11999. if (maidArray[j] && maidArray[j].Visible)
  12000. {
  12001. if (isDanceStart15V)
  12002. {
  12003. maidArray[j].SetPos(dancePos[j]);
  12004. maidArray[j].body0.transform.localRotation = danceRot[j];
  12005. }
  12006. }
  12007. }
  12008. isDanceStart15V = false;
  12009. }
  12010. if (maidArray[1] && maidArray[1].Visible)
  12011. {
  12012. if (maidArray[0].transform.position == maidArray[1].transform.position)
  12013. {
  12014. Vector3 vector = Vector3.zero;
  12015. vector.x = 0.6f;
  12016. maidArray[1].SetPos(vector);
  12017. if (maidArray[2] && maidArray[2].Visible)
  12018. {
  12019. vector.x = -0.6f;
  12020. maidArray[2].SetPos(vector);
  12021. }
  12022. if (maidArray[3] && maidArray[3].Visible)
  12023. {
  12024. vector.x = 1.2f;
  12025. maidArray[3].SetPos(vector);
  12026. }
  12027. if (maidArray[4] && maidArray[4].Visible)
  12028. {
  12029. vector.x = -1.2f;
  12030. maidArray[4].SetPos(vector);
  12031. }
  12032. if (maidArray[5] && maidArray[5].Visible)
  12033. {
  12034. vector.x = 1.8f;
  12035. maidArray[5].SetPos(vector);
  12036. }
  12037. if (maidArray[6] && maidArray[6].Visible)
  12038. {
  12039. vector.x = -1.8f;
  12040. maidArray[6].SetPos(vector);
  12041. }
  12042. if (maidArray[7] && maidArray[7].Visible)
  12043. {
  12044. vector.x = 2.4f;
  12045. maidArray[7].SetPos(vector);
  12046. }
  12047. if (maidArray[8] && maidArray[8].Visible)
  12048. {
  12049. vector.x = -2.4f;
  12050. maidArray[8].SetPos(vector);
  12051. }
  12052. if (maidArray[9] && maidArray[9].Visible)
  12053. {
  12054. vector.x = 3f;
  12055. maidArray[9].SetPos(vector);
  12056. }
  12057. if (maidArray[10] && maidArray[10].Visible)
  12058. {
  12059. vector.x = -3f;
  12060. maidArray[10].SetPos(vector);
  12061. }
  12062. if (maidArray[11] && maidArray[11].Visible)
  12063. {
  12064. vector.x = 3.6f;
  12065. maidArray[11].SetPos(vector);
  12066. }
  12067. if (maidArray[12] && maidArray[12].Visible)
  12068. {
  12069. vector.x = -3.6f;
  12070. maidArray[12].SetPos(vector);
  12071. }
  12072. if (maidArray[13] && maidArray[13].Visible)
  12073. {
  12074. vector.x = 4.2f;
  12075. maidArray[13].SetPos(vector);
  12076. }
  12077. }
  12078. }
  12079. if (isShift)
  12080. {
  12081. isDanceStart5K = true;
  12082. for (int j = 0; j < maidCnt; j++)
  12083. {
  12084. maidArray[j].SetRot(new Vector3(maidArray[j].body0.transform.localRotation.x,
  12085. maidArray[j].body0.transform.localRotation.y + 90f,
  12086. maidArray[j].body0.transform.localRotation.z));
  12087. maidArray[j].SetPos(new Vector3(maidArray[j].body0.transform.position.x + 1f,
  12088. maidArray[j].body0.transform.position.y,
  12089. maidArray[j].body0.transform.position.z + 4f));
  12090. string text2 = "handitem,HanditemL_Karaoke_Mike_I_.menu";
  12091. int i = j;
  12092. Maid maid = maidArray[j];
  12093. if (!isVR)
  12094. {
  12095. delCount[i] = 20;
  12096. if (goSlot[(int) selectList[i]] != null)
  12097. {
  12098. maidArray[i].body0.goSlot = new List<TBodySkin>(goSlot[(int) selectList[i]]);
  12099. for (int l = 0; l < bodyHit[(int) selectList[i]].Count; l++)
  12100. {
  12101. maidArray[i].body0.goSlot[l].bonehair.bodyhit = bodyHit[(int) selectList[i]][l];
  12102. }
  12103. }
  12104. }
  12105. string[] array = new string[2];
  12106. array = text2.Split(new char[] {','});
  12107. maid.DelProp(MPN.handitem, true);
  12108. maid.DelProp(MPN.accvag, true);
  12109. maid.DelProp(MPN.accanl, true);
  12110. maid.DelProp(MPN.kousoku_upper, true);
  12111. maid.DelProp(MPN.kousoku_lower, true);
  12112. if (array[0] != "")
  12113. {
  12114. maid.SetProp(array[0], array[1], 0, true, false);
  12115. }
  12116. maid.AllProcPropSeqStart();
  12117. }
  12118. }
  12119. isDance = true;
  12120. isDanceStart5 = true;
  12121. isCF1 = false;
  12122. }
  12123. if ((Input.GetKey(KeyCode.Return) && Input.GetKeyDown(KeyCode.Alpha4))
  12124. || (Input.GetKey(KeyCode.KeypadEnter) && Input.GetKeyDown(KeyCode.Keypad4)))
  12125. {
  12126. GameMain.Instance.SoundMgr.StopBGM(0f);
  12127. isCF1 = true;
  12128. if (this.getModKeyPressing(modKey.Shift))
  12129. {
  12130. isShift = true;
  12131. }
  12132. }
  12133. if (isKT1)
  12134. {
  12135. TextAsset textAsset = Resources.Load("SceneDance/dance_cktc_1_m0") as TextAsset;
  12136. string text4 = textAsset.text;
  12137. text4 = Regex.Replace(text4, "(\\r|\\n| )", string.Empty);
  12138. audioSourceBgm = GameMain.Instance.SoundMgr.GetAudioSourceBgm();
  12139. GameMain.Instance.SoundMgr.PlayBGM("se002.ogg", 0f, false);
  12140. for (int j = 0; j < maidCnt; j++)
  12141. {
  12142. if (!isShift)
  12143. {
  12144. if (!maidArray[j].body0.m_Bones.GetComponent<Animation>().GetClip("dance_cm3d_004_kano_f1.anm"))
  12145. {
  12146. maidArray[j].body0.LoadAnime("dance_cm3d_004_kano_f1.anm",
  12147. GameUty.FileSystem,
  12148. "dance_cm3d_004_kano_f1.anm",
  12149. false,
  12150. false);
  12151. }
  12152. danceName[j] = "dance_cm3d_004_kano_f1.anm";
  12153. }
  12154. else
  12155. {
  12156. if (!maidArray[j].body0.m_Bones.GetComponent<Animation>().GetClip("dance_cm3d2_kara_002_cktc_f1.anm"))
  12157. {
  12158. maidArray[j].body0.LoadAnime("dance_cm3d2_kara_002_cktc_f1.anm",
  12159. GameUty.FileSystem,
  12160. "dance_cm3d2_kara_002_cktc_f1.anm",
  12161. false,
  12162. false);
  12163. }
  12164. textAsset = (Resources.Load("SceneDance/cktc_kara_voice_2") as TextAsset);
  12165. text4 = textAsset.text;
  12166. text4 = Regex.Replace(text4, "(\\r|\\n| )", string.Empty);
  12167. if (!isDanceStart1K && !isDanceStart3K && !isDanceStart4K && !isDanceStart5K && !isDanceStart6K
  12168. && !isDanceStart9K && !isDanceStart13K)
  12169. {
  12170. dancePos[j] = maidArray[j].transform.position;
  12171. danceRot[j] = maidArray[j].transform.localRotation;
  12172. }
  12173. }
  12174. m_baKuchipakuPattern[j] = Convert.FromBase64String(text4);
  12175. }
  12176. if (!isShift)
  12177. {
  12178. GameMain.Instance.SoundMgr.PlayDanceBGM("can_know_two_close.ogg", 0f, false);
  12179. }
  12180. else
  12181. {
  12182. GameMain.Instance.SoundMgr.PlayDanceBGM("canknowtwoclose_short_kara.ogg", 0f, false);
  12183. }
  12184. for (int j = 0; j < maidCnt; j++)
  12185. {
  12186. maidArray[j].StartKuchipakuPattern(0f, text4, true);
  12187. isStop[j] = false;
  12188. isLock[j] = false;
  12189. pHandL[j] = 0;
  12190. pHandR[j] = 0;
  12191. muneIKL[j] = false;
  12192. muneIKR[j] = false;
  12193. if (!isVR)
  12194. {
  12195. maidArray[j].body0.quaDefEyeL.eulerAngles = eyeL[(int) selectList[j]];
  12196. maidArray[j].body0.quaDefEyeR.eulerAngles = eyeR[(int) selectList[j]];
  12197. }
  12198. }
  12199. ikBui = 5;
  12200. isDanceStart1F = false;
  12201. isDanceStart2F = false;
  12202. isDanceStart3F = false;
  12203. isDanceStart4F = false;
  12204. isDanceStart5F = false;
  12205. isDanceStart6F = false;
  12206. isDanceStart7F = false;
  12207. isDanceStart8F = false;
  12208. isDanceStart9F = false;
  12209. isDanceStart10F = false;
  12210. isDanceStart11F = false;
  12211. isDanceStart12F = false;
  12212. isDanceStart13F = false;
  12213. isDanceStart14F = false;
  12214. isDanceStart15F = false;
  12215. for (int j = 0; j < maidCnt; j++)
  12216. {
  12217. danceFace[j] = 0f;
  12218. }
  12219. if (isDanceStart7V)
  12220. {
  12221. for (int j = 0; j < maidCnt; j++)
  12222. {
  12223. if (maidArray[j] && maidArray[j].Visible)
  12224. {
  12225. if (isDanceStart7V)
  12226. {
  12227. maidArray[j].SetPos(dancePos[j]);
  12228. maidArray[j].body0.transform.localRotation = danceRot[j];
  12229. }
  12230. }
  12231. }
  12232. isDanceStart7V = false;
  12233. }
  12234. if (isDanceStart8V)
  12235. {
  12236. for (int j = 0; j < maidCnt; j++)
  12237. {
  12238. if (maidArray[j] && maidArray[j].Visible)
  12239. {
  12240. if (isDanceStart8V)
  12241. {
  12242. maidArray[j].SetPos(dancePos[j]);
  12243. maidArray[j].body0.transform.localRotation = danceRot[j];
  12244. }
  12245. }
  12246. }
  12247. isDanceStart8V = false;
  12248. isDanceStart8P = false;
  12249. }
  12250. if (isDanceStart11V)
  12251. {
  12252. for (int j = 0; j < maidCnt; j++)
  12253. {
  12254. if (maidArray[j] && maidArray[j].Visible)
  12255. {
  12256. if (isDanceStart11V)
  12257. {
  12258. maidArray[j].SetPos(dancePos[j]);
  12259. maidArray[j].body0.transform.localRotation = danceRot[j];
  12260. }
  12261. }
  12262. }
  12263. isDanceStart11V = false;
  12264. }
  12265. if (isDanceStart1K || isDanceStart3K || isDanceStart4K || isDanceStart5K || isDanceStart6K || isDanceStart9K
  12266. || isDanceStart13K)
  12267. {
  12268. for (int j = 0; j < maidCnt; j++)
  12269. {
  12270. if (maidArray[j] && maidArray[j].Visible)
  12271. {
  12272. if (isDanceStart1K || isDanceStart3K || isDanceStart4K || isDanceStart5K || isDanceStart6K || isDanceStart9K
  12273. || isDanceStart13K)
  12274. {
  12275. maidArray[j].SetPos(dancePos[j]);
  12276. maidArray[j].body0.transform.localRotation = danceRot[j];
  12277. int i = j;
  12278. if (!isVR)
  12279. {
  12280. delCount[i] = 20;
  12281. if (goSlot[(int) selectList[i]] != null)
  12282. {
  12283. maidArray[i].body0.goSlot = new List<TBodySkin>(goSlot[(int) selectList[i]]);
  12284. for (int l = 0; l < bodyHit[(int) selectList[i]].Count; l++)
  12285. {
  12286. maidArray[i].body0.goSlot[l].bonehair.bodyhit = bodyHit[(int) selectList[i]][l];
  12287. }
  12288. }
  12289. }
  12290. Maid maid = maidArray[j];
  12291. maid.DelProp(MPN.handitem, true);
  12292. maid.DelProp(MPN.accvag, true);
  12293. maid.DelProp(MPN.accanl, true);
  12294. maid.DelProp(MPN.kousoku_upper, true);
  12295. maid.DelProp(MPN.kousoku_lower, true);
  12296. maid.AllProcPropSeqStart();
  12297. }
  12298. }
  12299. }
  12300. isDanceStart1K = false;
  12301. isDanceStart3K = false;
  12302. isDanceStart4K = false;
  12303. isDanceStart5K = false;
  12304. isDanceStart6K = false;
  12305. isDanceStart9K = false;
  12306. isDanceStart13K = false;
  12307. }
  12308. if (isDanceStart14V)
  12309. {
  12310. for (int j = 0; j < maidCnt; j++)
  12311. {
  12312. if (maidArray[j] && maidArray[j].Visible)
  12313. {
  12314. if (isDanceStart14V)
  12315. {
  12316. maidArray[j].SetPos(dancePos[j]);
  12317. maidArray[j].body0.transform.localRotation = danceRot[j];
  12318. }
  12319. }
  12320. }
  12321. isDanceStart14V = false;
  12322. }
  12323. if (isDanceStart15V)
  12324. {
  12325. for (int j = 0; j < maidCnt; j++)
  12326. {
  12327. if (maidArray[j] && maidArray[j].Visible)
  12328. {
  12329. if (isDanceStart15V)
  12330. {
  12331. maidArray[j].SetPos(dancePos[j]);
  12332. maidArray[j].body0.transform.localRotation = danceRot[j];
  12333. }
  12334. }
  12335. }
  12336. isDanceStart15V = false;
  12337. }
  12338. if (maidArray[1] && maidArray[1].Visible)
  12339. {
  12340. if (maidArray[0].transform.position == maidArray[1].transform.position)
  12341. {
  12342. Vector3 vector = Vector3.zero;
  12343. vector.x = 0.6f;
  12344. maidArray[1].SetPos(vector);
  12345. if (maidArray[2] && maidArray[2].Visible)
  12346. {
  12347. vector.x = -0.6f;
  12348. maidArray[2].SetPos(vector);
  12349. }
  12350. if (maidArray[3] && maidArray[3].Visible)
  12351. {
  12352. vector.x = 1.2f;
  12353. maidArray[3].SetPos(vector);
  12354. }
  12355. if (maidArray[4] && maidArray[4].Visible)
  12356. {
  12357. vector.x = -1.2f;
  12358. maidArray[4].SetPos(vector);
  12359. }
  12360. if (maidArray[5] && maidArray[5].Visible)
  12361. {
  12362. vector.x = 1.8f;
  12363. maidArray[5].SetPos(vector);
  12364. }
  12365. if (maidArray[6] && maidArray[6].Visible)
  12366. {
  12367. vector.x = -1.8f;
  12368. maidArray[6].SetPos(vector);
  12369. }
  12370. if (maidArray[7] && maidArray[7].Visible)
  12371. {
  12372. vector.x = 2.4f;
  12373. maidArray[7].SetPos(vector);
  12374. }
  12375. if (maidArray[8] && maidArray[8].Visible)
  12376. {
  12377. vector.x = -2.4f;
  12378. maidArray[8].SetPos(vector);
  12379. }
  12380. if (maidArray[9] && maidArray[9].Visible)
  12381. {
  12382. vector.x = 3f;
  12383. maidArray[9].SetPos(vector);
  12384. }
  12385. if (maidArray[10] && maidArray[10].Visible)
  12386. {
  12387. vector.x = -3f;
  12388. maidArray[10].SetPos(vector);
  12389. }
  12390. if (maidArray[11] && maidArray[11].Visible)
  12391. {
  12392. vector.x = 3.6f;
  12393. maidArray[11].SetPos(vector);
  12394. }
  12395. if (maidArray[12] && maidArray[12].Visible)
  12396. {
  12397. vector.x = -3.6f;
  12398. maidArray[12].SetPos(vector);
  12399. }
  12400. if (maidArray[13] && maidArray[13].Visible)
  12401. {
  12402. vector.x = 4.2f;
  12403. maidArray[13].SetPos(vector);
  12404. }
  12405. }
  12406. }
  12407. if (maidArray[2] && maidArray[2].Visible)
  12408. {
  12409. if (maidArray[0].transform.position == maidArray[2].transform.position)
  12410. {
  12411. Vector3 vector = Vector3.zero;
  12412. vector.x = 0.6f;
  12413. maidArray[1].SetPos(vector);
  12414. if (maidArray[2] && maidArray[2].Visible)
  12415. {
  12416. vector.x = -0.6f;
  12417. maidArray[2].SetPos(vector);
  12418. }
  12419. if (maidArray[3] && maidArray[3].Visible)
  12420. {
  12421. vector.x = 1.2f;
  12422. maidArray[3].SetPos(vector);
  12423. }
  12424. if (maidArray[4] && maidArray[4].Visible)
  12425. {
  12426. vector.x = -1.2f;
  12427. maidArray[4].SetPos(vector);
  12428. }
  12429. if (maidArray[5] && maidArray[5].Visible)
  12430. {
  12431. vector.x = 1.8f;
  12432. maidArray[5].SetPos(vector);
  12433. }
  12434. if (maidArray[6] && maidArray[6].Visible)
  12435. {
  12436. vector.x = -1.8f;
  12437. maidArray[6].SetPos(vector);
  12438. }
  12439. if (maidArray[7] && maidArray[7].Visible)
  12440. {
  12441. vector.x = 2.4f;
  12442. maidArray[7].SetPos(vector);
  12443. }
  12444. if (maidArray[8] && maidArray[8].Visible)
  12445. {
  12446. vector.x = -2.4f;
  12447. maidArray[8].SetPos(vector);
  12448. }
  12449. if (maidArray[9] && maidArray[9].Visible)
  12450. {
  12451. vector.x = 3f;
  12452. maidArray[9].SetPos(vector);
  12453. }
  12454. if (maidArray[10] && maidArray[10].Visible)
  12455. {
  12456. vector.x = -3f;
  12457. maidArray[10].SetPos(vector);
  12458. }
  12459. if (maidArray[11] && maidArray[11].Visible)
  12460. {
  12461. vector.x = 3.6f;
  12462. maidArray[11].SetPos(vector);
  12463. }
  12464. if (maidArray[12] && maidArray[12].Visible)
  12465. {
  12466. vector.x = -3.6f;
  12467. maidArray[12].SetPos(vector);
  12468. }
  12469. if (maidArray[13] && maidArray[13].Visible)
  12470. {
  12471. vector.x = 4.2f;
  12472. maidArray[13].SetPos(vector);
  12473. }
  12474. }
  12475. }
  12476. if (isShift)
  12477. {
  12478. isDanceStart9K = true;
  12479. for (int j = 0; j < maidCnt; j++)
  12480. {
  12481. maidArray[j].SetRot(new Vector3(maidArray[j].body0.transform.localRotation.x,
  12482. maidArray[j].body0.transform.localRotation.y + 90f,
  12483. maidArray[j].body0.transform.localRotation.z));
  12484. maidArray[j].SetPos(new Vector3(maidArray[j].body0.transform.position.x + 1f,
  12485. maidArray[j].body0.transform.position.y,
  12486. maidArray[j].body0.transform.position.z + 4f));
  12487. string text2 = "handitem,HanditemL_Karaoke_Mike_I_.menu";
  12488. int i = j;
  12489. Maid maid = maidArray[j];
  12490. if (!isVR)
  12491. {
  12492. delCount[i] = 20;
  12493. if (goSlot[(int) selectList[i]] != null)
  12494. {
  12495. maidArray[i].body0.goSlot = new List<TBodySkin>(goSlot[(int) selectList[i]]);
  12496. for (int l = 0; l < bodyHit[(int) selectList[i]].Count; l++)
  12497. {
  12498. maidArray[i].body0.goSlot[l].bonehair.bodyhit = bodyHit[(int) selectList[i]][l];
  12499. }
  12500. }
  12501. }
  12502. string[] array = new string[2];
  12503. array = text2.Split(new char[] {','});
  12504. maid.DelProp(MPN.handitem, true);
  12505. maid.DelProp(MPN.accvag, true);
  12506. maid.DelProp(MPN.accanl, true);
  12507. maid.DelProp(MPN.kousoku_upper, true);
  12508. maid.DelProp(MPN.kousoku_lower, true);
  12509. if (array[0] != "")
  12510. {
  12511. maid.SetProp(array[0], array[1], 0, true, false);
  12512. }
  12513. maid.AllProcPropSeqStart();
  12514. }
  12515. }
  12516. isDance = true;
  12517. isDanceStart9 = true;
  12518. isKT1 = false;
  12519. }
  12520. if (isSS && (isSS1 || isSS2 || isSS3 || isSS4 || isSS5 || isSS6))
  12521. {
  12522. audioSourceBgm = GameMain.Instance.SoundMgr.GetAudioSourceBgm();
  12523. GameMain.Instance.SoundMgr.PlayBGM("se002.ogg", 0f, false);
  12524. if (isSS1)
  12525. {
  12526. nameK = "dance_BlD_m";
  12527. nameA = "dance_cm3d21_002_bid_f";
  12528. nameS = "bloomingdreaming_short";
  12529. danceNo1 = 1;
  12530. danceNo2 = 3;
  12531. danceNo3 = 2;
  12532. }
  12533. if (isSS2)
  12534. {
  12535. nameK = "dance_KAD_m";
  12536. nameA = "dance_cm3d21_003_kad_f";
  12537. nameS = "kiminiaijodelicious_short";
  12538. danceNo1 = 1;
  12539. danceNo2 = 2;
  12540. danceNo3 = 3;
  12541. }
  12542. if (isSS3)
  12543. {
  12544. nameK = "dance_LUM_m";
  12545. nameA = "dance_cm3d21_004_lm_f";
  12546. nameS = "luminousmoment_short";
  12547. danceNo1 = 3;
  12548. danceNo2 = 1;
  12549. danceNo3 = 2;
  12550. }
  12551. if (isSS4)
  12552. {
  12553. nameK = "dance_NmF_m";
  12554. nameA = "dance_cm3d21_001_nmf_f";
  12555. nameS = "nightmagicfire_short";
  12556. danceNo1 = 2;
  12557. danceNo2 = 1;
  12558. danceNo3 = 3;
  12559. }
  12560. if (isSS5)
  12561. {
  12562. nameK = "dance_MoE_m";
  12563. nameA = "dance_cm3d21_005_moe_f";
  12564. nameS = "melodyofempire_short";
  12565. danceNo1 = 1;
  12566. danceNo2 = 3;
  12567. danceNo3 = 2;
  12568. }
  12569. if (isSS6)
  12570. {
  12571. nameK = "dance_NmF_m";
  12572. nameA = "dance_cm3d21_kara_001_nmf_f";
  12573. nameS = "nightmagicfire_short";
  12574. danceNo1 = 1;
  12575. danceNo2 = 1;
  12576. danceNo3 = 1;
  12577. }
  12578. for (int j = 0; j < maidCnt; j++)
  12579. {
  12580. TextAsset textAsset = Resources.Load("SceneDance/" + nameK + (danceNo1 - 1)) as TextAsset;
  12581. string text5 = nameA + danceNo1 + ".anm";
  12582. switch (j)
  12583. {
  12584. case 1:
  12585. case 4:
  12586. case 7:
  12587. case 10:
  12588. case 13:
  12589. text5 = nameA + danceNo2 + ".anm";
  12590. textAsset = (Resources.Load("SceneDance/" + nameK + (danceNo2 - 1)) as TextAsset);
  12591. break;
  12592. case 2:
  12593. case 5:
  12594. case 8:
  12595. case 11:
  12596. text5 = nameA + danceNo3 + ".anm";
  12597. textAsset = (Resources.Load("SceneDance/" + nameK + (danceNo3 - 1)) as TextAsset);
  12598. break;
  12599. }
  12600. if (maidArray[j] && maidArray[j].Visible)
  12601. {
  12602. if (!maidArray[j].body0.m_Bones.GetComponent<Animation>().GetClip(text5))
  12603. {
  12604. maidArray[j].body0.LoadAnime(text5, GameUty.FileSystem, text5, false, false);
  12605. }
  12606. string text4 = textAsset.text;
  12607. text4 = Regex.Replace(text4, "(\\r|\\n| )", string.Empty);
  12608. maidArray[j].StartKuchipakuPattern(0f, text4, true);
  12609. m_baKuchipakuPattern[j] = Convert.FromBase64String(text4);
  12610. }
  12611. }
  12612. GameMain.Instance.SoundMgr.PlayDanceBGM(nameS + ".ogg", 0f, false);
  12613. ikBui = 5;
  12614. isDanceStart1F = false;
  12615. isDanceStart2F = false;
  12616. isDanceStart3F = false;
  12617. isDanceStart4F = false;
  12618. isDanceStart5F = false;
  12619. isDanceStart6F = false;
  12620. isDanceStart7F = false;
  12621. isDanceStart8F = false;
  12622. isDanceStart9F = false;
  12623. isDanceStart10F = false;
  12624. isDanceStart11F = false;
  12625. isDanceStart12F = false;
  12626. isDanceStart13F = false;
  12627. isDanceStart14F = false;
  12628. isDanceStart15F = false;
  12629. for (int j = 0; j < maidCnt; j++)
  12630. {
  12631. danceFace[j] = 0f;
  12632. }
  12633. if (isDanceStart7V)
  12634. {
  12635. for (int j = 0; j < maidCnt; j++)
  12636. {
  12637. if (maidArray[j] && maidArray[j].Visible)
  12638. {
  12639. if (isDanceStart7V)
  12640. {
  12641. maidArray[j].SetPos(dancePos[j]);
  12642. maidArray[j].body0.transform.localRotation = danceRot[j];
  12643. }
  12644. }
  12645. }
  12646. isDanceStart7V = false;
  12647. }
  12648. if (isDanceStart8V)
  12649. {
  12650. for (int j = 0; j < maidCnt; j++)
  12651. {
  12652. if (maidArray[j] && maidArray[j].Visible)
  12653. {
  12654. if (isDanceStart8V)
  12655. {
  12656. maidArray[j].SetPos(dancePos[j]);
  12657. maidArray[j].body0.transform.localRotation = danceRot[j];
  12658. }
  12659. }
  12660. }
  12661. isDanceStart8V = false;
  12662. isDanceStart8P = false;
  12663. }
  12664. if (isDanceStart11V)
  12665. {
  12666. for (int j = 0; j < maidCnt; j++)
  12667. {
  12668. if (maidArray[j] && maidArray[j].Visible)
  12669. {
  12670. if (isDanceStart11V)
  12671. {
  12672. maidArray[j].SetPos(dancePos[j]);
  12673. maidArray[j].body0.transform.localRotation = danceRot[j];
  12674. }
  12675. }
  12676. }
  12677. isDanceStart11V = false;
  12678. }
  12679. if (isDanceStart1K || isDanceStart3K || isDanceStart4K || isDanceStart5K || isDanceStart6K || isDanceStart9K
  12680. || isDanceStart13K)
  12681. {
  12682. for (int j = 0; j < maidCnt; j++)
  12683. {
  12684. if (maidArray[j] && maidArray[j].Visible)
  12685. {
  12686. if (isDanceStart1K || isDanceStart3K || isDanceStart4K || isDanceStart5K || isDanceStart6K || isDanceStart9K
  12687. || isDanceStart13K)
  12688. {
  12689. maidArray[j].SetPos(dancePos[j]);
  12690. maidArray[j].body0.transform.localRotation = danceRot[j];
  12691. int i = j;
  12692. if (!isVR)
  12693. {
  12694. delCount[i] = 20;
  12695. if (goSlot[(int) selectList[i]] != null)
  12696. {
  12697. maidArray[i].body0.goSlot = new List<TBodySkin>(goSlot[(int) selectList[i]]);
  12698. for (int l = 0; l < bodyHit[(int) selectList[i]].Count; l++)
  12699. {
  12700. maidArray[i].body0.goSlot[l].bonehair.bodyhit = bodyHit[(int) selectList[i]][l];
  12701. }
  12702. }
  12703. }
  12704. Maid maid = maidArray[j];
  12705. maid.DelProp(MPN.handitem, true);
  12706. maid.DelProp(MPN.accvag, true);
  12707. maid.DelProp(MPN.accanl, true);
  12708. maid.DelProp(MPN.kousoku_upper, true);
  12709. maid.DelProp(MPN.kousoku_lower, true);
  12710. maid.AllProcPropSeqStart();
  12711. }
  12712. }
  12713. }
  12714. isDanceStart1K = false;
  12715. isDanceStart3K = false;
  12716. isDanceStart4K = false;
  12717. isDanceStart5K = false;
  12718. isDanceStart6K = false;
  12719. isDanceStart9K = false;
  12720. isDanceStart13K = false;
  12721. }
  12722. if (isDanceStart14V)
  12723. {
  12724. for (int j = 0; j < maidCnt; j++)
  12725. {
  12726. if (maidArray[j] && maidArray[j].Visible)
  12727. {
  12728. if (isDanceStart14V)
  12729. {
  12730. maidArray[j].SetPos(dancePos[j]);
  12731. maidArray[j].body0.transform.localRotation = danceRot[j];
  12732. }
  12733. }
  12734. }
  12735. isDanceStart14V = false;
  12736. }
  12737. if (isDanceStart15V)
  12738. {
  12739. for (int j = 0; j < maidCnt; j++)
  12740. {
  12741. if (maidArray[j] && maidArray[j].Visible)
  12742. {
  12743. if (isDanceStart15V)
  12744. {
  12745. maidArray[j].SetPos(dancePos[j]);
  12746. maidArray[j].body0.transform.localRotation = danceRot[j];
  12747. }
  12748. }
  12749. }
  12750. isDanceStart15V = false;
  12751. }
  12752. for (int j = 0; j < maidCnt; j++)
  12753. {
  12754. isStop[j] = false;
  12755. isLock[j] = false;
  12756. pHandL[j] = 0;
  12757. pHandR[j] = 0;
  12758. muneIKL[j] = false;
  12759. muneIKR[j] = false;
  12760. if (!isVR)
  12761. {
  12762. maidArray[j].body0.quaDefEyeL.eulerAngles = eyeL[(int) selectList[j]];
  12763. maidArray[j].body0.quaDefEyeR.eulerAngles = eyeR[(int) selectList[j]];
  12764. }
  12765. if (maidArray[j].transform.position.y != 100f)
  12766. {
  12767. dancePos[j] = maidArray[j].transform.position;
  12768. }
  12769. else
  12770. {
  12771. dancePos[j] = new Vector3(maidArray[j].transform.position.x, 0f, maidArray[j].transform.position.z);
  12772. }
  12773. danceRot[j] = maidArray[j].transform.localRotation;
  12774. }
  12775. if (maidArray[1] && maidArray[1].Visible)
  12776. {
  12777. maidArray[1].SetPos(new Vector3(maidArray[0].transform.position.x,
  12778. maidArray[0].transform.position.y,
  12779. maidArray[0].transform.position.z));
  12780. maidArray[1].body0.transform.localRotation = maidArray[0].body0.transform.localRotation;
  12781. }
  12782. if (maidArray[2] && maidArray[2].Visible)
  12783. {
  12784. maidArray[2].SetPos(new Vector3(maidArray[0].transform.position.x,
  12785. maidArray[0].transform.position.y,
  12786. maidArray[0].transform.position.z));
  12787. maidArray[2].body0.transform.localRotation = maidArray[0].body0.transform.localRotation;
  12788. }
  12789. if (maidArray[4] && maidArray[4].Visible)
  12790. {
  12791. maidArray[4].SetPos(new Vector3(maidArray[3].transform.position.x,
  12792. maidArray[3].transform.position.y,
  12793. maidArray[3].transform.position.z));
  12794. maidArray[4].body0.transform.localRotation = maidArray[3].body0.transform.localRotation;
  12795. }
  12796. if (maidArray[5] && maidArray[5].Visible)
  12797. {
  12798. maidArray[5].SetPos(new Vector3(maidArray[3].transform.position.x,
  12799. maidArray[3].transform.position.y,
  12800. maidArray[3].transform.position.z));
  12801. maidArray[5].body0.transform.localRotation = maidArray[3].body0.transform.localRotation;
  12802. }
  12803. if (maidArray[7] && maidArray[7].Visible)
  12804. {
  12805. maidArray[7].SetPos(new Vector3(maidArray[6].transform.position.x,
  12806. maidArray[6].transform.position.y,
  12807. maidArray[6].transform.position.z));
  12808. maidArray[7].body0.transform.localRotation = maidArray[6].body0.transform.localRotation;
  12809. }
  12810. if (maidArray[8] && maidArray[8].Visible)
  12811. {
  12812. maidArray[8].SetPos(new Vector3(maidArray[6].transform.position.x,
  12813. maidArray[6].transform.position.y,
  12814. maidArray[6].transform.position.z));
  12815. maidArray[8].body0.transform.localRotation = maidArray[6].body0.transform.localRotation;
  12816. }
  12817. if (maidArray[10] && maidArray[10].Visible)
  12818. {
  12819. maidArray[10].SetPos(new Vector3(maidArray[9].transform.position.x,
  12820. maidArray[9].transform.position.y,
  12821. maidArray[9].transform.position.z));
  12822. maidArray[10].body0.transform.localRotation = maidArray[9].body0.transform.localRotation;
  12823. }
  12824. if (maidArray[11] && maidArray[11].Visible)
  12825. {
  12826. maidArray[11].SetPos(new Vector3(maidArray[9].transform.position.x,
  12827. maidArray[9].transform.position.y,
  12828. maidArray[9].transform.position.z));
  12829. maidArray[11].body0.transform.localRotation = maidArray[9].body0.transform.localRotation;
  12830. }
  12831. if (maidArray[13] && maidArray[13].Visible)
  12832. {
  12833. maidArray[13].SetPos(new Vector3(maidArray[12].transform.position.x,
  12834. maidArray[12].transform.position.y,
  12835. maidArray[12].transform.position.z));
  12836. maidArray[13].body0.transform.localRotation = maidArray[12].body0.transform.localRotation;
  12837. }
  12838. isSS = false;
  12839. isDance = true;
  12840. isDanceStart11 = true;
  12841. }
  12842. if ((Input.GetKey(KeyCode.Return) && Input.GetKeyDown(KeyCode.Alpha5))
  12843. || (Input.GetKey(KeyCode.KeypadEnter) && Input.GetKeyDown(KeyCode.Alpha5)))
  12844. {
  12845. GameMain.Instance.SoundMgr.StopBGM(0f);
  12846. isSS1 = true;
  12847. isSS2 = false;
  12848. isSS3 = false;
  12849. isSS4 = false;
  12850. isSS5 = false;
  12851. isSS6 = false;
  12852. isSS = true;
  12853. }
  12854. if ((Input.GetKey(KeyCode.Return) && Input.GetKeyDown(KeyCode.Alpha6))
  12855. || (Input.GetKey(KeyCode.KeypadEnter) && Input.GetKeyDown(KeyCode.Alpha6)))
  12856. {
  12857. GameMain.Instance.SoundMgr.StopBGM(0f);
  12858. isSS1 = false;
  12859. isSS2 = true;
  12860. isSS3 = false;
  12861. isSS4 = false;
  12862. isSS5 = false;
  12863. isSS6 = false;
  12864. isSS = true;
  12865. }
  12866. if ((Input.GetKey(KeyCode.Return) && Input.GetKeyDown(KeyCode.Alpha7))
  12867. || (Input.GetKey(KeyCode.KeypadEnter) && Input.GetKeyDown(KeyCode.Alpha7)))
  12868. {
  12869. GameMain.Instance.SoundMgr.StopBGM(0f);
  12870. isSS1 = false;
  12871. isSS2 = false;
  12872. isSS3 = true;
  12873. isSS4 = false;
  12874. isSS5 = false;
  12875. isSS6 = false;
  12876. isSS = true;
  12877. }
  12878. if ((Input.GetKey(KeyCode.Return) && Input.GetKeyDown(KeyCode.Alpha8))
  12879. || (Input.GetKey(KeyCode.KeypadEnter) && Input.GetKeyDown(KeyCode.Alpha8)))
  12880. {
  12881. GameMain.Instance.SoundMgr.StopBGM(0f);
  12882. isSS1 = false;
  12883. isSS2 = false;
  12884. isSS3 = false;
  12885. isSS4 = true;
  12886. isSS5 = false;
  12887. isSS6 = false;
  12888. isSS = true;
  12889. }
  12890. if ((Input.GetKey(KeyCode.Return) && Input.GetKeyDown(KeyCode.Alpha9))
  12891. || (Input.GetKey(KeyCode.KeypadEnter) && Input.GetKeyDown(KeyCode.Alpha9)))
  12892. {
  12893. GameMain.Instance.SoundMgr.StopBGM(0f);
  12894. isSS1 = false;
  12895. isSS2 = false;
  12896. isSS3 = false;
  12897. isSS4 = false;
  12898. isSS5 = true;
  12899. isSS6 = false;
  12900. isSS = true;
  12901. }
  12902. if (isKHG1 || isKHG2)
  12903. {
  12904. TextAsset textAsset = Resources.Load("SceneDance/dance_KhG_m0") as TextAsset;
  12905. string text4 = textAsset.text;
  12906. text4 = Regex.Replace(text4, "(\\r|\\n| )", string.Empty);
  12907. audioSourceBgm = GameMain.Instance.SoundMgr.GetAudioSourceBgm();
  12908. GameMain.Instance.SoundMgr.PlayBGM("se002.ogg", 0f, false);
  12909. for (int j = 0; j < maidCnt; j++)
  12910. {
  12911. if (!maidArray[j].body0.m_Bones.GetComponent<Animation>().GetClip("dance_cm3d2_005_khg_f.anm"))
  12912. {
  12913. maidArray[j].body0.LoadAnime("dance_cm3d2_005_khg_f.anm",
  12914. GameUty.FileSystem,
  12915. "dance_cm3d2_005_khg_f.anm",
  12916. false,
  12917. false);
  12918. }
  12919. m_baKuchipakuPattern[j] = Convert.FromBase64String(text4);
  12920. }
  12921. if (isKHG1)
  12922. {
  12923. GameMain.Instance.SoundMgr.PlayDanceBGM("kaikaku_short1.ogg", 0f, false);
  12924. }
  12925. if (isKHG2)
  12926. {
  12927. GameMain.Instance.SoundMgr.PlayDanceBGM("kaikaku_short2.ogg", 0f, false);
  12928. }
  12929. for (int j = 0; j < maidCnt; j++)
  12930. {
  12931. maidArray[j].StartKuchipakuPattern(0f, text4, true);
  12932. isStop[j] = false;
  12933. isLock[j] = false;
  12934. pHandL[j] = 0;
  12935. pHandR[j] = 0;
  12936. muneIKL[j] = false;
  12937. muneIKR[j] = false;
  12938. if (!isVR)
  12939. {
  12940. maidArray[j].body0.quaDefEyeL.eulerAngles = eyeL[(int) selectList[j]];
  12941. maidArray[j].body0.quaDefEyeR.eulerAngles = eyeR[(int) selectList[j]];
  12942. }
  12943. }
  12944. ikBui = 5;
  12945. isDanceStart1F = false;
  12946. isDanceStart2F = false;
  12947. isDanceStart3F = false;
  12948. isDanceStart4F = false;
  12949. isDanceStart5F = false;
  12950. isDanceStart6F = false;
  12951. isDanceStart7F = false;
  12952. isDanceStart8F = false;
  12953. isDanceStart9F = false;
  12954. isDanceStart10F = false;
  12955. isDanceStart11F = false;
  12956. isDanceStart12F = false;
  12957. isDanceStart13F = false;
  12958. isDanceStart14F = false;
  12959. isDanceStart15F = false;
  12960. for (int j = 0; j < maidCnt; j++)
  12961. {
  12962. danceFace[j] = 0f;
  12963. }
  12964. if (isDanceStart7V)
  12965. {
  12966. for (int j = 0; j < maidCnt; j++)
  12967. {
  12968. if (maidArray[j] && maidArray[j].Visible)
  12969. {
  12970. if (isDanceStart7V)
  12971. {
  12972. maidArray[j].SetPos(dancePos[j]);
  12973. maidArray[j].body0.transform.localRotation = danceRot[j];
  12974. }
  12975. }
  12976. }
  12977. isDanceStart7V = false;
  12978. }
  12979. if (isDanceStart8V)
  12980. {
  12981. for (int j = 0; j < maidCnt; j++)
  12982. {
  12983. if (maidArray[j] && maidArray[j].Visible)
  12984. {
  12985. if (isDanceStart8V)
  12986. {
  12987. maidArray[j].SetPos(dancePos[j]);
  12988. maidArray[j].body0.transform.localRotation = danceRot[j];
  12989. }
  12990. }
  12991. }
  12992. isDanceStart8V = false;
  12993. isDanceStart8P = false;
  12994. }
  12995. if (isDanceStart11V)
  12996. {
  12997. for (int j = 0; j < maidCnt; j++)
  12998. {
  12999. if (maidArray[j] && maidArray[j].Visible)
  13000. {
  13001. if (isDanceStart11V)
  13002. {
  13003. maidArray[j].SetPos(dancePos[j]);
  13004. maidArray[j].body0.transform.localRotation = danceRot[j];
  13005. }
  13006. }
  13007. }
  13008. isDanceStart11V = false;
  13009. }
  13010. if (isDanceStart1K || isDanceStart3K || isDanceStart4K || isDanceStart5K || isDanceStart6K || isDanceStart9K
  13011. || isDanceStart13K)
  13012. {
  13013. for (int j = 0; j < maidCnt; j++)
  13014. {
  13015. if (maidArray[j] && maidArray[j].Visible)
  13016. {
  13017. if (isDanceStart1K || isDanceStart3K || isDanceStart4K || isDanceStart5K || isDanceStart6K || isDanceStart9K
  13018. || isDanceStart13K)
  13019. {
  13020. maidArray[j].SetPos(dancePos[j]);
  13021. maidArray[j].body0.transform.localRotation = danceRot[j];
  13022. int i = j;
  13023. if (!isVR)
  13024. {
  13025. delCount[i] = 20;
  13026. if (goSlot[(int) selectList[i]] != null)
  13027. {
  13028. maidArray[i].body0.goSlot = new List<TBodySkin>(goSlot[(int) selectList[i]]);
  13029. for (int l = 0; l < bodyHit[(int) selectList[i]].Count; l++)
  13030. {
  13031. maidArray[i].body0.goSlot[l].bonehair.bodyhit = bodyHit[(int) selectList[i]][l];
  13032. }
  13033. }
  13034. }
  13035. Maid maid = maidArray[j];
  13036. maid.DelProp(MPN.handitem, true);
  13037. maid.DelProp(MPN.accvag, true);
  13038. maid.DelProp(MPN.accanl, true);
  13039. maid.DelProp(MPN.kousoku_upper, true);
  13040. maid.DelProp(MPN.kousoku_lower, true);
  13041. maid.AllProcPropSeqStart();
  13042. }
  13043. }
  13044. }
  13045. isDanceStart1K = false;
  13046. isDanceStart3K = false;
  13047. isDanceStart4K = false;
  13048. isDanceStart5K = false;
  13049. isDanceStart6K = false;
  13050. isDanceStart9K = false;
  13051. isDanceStart13K = false;
  13052. }
  13053. if (isDanceStart14V)
  13054. {
  13055. for (int j = 0; j < maidCnt; j++)
  13056. {
  13057. if (maidArray[j] && maidArray[j].Visible)
  13058. {
  13059. if (isDanceStart14V)
  13060. {
  13061. maidArray[j].SetPos(dancePos[j]);
  13062. maidArray[j].body0.transform.localRotation = danceRot[j];
  13063. }
  13064. }
  13065. }
  13066. isDanceStart14V = false;
  13067. }
  13068. if (isDanceStart15V)
  13069. {
  13070. for (int j = 0; j < maidCnt; j++)
  13071. {
  13072. if (maidArray[j] && maidArray[j].Visible)
  13073. {
  13074. if (isDanceStart15V)
  13075. {
  13076. maidArray[j].SetPos(dancePos[j]);
  13077. maidArray[j].body0.transform.localRotation = danceRot[j];
  13078. }
  13079. }
  13080. }
  13081. isDanceStart15V = false;
  13082. }
  13083. if (maidArray[1] && maidArray[1].Visible)
  13084. {
  13085. if (maidArray[0].transform.position == maidArray[1].transform.position)
  13086. {
  13087. Vector3 vector = Vector3.zero;
  13088. vector.x = 0.6f;
  13089. maidArray[1].SetPos(vector);
  13090. if (maidArray[2] && maidArray[2].Visible)
  13091. {
  13092. vector.x = -0.6f;
  13093. maidArray[2].SetPos(vector);
  13094. }
  13095. if (maidArray[3] && maidArray[3].Visible)
  13096. {
  13097. vector.x = 1.2f;
  13098. maidArray[3].SetPos(vector);
  13099. }
  13100. if (maidArray[4] && maidArray[4].Visible)
  13101. {
  13102. vector.x = -1.2f;
  13103. maidArray[4].SetPos(vector);
  13104. }
  13105. if (maidArray[5] && maidArray[5].Visible)
  13106. {
  13107. vector.x = 1.8f;
  13108. maidArray[5].SetPos(vector);
  13109. }
  13110. if (maidArray[6] && maidArray[6].Visible)
  13111. {
  13112. vector.x = -1.8f;
  13113. maidArray[6].SetPos(vector);
  13114. }
  13115. if (maidArray[7] && maidArray[7].Visible)
  13116. {
  13117. vector.x = 2.4f;
  13118. maidArray[7].SetPos(vector);
  13119. }
  13120. if (maidArray[8] && maidArray[8].Visible)
  13121. {
  13122. vector.x = -2.4f;
  13123. maidArray[8].SetPos(vector);
  13124. }
  13125. if (maidArray[9] && maidArray[9].Visible)
  13126. {
  13127. vector.x = 3f;
  13128. maidArray[9].SetPos(vector);
  13129. }
  13130. if (maidArray[10] && maidArray[10].Visible)
  13131. {
  13132. vector.x = -3f;
  13133. maidArray[10].SetPos(vector);
  13134. }
  13135. if (maidArray[11] && maidArray[11].Visible)
  13136. {
  13137. vector.x = 3.6f;
  13138. maidArray[11].SetPos(vector);
  13139. }
  13140. if (maidArray[12] && maidArray[12].Visible)
  13141. {
  13142. vector.x = -3.6f;
  13143. maidArray[12].SetPos(vector);
  13144. }
  13145. if (maidArray[13] && maidArray[13].Visible)
  13146. {
  13147. vector.x = 4.2f;
  13148. maidArray[13].SetPos(vector);
  13149. }
  13150. }
  13151. }
  13152. isDance = true;
  13153. isDanceStart12 = true;
  13154. isKHG1 = false;
  13155. isKHG2 = false;
  13156. }
  13157. if (isDanceStart13Count > 0)
  13158. {
  13159. isDanceStart13Count++;
  13160. }
  13161. if (isDanceStart13Count == 1)
  13162. {
  13163. GameMain.Instance.SoundMgr.PlayDanceBGM("nightmagicfire_short.ogg", 0f, false);
  13164. isDanceStart13Count = 0;
  13165. TextAsset textAsset = Resources.Load("SceneDance/dance_SsN_m0") as TextAsset;
  13166. string text4 = textAsset.text;
  13167. text4 = Regex.Replace(text4, "(\\r|\\n| )", string.Empty);
  13168. for (int j = 0; j < maidCnt; j++)
  13169. {
  13170. maidArray[j].StartKuchipakuPattern(0f, text4, true);
  13171. }
  13172. }
  13173. if ((isSN1 || isSN2 || isSN3) && isShift)
  13174. {
  13175. TextAsset textAsset = Resources.Load("SceneDance/dance_SsN_m0") as TextAsset;
  13176. string text4 = textAsset.text;
  13177. text4 = Regex.Replace(text4, "(\\r|\\n| )", string.Empty);
  13178. audioSourceBgm = GameMain.Instance.SoundMgr.GetAudioSourceBgm();
  13179. GameMain.Instance.SoundMgr.PlayBGM("se002.ogg", 0f, false);
  13180. for (int j = 0; j < maidCnt; j++)
  13181. {
  13182. if (!isShift)
  13183. {
  13184. if (!maidArray[j].body0.m_Bones.GetComponent<Animation>().GetClip("dance_cm3d2_006_ssn_f1.anm"))
  13185. {
  13186. maidArray[j].body0.LoadAnime("dance_cm3d2_006_ssn_f1.anm",
  13187. GameUty.FileSystem,
  13188. "dance_cm3d2_006_ssn_f1.anm",
  13189. false,
  13190. false);
  13191. }
  13192. }
  13193. else
  13194. {
  13195. if (!maidArray[j].body0.m_Bones.GetComponent<Animation>().GetClip("dance_cm3d21_kara_001_nmf_f1.anm"))
  13196. {
  13197. maidArray[j].body0.LoadAnime("dance_cm3d21_kara_001_nmf_f1.anm",
  13198. GameUty.FileSystem,
  13199. "dance_cm3d21_kara_001_nmf_f1.anm",
  13200. false,
  13201. false);
  13202. }
  13203. textAsset = (Resources.Load("SceneDance/dance_NmF_m1") as TextAsset);
  13204. string text5 = nameA + danceNo1 + ".anm";
  13205. switch (j)
  13206. {
  13207. case 1:
  13208. case 4:
  13209. case 7:
  13210. case 10:
  13211. case 13:
  13212. textAsset = (Resources.Load("SceneDance/dance_NmF_m0") as TextAsset);
  13213. break;
  13214. case 2:
  13215. case 5:
  13216. case 8:
  13217. case 11:
  13218. textAsset = (Resources.Load("SceneDance/dance_NmF_m2") as TextAsset);
  13219. break;
  13220. }
  13221. text4 = textAsset.text;
  13222. text4 = Regex.Replace(text4, "(\\r|\\n| )", string.Empty);
  13223. if (!isDanceStart1K && !isDanceStart3K && !isDanceStart4K && !isDanceStart5K && !isDanceStart6K
  13224. && !isDanceStart9K && !isDanceStart13K)
  13225. {
  13226. dancePos[j] = maidArray[j].transform.position;
  13227. danceRot[j] = maidArray[j].transform.localRotation;
  13228. }
  13229. }
  13230. m_baKuchipakuPattern[j] = Convert.FromBase64String(text4);
  13231. }
  13232. if (!isShift)
  13233. {
  13234. if (isSN1)
  13235. {
  13236. GameMain.Instance.SoundMgr.PlayDanceBGM("nightmagicfire_short.ogg", 0f, false);
  13237. }
  13238. if (isSN2)
  13239. {
  13240. GameMain.Instance.SoundMgr.PlayDanceBGM("sunshinenatsu2.ogg", 0f, false);
  13241. }
  13242. if (isSN3)
  13243. {
  13244. GameMain.Instance.SoundMgr.PlayDanceBGM("sunshinenatsu3.ogg", 0f, false);
  13245. }
  13246. }
  13247. else
  13248. {
  13249. danceWait = 400;
  13250. isDanceStart13Count++;
  13251. GameMain.Instance.SoundMgr.PlayDanceBGM("nightmagicfire_short.ogg", 0f, false);
  13252. }
  13253. for (int j = 0; j < maidCnt; j++)
  13254. {
  13255. maidArray[j].StartKuchipakuPattern(0f, text4, true);
  13256. isStop[j] = false;
  13257. isLock[j] = false;
  13258. pHandL[j] = 0;
  13259. pHandR[j] = 0;
  13260. muneIKL[j] = false;
  13261. muneIKR[j] = false;
  13262. if (!isVR)
  13263. {
  13264. maidArray[j].body0.quaDefEyeL.eulerAngles = eyeL[(int) selectList[j]];
  13265. maidArray[j].body0.quaDefEyeR.eulerAngles = eyeR[(int) selectList[j]];
  13266. }
  13267. }
  13268. ikBui = 5;
  13269. isDanceStart1F = false;
  13270. isDanceStart2F = false;
  13271. isDanceStart3F = false;
  13272. isDanceStart4F = false;
  13273. isDanceStart5F = false;
  13274. isDanceStart6F = false;
  13275. isDanceStart7F = false;
  13276. isDanceStart8F = false;
  13277. isDanceStart9F = false;
  13278. isDanceStart10F = false;
  13279. isDanceStart11F = false;
  13280. isDanceStart12F = false;
  13281. isDanceStart13F = false;
  13282. isDanceStart14F = false;
  13283. isDanceStart15F = false;
  13284. for (int j = 0; j < maidCnt; j++)
  13285. {
  13286. danceFace[j] = 0f;
  13287. }
  13288. if (isDanceStart7V)
  13289. {
  13290. for (int j = 0; j < maidCnt; j++)
  13291. {
  13292. if (maidArray[j] && maidArray[j].Visible)
  13293. {
  13294. if (isDanceStart7V)
  13295. {
  13296. maidArray[j].SetPos(dancePos[j]);
  13297. maidArray[j].body0.transform.localRotation = danceRot[j];
  13298. }
  13299. }
  13300. }
  13301. isDanceStart7V = false;
  13302. }
  13303. if (isDanceStart8V)
  13304. {
  13305. for (int j = 0; j < maidCnt; j++)
  13306. {
  13307. if (maidArray[j] && maidArray[j].Visible)
  13308. {
  13309. if (isDanceStart8V)
  13310. {
  13311. maidArray[j].SetPos(dancePos[j]);
  13312. maidArray[j].body0.transform.localRotation = danceRot[j];
  13313. }
  13314. }
  13315. }
  13316. isDanceStart8V = false;
  13317. isDanceStart8P = false;
  13318. }
  13319. if (isDanceStart11V)
  13320. {
  13321. for (int j = 0; j < maidCnt; j++)
  13322. {
  13323. if (maidArray[j] && maidArray[j].Visible)
  13324. {
  13325. if (isDanceStart11V)
  13326. {
  13327. maidArray[j].SetPos(dancePos[j]);
  13328. maidArray[j].body0.transform.localRotation = danceRot[j];
  13329. }
  13330. }
  13331. }
  13332. isDanceStart11V = false;
  13333. }
  13334. if (isDanceStart1K || isDanceStart3K || isDanceStart4K || isDanceStart5K || isDanceStart6K || isDanceStart9K
  13335. || isDanceStart13K)
  13336. {
  13337. for (int j = 0; j < maidCnt; j++)
  13338. {
  13339. if (maidArray[j] && maidArray[j].Visible)
  13340. {
  13341. if (isDanceStart1K || isDanceStart3K || isDanceStart4K || isDanceStart5K || isDanceStart6K || isDanceStart9K
  13342. || isDanceStart13K)
  13343. {
  13344. maidArray[j].SetPos(dancePos[j]);
  13345. maidArray[j].body0.transform.localRotation = danceRot[j];
  13346. int i = j;
  13347. if (!isVR)
  13348. {
  13349. delCount[i] = 20;
  13350. if (goSlot[(int) selectList[i]] != null)
  13351. {
  13352. maidArray[i].body0.goSlot = new List<TBodySkin>(goSlot[(int) selectList[i]]);
  13353. for (int l = 0; l < bodyHit[(int) selectList[i]].Count; l++)
  13354. {
  13355. maidArray[i].body0.goSlot[l].bonehair.bodyhit = bodyHit[(int) selectList[i]][l];
  13356. }
  13357. }
  13358. }
  13359. Maid maid = maidArray[j];
  13360. maid.DelProp(MPN.handitem, true);
  13361. maid.DelProp(MPN.accvag, true);
  13362. maid.DelProp(MPN.accanl, true);
  13363. maid.DelProp(MPN.kousoku_upper, true);
  13364. maid.DelProp(MPN.kousoku_lower, true);
  13365. maid.AllProcPropSeqStart();
  13366. }
  13367. }
  13368. }
  13369. isDanceStart1K = false;
  13370. isDanceStart3K = false;
  13371. isDanceStart4K = false;
  13372. isDanceStart5K = false;
  13373. isDanceStart6K = false;
  13374. isDanceStart9K = false;
  13375. isDanceStart13K = false;
  13376. }
  13377. if (isDanceStart14V)
  13378. {
  13379. for (int j = 0; j < maidCnt; j++)
  13380. {
  13381. if (maidArray[j] && maidArray[j].Visible)
  13382. {
  13383. if (isDanceStart14V)
  13384. {
  13385. maidArray[j].SetPos(dancePos[j]);
  13386. maidArray[j].body0.transform.localRotation = danceRot[j];
  13387. }
  13388. }
  13389. }
  13390. isDanceStart14V = false;
  13391. }
  13392. if (isDanceStart15V)
  13393. {
  13394. for (int j = 0; j < maidCnt; j++)
  13395. {
  13396. if (maidArray[j] && maidArray[j].Visible)
  13397. {
  13398. if (isDanceStart15V)
  13399. {
  13400. maidArray[j].SetPos(dancePos[j]);
  13401. maidArray[j].body0.transform.localRotation = danceRot[j];
  13402. }
  13403. }
  13404. }
  13405. isDanceStart15V = false;
  13406. }
  13407. if (maidArray[1] && maidArray[1].Visible)
  13408. {
  13409. if (maidArray[0].transform.position == maidArray[1].transform.position)
  13410. {
  13411. Vector3 vector = Vector3.zero;
  13412. vector.x = 0.6f;
  13413. maidArray[1].SetPos(vector);
  13414. if (maidArray[2] && maidArray[2].Visible)
  13415. {
  13416. vector.x = -0.6f;
  13417. maidArray[2].SetPos(vector);
  13418. }
  13419. if (maidArray[3] && maidArray[3].Visible)
  13420. {
  13421. vector.x = 1.2f;
  13422. maidArray[3].SetPos(vector);
  13423. }
  13424. if (maidArray[4] && maidArray[4].Visible)
  13425. {
  13426. vector.x = -1.2f;
  13427. maidArray[4].SetPos(vector);
  13428. }
  13429. if (maidArray[5] && maidArray[5].Visible)
  13430. {
  13431. vector.x = 1.8f;
  13432. maidArray[5].SetPos(vector);
  13433. }
  13434. if (maidArray[6] && maidArray[6].Visible)
  13435. {
  13436. vector.x = -1.8f;
  13437. maidArray[6].SetPos(vector);
  13438. }
  13439. if (maidArray[7] && maidArray[7].Visible)
  13440. {
  13441. vector.x = 2.4f;
  13442. maidArray[7].SetPos(vector);
  13443. }
  13444. if (maidArray[8] && maidArray[8].Visible)
  13445. {
  13446. vector.x = -2.4f;
  13447. maidArray[8].SetPos(vector);
  13448. }
  13449. if (maidArray[9] && maidArray[9].Visible)
  13450. {
  13451. vector.x = 3f;
  13452. maidArray[9].SetPos(vector);
  13453. }
  13454. if (maidArray[10] && maidArray[10].Visible)
  13455. {
  13456. vector.x = -3f;
  13457. maidArray[10].SetPos(vector);
  13458. }
  13459. if (maidArray[11] && maidArray[11].Visible)
  13460. {
  13461. vector.x = 3.6f;
  13462. maidArray[11].SetPos(vector);
  13463. }
  13464. if (maidArray[12] && maidArray[12].Visible)
  13465. {
  13466. vector.x = -3.6f;
  13467. maidArray[12].SetPos(vector);
  13468. }
  13469. if (maidArray[13] && maidArray[13].Visible)
  13470. {
  13471. vector.x = 4.2f;
  13472. maidArray[13].SetPos(vector);
  13473. }
  13474. }
  13475. }
  13476. if (isShift)
  13477. {
  13478. isDanceStart13K = true;
  13479. for (int j = 0; j < maidCnt; j++)
  13480. {
  13481. maidArray[j].SetRot(new Vector3(maidArray[j].body0.transform.localRotation.x,
  13482. maidArray[j].body0.transform.localRotation.y + 90f,
  13483. maidArray[j].body0.transform.localRotation.z));
  13484. maidArray[j].SetPos(new Vector3(maidArray[j].body0.transform.position.x + 1f,
  13485. maidArray[j].body0.transform.position.y,
  13486. maidArray[j].body0.transform.position.z + 4f));
  13487. string text2 = "handitem,HanditemL_Karaoke_Mike_I_.menu";
  13488. int i = j;
  13489. Maid maid = maidArray[j];
  13490. if (!isVR)
  13491. {
  13492. delCount[i] = 20;
  13493. if (goSlot[(int) selectList[i]] != null)
  13494. {
  13495. maidArray[i].body0.goSlot = new List<TBodySkin>(goSlot[(int) selectList[i]]);
  13496. for (int l = 0; l < bodyHit[(int) selectList[i]].Count; l++)
  13497. {
  13498. maidArray[i].body0.goSlot[l].bonehair.bodyhit = bodyHit[(int) selectList[i]][l];
  13499. }
  13500. }
  13501. }
  13502. string[] array = new string[2];
  13503. array = text2.Split(new char[] {','});
  13504. maid.DelProp(MPN.handitem, true);
  13505. maid.DelProp(MPN.accvag, true);
  13506. maid.DelProp(MPN.accanl, true);
  13507. maid.DelProp(MPN.kousoku_upper, true);
  13508. maid.DelProp(MPN.kousoku_lower, true);
  13509. if (array[0] != "")
  13510. {
  13511. maid.SetProp(array[0], array[1], 0, true, false);
  13512. }
  13513. maid.AllProcPropSeqStart();
  13514. }
  13515. }
  13516. isDance = true;
  13517. isDanceStart13 = true;
  13518. isSN1 = false;
  13519. isSN2 = false;
  13520. isSN3 = false;
  13521. }
  13522. if ((Input.GetKey(KeyCode.Return) && Input.GetKeyDown(KeyCode.Alpha8))
  13523. || (Input.GetKey(KeyCode.KeypadEnter) && Input.GetKeyDown(KeyCode.Alpha8)))
  13524. {
  13525. GameMain.Instance.SoundMgr.StopBGM(0f);
  13526. isSN1 = true;
  13527. hFlg = true;
  13528. if (this.getModKeyPressing(modKey.Shift))
  13529. {
  13530. isShift = true;
  13531. }
  13532. }
  13533. if (isSN4 || isSN5 || isSN6)
  13534. {
  13535. audioSourceBgm = GameMain.Instance.SoundMgr.GetAudioSourceBgm();
  13536. GameMain.Instance.SoundMgr.PlayBGM("se002.ogg", 0f, false);
  13537. for (int j = 0; j < maidCnt; j++)
  13538. {
  13539. TextAsset textAsset = Resources.Load("SceneDance/dance_SsN_m0") as TextAsset;
  13540. string text5 = "dance_cm3d2_006_ssn_f1.anm";
  13541. switch (j)
  13542. {
  13543. case 1:
  13544. case 4:
  13545. case 7:
  13546. case 10:
  13547. case 13:
  13548. text5 = "dance_cm3d2_006_ssn_f2.anm";
  13549. textAsset = (Resources.Load("SceneDance/dance_SsN_m1") as TextAsset);
  13550. break;
  13551. case 2:
  13552. case 5:
  13553. case 8:
  13554. case 11:
  13555. text5 = "dance_cm3d2_006_ssn_f3.anm";
  13556. textAsset = (Resources.Load("SceneDance/dance_SsN_m1") as TextAsset);
  13557. break;
  13558. }
  13559. if (maidArray[j] && maidArray[j].Visible)
  13560. {
  13561. if (!maidArray[j].body0.m_Bones.GetComponent<Animation>().GetClip(text5))
  13562. {
  13563. maidArray[j].body0.LoadAnime(text5, GameUty.FileSystem, text5, false, false);
  13564. }
  13565. string text4 = textAsset.text;
  13566. text4 = Regex.Replace(text4, "(\\r|\\n| )", string.Empty);
  13567. maidArray[j].StartKuchipakuPattern(0f, text4, true);
  13568. m_baKuchipakuPattern[j] = Convert.FromBase64String(text4);
  13569. }
  13570. }
  13571. if (isSN4)
  13572. {
  13573. GameMain.Instance.SoundMgr.PlayDanceBGM("sunshinenatsu1.ogg", 0f, false);
  13574. }
  13575. if (isSN5)
  13576. {
  13577. GameMain.Instance.SoundMgr.PlayDanceBGM("sunshinenatsu2.ogg", 0f, false);
  13578. }
  13579. if (isSN6)
  13580. {
  13581. GameMain.Instance.SoundMgr.PlayDanceBGM("sunshinenatsu3.ogg", 0f, false);
  13582. }
  13583. ikBui = 5;
  13584. isDanceStart1F = false;
  13585. isDanceStart2F = false;
  13586. isDanceStart3F = false;
  13587. isDanceStart4F = false;
  13588. isDanceStart5F = false;
  13589. isDanceStart6F = false;
  13590. isDanceStart7F = false;
  13591. isDanceStart8F = false;
  13592. isDanceStart9F = false;
  13593. isDanceStart10F = false;
  13594. isDanceStart11F = false;
  13595. isDanceStart12F = false;
  13596. isDanceStart13F = false;
  13597. isDanceStart14F = false;
  13598. isDanceStart15F = false;
  13599. for (int j = 0; j < maidCnt; j++)
  13600. {
  13601. danceFace[j] = 0f;
  13602. }
  13603. if (isDanceStart7V)
  13604. {
  13605. for (int j = 0; j < maidCnt; j++)
  13606. {
  13607. if (maidArray[j] && maidArray[j].Visible)
  13608. {
  13609. if (isDanceStart7V)
  13610. {
  13611. maidArray[j].SetPos(dancePos[j]);
  13612. maidArray[j].body0.transform.localRotation = danceRot[j];
  13613. }
  13614. }
  13615. }
  13616. isDanceStart7V = false;
  13617. }
  13618. if (isDanceStart8V)
  13619. {
  13620. for (int j = 0; j < maidCnt; j++)
  13621. {
  13622. if (maidArray[j] && maidArray[j].Visible)
  13623. {
  13624. if (isDanceStart8V)
  13625. {
  13626. maidArray[j].SetPos(dancePos[j]);
  13627. maidArray[j].body0.transform.localRotation = danceRot[j];
  13628. }
  13629. }
  13630. }
  13631. isDanceStart8V = false;
  13632. isDanceStart8P = false;
  13633. }
  13634. if (isDanceStart11V)
  13635. {
  13636. for (int j = 0; j < maidCnt; j++)
  13637. {
  13638. if (maidArray[j] && maidArray[j].Visible)
  13639. {
  13640. if (isDanceStart11V)
  13641. {
  13642. maidArray[j].SetPos(dancePos[j]);
  13643. maidArray[j].body0.transform.localRotation = danceRot[j];
  13644. }
  13645. }
  13646. }
  13647. isDanceStart11V = false;
  13648. }
  13649. if (isDanceStart1K || isDanceStart3K || isDanceStart4K || isDanceStart5K || isDanceStart6K || isDanceStart9K
  13650. || isDanceStart13K)
  13651. {
  13652. for (int j = 0; j < maidCnt; j++)
  13653. {
  13654. if (maidArray[j] && maidArray[j].Visible)
  13655. {
  13656. if (isDanceStart1K || isDanceStart3K || isDanceStart4K || isDanceStart5K || isDanceStart6K || isDanceStart9K
  13657. || isDanceStart13K)
  13658. {
  13659. maidArray[j].SetPos(dancePos[j]);
  13660. maidArray[j].body0.transform.localRotation = danceRot[j];
  13661. int i = j;
  13662. if (!isVR)
  13663. {
  13664. delCount[i] = 20;
  13665. if (goSlot[(int) selectList[i]] != null)
  13666. {
  13667. maidArray[i].body0.goSlot = new List<TBodySkin>(goSlot[(int) selectList[i]]);
  13668. for (int l = 0; l < bodyHit[(int) selectList[i]].Count; l++)
  13669. {
  13670. maidArray[i].body0.goSlot[l].bonehair.bodyhit = bodyHit[(int) selectList[i]][l];
  13671. }
  13672. }
  13673. }
  13674. Maid maid = maidArray[j];
  13675. maid.DelProp(MPN.handitem, true);
  13676. maid.DelProp(MPN.accvag, true);
  13677. maid.DelProp(MPN.accanl, true);
  13678. maid.DelProp(MPN.kousoku_upper, true);
  13679. maid.DelProp(MPN.kousoku_lower, true);
  13680. maid.AllProcPropSeqStart();
  13681. }
  13682. }
  13683. }
  13684. isDanceStart1K = false;
  13685. isDanceStart3K = false;
  13686. isDanceStart4K = false;
  13687. isDanceStart5K = false;
  13688. isDanceStart6K = false;
  13689. isDanceStart9K = false;
  13690. isDanceStart13K = false;
  13691. }
  13692. if (isDanceStart14V)
  13693. {
  13694. for (int j = 0; j < maidCnt; j++)
  13695. {
  13696. if (maidArray[j] && maidArray[j].Visible)
  13697. {
  13698. if (isDanceStart14V)
  13699. {
  13700. maidArray[j].SetPos(dancePos[j]);
  13701. maidArray[j].body0.transform.localRotation = danceRot[j];
  13702. }
  13703. }
  13704. }
  13705. isDanceStart14V = false;
  13706. }
  13707. if (isDanceStart15V)
  13708. {
  13709. for (int j = 0; j < maidCnt; j++)
  13710. {
  13711. if (maidArray[j] && maidArray[j].Visible)
  13712. {
  13713. if (isDanceStart15V)
  13714. {
  13715. maidArray[j].SetPos(dancePos[j]);
  13716. maidArray[j].body0.transform.localRotation = danceRot[j];
  13717. }
  13718. }
  13719. }
  13720. isDanceStart15V = false;
  13721. }
  13722. for (int j = 0; j < maidCnt; j++)
  13723. {
  13724. isStop[j] = false;
  13725. isLock[j] = false;
  13726. pHandL[j] = 0;
  13727. pHandR[j] = 0;
  13728. muneIKL[j] = false;
  13729. muneIKR[j] = false;
  13730. if (!isVR)
  13731. {
  13732. maidArray[j].body0.quaDefEyeL.eulerAngles = eyeL[(int) selectList[j]];
  13733. maidArray[j].body0.quaDefEyeR.eulerAngles = eyeR[(int) selectList[j]];
  13734. }
  13735. if (maidArray[j].transform.position.y != 100f)
  13736. {
  13737. dancePos[j] = maidArray[j].transform.position;
  13738. }
  13739. else
  13740. {
  13741. dancePos[j] = new Vector3(maidArray[j].transform.position.x, 0f, maidArray[j].transform.position.z);
  13742. }
  13743. danceRot[j] = maidArray[j].transform.localRotation;
  13744. }
  13745. if (maidArray[1] && maidArray[1].Visible)
  13746. {
  13747. maidArray[1].SetPos(new Vector3(maidArray[0].transform.position.x,
  13748. maidArray[0].transform.position.y,
  13749. maidArray[0].transform.position.z));
  13750. maidArray[1].body0.transform.localRotation = maidArray[0].body0.transform.localRotation;
  13751. }
  13752. if (maidArray[2] && maidArray[2].Visible)
  13753. {
  13754. maidArray[2].SetPos(new Vector3(maidArray[0].transform.position.x,
  13755. maidArray[0].transform.position.y,
  13756. maidArray[0].transform.position.z));
  13757. maidArray[2].body0.transform.localRotation = maidArray[0].body0.transform.localRotation;
  13758. }
  13759. if (maidArray[4] && maidArray[4].Visible)
  13760. {
  13761. maidArray[4].SetPos(new Vector3(maidArray[3].transform.position.x,
  13762. maidArray[3].transform.position.y,
  13763. maidArray[3].transform.position.z));
  13764. maidArray[4].body0.transform.localRotation = maidArray[3].body0.transform.localRotation;
  13765. }
  13766. if (maidArray[5] && maidArray[5].Visible)
  13767. {
  13768. maidArray[5].SetPos(new Vector3(maidArray[3].transform.position.x,
  13769. maidArray[3].transform.position.y,
  13770. maidArray[3].transform.position.z));
  13771. maidArray[5].body0.transform.localRotation = maidArray[3].body0.transform.localRotation;
  13772. }
  13773. if (maidArray[7] && maidArray[7].Visible)
  13774. {
  13775. maidArray[7].SetPos(new Vector3(maidArray[6].transform.position.x,
  13776. maidArray[6].transform.position.y,
  13777. maidArray[6].transform.position.z));
  13778. maidArray[7].body0.transform.localRotation = maidArray[6].body0.transform.localRotation;
  13779. }
  13780. if (maidArray[8] && maidArray[8].Visible)
  13781. {
  13782. maidArray[8].SetPos(new Vector3(maidArray[6].transform.position.x,
  13783. maidArray[6].transform.position.y,
  13784. maidArray[6].transform.position.z));
  13785. maidArray[8].body0.transform.localRotation = maidArray[6].body0.transform.localRotation;
  13786. }
  13787. if (maidArray[10] && maidArray[10].Visible)
  13788. {
  13789. maidArray[10].SetPos(new Vector3(maidArray[9].transform.position.x,
  13790. maidArray[9].transform.position.y,
  13791. maidArray[9].transform.position.z));
  13792. maidArray[10].body0.transform.localRotation = maidArray[9].body0.transform.localRotation;
  13793. }
  13794. if (maidArray[11] && maidArray[11].Visible)
  13795. {
  13796. maidArray[11].SetPos(new Vector3(maidArray[9].transform.position.x,
  13797. maidArray[9].transform.position.y,
  13798. maidArray[9].transform.position.z));
  13799. maidArray[11].body0.transform.localRotation = maidArray[9].body0.transform.localRotation;
  13800. }
  13801. if (maidArray[13] && maidArray[13].Visible)
  13802. {
  13803. maidArray[13].SetPos(new Vector3(maidArray[12].transform.position.x,
  13804. maidArray[12].transform.position.y,
  13805. maidArray[12].transform.position.z));
  13806. maidArray[13].body0.transform.localRotation = maidArray[12].body0.transform.localRotation;
  13807. }
  13808. isDance = true;
  13809. isDanceStart14 = true;
  13810. isSN4 = false;
  13811. isSN5 = false;
  13812. isSN6 = false;
  13813. }
  13814. if (isSD1)
  13815. {
  13816. audioSourceBgm = GameMain.Instance.SoundMgr.GetAudioSourceBgm();
  13817. GameMain.Instance.SoundMgr.PlayBGM("se002.ogg", 0f, false);
  13818. for (int j = 0; j < maidCnt; j++)
  13819. {
  13820. TextAsset textAsset = Resources.Load("SceneDance/uta_mmlop_mix_Bok") as TextAsset;
  13821. string text5 = "dance_cmo_002_sd_f1.anm";
  13822. switch (j)
  13823. {
  13824. case 1:
  13825. case 3:
  13826. case 5:
  13827. case 7:
  13828. case 9:
  13829. case 11:
  13830. case 13:
  13831. text5 = "dance_cmo_002_sd_f2.anm";
  13832. textAsset = (Resources.Load("SceneDance/uta_mmlop_mix_Aok") as TextAsset);
  13833. break;
  13834. }
  13835. danceName[j] = text5;
  13836. if (maidArray[j] && maidArray[j].Visible)
  13837. {
  13838. if (!maidArray[j].body0.m_Bones.GetComponent<Animation>().GetClip(text5))
  13839. {
  13840. maidArray[j].body0.LoadAnime(text5, GameUty.FileSystem, text5, false, false);
  13841. }
  13842. string text4 = textAsset.text;
  13843. text4 = Regex.Replace(text4, "(\\r|\\n| )", string.Empty);
  13844. maidArray[j].StartKuchipakuPattern(0f, text4, true);
  13845. m_baKuchipakuPattern[j] = Convert.FromBase64String(text4);
  13846. }
  13847. }
  13848. GameMain.Instance.SoundMgr.PlayDanceBGM("selfishdestiny_due_short_1.ogg", 0f, false);
  13849. ikBui = 5;
  13850. isDanceStart1F = false;
  13851. isDanceStart2F = false;
  13852. isDanceStart3F = false;
  13853. isDanceStart4F = false;
  13854. isDanceStart5F = false;
  13855. isDanceStart6F = false;
  13856. isDanceStart7F = false;
  13857. isDanceStart8F = false;
  13858. isDanceStart9F = false;
  13859. isDanceStart10F = false;
  13860. isDanceStart11F = false;
  13861. isDanceStart12F = false;
  13862. isDanceStart13F = false;
  13863. isDanceStart14F = false;
  13864. isDanceStart15F = false;
  13865. for (int j = 0; j < maidCnt; j++)
  13866. {
  13867. danceFace[j] = 0f;
  13868. }
  13869. if (isDanceStart7V)
  13870. {
  13871. for (int j = 0; j < maidCnt; j++)
  13872. {
  13873. if (maidArray[j] && maidArray[j].Visible)
  13874. {
  13875. if (isDanceStart7V)
  13876. {
  13877. maidArray[j].SetPos(dancePos[j]);
  13878. maidArray[j].body0.transform.localRotation = danceRot[j];
  13879. }
  13880. }
  13881. }
  13882. isDanceStart7V = false;
  13883. }
  13884. if (isDanceStart8V)
  13885. {
  13886. for (int j = 0; j < maidCnt; j++)
  13887. {
  13888. if (maidArray[j] && maidArray[j].Visible)
  13889. {
  13890. if (isDanceStart8V)
  13891. {
  13892. maidArray[j].SetPos(dancePos[j]);
  13893. maidArray[j].body0.transform.localRotation = danceRot[j];
  13894. }
  13895. }
  13896. }
  13897. isDanceStart8V = false;
  13898. isDanceStart8P = false;
  13899. }
  13900. if (isDanceStart11V)
  13901. {
  13902. for (int j = 0; j < maidCnt; j++)
  13903. {
  13904. if (maidArray[j] && maidArray[j].Visible)
  13905. {
  13906. if (isDanceStart11V)
  13907. {
  13908. maidArray[j].SetPos(dancePos[j]);
  13909. maidArray[j].body0.transform.localRotation = danceRot[j];
  13910. }
  13911. }
  13912. }
  13913. isDanceStart11V = false;
  13914. }
  13915. if (isDanceStart1K || isDanceStart3K || isDanceStart4K || isDanceStart5K || isDanceStart6K || isDanceStart9K
  13916. || isDanceStart13K)
  13917. {
  13918. for (int j = 0; j < maidCnt; j++)
  13919. {
  13920. if (maidArray[j] && maidArray[j].Visible)
  13921. {
  13922. if (isDanceStart1K || isDanceStart3K || isDanceStart4K || isDanceStart5K || isDanceStart6K || isDanceStart9K
  13923. || isDanceStart13K)
  13924. {
  13925. maidArray[j].SetPos(dancePos[j]);
  13926. maidArray[j].body0.transform.localRotation = danceRot[j];
  13927. int i = j;
  13928. if (!isVR)
  13929. {
  13930. delCount[i] = 20;
  13931. if (goSlot[(int) selectList[i]] != null)
  13932. {
  13933. maidArray[i].body0.goSlot = new List<TBodySkin>(goSlot[(int) selectList[i]]);
  13934. for (int l = 0; l < bodyHit[(int) selectList[i]].Count; l++)
  13935. {
  13936. maidArray[i].body0.goSlot[l].bonehair.bodyhit = bodyHit[(int) selectList[i]][l];
  13937. }
  13938. }
  13939. }
  13940. Maid maid = maidArray[j];
  13941. maid.DelProp(MPN.handitem, true);
  13942. maid.DelProp(MPN.accvag, true);
  13943. maid.DelProp(MPN.accanl, true);
  13944. maid.DelProp(MPN.kousoku_upper, true);
  13945. maid.DelProp(MPN.kousoku_lower, true);
  13946. maid.AllProcPropSeqStart();
  13947. }
  13948. }
  13949. }
  13950. isDanceStart1K = false;
  13951. isDanceStart3K = false;
  13952. isDanceStart4K = false;
  13953. isDanceStart5K = false;
  13954. isDanceStart6K = false;
  13955. isDanceStart9K = false;
  13956. isDanceStart13K = false;
  13957. }
  13958. if (isDanceStart14V)
  13959. {
  13960. for (int j = 0; j < maidCnt; j++)
  13961. {
  13962. if (maidArray[j] && maidArray[j].Visible)
  13963. {
  13964. if (isDanceStart14V)
  13965. {
  13966. maidArray[j].SetPos(dancePos[j]);
  13967. maidArray[j].body0.transform.localRotation = danceRot[j];
  13968. }
  13969. }
  13970. }
  13971. isDanceStart14V = false;
  13972. }
  13973. if (isDanceStart15V)
  13974. {
  13975. for (int j = 0; j < maidCnt; j++)
  13976. {
  13977. if (maidArray[j] && maidArray[j].Visible)
  13978. {
  13979. if (isDanceStart15V)
  13980. {
  13981. maidArray[j].SetPos(dancePos[j]);
  13982. maidArray[j].body0.transform.localRotation = danceRot[j];
  13983. }
  13984. }
  13985. }
  13986. isDanceStart15V = false;
  13987. }
  13988. for (int j = 0; j < maidCnt; j++)
  13989. {
  13990. isStop[j] = false;
  13991. isLock[j] = false;
  13992. pHandL[j] = 0;
  13993. pHandR[j] = 0;
  13994. muneIKL[j] = false;
  13995. muneIKR[j] = false;
  13996. if (!isVR)
  13997. {
  13998. maidArray[j].body0.quaDefEyeL.eulerAngles = eyeL[(int) selectList[j]];
  13999. maidArray[j].body0.quaDefEyeR.eulerAngles = eyeR[(int) selectList[j]];
  14000. }
  14001. if (maidArray[j].transform.position.y != 100f)
  14002. {
  14003. dancePos[j] = maidArray[j].transform.position;
  14004. }
  14005. else
  14006. {
  14007. dancePos[j] = new Vector3(maidArray[j].transform.position.x, 0f, maidArray[j].transform.position.z);
  14008. }
  14009. danceRot[j] = maidArray[j].transform.localRotation;
  14010. }
  14011. if (maidArray[0] && maidArray[0].Visible && maidArray[1] && maidArray[1].Visible)
  14012. {
  14013. maidArray[0].SetPos(new Vector3((maidArray[0].transform.position.x + maidArray[1].transform.position.x) / 2f,
  14014. (maidArray[0].transform.position.y + maidArray[1].transform.position.y) / 2f,
  14015. (maidArray[0].transform.position.z + maidArray[1].transform.position.z) / 2f));
  14016. maidArray[0].body0.transform.localRotation =
  14017. Quaternion.Lerp(maidArray[0].transform.localRotation, maidArray[1].transform.localRotation, 0.5f);
  14018. }
  14019. if (maidArray[2] && maidArray[2].Visible && maidArray[3] && maidArray[3].Visible)
  14020. {
  14021. maidArray[2].SetPos(new Vector3((maidArray[2].transform.position.x + maidArray[3].transform.position.x) / 2f,
  14022. (maidArray[2].transform.position.y + maidArray[3].transform.position.y) / 2f,
  14023. (maidArray[2].transform.position.z + maidArray[3].transform.position.z) / 2f));
  14024. maidArray[2].body0.transform.localRotation =
  14025. Quaternion.Lerp(maidArray[2].transform.localRotation, maidArray[3].transform.localRotation, 0.5f);
  14026. }
  14027. if (maidArray[4] && maidArray[4].Visible && maidArray[5] && maidArray[5].Visible)
  14028. {
  14029. maidArray[4].SetPos(new Vector3((maidArray[4].transform.position.x + maidArray[5].transform.position.x) / 2f,
  14030. (maidArray[4].transform.position.y + maidArray[5].transform.position.y) / 2f,
  14031. (maidArray[4].transform.position.z + maidArray[5].transform.position.z) / 2f));
  14032. maidArray[4].body0.transform.localRotation =
  14033. Quaternion.Lerp(maidArray[4].transform.localRotation, maidArray[5].transform.localRotation, 0.5f);
  14034. }
  14035. if (maidArray[6] && maidArray[6].Visible && maidArray[7] && maidArray[7].Visible)
  14036. {
  14037. maidArray[6].SetPos(new Vector3((maidArray[6].transform.position.x + maidArray[7].transform.position.x) / 2f,
  14038. (maidArray[6].transform.position.y + maidArray[7].transform.position.y) / 2f,
  14039. (maidArray[6].transform.position.z + maidArray[7].transform.position.z) / 2f));
  14040. maidArray[6].body0.transform.localRotation =
  14041. Quaternion.Lerp(maidArray[6].transform.localRotation, maidArray[7].transform.localRotation, 0.5f);
  14042. }
  14043. if (maidArray[8] && maidArray[8].Visible && maidArray[9] && maidArray[9].Visible)
  14044. {
  14045. maidArray[8].SetPos(new Vector3((maidArray[8].transform.position.x + maidArray[9].transform.position.x) / 2f,
  14046. (maidArray[8].transform.position.y + maidArray[9].transform.position.y) / 2f,
  14047. (maidArray[8].transform.position.z + maidArray[9].transform.position.z) / 2f));
  14048. maidArray[8].body0.transform.localRotation =
  14049. Quaternion.Lerp(maidArray[8].transform.localRotation, maidArray[9].transform.localRotation, 0.5f);
  14050. }
  14051. if (maidArray[10] && maidArray[10].Visible && maidArray[11] && maidArray[11].Visible)
  14052. {
  14053. maidArray[10].SetPos(new Vector3((maidArray[10].transform.position.x + maidArray[11].transform.position.x) / 2f,
  14054. (maidArray[10].transform.position.y + maidArray[11].transform.position.y) / 2f,
  14055. (maidArray[10].transform.position.z + maidArray[11].transform.position.z) / 2f));
  14056. maidArray[10].body0.transform.localRotation =
  14057. Quaternion.Lerp(maidArray[10].transform.localRotation, maidArray[11].transform.localRotation, 0.5f);
  14058. }
  14059. if (maidArray[12] && maidArray[12].Visible && maidArray[13] && maidArray[13].Visible)
  14060. {
  14061. maidArray[12].SetPos(new Vector3((maidArray[12].transform.position.x + maidArray[13].transform.position.x) / 2f,
  14062. (maidArray[12].transform.position.y + maidArray[13].transform.position.y) / 2f,
  14063. (maidArray[12].transform.position.z + maidArray[13].transform.position.z) / 2f));
  14064. maidArray[12].body0.transform.localRotation =
  14065. Quaternion.Lerp(maidArray[12].transform.localRotation, maidArray[13].transform.localRotation, 0.5f);
  14066. }
  14067. if (maidArray[1] && maidArray[1].Visible)
  14068. {
  14069. maidArray[1].SetPos(new Vector3(maidArray[0].transform.position.x,
  14070. maidArray[0].transform.position.y,
  14071. maidArray[0].transform.position.z));
  14072. maidArray[1].body0.transform.localRotation = maidArray[0].body0.transform.localRotation;
  14073. }
  14074. if (maidArray[3] && maidArray[3].Visible)
  14075. {
  14076. maidArray[3].SetPos(new Vector3(maidArray[2].transform.position.x,
  14077. maidArray[2].transform.position.y,
  14078. maidArray[2].transform.position.z));
  14079. maidArray[3].body0.transform.localRotation = maidArray[2].body0.transform.localRotation;
  14080. }
  14081. if (maidArray[5] && maidArray[5].Visible)
  14082. {
  14083. maidArray[5].SetPos(new Vector3(maidArray[4].transform.position.x,
  14084. maidArray[4].transform.position.y,
  14085. maidArray[4].transform.position.z));
  14086. maidArray[5].body0.transform.localRotation = maidArray[4].body0.transform.localRotation;
  14087. }
  14088. if (maidArray[7] && maidArray[7].Visible)
  14089. {
  14090. maidArray[7].SetPos(new Vector3(maidArray[6].transform.position.x,
  14091. maidArray[6].transform.position.y,
  14092. maidArray[6].transform.position.z));
  14093. maidArray[7].body0.transform.localRotation = maidArray[6].body0.transform.localRotation;
  14094. }
  14095. if (maidArray[9] && maidArray[9].Visible)
  14096. {
  14097. maidArray[9].SetPos(new Vector3(maidArray[8].transform.position.x,
  14098. maidArray[8].transform.position.y,
  14099. maidArray[8].transform.position.z));
  14100. maidArray[9].body0.transform.localRotation = maidArray[8].body0.transform.localRotation;
  14101. }
  14102. if (maidArray[11] && maidArray[11].Visible)
  14103. {
  14104. maidArray[11].SetPos(new Vector3(maidArray[10].transform.position.x,
  14105. maidArray[10].transform.position.y,
  14106. maidArray[10].transform.position.z));
  14107. maidArray[11].body0.transform.localRotation = maidArray[10].body0.transform.localRotation;
  14108. }
  14109. if (maidArray[13] && maidArray[13].Visible)
  14110. {
  14111. maidArray[13].SetPos(new Vector3(maidArray[12].transform.position.x,
  14112. maidArray[12].transform.position.y,
  14113. maidArray[12].transform.position.z));
  14114. maidArray[13].body0.transform.localRotation = maidArray[12].body0.transform.localRotation;
  14115. }
  14116. if (maidArray[2] && maidArray[2].Visible)
  14117. {
  14118. if (maidArray[0].transform.position == maidArray[2].transform.position)
  14119. {
  14120. Vector3 vector = Vector3.zero;
  14121. vector.x = 0.6f;
  14122. maidArray[1].SetPos(vector);
  14123. if (maidArray[2] && maidArray[2].Visible)
  14124. {
  14125. vector.x = -0.6f;
  14126. maidArray[2].SetPos(vector);
  14127. }
  14128. if (maidArray[3] && maidArray[3].Visible)
  14129. {
  14130. vector.x = 1.2f;
  14131. maidArray[3].SetPos(vector);
  14132. }
  14133. if (maidArray[4] && maidArray[4].Visible)
  14134. {
  14135. vector.x = -1.2f;
  14136. maidArray[4].SetPos(vector);
  14137. }
  14138. if (maidArray[5] && maidArray[5].Visible)
  14139. {
  14140. vector.x = 1.8f;
  14141. maidArray[5].SetPos(vector);
  14142. }
  14143. if (maidArray[6] && maidArray[6].Visible)
  14144. {
  14145. vector.x = -1.8f;
  14146. maidArray[6].SetPos(vector);
  14147. }
  14148. if (maidArray[7] && maidArray[7].Visible)
  14149. {
  14150. vector.x = 2.4f;
  14151. maidArray[7].SetPos(vector);
  14152. }
  14153. if (maidArray[8] && maidArray[8].Visible)
  14154. {
  14155. vector.x = -2.4f;
  14156. maidArray[8].SetPos(vector);
  14157. }
  14158. if (maidArray[9] && maidArray[9].Visible)
  14159. {
  14160. vector.x = 3f;
  14161. maidArray[9].SetPos(vector);
  14162. }
  14163. if (maidArray[10] && maidArray[10].Visible)
  14164. {
  14165. vector.x = -3f;
  14166. maidArray[10].SetPos(vector);
  14167. }
  14168. if (maidArray[11] && maidArray[11].Visible)
  14169. {
  14170. vector.x = 3.6f;
  14171. maidArray[11].SetPos(vector);
  14172. }
  14173. if (maidArray[12] && maidArray[12].Visible)
  14174. {
  14175. vector.x = -3.6f;
  14176. maidArray[12].SetPos(vector);
  14177. }
  14178. if (maidArray[13] && maidArray[13].Visible)
  14179. {
  14180. vector.x = 4.2f;
  14181. maidArray[13].SetPos(vector);
  14182. }
  14183. }
  14184. }
  14185. isDance = true;
  14186. isDanceStart15 = true;
  14187. isSD1 = false;
  14188. }
  14189. if (Input.GetKeyDown(KeyCode.Keypad1) || Input.GetKeyDown(KeyCode.Keypad2) || Input.GetKeyDown(KeyCode.Keypad3)
  14190. || Input.GetKeyDown(KeyCode.Keypad4) || Input.GetKeyDown(KeyCode.Keypad5) || Input.GetKeyDown(KeyCode.Keypad6)
  14191. || Input.GetKeyDown(KeyCode.Keypad7) || Input.GetKeyDown(KeyCode.Keypad8) || Input.GetKeyDown(KeyCode.Keypad9)
  14192. || Input.GetKeyDown(KeyCode.Keypad0))
  14193. {
  14194. for (int j = 0; j < maidCnt; j++)
  14195. {
  14196. if (maidArray[j] && maidArray[j].Visible)
  14197. {
  14198. if (!isVR)
  14199. {
  14200. if (goSlot[(int) selectList[j]] != null)
  14201. {
  14202. maidArray[j].body0.goSlot = new List<TBodySkin>(goSlot[(int) selectList[j]]);
  14203. for (int l = 0; l < bodyHit[(int) selectList[j]].Count; l++)
  14204. {
  14205. maidArray[j].body0.goSlot[l].bonehair.bodyhit = bodyHit[(int) selectList[j]][l];
  14206. }
  14207. }
  14208. }
  14209. }
  14210. }
  14211. }
  14212. if (!Input.GetKeyUp(KeyCode.Return) && Input.GetKeyUp(KeyCode.H) && !hFlg)
  14213. {
  14214. if (h2Flg)
  14215. {
  14216. h2Flg = false;
  14217. }
  14218. else
  14219. {
  14220. string text4 = "";
  14221. if (wearIndex == 0)
  14222. {
  14223. text4 = "Underwear";
  14224. wearIndex = 1;
  14225. isWear = false;
  14226. isSkirt = false;
  14227. isBra = true;
  14228. isPanz = true;
  14229. isHeadset = false;
  14230. isGlove = false;
  14231. isStkg = true;
  14232. isShoes = false;
  14233. }
  14234. else if (wearIndex == 1)
  14235. {
  14236. text4 = "Nude";
  14237. wearIndex = 2;
  14238. isWear = false;
  14239. isSkirt = false;
  14240. isBra = false;
  14241. isPanz = false;
  14242. isHeadset = false;
  14243. isGlove = false;
  14244. isStkg = false;
  14245. isShoes = false;
  14246. }
  14247. else if (wearIndex == 2)
  14248. {
  14249. text4 = "None";
  14250. wearIndex = 0;
  14251. isWear = true;
  14252. isSkirt = true;
  14253. isBra = true;
  14254. isPanz = true;
  14255. isHeadset = true;
  14256. isGlove = true;
  14257. isStkg = true;
  14258. isShoes = true;
  14259. }
  14260. TBody.MaskMode maskMode = (TBody.MaskMode) ((int) Enum.Parse(typeof(TBody.MaskMode), text4));
  14261. for (int j = 0; j < maidCnt; j++)
  14262. {
  14263. if (maidArray[j] && maidArray[j].Visible)
  14264. {
  14265. if (!isVR)
  14266. {
  14267. if (goSlot[(int) selectList[j]] != null)
  14268. {
  14269. maidArray[j].body0.goSlot = new List<TBodySkin>(goSlot[(int) selectList[j]]);
  14270. for (int l = 0; l < bodyHit[(int) selectList[j]].Count; l++)
  14271. {
  14272. maidArray[j].body0.goSlot[l].bonehair.bodyhit = bodyHit[(int) selectList[j]][l];
  14273. }
  14274. }
  14275. }
  14276. maidArray[j].body0.SetMaskMode(maskMode);
  14277. }
  14278. }
  14279. }
  14280. }
  14281. if (this.getModKeyPressing(modKey.Ctrl) && Input.GetKeyDown(KeyCode.S) && !sFlg)
  14282. {
  14283. saveScene = 9999;
  14284. saveScene2 = saveScene;
  14285. GameMain.Instance.SoundMgr.PlaySe("se002.ogg", false);
  14286. try
  14287. {
  14288. thum_byte_to_base64_ = string.Empty;
  14289. thum_file_path_ = Path.Combine(Path.GetTempPath(), "cm3d2_" + Guid.NewGuid().ToString() + ".png");
  14290. GameMain.Instance.MainCamera.ScreenShot(thum_file_path_, 1, false);
  14291. }
  14292. catch { }
  14293. }
  14294. if (this.getModKeyPressing(modKey.Ctrl) && Input.GetKeyDown(KeyCode.A))
  14295. {
  14296. loadScene = 9999;
  14297. GameMain.Instance.SoundMgr.PlaySe("se002.ogg", false);
  14298. }
  14299. if (isScreen)
  14300. {
  14301. isScreen = false;
  14302. bGui = isGui;
  14303. isGui = false;
  14304. if (!isMessage)
  14305. {
  14306. foreach (UICamera uicamera in ui_cam_hide_list_)
  14307. {
  14308. uicamera.GetComponent<Camera>().enabled = true;
  14309. }
  14310. ui_cam_hide_list_.Clear();
  14311. }
  14312. else
  14313. {
  14314. if (editUI != null)
  14315. {
  14316. editUI.SetActive(true);
  14317. }
  14318. if (GameMain.Instance.CMSystem.ViewFps)
  14319. {
  14320. GameObject childObject = UTY.GetChildObject(GameMain.Instance.gameObject, "SystemUI Root/FpsCounter", false);
  14321. childObject.SetActive(true);
  14322. }
  14323. GameObject childObject2 = UTY.GetChildObject(GameMain.Instance.gameObject, "SystemUI Root/SystemDialog", false);
  14324. GameObject childObject3 = UTY.GetChildObject(GameMain.Instance.gameObject, "SystemUI Root/SystemShortcut", false);
  14325. childObject2.SetActive(true);
  14326. childObject3.SetActive(true);
  14327. }
  14328. for (int j = 0; j < maidCnt; j++)
  14329. {
  14330. if (maidArray[j] && maidArray[j].Visible)
  14331. {
  14332. isBone[j] = isBoneN[j];
  14333. if (isBone[j])
  14334. {
  14335. gNeck[j].SetActive(true);
  14336. gSpine[j].SetActive(true);
  14337. gSpine0a[j].SetActive(true);
  14338. gSpine1a[j].SetActive(true);
  14339. gSpine1[j].SetActive(true);
  14340. gPelvis[j].SetActive(true);
  14341. gHandL[j].SetActive(true);
  14342. gArmL[j].SetActive(true);
  14343. gFootL[j].SetActive(true);
  14344. gHizaL[j].SetActive(true);
  14345. gHandR[j].SetActive(true);
  14346. gArmR[j].SetActive(true);
  14347. gFootR[j].SetActive(true);
  14348. gHizaR[j].SetActive(true);
  14349. gClavicleL[j].SetActive(true);
  14350. gClavicleR[j].SetActive(true);
  14351. }
  14352. }
  14353. }
  14354. }
  14355. if (isScreen2)
  14356. {
  14357. isScreen = true;
  14358. isScreen2 = false;
  14359. }
  14360. if (!isVR && Input.GetKeyDown(KeyCode.S) && !sFlg && !Input.GetKey(KeyCode.KeypadEnter) && !Input.GetKey(KeyCode.Return)
  14361. && !Input.GetKey(KeyCode.Q))
  14362. {
  14363. if (!Input.GetKey(KeyCode.LeftShift) && !Input.GetKey(KeyCode.LeftAlt) && !this.getModKeyPressing(modKey.Ctrl))
  14364. {
  14365. isScreen = true;
  14366. for (int j = 0; j < maidCnt; j++)
  14367. {
  14368. if (maidArray[j] && maidArray[j].Visible)
  14369. {
  14370. if (isBone[j])
  14371. {
  14372. gNeck[j].SetActive(false);
  14373. gSpine[j].SetActive(false);
  14374. gSpine0a[j].SetActive(false);
  14375. gSpine1a[j].SetActive(false);
  14376. gSpine1[j].SetActive(false);
  14377. gPelvis[j].SetActive(false);
  14378. gHandL[j].SetActive(false);
  14379. gArmL[j].SetActive(false);
  14380. gFootL[j].SetActive(false);
  14381. gHizaL[j].SetActive(false);
  14382. gHandR[j].SetActive(false);
  14383. gArmR[j].SetActive(false);
  14384. gFootR[j].SetActive(false);
  14385. gHizaR[j].SetActive(false);
  14386. gClavicleL[j].SetActive(false);
  14387. gClavicleR[j].SetActive(false);
  14388. }
  14389. isBoneN[j] = isBone[j];
  14390. isBone[j] = false;
  14391. }
  14392. }
  14393. if (!isMessage)
  14394. {
  14395. ui_cam_hide_list_.Clear();
  14396. UICamera[] array16 = NGUITools.FindActive<UICamera>();
  14397. foreach (UICamera uicamera2 in array16)
  14398. {
  14399. if (uicamera2.GetComponent<Camera>().enabled)
  14400. {
  14401. uicamera2.GetComponent<Camera>().enabled = false;
  14402. ui_cam_hide_list_.Add(uicamera2);
  14403. }
  14404. }
  14405. }
  14406. else
  14407. {
  14408. editUI = GameObject.Find("/UI Root/Camera");
  14409. if (editUI != null)
  14410. {
  14411. editUI.SetActive(false);
  14412. }
  14413. if (GameMain.Instance.CMSystem.ViewFps)
  14414. {
  14415. GameObject childObject =
  14416. UTY.GetChildObject(GameMain.Instance.gameObject, "SystemUI Root/FpsCounter", false);
  14417. childObject.SetActive(false);
  14418. }
  14419. GameObject childObject2 = UTY.GetChildObject(GameMain.Instance.gameObject, "SystemUI Root/SystemDialog", false);
  14420. GameObject childObject3 =
  14421. UTY.GetChildObject(GameMain.Instance.gameObject, "SystemUI Root/SystemShortcut", false);
  14422. childObject2.SetActive(false);
  14423. childObject3.SetActive(false);
  14424. }
  14425. isGui = bGui;
  14426. bGui = false;
  14427. GameMain.Instance.MainCamera.ScreenShot(false);
  14428. GameMain.Instance.SoundMgr.PlaySe("se022.ogg", false);
  14429. }
  14430. }
  14431. if (!isVR && Input.GetKey(KeyCode.Q) && Input.GetKey(KeyCode.U) && !qFlg)
  14432. {
  14433. mainCameraTransform.Rotate(0f, 0f, -0.15f);
  14434. keyFlg2 = true;
  14435. }
  14436. else if (!isVR && Input.GetKey(KeyCode.Q) && Input.GetKey(KeyCode.O) && !qFlg)
  14437. {
  14438. mainCameraTransform.Rotate(0f, 0f, 0.15f);
  14439. keyFlg2 = true;
  14440. }
  14441. else if (!isVR && Input.GetKey(KeyCode.Q) && Input.GetKeyDown(KeyCode.BackQuote) && !qFlg)
  14442. {
  14443. mainCameraTransform.eulerAngles =
  14444. new Vector3(mainCameraTransform.rotation.eulerAngles.x, mainCameraTransform.rotation.eulerAngles.y, 0f);
  14445. keyFlg2 = true;
  14446. }
  14447. else if (!isVR && Input.GetKey(KeyCode.Q) && Input.GetKeyDown(KeyCode.R) && !qFlg)
  14448. {
  14449. GameMain.Instance.MainCamera.Reset(CameraMain.CameraType.Target, true);
  14450. mainCamera.SetTargetPos(new Vector3(0f, 0.9f, 0f), true);
  14451. mainCamera.SetDistance(3f, true);
  14452. keyFlg2 = true;
  14453. }
  14454. else if (!isVR && Input.GetKey(KeyCode.Q) && Input.GetKeyDown(KeyCode.S) && !qFlg)
  14455. {
  14456. cameraIti = mainCamera.GetTargetPos();
  14457. cameraIti2 = mainCamera.GetPos();
  14458. cameraItiAngle = mainCamera.GetAroundAngle();
  14459. cameraItiDistance = mainCamera.GetDistance();
  14460. keyFlg2 = true;
  14461. }
  14462. else if (!isVR && Input.GetKey(KeyCode.Q) && Input.GetKeyDown(KeyCode.A) && !qFlg)
  14463. {
  14464. mainCamera.SetTargetPos(cameraIti, true);
  14465. mainCamera.SetPos(cameraIti2);
  14466. mainCamera.SetAroundAngle(cameraItiAngle, true);
  14467. mainCamera.SetDistance(cameraItiDistance, true);
  14468. keyFlg2 = true;
  14469. }
  14470. else if (!isVR && Input.GetKeyUp(KeyCode.Q) && !qFlg)
  14471. {
  14472. if (keyFlg2)
  14473. {
  14474. keyFlg2 = false;
  14475. }
  14476. else
  14477. {
  14478. effectIndex++;
  14479. if (effectIndex == 9)
  14480. {
  14481. kami.SetActive(false);
  14482. effectIndex = 0;
  14483. }
  14484. Vignetting component3 = GameMain.Instance.MainCamera.gameObject.GetComponent<Vignetting>();
  14485. if (!isBlur)
  14486. {
  14487. component3.mode = Vignetting.AberrationMode.Simple;
  14488. component3.intensity = -3.98f;
  14489. component3.chromaticAberration = -0.75f;
  14490. component3.axialAberration = 1.18f;
  14491. component3.blurSpread = 4.19f;
  14492. component3.luminanceDependency = 0.494f;
  14493. component3.blurDistance = 1.71f;
  14494. component3.enabled = false;
  14495. }
  14496. if (kami) { }
  14497. if (effectIndex == 0)
  14498. {
  14499. component3.enabled = false;
  14500. }
  14501. if (effectIndex == 1)
  14502. {
  14503. component3.mode = Vignetting.AberrationMode.Simple;
  14504. component3.intensity = -1f;
  14505. component3.chromaticAberration = 0f;
  14506. component3.axialAberration = 0f;
  14507. component3.blurSpread = 5f;
  14508. component3.luminanceDependency = 0f;
  14509. component3.blurDistance = 0f;
  14510. component3.enabled = true;
  14511. }
  14512. if (effectIndex == 2)
  14513. {
  14514. component3.enabled = true;
  14515. }
  14516. if (effectIndex == 3)
  14517. {
  14518. component3.mode = Vignetting.AberrationMode.Simple;
  14519. component3.intensity = 9f;
  14520. component3.chromaticAberration = 0f;
  14521. component3.axialAberration = 0f;
  14522. component3.blurSpread = 5f;
  14523. component3.luminanceDependency = 0f;
  14524. component3.blurDistance = 0f;
  14525. component3.enabled = true;
  14526. }
  14527. if (effectIndex == 4)
  14528. {
  14529. Object @object = Resources.Load("Prefab/p_kamihubuki_photo_ver");
  14530. kami = (GameObject) Instantiate(@object);
  14531. Vector3 localPosition = kami.transform.localPosition;
  14532. localPosition.y = 3.5f;
  14533. kami.transform.localPosition = localPosition;
  14534. }
  14535. if (effectIndex == 5)
  14536. {
  14537. component3.enabled = true;
  14538. component3.mode = Vignetting.AberrationMode.Simple;
  14539. component3.intensity = -2.5f;
  14540. component3.chromaticAberration = -0.3f;
  14541. component3.axialAberration = 0.5f;
  14542. component3.blurSpread = 4.5f;
  14543. component3.luminanceDependency = 0.2f;
  14544. component3.blurDistance = 0.8f;
  14545. component3.enabled = true;
  14546. }
  14547. if (effectIndex == 6)
  14548. {
  14549. kami.SetActive(false);
  14550. Object @object = Resources.Load("Prefab/p_powder_snow_photo_ver");
  14551. kami = (GameObject) Instantiate(@object);
  14552. Vector3 localPosition = kami.transform.localPosition;
  14553. localPosition.y = 3.5f;
  14554. kami.transform.localPosition = localPosition;
  14555. }
  14556. if (effectIndex == 7)
  14557. {
  14558. component3.enabled = true;
  14559. component3.mode = Vignetting.AberrationMode.Simple;
  14560. component3.intensity = -2.5f;
  14561. component3.chromaticAberration = -0.3f;
  14562. component3.axialAberration = 0.5f;
  14563. component3.blurSpread = 4.5f;
  14564. component3.luminanceDependency = 0.2f;
  14565. component3.blurDistance = 0.8f;
  14566. component3.enabled = true;
  14567. }
  14568. if (effectIndex == 8)
  14569. {
  14570. component3.mode = Vignetting.AberrationMode.Simple;
  14571. component3.intensity = 8f;
  14572. component3.chromaticAberration = 0f;
  14573. component3.axialAberration = 0f;
  14574. component3.blurSpread = 5f;
  14575. component3.luminanceDependency = 0f;
  14576. component3.blurDistance = 0f;
  14577. component3.enabled = true;
  14578. }
  14579. }
  14580. }
  14581. if (!isVR && Input.GetKeyUp(KeyCode.Q) && qFlg)
  14582. {
  14583. qFlg = false;
  14584. }
  14585. if (Input.GetKey(KeyCode.A) && !Input.GetKey(KeyCode.Space))
  14586. {
  14587. bool flag5 = false;
  14588. for (int k = 0; k < keyArray.Length; k++)
  14589. {
  14590. if (Input.GetKey(keyArray[k]))
  14591. {
  14592. flag5 = true;
  14593. break;
  14594. }
  14595. }
  14596. if (!this.getModKeyPressing(modKey.Shift))
  14597. {
  14598. if (!flag5)
  14599. {
  14600. Vector3 vector2 = mainCameraTransform.TransformDirection(Vector3.forward);
  14601. Vector3 vector3 = mainCameraTransform.TransformDirection(Vector3.right);
  14602. Vector3 vector4 = mainCameraTransform.TransformDirection(Vector3.up);
  14603. if (Input.GetKey(KeyCode.A) && Input.GetKey(KeyCode.I) && Input.GetKey(KeyCode.J))
  14604. {
  14605. Vector3 vector = softG;
  14606. vector += new Vector3(vector2.x, 0f, vector2.z) * 6E-05f * speed;
  14607. vector += new Vector3(vector3.x, 0f, vector3.z) * -6E-05f * speed;
  14608. softG = vector;
  14609. }
  14610. else if (Input.GetKey(KeyCode.A) && Input.GetKey(KeyCode.I) && Input.GetKey(KeyCode.L))
  14611. {
  14612. Vector3 vector = softG;
  14613. vector += new Vector3(vector2.x, 0f, vector2.z) * 6E-05f * speed;
  14614. vector += new Vector3(vector3.x, 0f, vector3.z) * 6E-05f * speed;
  14615. softG = vector;
  14616. }
  14617. else if (Input.GetKey(KeyCode.A) && Input.GetKey(KeyCode.K) && Input.GetKey(KeyCode.J))
  14618. {
  14619. Vector3 vector = softG;
  14620. vector += new Vector3(vector2.x, 0f, vector2.z) * -6E-05f * speed;
  14621. vector += new Vector3(vector3.x, 0f, vector3.z) * -6E-05f * speed;
  14622. softG = vector;
  14623. }
  14624. else if (Input.GetKey(KeyCode.A) && Input.GetKey(KeyCode.K) && Input.GetKey(KeyCode.L))
  14625. {
  14626. Vector3 vector = softG;
  14627. vector += new Vector3(vector2.x, 0f, vector2.z) * -6E-05f * speed;
  14628. vector += new Vector3(vector3.x, 0f, vector3.z) * 6E-05f * speed;
  14629. softG = vector;
  14630. }
  14631. else if (Input.GetKey(KeyCode.A) && Input.GetKey(KeyCode.I))
  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.K))
  14638. {
  14639. Vector3 vector = softG;
  14640. vector += new Vector3(vector2.x, 0f, vector2.z) * -6E-05f * speed;
  14641. softG = vector;
  14642. }
  14643. else if (Input.GetKey(KeyCode.A) && Input.GetKey(KeyCode.J))
  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.L))
  14650. {
  14651. Vector3 vector = softG;
  14652. vector += new Vector3(vector3.x, 0f, vector3.z) * 6E-05f * speed;
  14653. softG = vector;
  14654. }
  14655. else if (Input.GetKey(KeyCode.A) && Input.GetKey(KeyCode.Alpha0))
  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.P))
  14662. {
  14663. Vector3 vector = softG;
  14664. vector.y -= 6E-05f * speed;
  14665. softG = vector;
  14666. }
  14667. else if (Input.GetKey(KeyCode.A) && Input.GetKey(KeyCode.BackQuote) && !atFlg)
  14668. {
  14669. softG = new Vector3(0f, -0.003f, 0f);
  14670. }
  14671. for (int j = 0; j < maidCnt; j++)
  14672. {
  14673. Maid maid = maidArray[j];
  14674. for (int l = 0; l < maid.body0.goSlot.Count; l++)
  14675. {
  14676. if (maid.body0.goSlot[l].obj != null)
  14677. {
  14678. DynamicBone component2 = maid.body0.goSlot[l].obj.GetComponent<DynamicBone>();
  14679. if (component2 != null && component2.enabled)
  14680. {
  14681. component2.m_Gravity = new Vector3(softG.x * 5f, (softG.y + 0.003f) * 5f, softG.z * 5f);
  14682. }
  14683. }
  14684. List<THair1> fieldValue3 =
  14685. GetFieldValue<TBoneHair_, List<THair1>>(maid.body0.goSlot[l].bonehair, "hair1list");
  14686. for (int k = 0; k < fieldValue3.Count; k++)
  14687. {
  14688. fieldValue3[k].SoftG = new Vector3(softG.x, softG.y + kamiyure, softG.z);
  14689. }
  14690. }
  14691. }
  14692. }
  14693. }
  14694. else if (!flag5)
  14695. {
  14696. Vector3 vector2 = mainCameraTransform.TransformDirection(Vector3.forward);
  14697. Vector3 vector3 = mainCameraTransform.TransformDirection(Vector3.right);
  14698. Vector3 vector4 = mainCameraTransform.TransformDirection(Vector3.up);
  14699. if (Input.GetKey(KeyCode.A) && Input.GetKey(KeyCode.I) && Input.GetKey(KeyCode.J))
  14700. {
  14701. Vector3 vector = softG2;
  14702. vector += new Vector3(vector2.x, 0f, vector2.z) * 4E-05f * speed;
  14703. vector += new Vector3(vector3.x, 0f, vector3.z) * -4E-05f * speed;
  14704. softG2 = vector;
  14705. }
  14706. else if (Input.GetKey(KeyCode.A) && Input.GetKey(KeyCode.I) && Input.GetKey(KeyCode.L))
  14707. {
  14708. Vector3 vector = softG2;
  14709. vector += new Vector3(vector2.x, 0f, vector2.z) * 4E-05f * speed;
  14710. vector += new Vector3(vector3.x, 0f, vector3.z) * 4E-05f * speed;
  14711. softG2 = vector;
  14712. }
  14713. else if (Input.GetKey(KeyCode.A) && Input.GetKey(KeyCode.K) && Input.GetKey(KeyCode.J))
  14714. {
  14715. Vector3 vector = softG2;
  14716. vector += new Vector3(vector2.x, 0f, vector2.z) * -4E-05f * speed;
  14717. vector += new Vector3(vector3.x, 0f, vector3.z) * -4E-05f * speed;
  14718. softG2 = vector;
  14719. }
  14720. else if (Input.GetKey(KeyCode.A) && Input.GetKey(KeyCode.K) && Input.GetKey(KeyCode.L))
  14721. {
  14722. Vector3 vector = softG2;
  14723. vector += new Vector3(vector2.x, 0f, vector2.z) * -4E-05f * speed;
  14724. vector += new Vector3(vector3.x, 0f, vector3.z) * 4E-05f * speed;
  14725. softG2 = vector;
  14726. }
  14727. else if (Input.GetKey(KeyCode.A) && Input.GetKey(KeyCode.I))
  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.K))
  14734. {
  14735. Vector3 vector = softG2;
  14736. vector += new Vector3(vector2.x, 0f, vector2.z) * -4E-05f * speed;
  14737. softG2 = vector;
  14738. }
  14739. else if (Input.GetKey(KeyCode.A) && Input.GetKey(KeyCode.J))
  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.L))
  14746. {
  14747. Vector3 vector = softG2;
  14748. vector += new Vector3(vector3.x, 0f, vector3.z) * 4E-05f * speed;
  14749. softG2 = vector;
  14750. }
  14751. else if (Input.GetKey(KeyCode.A) && Input.GetKey(KeyCode.Alpha0))
  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.P))
  14758. {
  14759. Vector3 vector = softG2;
  14760. vector.y -= 2E-05f * speed;
  14761. softG2 = vector;
  14762. }
  14763. else if (Input.GetKey(KeyCode.A) && Input.GetKey(KeyCode.BackQuote) && !atFlg)
  14764. {
  14765. softG2 = new Vector3(0f, -0.005f, 0f);
  14766. }
  14767. for (int j = 0; j < maidCnt; j++)
  14768. {
  14769. Maid maid = maidArray[j];
  14770. for (int l = 0; l < maid.body0.goSlot.Count; l++)
  14771. {
  14772. if (maid.body0.goSlot[l].obj != null)
  14773. {
  14774. DynamicSkirtBone fieldValue8 =
  14775. GetFieldValue<BoneHair3, DynamicSkirtBone>(maidArray[j].body0.goSlot[l].bonehair3,
  14776. "m_SkirtBone");
  14777. if (fieldValue8 != null)
  14778. {
  14779. fieldValue8.m_vGravity = new Vector3(softG2.x, softG2.y, softG2.z);
  14780. fieldValue8.UpdateParameters();
  14781. }
  14782. }
  14783. }
  14784. }
  14785. }
  14786. }
  14787. if (!isVR)
  14788. {
  14789. if (doguObject.Count > 0)
  14790. {
  14791. Vector3 vector2 = mainCameraTransform.TransformDirection(Vector3.forward);
  14792. Vector3 vector3 = mainCameraTransform.TransformDirection(Vector3.right);
  14793. Vector3 vector4 = mainCameraTransform.TransformDirection(Vector3.up);
  14794. if (doguObject[doguSelectIndex] && Input.GetKey(KeyCode.W) && Input.GetKey(KeyCode.E))
  14795. {
  14796. idoFlg2 = true;
  14797. doguObject[doguSelectIndex].transform.localScale =
  14798. new Vector3(doguObject[doguSelectIndex].transform.localScale.x * 1.005f,
  14799. doguObject[doguSelectIndex].transform.localScale.y * 1.005f,
  14800. doguObject[doguSelectIndex].transform.localScale.z * 1.005f);
  14801. }
  14802. else if (doguObject[doguSelectIndex] && Input.GetKey(KeyCode.W) && Input.GetKey(KeyCode.D))
  14803. {
  14804. idoFlg2 = true;
  14805. doguObject[doguSelectIndex].transform.localScale =
  14806. new Vector3(doguObject[doguSelectIndex].transform.localScale.x * 0.995f,
  14807. doguObject[doguSelectIndex].transform.localScale.y * 0.995f,
  14808. doguObject[doguSelectIndex].transform.localScale.z * 0.995f);
  14809. }
  14810. else if (doguObject[doguSelectIndex] && Input.GetKey(KeyCode.W) && Input.GetKeyDown(KeyCode.C))
  14811. {
  14812. idoFlg2 = true;
  14813. doguObject[doguSelectIndex].transform.localScale = new Vector3(1f, 1f, 1f);
  14814. }
  14815. else if (doguObject[doguSelectIndex] && Input.GetKey(KeyCode.W) && Input.GetKey(KeyCode.U))
  14816. {
  14817. doguObject[doguSelectIndex]
  14818. .transform.RotateAround(doguObject[doguSelectIndex].transform.position, Vector3.up, -0.7f);
  14819. idoFlg2 = true;
  14820. }
  14821. else if (doguObject[doguSelectIndex] && Input.GetKey(KeyCode.W) && Input.GetKey(KeyCode.O))
  14822. {
  14823. doguObject[doguSelectIndex]
  14824. .transform.RotateAround(doguObject[doguSelectIndex].transform.position, Vector3.up, 0.7f);
  14825. idoFlg2 = true;
  14826. }
  14827. else if (doguObject[doguSelectIndex] && Input.GetKey(KeyCode.W) && Input.GetKeyDown(KeyCode.BackQuote)
  14828. && this.getModKeyPressing(modKey.Alt))
  14829. {
  14830. for (int k = 0; k < 10; k++)
  14831. {
  14832. doguObject[doguSelectIndex].transform.RotateAround(doguObject[doguSelectIndex].transform.position,
  14833. Vector3.right,
  14834. -doguObject[doguSelectIndex]
  14835. .transform.rotation.eulerAngles.x);
  14836. doguObject[doguSelectIndex].transform.RotateAround(doguObject[doguSelectIndex].transform.position,
  14837. Vector3.forward,
  14838. -doguObject[doguSelectIndex]
  14839. .transform.rotation.eulerAngles.z);
  14840. }
  14841. idoFlg2 = true;
  14842. Vector3 vector = Vector3.zero;
  14843. Vector3 zero3 = Vector3.zero;
  14844. zero3.x = -90f;
  14845. int num12 = doguIndex[doguSelectIndex];
  14846. switch (num12)
  14847. {
  14848. case 3:
  14849. vector.z = 0.5f;
  14850. zero3.z = 90f;
  14851. break;
  14852. case 4:
  14853. case 5:
  14854. case 7:
  14855. case 10:
  14856. case 11: break;
  14857. case 6:
  14858. vector.z = 0.6f;
  14859. zero3.x = 0f;
  14860. break;
  14861. case 8:
  14862. vector.z = 0.5f;
  14863. zero3.x = 0f;
  14864. break;
  14865. case 9:
  14866. vector.z = 0.32f;
  14867. zero3.z = 180f;
  14868. break;
  14869. case 12:
  14870. vector.z = 0.5f;
  14871. zero3.z = 180f;
  14872. break;
  14873. case 13:
  14874. vector.z = 0.7f;
  14875. zero3.z = 180f;
  14876. break;
  14877. default:
  14878. if (num12 != 16)
  14879. {
  14880. switch (num12)
  14881. {
  14882. case 23:
  14883. vector.z = 2.7f;
  14884. vector.x = 0.77f;
  14885. zero3.z = 90f;
  14886. break;
  14887. case 25:
  14888. vector.z = 0.5f;
  14889. vector.y = 0.9f;
  14890. zero3.z = 180f;
  14891. break;
  14892. case 26:
  14893. vector.z = 0.5f;
  14894. vector.y = 0.9f;
  14895. zero3.z = 180f;
  14896. break;
  14897. case 30:
  14898. vector.z = 0f;
  14899. zero3.z = 0f;
  14900. break;
  14901. case 31:
  14902. vector.z = -0.6f;
  14903. vector.y = 0.96f;
  14904. zero3.z = 180f;
  14905. break;
  14906. case 32:
  14907. vector.z = -0.6f;
  14908. vector.y = 0.96f;
  14909. zero3.z = 180f;
  14910. break;
  14911. case 33:
  14912. vector.z = -0.6f;
  14913. vector.y = 0.85f;
  14914. zero3.z = 180f;
  14915. break;
  14916. }
  14917. }
  14918. else
  14919. {
  14920. vector.z = -0.4f;
  14921. zero3.z = 180f;
  14922. }
  14923. break;
  14924. }
  14925. doguObject[doguSelectIndex].transform.localRotation = Quaternion.Euler(zero3);
  14926. }
  14927. else if (Input.GetKey(KeyCode.W) && this.getModKeyPressing(modKey.Alt) && Input.GetKey(KeyCode.I)
  14928. && Input.GetKey(KeyCode.J))
  14929. {
  14930. doguObject[doguSelectIndex]
  14931. .transform.RotateAround(doguObject[doguSelectIndex].transform.position,
  14932. new Vector3(vector3.x, 0f, vector3.z),
  14933. 0.3f);
  14934. doguObject[doguSelectIndex]
  14935. .transform.RotateAround(doguObject[doguSelectIndex].transform.position,
  14936. new Vector3(vector2.x, 0f, vector2.z),
  14937. 0.3f);
  14938. idoFlg2 = true;
  14939. }
  14940. else if (Input.GetKey(KeyCode.W) && this.getModKeyPressing(modKey.Alt) && Input.GetKey(KeyCode.I)
  14941. && Input.GetKey(KeyCode.L))
  14942. {
  14943. doguObject[doguSelectIndex]
  14944. .transform.RotateAround(doguObject[doguSelectIndex].transform.position,
  14945. new Vector3(vector3.x, 0f, vector3.z),
  14946. 0.3f);
  14947. doguObject[doguSelectIndex].transform.RotateAround(doguObject[doguSelectIndex].transform.position,
  14948. new Vector3(vector2.x, 0f, vector2.z),
  14949. -0.3f);
  14950. idoFlg2 = true;
  14951. }
  14952. else if (Input.GetKey(KeyCode.W) && this.getModKeyPressing(modKey.Alt) && Input.GetKey(KeyCode.K)
  14953. && Input.GetKey(KeyCode.J))
  14954. {
  14955. doguObject[doguSelectIndex].transform.RotateAround(doguObject[doguSelectIndex].transform.position,
  14956. new Vector3(vector3.x, 0f, vector3.z),
  14957. -0.3f);
  14958. doguObject[doguSelectIndex]
  14959. .transform.RotateAround(doguObject[doguSelectIndex].transform.position,
  14960. new Vector3(vector2.x, 0f, vector2.z),
  14961. 0.3f);
  14962. idoFlg2 = true;
  14963. }
  14964. else if (Input.GetKey(KeyCode.W) && this.getModKeyPressing(modKey.Alt) && Input.GetKey(KeyCode.K)
  14965. && Input.GetKey(KeyCode.L))
  14966. {
  14967. doguObject[doguSelectIndex].transform.RotateAround(doguObject[doguSelectIndex].transform.position,
  14968. new Vector3(vector3.x, 0f, vector3.z),
  14969. -0.3f);
  14970. doguObject[doguSelectIndex].transform.RotateAround(doguObject[doguSelectIndex].transform.position,
  14971. new Vector3(vector2.x, 0f, vector2.z),
  14972. -0.3f);
  14973. idoFlg2 = true;
  14974. }
  14975. else if (Input.GetKey(KeyCode.W) && this.getModKeyPressing(modKey.Alt) && Input.GetKey(KeyCode.I))
  14976. {
  14977. doguObject[doguSelectIndex]
  14978. .transform.RotateAround(doguObject[doguSelectIndex].transform.position,
  14979. new Vector3(vector3.x, 0f, vector3.z),
  14980. 0.4f);
  14981. idoFlg2 = true;
  14982. }
  14983. else if (Input.GetKey(KeyCode.W) && this.getModKeyPressing(modKey.Alt) && Input.GetKey(KeyCode.K))
  14984. {
  14985. doguObject[doguSelectIndex].transform.RotateAround(doguObject[doguSelectIndex].transform.position,
  14986. new Vector3(vector3.x, 0f, vector3.z),
  14987. -0.4f);
  14988. idoFlg2 = true;
  14989. }
  14990. else if (Input.GetKey(KeyCode.W) && this.getModKeyPressing(modKey.Alt) && Input.GetKey(KeyCode.J))
  14991. {
  14992. doguObject[doguSelectIndex]
  14993. .transform.RotateAround(doguObject[doguSelectIndex].transform.position,
  14994. new Vector3(vector2.x, 0f, vector2.z),
  14995. 0.4f);
  14996. idoFlg2 = true;
  14997. }
  14998. else if (Input.GetKey(KeyCode.W) && this.getModKeyPressing(modKey.Alt) && Input.GetKey(KeyCode.L))
  14999. {
  15000. doguObject[doguSelectIndex].transform.RotateAround(doguObject[doguSelectIndex].transform.position,
  15001. new Vector3(vector2.x, 0f, vector2.z),
  15002. -0.4f);
  15003. idoFlg2 = true;
  15004. }
  15005. else if (Input.GetKey(KeyCode.W) && this.getModKeyPressing(modKey.Alt) && Input.GetKey(KeyCode.U))
  15006. {
  15007. doguObject[doguSelectIndex].transform.localRotation =
  15008. Quaternion.Euler(doguObject[doguSelectIndex].transform.localEulerAngles)
  15009. * Quaternion.AngleAxis(-1.5f, Vector3.up);
  15010. idoFlg2 = true;
  15011. }
  15012. else if (Input.GetKey(KeyCode.W) && this.getModKeyPressing(modKey.Alt) && Input.GetKey(KeyCode.O))
  15013. {
  15014. doguObject[doguSelectIndex].transform.localRotation =
  15015. Quaternion.Euler(doguObject[doguSelectIndex].transform.localEulerAngles)
  15016. * Quaternion.AngleAxis(1.5f, Vector3.up);
  15017. idoFlg2 = true;
  15018. }
  15019. else if (doguObject[doguSelectIndex] && Input.GetKey(KeyCode.W)
  15020. && ((Input.GetKey(KeyCode.Minus) && this.getModKeyPressing(modKey.Shift))
  15021. || (Input.GetKey(KeyCode.K) && this.getModKeyPressing(modKey.Alt))))
  15022. {
  15023. doguObject[doguSelectIndex].transform.RotateAround(doguObject[doguSelectIndex].transform.position,
  15024. new Vector3(vector3.x, 0f, vector3.z),
  15025. -0.7f);
  15026. idoFlg2 = true;
  15027. }
  15028. else if (doguObject[doguSelectIndex] && Input.GetKey(KeyCode.W)
  15029. && ((Input.GetKey(KeyCode.Quote) && this.getModKeyPressing(modKey.Shift))
  15030. || (Input.GetKey(KeyCode.I) && this.getModKeyPressing(modKey.Alt))))
  15031. {
  15032. doguObject[doguSelectIndex]
  15033. .transform.RotateAround(doguObject[doguSelectIndex].transform.position,
  15034. new Vector3(vector3.x, 0f, vector3.z),
  15035. 0.7f);
  15036. idoFlg2 = true;
  15037. }
  15038. else if (doguObject[doguSelectIndex] && Input.GetKey(KeyCode.W)
  15039. && (Input.GetKey(KeyCode.Minus)
  15040. || (Input.GetKey(KeyCode.J) && this.getModKeyPressing(modKey.Alt))))
  15041. {
  15042. doguObject[doguSelectIndex]
  15043. .transform.RotateAround(doguObject[doguSelectIndex].transform.position,
  15044. new Vector3(vector2.x, 0f, vector2.z),
  15045. 0.7f);
  15046. idoFlg2 = true;
  15047. }
  15048. else if (doguObject[doguSelectIndex] && Input.GetKey(KeyCode.W)
  15049. && (Input.GetKey(KeyCode.Quote)
  15050. || (Input.GetKey(KeyCode.L) && this.getModKeyPressing(modKey.Alt))))
  15051. {
  15052. doguObject[doguSelectIndex].transform.RotateAround(doguObject[doguSelectIndex].transform.position,
  15053. new Vector3(vector2.x, 0f, vector2.z),
  15054. -0.7f);
  15055. idoFlg2 = true;
  15056. }
  15057. else if (doguObject[doguSelectIndex] && Input.GetKey(KeyCode.W) && Input.GetKey(KeyCode.I)
  15058. && Input.GetKey(KeyCode.J))
  15059. {
  15060. Vector3 vector = doguObject[doguSelectIndex].transform.position;
  15061. vector += new Vector3(vector2.x, 0f, vector2.z) * 0.0075f * speed;
  15062. vector += new Vector3(vector3.x, 0f, vector3.z) * -0.0075f * speed;
  15063. doguObject[doguSelectIndex].transform.localPosition = vector;
  15064. idoFlg2 = true;
  15065. }
  15066. else if (doguObject[doguSelectIndex] && Input.GetKey(KeyCode.W) && Input.GetKey(KeyCode.I)
  15067. && Input.GetKey(KeyCode.L))
  15068. {
  15069. Vector3 vector = doguObject[doguSelectIndex].transform.position;
  15070. vector += new Vector3(vector2.x, 0f, vector2.z) * 0.0075f * speed;
  15071. vector += new Vector3(vector3.x, 0f, vector3.z) * 0.0075f * speed;
  15072. doguObject[doguSelectIndex].transform.localPosition = vector;
  15073. idoFlg2 = true;
  15074. }
  15075. else if (doguObject[doguSelectIndex] && Input.GetKey(KeyCode.W) && Input.GetKey(KeyCode.K)
  15076. && Input.GetKey(KeyCode.J))
  15077. {
  15078. Vector3 vector = doguObject[doguSelectIndex].transform.position;
  15079. vector += new Vector3(vector2.x, 0f, vector2.z) * -0.0075f * speed;
  15080. vector += new Vector3(vector3.x, 0f, vector3.z) * -0.0075f * speed;
  15081. doguObject[doguSelectIndex].transform.localPosition = vector;
  15082. idoFlg2 = true;
  15083. }
  15084. else if (doguObject[doguSelectIndex] && Input.GetKey(KeyCode.W) && Input.GetKey(KeyCode.K)
  15085. && Input.GetKey(KeyCode.L))
  15086. {
  15087. Vector3 vector = doguObject[doguSelectIndex].transform.position;
  15088. vector += new Vector3(vector2.x, 0f, vector2.z) * -0.0075f * speed;
  15089. vector += new Vector3(vector3.x, 0f, vector3.z) * 0.0075f * speed;
  15090. doguObject[doguSelectIndex].transform.localPosition = vector;
  15091. idoFlg2 = true;
  15092. }
  15093. else if (doguObject[doguSelectIndex] && Input.GetKey(KeyCode.W) && Input.GetKey(KeyCode.I))
  15094. {
  15095. Vector3 vector = doguObject[doguSelectIndex].transform.position;
  15096. vector += new Vector3(vector2.x, 0f, vector2.z) * 0.0075f * speed;
  15097. doguObject[doguSelectIndex].transform.localPosition = vector;
  15098. idoFlg2 = true;
  15099. }
  15100. else if (doguObject[doguSelectIndex] && Input.GetKey(KeyCode.W) && Input.GetKey(KeyCode.K))
  15101. {
  15102. Vector3 vector = doguObject[doguSelectIndex].transform.position;
  15103. vector += new Vector3(vector2.x, 0f, vector2.z) * -0.0075f * speed;
  15104. doguObject[doguSelectIndex].transform.localPosition = vector;
  15105. idoFlg2 = true;
  15106. }
  15107. else if (doguObject[doguSelectIndex] && Input.GetKey(KeyCode.W) && Input.GetKey(KeyCode.J))
  15108. {
  15109. Vector3 vector = doguObject[doguSelectIndex].transform.position;
  15110. vector += new Vector3(vector3.x, 0f, vector3.z) * -0.0075f * speed;
  15111. doguObject[doguSelectIndex].transform.localPosition = vector;
  15112. idoFlg2 = true;
  15113. }
  15114. else if (doguObject[doguSelectIndex] && Input.GetKey(KeyCode.W) && Input.GetKey(KeyCode.L))
  15115. {
  15116. Vector3 vector = doguObject[doguSelectIndex].transform.position;
  15117. vector += new Vector3(vector3.x, 0f, vector3.z) * 0.0075f * speed;
  15118. doguObject[doguSelectIndex].transform.localPosition = vector;
  15119. idoFlg2 = true;
  15120. }
  15121. else if (doguObject[doguSelectIndex] && Input.GetKey(KeyCode.W) && Input.GetKey(KeyCode.Alpha0))
  15122. {
  15123. Vector3 vector = doguObject[doguSelectIndex].transform.position;
  15124. vector.y += 0.0075f * speed;
  15125. doguObject[doguSelectIndex].transform.localPosition = vector;
  15126. idoFlg2 = true;
  15127. }
  15128. else if (doguObject[doguSelectIndex] && Input.GetKey(KeyCode.W) && Input.GetKey(KeyCode.P))
  15129. {
  15130. Vector3 vector = doguObject[doguSelectIndex].transform.position;
  15131. vector.y -= 0.0075f * speed;
  15132. doguObject[doguSelectIndex].transform.localPosition = vector;
  15133. idoFlg2 = true;
  15134. }
  15135. else if (doguObject[doguSelectIndex] && Input.GetKey(KeyCode.W) && Input.GetKeyDown(KeyCode.BackQuote) && !atFlg)
  15136. {
  15137. idoFlg2 = true;
  15138. if (doguObject.Count > 0 && doguObject[doguSelectIndex] != null)
  15139. {
  15140. Destroy(doguObject[doguSelectIndex]);
  15141. doguObject.RemoveAt(doguSelectIndex);
  15142. }
  15143. doguIndex.RemoveAt(doguSelectIndex);
  15144. doguSelectIndex = 0;
  15145. }
  15146. }
  15147. if (Input.GetKeyDown(KeyCode.W) && this.getModKeyPressing(modKey.Shift))
  15148. {
  15149. idoFlg2 = true;
  15150. if (doguSelectIndex == doguObject.Count)
  15151. {
  15152. doguIndex.Add(0);
  15153. }
  15154. else if (doguObject.Count > 0 && doguObject[doguSelectIndex] != null)
  15155. {
  15156. Destroy(doguObject[doguSelectIndex]);
  15157. doguObject.RemoveAt(doguSelectIndex);
  15158. }
  15159. else
  15160. {
  15161. doguIndex.Add(0);
  15162. doguSelectIndex = doguIndex.Count - 1;
  15163. }
  15164. List<int> list2;
  15165. int index;
  15166. (list2 = doguIndex)[index = doguSelectIndex] = list2[index] - 1;
  15167. if (doguIndex[doguSelectIndex] <= -1)
  15168. {
  15169. doguIndex[doguSelectIndex] = doguArray.Length - 1;
  15170. }
  15171. if (doguIndex[doguSelectIndex] > 0)
  15172. {
  15173. if (!doguArray[doguIndex[doguSelectIndex]].StartsWith("mirror"))
  15174. {
  15175. Object @object = null;
  15176. for (int j = 0; j < 5; j++)
  15177. {
  15178. @object = Resources.Load("Prefab/" + doguArray[doguIndex[doguSelectIndex]]);
  15179. if (@object != null)
  15180. {
  15181. break;
  15182. }
  15183. (list2 = doguIndex)[index = doguSelectIndex] = list2[index] - 1;
  15184. }
  15185. doguObject.Add(Instantiate(@object) as GameObject);
  15186. }
  15187. else
  15188. {
  15189. Material material = new Material(Shader.Find("Mirror"));
  15190. GameObject gameObject7 = GameObject.CreatePrimitive(PrimitiveType.Plane);
  15191. gameObject7.transform.localScale = new Vector3(0.3f, 1f, 0.3f);
  15192. gameObject7.GetComponent<Renderer>().material = material;
  15193. gameObject7.AddComponent<MirrorReflection2>();
  15194. MirrorReflection2 component5 = gameObject7.GetComponent<MirrorReflection2>();
  15195. component5.m_TextureSize = 2048;
  15196. component5.m_ClipPlaneOffset = 0f;
  15197. gameObject7.GetComponent<Renderer>().enabled = true;
  15198. doguObject.Add(gameObject7);
  15199. }
  15200. Vector3 vector = Vector3.zero;
  15201. Vector3 zero3 = Vector3.zero;
  15202. zero3.x = -90f;
  15203. switch (doguIndex[doguSelectIndex])
  15204. {
  15205. case 1:
  15206. vector.z = -0.5f;
  15207. goto IL_344DC;
  15208. case 2:
  15209. vector.z = -0.5f;
  15210. goto IL_344DC;
  15211. case 3:
  15212. vector.z = 0.5f;
  15213. zero3.z = 90f;
  15214. goto IL_344DC;
  15215. case 4:
  15216. vector.z = 0.9f;
  15217. goto IL_344DC;
  15218. case 5:
  15219. vector.z = 0.9f;
  15220. goto IL_344DC;
  15221. case 6:
  15222. vector.z = 0.6f;
  15223. zero3.x = 0f;
  15224. doguObject[doguSelectIndex].transform.localScale = new Vector3(4.5f, 4.5f, 4.5f);
  15225. goto IL_344DC;
  15226. case 7:
  15227. vector.z = 0.6f;
  15228. doguObject[doguSelectIndex].transform.localScale = new Vector3(3.5f, 3.5f, 3.5f);
  15229. goto IL_344DC;
  15230. case 8:
  15231. vector.z = 0.5f;
  15232. zero3.x = 0f;
  15233. goto IL_344DC;
  15234. case 9:
  15235. vector.z = 0.32f;
  15236. zero3.z = 180f;
  15237. goto IL_344DC;
  15238. case 10:
  15239. vector.z = 0.6f;
  15240. goto IL_344DC;
  15241. case 11:
  15242. vector.z = 0.6f;
  15243. goto IL_344DC;
  15244. case 12:
  15245. vector.z = 0.5f;
  15246. zero3.z = 180f;
  15247. goto IL_344DC;
  15248. case 13:
  15249. vector.z = 0.7f;
  15250. zero3.z = 180f;
  15251. goto IL_344DC;
  15252. case 14:
  15253. vector.z = -0.4f;
  15254. goto IL_344DC;
  15255. case 15:
  15256. vector.z = -0.4f;
  15257. goto IL_344DC;
  15258. case 16:
  15259. vector.z = -0.4f;
  15260. zero3.z = 180f;
  15261. goto IL_344DC;
  15262. case 17:
  15263. vector.z = -0.4f;
  15264. goto IL_344DC;
  15265. case 18:
  15266. vector.z = -0.2f;
  15267. goto IL_344DC;
  15268. case 19:
  15269. vector.z = 0f;
  15270. goto IL_344DC;
  15271. case 20:
  15272. vector.z = 3.4f;
  15273. vector.x = -1f;
  15274. goto IL_344DC;
  15275. case 21:
  15276. vector.z = 3.4f;
  15277. vector.x = -1f;
  15278. goto IL_344DC;
  15279. case 22:
  15280. vector.z = 3.4f;
  15281. vector.y = 0.3f;
  15282. vector.x = -1f;
  15283. goto IL_344DC;
  15284. case 23:
  15285. vector.z = 2.7f;
  15286. vector.x = 0.77f;
  15287. zero3.z = 90f;
  15288. goto IL_344DC;
  15289. case 25:
  15290. vector.z = 0.5f;
  15291. vector.y = 0.9f;
  15292. zero3.z = 180f;
  15293. goto IL_344DC;
  15294. case 26:
  15295. vector.z = 0.5f;
  15296. vector.y = 0.9f;
  15297. zero3.z = 180f;
  15298. goto IL_344DC;
  15299. case 29:
  15300. vector.z = 0.5f;
  15301. vector.x = -1.05f;
  15302. goto IL_344DC;
  15303. case 30:
  15304. vector.z = -2.8f;
  15305. zero3.z = 0f;
  15306. zero3.x = 0f;
  15307. doguObject[doguSelectIndex].transform.localScale = new Vector3(0.75f, 0.75f, 0.75f);
  15308. goto IL_344DC;
  15309. case 31:
  15310. vector.z = -0.6f;
  15311. vector.y = 0.96f;
  15312. zero3.z = 180f;
  15313. doguObject[doguSelectIndex].transform.localScale = new Vector3(0.2f, 0.4f, 0.2f);
  15314. goto IL_344DC;
  15315. case 32:
  15316. vector.z = -0.6f;
  15317. vector.y = 0.96f;
  15318. zero3.z = 180f;
  15319. doguObject[doguSelectIndex].transform.localScale = new Vector3(0.1f, 0.4f, 0.2f);
  15320. goto IL_344DC;
  15321. case 33:
  15322. vector.z = -0.6f;
  15323. vector.y = 0.85f;
  15324. zero3.z = 180f;
  15325. doguObject[doguSelectIndex].transform.localScale = new Vector3(0.03f, 0.18f, 0.124f);
  15326. goto IL_344DC;
  15327. }
  15328. vector.z = 0.5f;
  15329. IL_344DC:
  15330. doguObject[doguSelectIndex].transform.localPosition = vector;
  15331. doguObject[doguSelectIndex].transform.localRotation = Quaternion.Euler(zero3);
  15332. }
  15333. if (doguIndex[doguSelectIndex] == 0)
  15334. {
  15335. doguIndex.RemoveAt(doguSelectIndex);
  15336. }
  15337. }
  15338. else if (Input.GetKeyDown(KeyCode.W))
  15339. {
  15340. for (int k = 0; k < keyArray.Length; k++)
  15341. {
  15342. if (Input.GetKey(keyArray[k]))
  15343. {
  15344. wFlg = true;
  15345. break;
  15346. }
  15347. }
  15348. }
  15349. else if (Input.GetKeyUp(KeyCode.W))
  15350. {
  15351. if (wFlg)
  15352. {
  15353. wFlg = false;
  15354. }
  15355. else if (idoFlg2)
  15356. {
  15357. idoFlg2 = false;
  15358. }
  15359. else
  15360. {
  15361. if (doguObject.Count > 0 && doguObject[doguSelectIndex] != null)
  15362. {
  15363. Destroy(doguObject[doguSelectIndex]);
  15364. doguObject.RemoveAt(doguSelectIndex);
  15365. }
  15366. else
  15367. {
  15368. doguIndex.Add(0);
  15369. doguSelectIndex = doguIndex.Count - 1;
  15370. }
  15371. List<int> list2;
  15372. int index;
  15373. (list2 = doguIndex)[index = doguSelectIndex] = list2[index] + 1;
  15374. if (doguIndex[doguSelectIndex] == doguArray.Length)
  15375. {
  15376. doguIndex[doguSelectIndex] = 0;
  15377. }
  15378. if (doguIndex[doguSelectIndex] > 0)
  15379. {
  15380. if (!doguArray[doguIndex[doguSelectIndex]].StartsWith("mirror"))
  15381. {
  15382. Object @object = null;
  15383. for (int j = 0; j < 5; j++)
  15384. {
  15385. @object = Resources.Load("Prefab/" + doguArray[doguIndex[doguSelectIndex]]);
  15386. if (@object != null)
  15387. {
  15388. break;
  15389. }
  15390. (list2 = doguIndex)[index = doguSelectIndex] = list2[index] + 1;
  15391. }
  15392. doguObject.Add(Instantiate(@object) as GameObject);
  15393. }
  15394. else
  15395. {
  15396. Material material = new Material(Shader.Find("Mirror"));
  15397. GameObject gameObject7 = GameObject.CreatePrimitive(PrimitiveType.Plane);
  15398. gameObject7.transform.localScale = new Vector3(0.3f, 1f, 0.3f);
  15399. gameObject7.GetComponent<Renderer>().material = material;
  15400. gameObject7.AddComponent<MirrorReflection2>();
  15401. MirrorReflection2 component5 = gameObject7.GetComponent<MirrorReflection2>();
  15402. component5.m_TextureSize = 2048;
  15403. component5.m_ClipPlaneOffset = 0f;
  15404. gameObject7.GetComponent<Renderer>().enabled = true;
  15405. doguObject.Add(gameObject7);
  15406. }
  15407. Vector3 vector = Vector3.zero;
  15408. Vector3 zero3 = Vector3.zero;
  15409. zero3.x = -90f;
  15410. switch (doguIndex[doguSelectIndex])
  15411. {
  15412. case 1:
  15413. vector.z = -0.5f;
  15414. goto IL_34D66;
  15415. case 2:
  15416. vector.z = -0.5f;
  15417. goto IL_34D66;
  15418. case 3:
  15419. vector.z = 0.5f;
  15420. zero3.z = 90f;
  15421. goto IL_34D66;
  15422. case 4:
  15423. vector.z = 0.9f;
  15424. goto IL_34D66;
  15425. case 5:
  15426. vector.z = 0.9f;
  15427. goto IL_34D66;
  15428. case 6:
  15429. vector.z = 0.6f;
  15430. zero3.x = 0f;
  15431. doguObject[doguSelectIndex].transform.localScale = new Vector3(4.5f, 4.5f, 4.5f);
  15432. goto IL_34D66;
  15433. case 7:
  15434. vector.z = 0.6f;
  15435. doguObject[doguSelectIndex].transform.localScale = new Vector3(3.5f, 3.5f, 3.5f);
  15436. goto IL_34D66;
  15437. case 8:
  15438. vector.z = 0.5f;
  15439. zero3.x = 0f;
  15440. goto IL_34D66;
  15441. case 9:
  15442. vector.z = 0.32f;
  15443. zero3.z = 180f;
  15444. goto IL_34D66;
  15445. case 10:
  15446. vector.z = 0.6f;
  15447. goto IL_34D66;
  15448. case 11:
  15449. vector.z = 0.6f;
  15450. goto IL_34D66;
  15451. case 12:
  15452. vector.z = 0.5f;
  15453. zero3.z = 180f;
  15454. goto IL_34D66;
  15455. case 13:
  15456. vector.z = 0.7f;
  15457. zero3.z = 180f;
  15458. goto IL_34D66;
  15459. case 14:
  15460. vector.z = -0.4f;
  15461. goto IL_34D66;
  15462. case 15:
  15463. vector.z = -0.4f;
  15464. goto IL_34D66;
  15465. case 16:
  15466. vector.z = -0.4f;
  15467. zero3.z = 180f;
  15468. goto IL_34D66;
  15469. case 17:
  15470. vector.z = -0.4f;
  15471. goto IL_34D66;
  15472. case 18:
  15473. vector.z = -0.2f;
  15474. goto IL_34D66;
  15475. case 19:
  15476. vector.z = 0f;
  15477. goto IL_34D66;
  15478. case 20:
  15479. vector.z = 3.4f;
  15480. vector.x = -1f;
  15481. goto IL_34D66;
  15482. case 21:
  15483. vector.z = 3.4f;
  15484. vector.x = -1f;
  15485. goto IL_34D66;
  15486. case 22:
  15487. vector.z = 3.4f;
  15488. vector.y = 0.3f;
  15489. vector.x = -1f;
  15490. goto IL_34D66;
  15491. case 23:
  15492. vector.z = 2.7f;
  15493. vector.x = 0.77f;
  15494. zero3.z = 90f;
  15495. goto IL_34D66;
  15496. case 25:
  15497. vector.z = 0.5f;
  15498. vector.y = 0.9f;
  15499. zero3.z = 180f;
  15500. goto IL_34D66;
  15501. case 26:
  15502. vector.z = 0.5f;
  15503. vector.y = 0.9f;
  15504. zero3.z = 180f;
  15505. goto IL_34D66;
  15506. case 29:
  15507. vector.z = 0.5f;
  15508. vector.x = -1.05f;
  15509. goto IL_34D66;
  15510. case 30:
  15511. vector.z = -2.8f;
  15512. zero3.z = 0f;
  15513. zero3.x = 0f;
  15514. doguObject[doguSelectIndex].transform.localScale = new Vector3(0.75f, 0.75f, 0.75f);
  15515. goto IL_34D66;
  15516. case 31:
  15517. vector.z = -0.6f;
  15518. vector.y = 0.96f;
  15519. zero3.z = 180f;
  15520. doguObject[doguSelectIndex].transform.localScale = new Vector3(0.2f, 0.4f, 0.2f);
  15521. goto IL_34D66;
  15522. case 32:
  15523. vector.z = -0.6f;
  15524. vector.y = 0.96f;
  15525. zero3.z = 180f;
  15526. doguObject[doguSelectIndex].transform.localScale = new Vector3(0.1f, 0.4f, 0.2f);
  15527. goto IL_34D66;
  15528. case 33:
  15529. vector.z = -0.6f;
  15530. vector.y = 0.85f;
  15531. zero3.z = 180f;
  15532. doguObject[doguSelectIndex].transform.localScale = new Vector3(0.03f, 0.18f, 0.124f);
  15533. goto IL_34D66;
  15534. }
  15535. vector.z = 0.5f;
  15536. IL_34D66:;
  15537. }
  15538. if (doguIndex[doguSelectIndex] == 0)
  15539. {
  15540. doguIndex.RemoveAt(doguSelectIndex);
  15541. }
  15542. }
  15543. }
  15544. }
  15545. if (!isVR)
  15546. {
  15547. int i;
  15548. for (i = 0; i < 999; i++)
  15549. {
  15550. if (gDogu[i] != null)
  15551. {
  15552. gDogu[i].GetComponent<Renderer>().enabled = false;
  15553. gDogu[i].SetActive(false);
  15554. if (mDogu[i].del)
  15555. {
  15556. mDogu[i].del = false;
  15557. Destroy(doguBObject[i]);
  15558. doguBObject.RemoveAt(i);
  15559. }
  15560. else if (mDogu[i].count > 0)
  15561. {
  15562. mDogu[i].count--;
  15563. if (doguBObject.Count > i && doguBObject[i] != null && doguBObject[i].name.StartsWith("Particle/p"))
  15564. {
  15565. if (mDogu[i].count == 1)
  15566. {
  15567. doguBObject[i].SetActive(false);
  15568. }
  15569. if (mDogu[i].count == 0)
  15570. {
  15571. doguBObject[i].SetActive(true);
  15572. string name = doguBObject[i].name;
  15573. if (name != null)
  15574. {
  15575. if (!(name == "Particle/pLineY"))
  15576. {
  15577. if (!(name == "Particle/pLineP02"))
  15578. {
  15579. if (!(name == "Particle/pLine_act2"))
  15580. {
  15581. if (name == "Particle/pHeart01")
  15582. {
  15583. mDogu[i].count = 77;
  15584. }
  15585. }
  15586. else
  15587. {
  15588. mDogu[i].count = 90;
  15589. }
  15590. }
  15591. else
  15592. {
  15593. mDogu[i].count = 115;
  15594. }
  15595. }
  15596. else
  15597. {
  15598. mDogu[i].count = 180;
  15599. }
  15600. }
  15601. }
  15602. }
  15603. }
  15604. }
  15605. }
  15606. if (Input.GetKey(KeyCode.Z) && this.getModKeyPressing(modKey.Shift))
  15607. {
  15608. ikMode2 = 11;
  15609. }
  15610. else if (Input.GetKey(KeyCode.Z) && this.getModKeyPressing(modKey.Ctrl))
  15611. {
  15612. ikMode2 = 12;
  15613. }
  15614. else if (Input.GetKey(KeyCode.X) && this.getModKeyPressing(modKey.Shift))
  15615. {
  15616. ikMode2 = 14;
  15617. }
  15618. else if (Input.GetKey(KeyCode.X))
  15619. {
  15620. ikMode2 = 9;
  15621. }
  15622. else if (Input.GetKey(KeyCode.Z))
  15623. {
  15624. ikMode2 = 10;
  15625. }
  15626. else if (Input.GetKey(KeyCode.C))
  15627. {
  15628. ikMode2 = 13;
  15629. }
  15630. else if (Input.GetKey(KeyCode.D))
  15631. {
  15632. ikMode2 = 15;
  15633. }
  15634. else
  15635. {
  15636. ikMode2 = 0;
  15637. }
  15638. if (gBg != null)
  15639. {
  15640. if (!isCube3)
  15641. {
  15642. gBg.GetComponent<Renderer>().enabled = false;
  15643. gBg.SetActive(false);
  15644. }
  15645. else
  15646. {
  15647. if (ikMode2 > 0 && ikMode2 != 15)
  15648. {
  15649. gBg.GetComponent<Renderer>().enabled = true;
  15650. gBg.SetActive(true);
  15651. }
  15652. else
  15653. {
  15654. gBg.GetComponent<Renderer>().enabled = false;
  15655. gBg.SetActive(false);
  15656. }
  15657. if (ikMode2 == 10 || ikMode2 == 11 || ikMode2 == 12)
  15658. {
  15659. gBg.GetComponent<Renderer>().material.color = new Color(0.4f, 0.4f, 1f, 0.5f);
  15660. }
  15661. if (ikMode2 == 9 || ikMode2 == 14)
  15662. {
  15663. gBg.GetComponent<Renderer>().material.color = new Color(0.3f, 0.7f, 0.3f, 0.5f);
  15664. mBg.Update();
  15665. }
  15666. if (ikMode2 == 13)
  15667. {
  15668. gBg.GetComponent<Renderer>().material.color = new Color(0.7f, 0.7f, 0.3f, 0.5f);
  15669. mBg.Update();
  15670. }
  15671. if (ikMode2 == 13)
  15672. {
  15673. if ((ikModeOld2 == 0 || ikModeOld2 >= 9) && ikModeOld2 != 13 && gBg)
  15674. {
  15675. mBg.ido = 5;
  15676. mBg.reset = true;
  15677. }
  15678. else
  15679. {
  15680. gBg.transform.position = bg.position;
  15681. gBg.transform.eulerAngles = bg.eulerAngles;
  15682. mBg.maid = bgObject;
  15683. mBg.ido = 5;
  15684. }
  15685. }
  15686. else if (ikMode2 == 11)
  15687. {
  15688. if ((ikModeOld2 == 0 || ikModeOld2 >= 9) && ikModeOld2 != 11 && gBg)
  15689. {
  15690. mBg.ido = 3;
  15691. mBg.reset = true;
  15692. }
  15693. else
  15694. {
  15695. gBg.transform.position = bg.position;
  15696. gBg.transform.eulerAngles = bg.eulerAngles;
  15697. mBg.maid = bgObject;
  15698. mBg.ido = 3;
  15699. }
  15700. }
  15701. else if (ikMode2 == 12)
  15702. {
  15703. if ((ikModeOld2 == 0 || ikModeOld2 >= 9) && ikModeOld2 != 12 && gBg)
  15704. {
  15705. mBg.ido = 2;
  15706. mBg.reset = true;
  15707. }
  15708. else
  15709. {
  15710. gBg.transform.position = bg.position;
  15711. gBg.transform.eulerAngles = bg.eulerAngles;
  15712. mBg.maid = bgObject;
  15713. mBg.ido = 2;
  15714. }
  15715. }
  15716. else if (ikMode2 == 10)
  15717. {
  15718. if ((ikModeOld2 == 0 || ikModeOld2 >= 9) && ikModeOld2 != 10 && gBg)
  15719. {
  15720. mBg.ido = 1;
  15721. mBg.reset = true;
  15722. }
  15723. else
  15724. {
  15725. gBg.transform.position = bg.position;
  15726. gBg.transform.eulerAngles = bg.eulerAngles;
  15727. mBg.maid = bgObject;
  15728. mBg.ido = 1;
  15729. }
  15730. }
  15731. else if (ikMode2 == 9)
  15732. {
  15733. if ((ikModeOld2 == 0 || ikModeOld2 >= 9) && ikModeOld2 != 9 && gBg)
  15734. {
  15735. mBg.ido = 4;
  15736. mBg.reset = true;
  15737. }
  15738. else
  15739. {
  15740. gBg.transform.position = bg.position;
  15741. gBg.transform.eulerAngles = bg.eulerAngles;
  15742. mBg.maid = bgObject;
  15743. mBg.ido = 4;
  15744. }
  15745. }
  15746. else if (ikMode2 == 14)
  15747. {
  15748. if ((ikModeOld2 == 0 || ikModeOld2 >= 9) && ikModeOld2 != 14 && gBg)
  15749. {
  15750. mBg.ido = 6;
  15751. mBg.reset = true;
  15752. }
  15753. else
  15754. {
  15755. gBg.transform.position = bg.position;
  15756. gBg.transform.eulerAngles = bg.eulerAngles;
  15757. mBg.maid = bgObject;
  15758. mBg.ido = 6;
  15759. }
  15760. }
  15761. }
  15762. }
  15763. i = 0;
  15764. while (i < lightIndex.Count)
  15765. {
  15766. if (gLight[0] == null)
  15767. {
  15768. gLight[0] = GameObject.CreatePrimitive(PrimitiveType.Cube);
  15769. Material material2 = new Material(Shader.Find("Transparent/Diffuse"));
  15770. material2.color = new Color(0.5f, 0.5f, 1f, 0.8f);
  15771. gLight[0].GetComponent<Renderer>().material = material2;
  15772. gLight[0].layer = 8;
  15773. gLight[0].GetComponent<Renderer>().enabled = false;
  15774. gLight[0].SetActive(false);
  15775. gLight[0].transform.position = GameMain.Instance.MainLight.transform.position;
  15776. mLight[0] = gLight[0].AddComponent<MouseDrag6>();
  15777. mLight[0].obj = gLight[0];
  15778. mLight[0].maid = GameMain.Instance.MainLight.gameObject;
  15779. mLight[0].angles = GameMain.Instance.MainLight.gameObject.transform.eulerAngles;
  15780. gLight[0].transform.localScale = new Vector3(0.12f, 0.12f, 0.12f);
  15781. mLight[0].ido = 1;
  15782. mLight[0].isScale = false;
  15783. }
  15784. if (gLight[i] != null)
  15785. {
  15786. if (!isCube4)
  15787. {
  15788. gLight[i].GetComponent<Renderer>().enabled = false;
  15789. gLight[i].SetActive(false);
  15790. }
  15791. else if (lightList[i].GetComponent<Light>().type == LightType.Spot
  15792. || lightList[i].GetComponent<Light>().type == LightType.Point)
  15793. {
  15794. if (ikMode2 > 0 && ikMode2 != 15)
  15795. {
  15796. gLight[i].GetComponent<Renderer>().enabled = true;
  15797. gLight[i].SetActive(true);
  15798. }
  15799. else
  15800. {
  15801. gLight[i].GetComponent<Renderer>().enabled = false;
  15802. gLight[i].SetActive(false);
  15803. mLight[i].isAlt = false;
  15804. }
  15805. if (ikMode2 == 10 || ikMode2 == 11 || ikMode2 == 12)
  15806. {
  15807. gLight[i].GetComponent<Renderer>().material.color = new Color(0.4f, 0.4f, 1f, 0.5f);
  15808. if (mLight[i].isAlt)
  15809. {
  15810. gLight[i].GetComponent<Renderer>().material.color = new Color(0.6f, 0.6f, 1f, 0.5f);
  15811. }
  15812. }
  15813. if (ikMode2 == 9 || ikMode2 == 14)
  15814. {
  15815. gLight[i].GetComponent<Renderer>().material.color = new Color(0.3f, 0.7f, 0.3f, 0.5f);
  15816. mLight[i].Update();
  15817. }
  15818. if (ikMode2 == 13)
  15819. {
  15820. gLight[i].GetComponent<Renderer>().material.color = new Color(0.7f, 0.7f, 0.3f, 0.5f);
  15821. mLight[i].Update();
  15822. }
  15823. if (ikMode2 == 13)
  15824. {
  15825. if ((ikModeOld2 == 0 || ikModeOld2 >= 9) && ikModeOld2 != 13 && gLight[i])
  15826. {
  15827. mLight[i].ido = 15;
  15828. mLight[i].reset = true;
  15829. }
  15830. else
  15831. {
  15832. if (lightList[i].transform.localScale.x == 1f)
  15833. {
  15834. lightList[i].transform.localScale = new Vector3(lightRange[i], lightRange[i], lightRange[i]);
  15835. }
  15836. lightRange[i] = lightList[i].transform.localScale.x;
  15837. gLight[i].transform.position = lightList[i].transform.position;
  15838. gLight[i].transform.eulerAngles = lightList[i].transform.eulerAngles;
  15839. mLight[i].maid = lightList[i];
  15840. mLight[i].ido = 15;
  15841. }
  15842. }
  15843. else if (ikMode2 == 11)
  15844. {
  15845. if ((ikModeOld2 == 0 || ikModeOld2 >= 9) && ikModeOld2 != 11 && gLight[i])
  15846. {
  15847. mLight[i].ido = 3;
  15848. mLight[i].reset = true;
  15849. }
  15850. else
  15851. {
  15852. gLight[i].transform.position = lightList[i].transform.position;
  15853. gLight[i].transform.eulerAngles = lightList[i].transform.eulerAngles;
  15854. lightX[i] = gLight[i].transform.eulerAngles.x;
  15855. lightY[i] = gLight[i].transform.eulerAngles.y;
  15856. mLight[i].maid = lightList[i];
  15857. mLight[i].ido = 3;
  15858. }
  15859. }
  15860. else if (ikMode2 == 12)
  15861. {
  15862. if ((ikModeOld2 == 0 || ikModeOld2 >= 9) && ikModeOld2 != 12 && gLight[i])
  15863. {
  15864. mLight[i].ido = 2;
  15865. mLight[i].reset = true;
  15866. }
  15867. else
  15868. {
  15869. gLight[i].transform.position = lightList[i].transform.position;
  15870. gLight[i].transform.eulerAngles = lightList[i].transform.eulerAngles;
  15871. mLight[i].maid = lightList[i];
  15872. mLight[i].ido = 2;
  15873. }
  15874. }
  15875. else if (ikMode2 == 10)
  15876. {
  15877. if ((ikModeOld2 == 0 || ikModeOld2 >= 9) && ikModeOld2 != 10 && gLight[i])
  15878. {
  15879. mLight[i].ido = 1;
  15880. mLight[i].reset = true;
  15881. }
  15882. else
  15883. {
  15884. gLight[i].transform.position = lightList[i].transform.position;
  15885. gLight[i].transform.eulerAngles = lightList[i].transform.eulerAngles;
  15886. mLight[i].maid = lightList[i];
  15887. mLight[i].maidArray = lightList.ToArray();
  15888. mLight[i].mArray = mLight.ToArray<MouseDrag6>();
  15889. mLight[i].ido = 1;
  15890. }
  15891. }
  15892. else if (ikMode2 == 9)
  15893. {
  15894. if ((ikModeOld2 == 0 || ikModeOld2 >= 9) && ikModeOld2 != 9 && gLight[i])
  15895. {
  15896. mLight[i].ido = 4;
  15897. mLight[i].reset = true;
  15898. }
  15899. else
  15900. {
  15901. gLight[i].transform.position = lightList[i].transform.position;
  15902. gLight[i].transform.eulerAngles = lightList[i].transform.eulerAngles;
  15903. lightX[i] = gLight[i].transform.eulerAngles.x;
  15904. lightY[i] = gLight[i].transform.eulerAngles.y;
  15905. mLight[i].maid = lightList[i];
  15906. mLight[i].ido = 4;
  15907. }
  15908. }
  15909. else if (ikMode2 == 14)
  15910. {
  15911. if ((ikModeOld2 == 0 || ikModeOld2 >= 9) && ikModeOld2 != 14 && gLight[i])
  15912. {
  15913. mLight[i].ido = 6;
  15914. mLight[i].reset = true;
  15915. }
  15916. else
  15917. {
  15918. gLight[i].transform.position = lightList[i].transform.position;
  15919. gLight[i].transform.eulerAngles = lightList[i].transform.eulerAngles;
  15920. lightX[i] = gLight[i].transform.eulerAngles.x;
  15921. lightY[i] = gLight[i].transform.eulerAngles.y;
  15922. mLight[i].maid = lightList[i];
  15923. mLight[i].ido = 6;
  15924. }
  15925. }
  15926. }
  15927. }
  15928. IL_36227:
  15929. i++;
  15930. continue;
  15931. goto IL_36227;
  15932. }
  15933. for (i = 0; i < doguBObject.Count; i++)
  15934. {
  15935. if (!isCube2)
  15936. {
  15937. gDogu[i].GetComponent<Renderer>().enabled = false;
  15938. gDogu[i].SetActive(false);
  15939. }
  15940. else
  15941. {
  15942. if (ikMode2 > 0)
  15943. {
  15944. gDogu[i].GetComponent<Renderer>().enabled = true;
  15945. gDogu[i].SetActive(true);
  15946. }
  15947. else
  15948. {
  15949. gDogu[i].GetComponent<Renderer>().enabled = false;
  15950. gDogu[i].SetActive(false);
  15951. mDogu[i].isAlt = false;
  15952. }
  15953. if (ikMode2 == 10 || ikMode2 == 11 || ikMode2 == 12)
  15954. {
  15955. gDogu[i].GetComponent<Renderer>().material.color = new Color(0.4f, 0.4f, 1f, 0.5f);
  15956. if (mDogu[i].isAlt)
  15957. {
  15958. gDogu[i].GetComponent<Renderer>().material.color = new Color(0.6f, 0.6f, 1f, 0.5f);
  15959. }
  15960. }
  15961. if (ikMode2 == 9 || ikMode2 == 14)
  15962. {
  15963. gDogu[i].GetComponent<Renderer>().material.color = new Color(0.3f, 0.7f, 0.3f, 0.5f);
  15964. mDogu[i].Update();
  15965. }
  15966. if (ikMode2 == 15)
  15967. {
  15968. gDogu[i].GetComponent<Renderer>().material.color = new Color(1f, 0.3f, 0.3f, 0.5f);
  15969. }
  15970. if (ikMode2 == 13)
  15971. {
  15972. gDogu[i].GetComponent<Renderer>().material.color = new Color(0.7f, 0.7f, 0.3f, 0.5f);
  15973. mDogu[i].Update();
  15974. }
  15975. if (ikMode2 == 13)
  15976. {
  15977. if ((ikModeOld2 == 0 || ikModeOld2 >= 9) && ikModeOld2 != 13 && gDogu[i])
  15978. {
  15979. mDogu[i].ido = 5;
  15980. mDogu[i].reset = true;
  15981. }
  15982. else
  15983. {
  15984. gDogu[i].transform.position = doguBObject[i].transform.position;
  15985. gDogu[i].transform.eulerAngles = doguBObject[i].transform.eulerAngles;
  15986. mDogu[i].maid = doguBObject[i];
  15987. mDogu[i].ido = 5;
  15988. }
  15989. }
  15990. else if (ikMode2 == 11)
  15991. {
  15992. if ((ikModeOld2 == 0 || ikModeOld2 >= 9) && ikModeOld2 != 11 && gDogu[i])
  15993. {
  15994. mDogu[i].ido = 3;
  15995. mDogu[i].reset = true;
  15996. }
  15997. else
  15998. {
  15999. gDogu[i].transform.position = doguBObject[i].transform.position;
  16000. gDogu[i].transform.eulerAngles = doguBObject[i].transform.eulerAngles;
  16001. mDogu[i].maid = doguBObject[i];
  16002. mDogu[i].ido = 3;
  16003. }
  16004. }
  16005. else if (ikMode2 == 12)
  16006. {
  16007. if ((ikModeOld2 == 0 || ikModeOld2 >= 9) && ikModeOld2 != 12 && gDogu[i])
  16008. {
  16009. mDogu[i].ido = 2;
  16010. mDogu[i].reset = true;
  16011. }
  16012. else
  16013. {
  16014. gDogu[i].transform.position = doguBObject[i].transform.position;
  16015. gDogu[i].transform.eulerAngles = doguBObject[i].transform.eulerAngles;
  16016. mDogu[i].maid = doguBObject[i];
  16017. mDogu[i].ido = 2;
  16018. }
  16019. }
  16020. else if (ikMode2 == 10)
  16021. {
  16022. if ((ikModeOld2 == 0 || ikModeOld2 >= 9) && ikModeOld2 != 10 && gDogu[i])
  16023. {
  16024. mDogu[i].ido = 1;
  16025. mDogu[i].reset = true;
  16026. }
  16027. else
  16028. {
  16029. gDogu[i].transform.position = doguBObject[i].transform.position;
  16030. gDogu[i].transform.eulerAngles = doguBObject[i].transform.eulerAngles;
  16031. mDogu[i].maid = doguBObject[i];
  16032. mDogu[i].maidArray = doguBObject.ToArray();
  16033. mDogu[i].mArray = mDogu.ToArray<MouseDrag6>();
  16034. mDogu[i].ido = 1;
  16035. }
  16036. }
  16037. else if (ikMode2 == 9)
  16038. {
  16039. if ((ikModeOld2 == 0 || ikModeOld2 >= 9) && ikModeOld2 != 9 && gDogu[i])
  16040. {
  16041. mDogu[i].ido = 4;
  16042. mDogu[i].reset = true;
  16043. }
  16044. else
  16045. {
  16046. gDogu[i].transform.position = doguBObject[i].transform.position;
  16047. gDogu[i].transform.eulerAngles = doguBObject[i].transform.eulerAngles;
  16048. mDogu[i].maid = doguBObject[i];
  16049. mDogu[i].ido = 4;
  16050. }
  16051. }
  16052. else if (ikMode2 == 14)
  16053. {
  16054. if ((ikModeOld2 == 0 || ikModeOld2 >= 9) && ikModeOld2 != 14 && gDogu[i])
  16055. {
  16056. mDogu[i].ido = 6;
  16057. mDogu[i].reset = true;
  16058. }
  16059. else
  16060. {
  16061. gDogu[i].transform.position = doguBObject[i].transform.position;
  16062. gDogu[i].transform.eulerAngles = doguBObject[i].transform.eulerAngles;
  16063. mDogu[i].maid = doguBObject[i];
  16064. mDogu[i].ido = 6;
  16065. }
  16066. }
  16067. else if (ikMode2 == 15)
  16068. {
  16069. if ((ikModeOld2 == 0 || ikModeOld2 >= 9) && ikModeOld2 != 15 && gDogu[i])
  16070. {
  16071. mDogu[i].ido = 7;
  16072. mDogu[i].reset = true;
  16073. }
  16074. else
  16075. {
  16076. gDogu[i].transform.position = doguBObject[i].transform.position;
  16077. gDogu[i].transform.eulerAngles = doguBObject[i].transform.eulerAngles;
  16078. mDogu[i].maid = doguBObject[i];
  16079. mDogu[i].ido = 7;
  16080. }
  16081. }
  16082. }
  16083. }
  16084. ikModeOld2 = ikMode2;
  16085. }
  16086. if (isVR)
  16087. {
  16088. if (Input.GetKeyDown(KeyCode.F8) && this.getModKeyPressing(modKey.Shift))
  16089. {
  16090. if (!isVR2)
  16091. {
  16092. isVR2 = true;
  16093. base.Preferences["config"]["shift_f8"].Value = "true";
  16094. base.SaveConfig();
  16095. GameMain.Instance.SoundMgr.PlaySe("se002.ogg", false);
  16096. }
  16097. else
  16098. {
  16099. isVR2 = false;
  16100. base.Preferences["config"]["shift_f8"].Value = "false";
  16101. base.SaveConfig();
  16102. GameMain.Instance.SoundMgr.PlaySe("se003.ogg", false);
  16103. }
  16104. }
  16105. if (Input.GetKey(KeyCode.F8) && Input.GetKeyDown(KeyCode.Alpha1))
  16106. {
  16107. loadScene = 1;
  16108. GameMain.Instance.SoundMgr.PlaySe("se002.ogg", false);
  16109. }
  16110. if (Input.GetKey(KeyCode.F8) && Input.GetKeyDown(KeyCode.Alpha2))
  16111. {
  16112. loadScene = 2;
  16113. GameMain.Instance.SoundMgr.PlaySe("se002.ogg", false);
  16114. }
  16115. if (Input.GetKey(KeyCode.F8) && Input.GetKeyDown(KeyCode.Alpha3))
  16116. {
  16117. loadScene = 3;
  16118. GameMain.Instance.SoundMgr.PlaySe("se002.ogg", false);
  16119. }
  16120. if (Input.GetKey(KeyCode.F8) && Input.GetKeyDown(KeyCode.Alpha4))
  16121. {
  16122. loadScene = 4;
  16123. GameMain.Instance.SoundMgr.PlaySe("se002.ogg", false);
  16124. }
  16125. if (Input.GetKey(KeyCode.F8) && Input.GetKeyDown(KeyCode.Alpha5))
  16126. {
  16127. loadScene = 5;
  16128. GameMain.Instance.SoundMgr.PlaySe("se002.ogg", false);
  16129. }
  16130. if (Input.GetKey(KeyCode.F8) && Input.GetKeyDown(KeyCode.Alpha6))
  16131. {
  16132. loadScene = 6;
  16133. GameMain.Instance.SoundMgr.PlaySe("se002.ogg", false);
  16134. }
  16135. if (Input.GetKey(KeyCode.F8) && Input.GetKeyDown(KeyCode.Alpha7))
  16136. {
  16137. loadScene = 7;
  16138. GameMain.Instance.SoundMgr.PlaySe("se002.ogg", false);
  16139. }
  16140. if (Input.GetKey(KeyCode.F8) && Input.GetKeyDown(KeyCode.Alpha8))
  16141. {
  16142. loadScene = 8;
  16143. GameMain.Instance.SoundMgr.PlaySe("se002.ogg", false);
  16144. }
  16145. if (Input.GetKey(KeyCode.F8) && Input.GetKeyDown(KeyCode.Alpha9))
  16146. {
  16147. loadScene = 9;
  16148. GameMain.Instance.SoundMgr.PlaySe("se002.ogg", false);
  16149. }
  16150. if (Input.GetKey(KeyCode.F8) && Input.GetKeyDown(KeyCode.Alpha0))
  16151. {
  16152. loadScene = 10;
  16153. GameMain.Instance.SoundMgr.PlaySe("se002.ogg", false);
  16154. }
  16155. for (int j = 0; j < 7; j++)
  16156. {
  16157. if (!maidArray[j])
  16158. {
  16159. maidArray[j] = GameMain.Instance.CharacterMgr.GetMaid(j);
  16160. }
  16161. }
  16162. }
  16163. }
  16164. }
  16165. }
  16166. }