MultipleMaids.Gui.cs 406 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329330331332333334335336337338339340341342343344345346347348349350351352353354355356357358359360361362363364365366367368369370371372373374375376377378379380381382383384385386387388389390391392393394395396397398399400401402403404405406407408409410411412413414415416417418419420421422423424425426427428429430431432433434435436437438439440441442443444445446447448449450451452453454455456457458459460461462463464465466467468469470471472473474475476477478479480481482483484485486487488489490491492493494495496497498499500501502503504505506507508509510511512513514515516517518519520521522523524525526527528529530531532533534535536537538539540541542543544545546547548549550551552553554555556557558559560561562563564565566567568569570571572573574575576577578579580581582583584585586587588589590591592593594595596597598599600601602603604605606607608609610611612613614615616617618619620621622623624625626627628629630631632633634635636637638639640641642643644645646647648649650651652653654655656657658659660661662663664665666667668669670671672673674675676677678679680681682683684685686687688689690691692693694695696697698699700701702703704705706707708709710711712713714715716717718719720721722723724725726727728729730731732733734735736737738739740741742743744745746747748749750751752753754755756757758759760761762763764765766767768769770771772773774775776777778779780781782783784785786787788789790791792793794795796797798799800801802803804805806807808809810811812813814815816817818819820821822823824825826827828829830831832833834835836837838839840841842843844845846847848849850851852853854855856857858859860861862863864865866867868869870871872873874875876877878879880881882883884885886887888889890891892893894895896897898899900901902903904905906907908909910911912913914915916917918919920921922923924925926927928929930931932933934935936937938939940941942943944945946947948949950951952953954955956957958959960961962963964965966967968969970971972973974975976977978979980981982983984985986987988989990991992993994995996997998999100010011002100310041005100610071008100910101011101210131014101510161017101810191020102110221023102410251026102710281029103010311032103310341035103610371038103910401041104210431044104510461047104810491050105110521053105410551056105710581059106010611062106310641065106610671068106910701071107210731074107510761077107810791080108110821083108410851086108710881089109010911092109310941095109610971098109911001101110211031104110511061107110811091110111111121113111411151116111711181119112011211122112311241125112611271128112911301131113211331134113511361137113811391140114111421143114411451146114711481149115011511152115311541155115611571158115911601161116211631164116511661167116811691170117111721173117411751176117711781179118011811182118311841185118611871188118911901191119211931194119511961197119811991200120112021203120412051206120712081209121012111212121312141215121612171218121912201221122212231224122512261227122812291230123112321233123412351236123712381239124012411242124312441245124612471248124912501251125212531254125512561257125812591260126112621263126412651266126712681269127012711272127312741275127612771278127912801281128212831284128512861287128812891290129112921293129412951296129712981299130013011302130313041305130613071308130913101311131213131314131513161317131813191320132113221323132413251326132713281329133013311332133313341335133613371338133913401341134213431344134513461347134813491350135113521353135413551356135713581359136013611362136313641365136613671368136913701371137213731374137513761377137813791380138113821383138413851386138713881389139013911392139313941395139613971398139914001401140214031404140514061407140814091410141114121413141414151416141714181419142014211422142314241425142614271428142914301431143214331434143514361437143814391440144114421443144414451446144714481449145014511452145314541455145614571458145914601461146214631464146514661467146814691470147114721473147414751476147714781479148014811482148314841485148614871488148914901491149214931494149514961497149814991500150115021503150415051506150715081509151015111512151315141515151615171518151915201521152215231524152515261527152815291530153115321533153415351536153715381539154015411542154315441545154615471548154915501551155215531554155515561557155815591560156115621563156415651566156715681569157015711572157315741575157615771578157915801581158215831584158515861587158815891590159115921593159415951596159715981599160016011602160316041605160616071608160916101611161216131614161516161617161816191620162116221623162416251626162716281629163016311632163316341635163616371638163916401641164216431644164516461647164816491650165116521653165416551656165716581659166016611662166316641665166616671668166916701671167216731674167516761677167816791680168116821683168416851686168716881689169016911692169316941695169616971698169917001701170217031704170517061707170817091710171117121713171417151716171717181719172017211722172317241725172617271728172917301731173217331734173517361737173817391740174117421743174417451746174717481749175017511752175317541755175617571758175917601761176217631764176517661767176817691770177117721773177417751776177717781779178017811782178317841785178617871788178917901791179217931794179517961797179817991800180118021803180418051806180718081809181018111812181318141815181618171818181918201821182218231824182518261827182818291830183118321833183418351836183718381839184018411842184318441845184618471848184918501851185218531854185518561857185818591860186118621863186418651866186718681869187018711872187318741875187618771878187918801881188218831884188518861887188818891890189118921893189418951896189718981899190019011902190319041905190619071908190919101911191219131914191519161917191819191920192119221923192419251926192719281929193019311932193319341935193619371938193919401941194219431944194519461947194819491950195119521953195419551956195719581959196019611962196319641965196619671968196919701971197219731974197519761977197819791980198119821983198419851986198719881989199019911992199319941995199619971998199920002001200220032004200520062007200820092010201120122013201420152016201720182019202020212022202320242025202620272028202920302031203220332034203520362037203820392040204120422043204420452046204720482049205020512052205320542055205620572058205920602061206220632064206520662067206820692070207120722073207420752076207720782079208020812082208320842085208620872088208920902091209220932094209520962097209820992100210121022103210421052106210721082109211021112112211321142115211621172118211921202121212221232124212521262127212821292130213121322133213421352136213721382139214021412142214321442145214621472148214921502151215221532154215521562157215821592160216121622163216421652166216721682169217021712172217321742175217621772178217921802181218221832184218521862187218821892190219121922193219421952196219721982199220022012202220322042205220622072208220922102211221222132214221522162217221822192220222122222223222422252226222722282229223022312232223322342235223622372238223922402241224222432244224522462247224822492250225122522253225422552256225722582259226022612262226322642265226622672268226922702271227222732274227522762277227822792280228122822283228422852286228722882289229022912292229322942295229622972298229923002301230223032304230523062307230823092310231123122313231423152316231723182319232023212322232323242325232623272328232923302331233223332334233523362337233823392340234123422343234423452346234723482349235023512352235323542355235623572358235923602361236223632364236523662367236823692370237123722373237423752376237723782379238023812382238323842385238623872388238923902391239223932394239523962397239823992400240124022403240424052406240724082409241024112412241324142415241624172418241924202421242224232424242524262427242824292430243124322433243424352436243724382439244024412442244324442445244624472448244924502451245224532454245524562457245824592460246124622463246424652466246724682469247024712472247324742475247624772478247924802481248224832484248524862487248824892490249124922493249424952496249724982499250025012502250325042505250625072508250925102511251225132514251525162517251825192520252125222523252425252526252725282529253025312532253325342535253625372538253925402541254225432544254525462547254825492550255125522553255425552556255725582559256025612562256325642565256625672568256925702571257225732574257525762577257825792580258125822583258425852586258725882589259025912592259325942595259625972598259926002601260226032604260526062607260826092610261126122613261426152616261726182619262026212622262326242625262626272628262926302631263226332634263526362637263826392640264126422643264426452646264726482649265026512652265326542655265626572658265926602661266226632664266526662667266826692670267126722673267426752676267726782679268026812682268326842685268626872688268926902691269226932694269526962697269826992700270127022703270427052706270727082709271027112712271327142715271627172718271927202721272227232724272527262727272827292730273127322733273427352736273727382739274027412742274327442745274627472748274927502751275227532754275527562757275827592760276127622763276427652766276727682769277027712772277327742775277627772778277927802781278227832784278527862787278827892790279127922793279427952796279727982799280028012802280328042805280628072808280928102811281228132814281528162817281828192820282128222823282428252826282728282829283028312832283328342835283628372838283928402841284228432844284528462847284828492850285128522853285428552856285728582859286028612862286328642865286628672868286928702871287228732874287528762877287828792880288128822883288428852886288728882889289028912892289328942895289628972898289929002901290229032904290529062907290829092910291129122913291429152916291729182919292029212922292329242925292629272928292929302931293229332934293529362937293829392940294129422943294429452946294729482949295029512952295329542955295629572958295929602961296229632964296529662967296829692970297129722973297429752976297729782979298029812982298329842985298629872988298929902991299229932994299529962997299829993000300130023003300430053006300730083009301030113012301330143015301630173018301930203021302230233024302530263027302830293030303130323033303430353036303730383039304030413042304330443045304630473048304930503051305230533054305530563057305830593060306130623063306430653066306730683069307030713072307330743075307630773078307930803081308230833084308530863087308830893090309130923093309430953096309730983099310031013102310331043105310631073108310931103111311231133114311531163117311831193120312131223123312431253126312731283129313031313132313331343135313631373138313931403141314231433144314531463147314831493150315131523153315431553156315731583159316031613162316331643165316631673168316931703171317231733174317531763177317831793180318131823183318431853186318731883189319031913192319331943195319631973198319932003201320232033204320532063207320832093210321132123213321432153216321732183219322032213222322332243225322632273228322932303231323232333234323532363237323832393240324132423243324432453246324732483249325032513252325332543255325632573258325932603261326232633264326532663267326832693270327132723273327432753276327732783279328032813282328332843285328632873288328932903291329232933294329532963297329832993300330133023303330433053306330733083309331033113312331333143315331633173318331933203321332233233324332533263327332833293330333133323333333433353336333733383339334033413342334333443345334633473348334933503351335233533354335533563357335833593360336133623363336433653366336733683369337033713372337333743375337633773378337933803381338233833384338533863387338833893390339133923393339433953396339733983399340034013402340334043405340634073408340934103411341234133414341534163417341834193420342134223423342434253426342734283429343034313432343334343435343634373438343934403441344234433444344534463447344834493450345134523453345434553456345734583459346034613462346334643465346634673468346934703471347234733474347534763477347834793480348134823483348434853486348734883489349034913492349334943495349634973498349935003501350235033504350535063507350835093510351135123513351435153516351735183519352035213522352335243525352635273528352935303531353235333534353535363537353835393540354135423543354435453546354735483549355035513552355335543555355635573558355935603561356235633564356535663567356835693570357135723573357435753576357735783579358035813582358335843585358635873588358935903591359235933594359535963597359835993600360136023603360436053606360736083609361036113612361336143615361636173618361936203621362236233624362536263627362836293630363136323633363436353636363736383639364036413642364336443645364636473648364936503651365236533654365536563657365836593660366136623663366436653666366736683669367036713672367336743675367636773678367936803681368236833684368536863687368836893690369136923693369436953696369736983699370037013702370337043705370637073708370937103711371237133714371537163717371837193720372137223723372437253726372737283729373037313732373337343735373637373738373937403741374237433744374537463747374837493750375137523753375437553756375737583759376037613762376337643765376637673768376937703771377237733774377537763777377837793780378137823783378437853786378737883789379037913792379337943795379637973798379938003801380238033804380538063807380838093810381138123813381438153816381738183819382038213822382338243825382638273828382938303831383238333834383538363837383838393840384138423843384438453846384738483849385038513852385338543855385638573858385938603861386238633864386538663867386838693870387138723873387438753876387738783879388038813882388338843885388638873888388938903891389238933894389538963897389838993900390139023903390439053906390739083909391039113912391339143915391639173918391939203921392239233924392539263927392839293930393139323933393439353936393739383939394039413942394339443945394639473948394939503951395239533954395539563957395839593960396139623963396439653966396739683969397039713972397339743975397639773978397939803981398239833984398539863987398839893990399139923993399439953996399739983999400040014002400340044005400640074008400940104011401240134014401540164017401840194020402140224023402440254026402740284029403040314032403340344035403640374038403940404041404240434044404540464047404840494050405140524053405440554056405740584059406040614062406340644065406640674068406940704071407240734074407540764077407840794080408140824083408440854086408740884089409040914092409340944095409640974098409941004101410241034104410541064107410841094110411141124113411441154116411741184119412041214122412341244125412641274128412941304131413241334134413541364137413841394140414141424143414441454146414741484149415041514152415341544155415641574158415941604161416241634164416541664167416841694170417141724173417441754176417741784179418041814182418341844185418641874188418941904191419241934194419541964197419841994200420142024203420442054206420742084209421042114212421342144215421642174218421942204221422242234224422542264227422842294230423142324233423442354236423742384239424042414242424342444245424642474248424942504251425242534254425542564257425842594260426142624263426442654266426742684269427042714272427342744275427642774278427942804281428242834284428542864287428842894290429142924293429442954296429742984299430043014302430343044305430643074308430943104311431243134314431543164317431843194320432143224323432443254326432743284329433043314332433343344335433643374338433943404341434243434344434543464347434843494350435143524353435443554356435743584359436043614362436343644365436643674368436943704371437243734374437543764377437843794380438143824383438443854386438743884389439043914392439343944395439643974398439944004401440244034404440544064407440844094410441144124413441444154416441744184419442044214422442344244425442644274428442944304431443244334434443544364437443844394440444144424443444444454446444744484449445044514452445344544455445644574458445944604461446244634464446544664467446844694470447144724473447444754476447744784479448044814482448344844485448644874488448944904491449244934494449544964497449844994500450145024503450445054506450745084509451045114512451345144515451645174518451945204521452245234524452545264527452845294530453145324533453445354536453745384539454045414542454345444545454645474548454945504551455245534554455545564557455845594560456145624563456445654566456745684569457045714572457345744575457645774578457945804581458245834584458545864587458845894590459145924593459445954596459745984599460046014602460346044605460646074608460946104611461246134614461546164617461846194620462146224623462446254626462746284629463046314632463346344635463646374638463946404641464246434644464546464647464846494650465146524653465446554656465746584659466046614662466346644665466646674668466946704671467246734674467546764677467846794680468146824683468446854686468746884689469046914692469346944695469646974698469947004701470247034704470547064707470847094710471147124713471447154716471747184719472047214722472347244725472647274728472947304731473247334734473547364737473847394740474147424743474447454746474747484749475047514752475347544755475647574758475947604761476247634764476547664767476847694770477147724773477447754776477747784779478047814782478347844785478647874788478947904791479247934794479547964797479847994800480148024803480448054806480748084809481048114812481348144815481648174818481948204821482248234824482548264827482848294830483148324833483448354836483748384839484048414842484348444845484648474848484948504851485248534854485548564857485848594860486148624863486448654866486748684869487048714872487348744875487648774878487948804881488248834884488548864887488848894890489148924893489448954896489748984899490049014902490349044905490649074908490949104911491249134914491549164917491849194920492149224923492449254926492749284929493049314932493349344935493649374938493949404941494249434944494549464947494849494950495149524953495449554956495749584959496049614962496349644965496649674968496949704971497249734974497549764977497849794980498149824983498449854986498749884989499049914992499349944995499649974998499950005001500250035004500550065007500850095010501150125013501450155016501750185019502050215022502350245025502650275028502950305031503250335034503550365037503850395040504150425043504450455046504750485049505050515052505350545055505650575058505950605061506250635064506550665067506850695070507150725073507450755076507750785079508050815082508350845085508650875088508950905091509250935094509550965097509850995100510151025103510451055106510751085109511051115112511351145115511651175118511951205121512251235124512551265127512851295130513151325133513451355136513751385139514051415142514351445145514651475148514951505151515251535154515551565157515851595160516151625163516451655166516751685169517051715172517351745175517651775178517951805181518251835184518551865187518851895190519151925193519451955196519751985199520052015202520352045205520652075208520952105211521252135214521552165217521852195220522152225223522452255226522752285229523052315232523352345235523652375238523952405241524252435244524552465247524852495250525152525253525452555256525752585259526052615262526352645265526652675268526952705271527252735274527552765277527852795280528152825283528452855286528752885289529052915292529352945295529652975298529953005301530253035304530553065307530853095310531153125313531453155316531753185319532053215322532353245325532653275328532953305331533253335334533553365337533853395340534153425343534453455346534753485349535053515352535353545355535653575358535953605361536253635364536553665367536853695370537153725373537453755376537753785379538053815382538353845385538653875388538953905391539253935394539553965397539853995400540154025403540454055406540754085409541054115412541354145415541654175418541954205421542254235424542554265427542854295430543154325433543454355436543754385439544054415442544354445445544654475448544954505451545254535454545554565457545854595460546154625463546454655466546754685469547054715472547354745475547654775478547954805481548254835484548554865487548854895490549154925493549454955496549754985499550055015502550355045505550655075508550955105511551255135514551555165517551855195520552155225523552455255526552755285529553055315532553355345535553655375538553955405541554255435544554555465547554855495550555155525553555455555556555755585559556055615562556355645565556655675568556955705571557255735574557555765577557855795580558155825583558455855586558755885589559055915592559355945595559655975598559956005601560256035604560556065607560856095610561156125613561456155616561756185619562056215622562356245625562656275628562956305631563256335634563556365637563856395640564156425643564456455646564756485649565056515652565356545655565656575658565956605661566256635664566556665667566856695670567156725673567456755676567756785679568056815682568356845685568656875688568956905691569256935694569556965697569856995700570157025703570457055706570757085709571057115712571357145715571657175718571957205721572257235724572557265727572857295730573157325733573457355736573757385739574057415742574357445745574657475748574957505751575257535754575557565757575857595760576157625763576457655766576757685769577057715772577357745775577657775778577957805781578257835784578557865787578857895790579157925793579457955796579757985799580058015802580358045805580658075808580958105811581258135814581558165817581858195820582158225823582458255826582758285829583058315832583358345835583658375838583958405841584258435844584558465847584858495850585158525853585458555856585758585859586058615862586358645865586658675868586958705871587258735874587558765877587858795880588158825883588458855886588758885889589058915892589358945895589658975898589959005901590259035904590559065907590859095910591159125913591459155916591759185919592059215922592359245925592659275928592959305931593259335934593559365937593859395940594159425943594459455946594759485949595059515952595359545955595659575958595959605961596259635964596559665967596859695970597159725973597459755976597759785979598059815982598359845985598659875988598959905991599259935994599559965997599859996000600160026003600460056006600760086009601060116012601360146015601660176018601960206021602260236024602560266027602860296030603160326033603460356036603760386039604060416042604360446045604660476048604960506051605260536054605560566057605860596060606160626063606460656066606760686069607060716072607360746075607660776078607960806081608260836084608560866087608860896090609160926093609460956096609760986099610061016102610361046105610661076108610961106111611261136114611561166117611861196120612161226123612461256126612761286129613061316132613361346135613661376138613961406141614261436144614561466147614861496150615161526153615461556156615761586159616061616162616361646165616661676168616961706171617261736174617561766177617861796180618161826183618461856186618761886189619061916192619361946195619661976198619962006201620262036204620562066207620862096210621162126213621462156216621762186219622062216222622362246225622662276228622962306231623262336234623562366237623862396240624162426243624462456246624762486249625062516252625362546255625662576258625962606261626262636264626562666267626862696270627162726273627462756276627762786279628062816282628362846285628662876288628962906291629262936294629562966297629862996300630163026303630463056306630763086309631063116312631363146315631663176318631963206321632263236324632563266327632863296330633163326333633463356336633763386339634063416342634363446345634663476348634963506351635263536354635563566357635863596360636163626363636463656366636763686369637063716372637363746375637663776378637963806381638263836384638563866387638863896390639163926393639463956396639763986399640064016402640364046405640664076408640964106411641264136414641564166417641864196420642164226423642464256426642764286429643064316432643364346435643664376438643964406441644264436444644564466447644864496450645164526453645464556456645764586459646064616462646364646465646664676468646964706471647264736474647564766477647864796480648164826483648464856486648764886489649064916492649364946495649664976498649965006501650265036504650565066507650865096510651165126513651465156516651765186519652065216522652365246525652665276528652965306531653265336534653565366537653865396540654165426543654465456546654765486549655065516552655365546555655665576558655965606561656265636564656565666567656865696570657165726573657465756576657765786579658065816582658365846585658665876588658965906591659265936594659565966597659865996600660166026603660466056606660766086609661066116612661366146615661666176618661966206621662266236624662566266627662866296630663166326633663466356636663766386639664066416642664366446645664666476648664966506651665266536654665566566657665866596660666166626663666466656666666766686669667066716672667366746675667666776678667966806681668266836684668566866687668866896690669166926693669466956696669766986699670067016702670367046705670667076708670967106711671267136714671567166717671867196720672167226723672467256726672767286729673067316732673367346735673667376738673967406741674267436744674567466747674867496750675167526753675467556756675767586759676067616762676367646765676667676768676967706771677267736774677567766777677867796780678167826783678467856786678767886789679067916792679367946795679667976798679968006801680268036804680568066807680868096810681168126813681468156816681768186819682068216822682368246825682668276828682968306831683268336834683568366837683868396840684168426843684468456846684768486849685068516852685368546855685668576858685968606861686268636864686568666867686868696870687168726873687468756876687768786879688068816882688368846885688668876888688968906891689268936894689568966897689868996900690169026903690469056906690769086909691069116912691369146915691669176918691969206921692269236924692569266927692869296930693169326933693469356936693769386939694069416942694369446945694669476948694969506951695269536954695569566957695869596960696169626963696469656966696769686969697069716972697369746975697669776978697969806981698269836984698569866987698869896990699169926993699469956996699769986999700070017002700370047005700670077008700970107011701270137014701570167017701870197020702170227023702470257026702770287029703070317032703370347035703670377038703970407041704270437044704570467047704870497050705170527053705470557056705770587059706070617062706370647065706670677068706970707071707270737074707570767077707870797080708170827083708470857086708770887089709070917092709370947095709670977098709971007101710271037104710571067107710871097110711171127113711471157116711771187119712071217122712371247125712671277128712971307131713271337134713571367137713871397140714171427143714471457146714771487149715071517152715371547155715671577158715971607161716271637164716571667167716871697170717171727173717471757176717771787179718071817182718371847185718671877188718971907191719271937194719571967197719871997200720172027203720472057206720772087209721072117212721372147215721672177218721972207221722272237224722572267227722872297230723172327233723472357236723772387239724072417242724372447245724672477248724972507251725272537254725572567257725872597260726172627263726472657266726772687269727072717272727372747275727672777278727972807281728272837284728572867287728872897290729172927293729472957296729772987299730073017302730373047305730673077308730973107311731273137314731573167317731873197320732173227323732473257326732773287329733073317332733373347335733673377338733973407341734273437344734573467347734873497350735173527353735473557356735773587359736073617362736373647365736673677368736973707371737273737374737573767377737873797380738173827383738473857386738773887389739073917392739373947395739673977398739974007401740274037404740574067407740874097410741174127413741474157416741774187419742074217422742374247425742674277428742974307431743274337434743574367437743874397440744174427443744474457446744774487449745074517452745374547455745674577458745974607461746274637464746574667467746874697470747174727473747474757476747774787479748074817482748374847485748674877488748974907491749274937494749574967497749874997500750175027503750475057506750775087509751075117512751375147515751675177518751975207521752275237524752575267527752875297530753175327533753475357536753775387539754075417542754375447545754675477548754975507551755275537554755575567557755875597560756175627563756475657566756775687569757075717572757375747575757675777578757975807581758275837584758575867587758875897590759175927593759475957596759775987599760076017602760376047605760676077608760976107611761276137614761576167617761876197620762176227623762476257626762776287629763076317632763376347635763676377638763976407641764276437644764576467647764876497650765176527653765476557656765776587659766076617662766376647665766676677668766976707671767276737674767576767677767876797680768176827683768476857686768776887689769076917692769376947695769676977698769977007701770277037704770577067707770877097710771177127713771477157716771777187719772077217722772377247725772677277728772977307731773277337734773577367737773877397740774177427743774477457746774777487749775077517752775377547755775677577758775977607761776277637764776577667767776877697770777177727773777477757776777777787779778077817782778377847785778677877788778977907791779277937794779577967797779877997800780178027803780478057806780778087809781078117812781378147815781678177818781978207821782278237824782578267827782878297830783178327833783478357836783778387839784078417842784378447845784678477848784978507851785278537854785578567857785878597860786178627863786478657866786778687869787078717872787378747875787678777878787978807881788278837884788578867887788878897890789178927893789478957896789778987899790079017902790379047905790679077908790979107911791279137914791579167917791879197920792179227923792479257926792779287929793079317932793379347935793679377938793979407941794279437944794579467947794879497950795179527953795479557956795779587959796079617962796379647965796679677968796979707971797279737974797579767977797879797980798179827983798479857986798779887989799079917992799379947995799679977998799980008001800280038004800580068007800880098010801180128013801480158016801780188019802080218022802380248025802680278028802980308031803280338034803580368037803880398040804180428043804480458046804780488049805080518052805380548055805680578058805980608061806280638064806580668067806880698070807180728073807480758076807780788079808080818082808380848085808680878088808980908091809280938094809580968097809880998100810181028103810481058106810781088109811081118112811381148115811681178118811981208121812281238124812581268127812881298130813181328133813481358136813781388139814081418142814381448145814681478148814981508151815281538154815581568157815881598160816181628163816481658166816781688169817081718172817381748175817681778178817981808181818281838184818581868187818881898190819181928193819481958196819781988199820082018202820382048205820682078208820982108211821282138214821582168217821882198220822182228223822482258226822782288229823082318232823382348235823682378238823982408241824282438244824582468247824882498250825182528253825482558256825782588259826082618262826382648265826682678268826982708271827282738274827582768277827882798280828182828283828482858286828782888289829082918292829382948295829682978298829983008301830283038304830583068307830883098310831183128313831483158316831783188319832083218322832383248325832683278328832983308331833283338334833583368337833883398340834183428343834483458346834783488349835083518352835383548355835683578358835983608361836283638364836583668367836883698370837183728373837483758376837783788379838083818382838383848385838683878388838983908391839283938394839583968397839883998400840184028403840484058406840784088409841084118412841384148415841684178418841984208421842284238424842584268427842884298430843184328433843484358436843784388439844084418442844384448445844684478448844984508451845284538454845584568457845884598460846184628463846484658466846784688469847084718472847384748475847684778478847984808481848284838484848584868487848884898490849184928493849484958496849784988499850085018502850385048505850685078508850985108511851285138514851585168517851885198520852185228523852485258526852785288529853085318532853385348535853685378538853985408541854285438544854585468547854885498550855185528553855485558556855785588559856085618562856385648565856685678568856985708571857285738574857585768577857885798580858185828583858485858586858785888589859085918592859385948595859685978598859986008601860286038604860586068607860886098610861186128613861486158616861786188619862086218622862386248625862686278628862986308631863286338634863586368637863886398640864186428643864486458646864786488649865086518652865386548655865686578658865986608661866286638664866586668667866886698670867186728673867486758676867786788679868086818682868386848685868686878688868986908691869286938694869586968697869886998700870187028703870487058706870787088709871087118712871387148715871687178718871987208721872287238724872587268727872887298730873187328733873487358736873787388739874087418742874387448745874687478748874987508751875287538754875587568757875887598760876187628763876487658766876787688769877087718772877387748775877687778778877987808781878287838784878587868787878887898790879187928793879487958796879787988799880088018802880388048805880688078808880988108811881288138814881588168817881888198820882188228823882488258826882788288829883088318832883388348835883688378838883988408841884288438844884588468847884888498850885188528853885488558856885788588859886088618862886388648865886688678868886988708871887288738874887588768877887888798880888188828883888488858886888788888889889088918892889388948895889688978898889989008901890289038904890589068907890889098910891189128913891489158916891789188919892089218922892389248925892689278928892989308931893289338934893589368937893889398940894189428943894489458946894789488949895089518952895389548955895689578958895989608961896289638964896589668967896889698970897189728973897489758976897789788979898089818982898389848985898689878988898989908991899289938994899589968997899889999000
  1. using ExIni;
  2. using System;
  3. using System.Collections;
  4. using System.Collections.Generic;
  5. using System.IO;
  6. using System.Linq;
  7. using System.Text;
  8. using UnityEngine;
  9. using UnityEngine.Rendering;
  10. using Object = UnityEngine.Object;
  11. namespace CM3D2.MultipleMaids.Plugin
  12. {
  13. public partial class MultipleMaids
  14. {
  15. public void OnGUI()
  16. {
  17. for (int index1 = 0; index1 < maidCnt; ++index1)
  18. {
  19. if (isPoseIti[index1])
  20. {
  21. Maid maid = maidArray[index1];
  22. isPoseIti[index1] = false;
  23. maid.transform.position = poseIti[index1];
  24. Vector3 eulerAngles = maid.transform.eulerAngles;
  25. for (int index2 = 0; index2 < 10; ++index2)
  26. {
  27. Transform transform1 = maid.transform;
  28. Vector3 position1 = maid.transform.position;
  29. Vector3 right = Vector3.right;
  30. Quaternion rotation = maid.transform.rotation;
  31. double num1 = -rotation.eulerAngles.x;
  32. transform1.RotateAround(position1, right, (float)num1);
  33. Transform transform2 = maid.transform;
  34. Vector3 position2 = maid.transform.position;
  35. Vector3 forward = Vector3.forward;
  36. rotation = maid.transform.rotation;
  37. double num2 = -rotation.eulerAngles.z;
  38. transform2.RotateAround(position2, forward, (float)num2);
  39. }
  40. Transform transform = CMT.SearchObjName(maid.body0.m_Bones.transform, "Bip01", true);
  41. transform.position = new Vector3(poseIti[index1].x, transform.position.y, poseIti[index1].z);
  42. maid.transform.eulerAngles = eulerAngles;
  43. }
  44. }
  45. GUIStyle style = GUI.skin.box;
  46. style.fontSize = GetPix(11);
  47. style.alignment = TextAnchor.UpperRight;
  48. if (isGuiInit || screenSize != new Vector2(Screen.width, Screen.height))
  49. {
  50. screenSize = new Vector2(Screen.width, Screen.height);
  51. isGuiInit = false;
  52. rectWin2.width = Screen.width * 0.4f;
  53. rectWin2.height = Screen.height * 0.15f;
  54. rectWin2.x = (float)(Screen.width / 2.0 - rectWin2.width / 2.0);
  55. rectWin2.y = sceneLevel != 5
  56. ? Screen.height - rectWin2.height
  57. : Screen.height * 0.94f - rectWin2.height;
  58. rectWin.width = GetPix(kankyoFlg || kankyo2Flg ? 220 : 180);
  59. rectWin.height = Screen.height * 0.9f;
  60. rectWin.x = Screen.width - rectWin.width;
  61. rectWin.y = GetPix(65);
  62. }
  63. if (bGuiMessage)
  64. {
  65. rectWin2.width = Screen.width * 0.4f;
  66. rectWin2.height = Screen.height * 0.15f;
  67. rectWin2.x = Mathf.Clamp(rectWin2.x, -rectWin2.width + GetPix(20), Screen.width - GetPix(20));
  68. rectWin2.y = Mathf.Clamp(rectWin2.y, -rectWin2.height + GetPix(20), Screen.height - GetPix(20));
  69. rectWin2 = GUI.Window(130, rectWin2, MessageWindow, "", style);
  70. }
  71. if (bGui)
  72. {
  73. rectWin.x = Mathf.Clamp(rectWin.x, 0, Screen.width - rectWin.width);
  74. rectWin.y = Mathf.Clamp(rectWin.y, -rectWin.height + GetPix(20), Screen.height - GetPix(20));
  75. rectWin.height = Screen.height * 0.9f;
  76. rectWin.width = GetPix(kankyoFlg || kankyo2Flg ? 220 : 180);
  77. if (sceneLevel == 5 || sceneLevel == 14)
  78. rectWin.height *= 0.85f;
  79. comboBoxControl.height = rectWin.height;
  80. faceCombo.height = rectWin.height;
  81. poseCombo.height = rectWin.height;
  82. poseGroupCombo.height = rectWin.height;
  83. itemCombo.height = rectWin.height;
  84. bgmCombo.height = rectWin.height;
  85. itemCombo2.height = rectWin.height;
  86. bgCombo2.height = rectWin.height;
  87. kankyoCombo.height = rectWin.height;
  88. bgCombo.height = rectWin.height;
  89. slotCombo.height = rectWin.height;
  90. doguCombo.height = rectWin.height;
  91. parCombo.height = rectWin.height;
  92. lightCombo.height = rectWin.height;
  93. GameMain.Instance.MainCamera.SetControl(true);
  94. if (!sceneFlg && !faceFlg && !poseFlg && !kankyoFlg && !kankyo2Flg && !isF6 && okFlg)
  95. {
  96. rectWin = GUI.Window(129, rectWin, MaidCallWindow, "", style);
  97. }
  98. else if (sceneFlg)
  99. {
  100. rectWin = GUI.Window(129, rectWin, SaveSceneWindow, "", style);
  101. Rect rect = default;
  102. dispNo = 0;
  103. for (int index = 0; index < 10; ++index)
  104. {
  105. rect = new Rect(0.0f, 0.0f, GetPix(170), GetPix(36));
  106. rect.x = rectWin.x;
  107. rect.y = rectWin.y - saveSceneScrollPos.y + GetPix(64 + 50 * index);
  108. if (rect.Contains(new Vector2(Input.mousePosition.x, Screen.height - Input.mousePosition.y)))
  109. {
  110. dispNo = index + 1;
  111. break;
  112. }
  113. }
  114. if (saveScene2 > 0)
  115. {
  116. dispNo = 0;
  117. }
  118. if (dispNo == 0)
  119. {
  120. texture2D = null;
  121. dispNoOld = 0;
  122. }
  123. else if (dispNo != dispNoOld)
  124. {
  125. dispNoOld = dispNo;
  126. texture2D = null;
  127. try
  128. {
  129. IniKey iniKey = Preferences["scene"]["ss" + (page * 10 + dispNo)];
  130. if (iniKey.Value != null && iniKey.Value != "")
  131. {
  132. byte[] data = Convert.FromBase64String(iniKey.Value);
  133. texture2D = new Texture2D(1, 1, TextureFormat.ARGB32, false);
  134. texture2D.LoadImage(data);
  135. }
  136. }
  137. catch { }
  138. }
  139. if (texture2D != null)
  140. {
  141. if (waku == null)
  142. {
  143. waku = MakeTex(2, 2, new Color(1f, 1f, 1f, 1f));
  144. waku2 = MakeTex(2, 2, new Color(0.0f, 0.0f, 0.0f, 0.4f));
  145. }
  146. Rect position1 = new Rect(rect.x - texture2D.width - GetPix(18),
  147. rect.y - texture2D.height / 2 + GetPix(12),
  148. texture2D.width + GetPix(12),
  149. texture2D.height + GetPix(12));
  150. Rect position2 = new Rect(rect.x - texture2D.width - GetPix(12),
  151. rect.y - texture2D.height / 2 + GetPix(18),
  152. texture2D.width,
  153. texture2D.height);
  154. Rect position3 = new Rect(rect.x - texture2D.width - GetPix(16),
  155. rect.y - texture2D.height / 2 + GetPix(14),
  156. texture2D.width + GetPix(12),
  157. texture2D.height + GetPix(12));
  158. if (position1.y + (double)position1.height > Screen.height)
  159. {
  160. float num = position3.y + position3.height - Screen.height;
  161. position1.y -= num;
  162. position2.y -= num;
  163. position3.y -= num;
  164. }
  165. if (position1.y < 0)
  166. {
  167. position3.y -= position1.y;
  168. position2.y -= position1.y;
  169. position1.y -= position1.y;
  170. }
  171. if (rect.x + rect.width / 2 <= Screen.width / 2)
  172. {
  173. float offset = texture2D.width + rect.width + GetPix(24);
  174. position1.x += offset;
  175. position2.x += offset;
  176. position3.x += offset;
  177. }
  178. GUI.DrawTexture(position3, waku2);
  179. GUI.DrawTexture(position1, waku);
  180. GUI.DrawTexture(position2, texture2D);
  181. }
  182. }
  183. else if (kankyoFlg)
  184. {
  185. if (!yotogiFlg && sceneLevel != 3 && sceneLevel != 5
  186. && rectWin.Contains(Event.current.mousePosition)
  187. && Input.GetMouseButtonDown(0))
  188. {
  189. Input.ResetInputAxes();
  190. }
  191. rectWin = GUI.Window(129, rectWin, BGSelectWindow, "", style);
  192. }
  193. else if (kankyo2Flg)
  194. {
  195. if (!yotogiFlg && sceneLevel != 3 && sceneLevel != 5
  196. && rectWin.Contains(Event.current.mousePosition)
  197. && Input.GetMouseButtonDown(0))
  198. {
  199. Input.ResetInputAxes();
  200. }
  201. rectWin = GUI.Window(129, rectWin, BGSelectWindow2, "", style);
  202. }
  203. else if (poseFlg)
  204. {
  205. if (!yotogiFlg && sceneLevel != 3 && sceneLevel != 5
  206. && rectWin.Contains(Event.current.mousePosition)
  207. && Input.GetMouseButtonDown(0))
  208. {
  209. Input.ResetInputAxes();
  210. }
  211. rectWin = GUI.Window(129, rectWin, PoseWindow, "", style);
  212. }
  213. else // implies faceFlg == true
  214. {
  215. if (!yotogiFlg && sceneLevel != 3 && sceneLevel != 5
  216. && rectWin.Contains(Event.current.mousePosition)
  217. && Input.GetMouseButtonDown(0))
  218. {
  219. Input.ResetInputAxes();
  220. }
  221. rectWin = GUI.Window(129, rectWin, FaceWindow, "", style);
  222. }
  223. }
  224. }
  225. private void SaveSceneWindow(int winID)
  226. {
  227. GUIStyle style1 = "label";
  228. style1.fontSize = GetPix(12);
  229. style1.alignment = TextAnchor.UpperLeft;
  230. GUIStyle style2 = "button";
  231. style2.fontSize = GetPix(12);
  232. style2.alignment = TextAnchor.MiddleCenter;
  233. GUI.Label(new Rect(GetPix(50), GetPix(6), GetPix(100), GetPix(25)),
  234. "シーン管理",
  235. style1);
  236. if (GUI.Button(new Rect(GetPix(135), GetPix(3), GetPix(23), GetPix(23)),
  237. "→",
  238. style2))
  239. {
  240. faceFlg = false;
  241. poseFlg = false;
  242. sceneFlg = false;
  243. kankyoFlg = true;
  244. kankyo2Flg = false;
  245. bGui = true;
  246. copyIndex = 0;
  247. }
  248. if (GUI.Button(new Rect(GetPix(25), GetPix(31), GetPix(23), GetPix(23)),
  249. "<",
  250. style2))
  251. {
  252. saveSceneScrollPos.y = 0.0f;
  253. --page;
  254. if (page < 0)
  255. {
  256. page = maxPage - 1;
  257. }
  258. for (int index = 0; index < 10; ++index)
  259. {
  260. date[index] = "未保存";
  261. ninzu[index] = "";
  262. IniKey iniKey = Preferences["scene"]["s" + (page * 10 + index + 1)];
  263. if (iniKey.Value != null && iniKey.Value.ToString() != "")
  264. {
  265. string[] strArray1 = iniKey.Value.Split('_');
  266. if (strArray1.Length >= 2)
  267. {
  268. string[] strArray2 = strArray1[0].Split(',');
  269. date[index] = strArray2[0];
  270. ninzu[index] = strArray2[1] + "人";
  271. }
  272. }
  273. }
  274. }
  275. if (GUI.Button(new Rect(GetPix(115), GetPix(31), GetPix(23), GetPix(23)),
  276. ">",
  277. style2))
  278. {
  279. saveSceneScrollPos.y = 0.0f;
  280. ++page;
  281. if (page >= maxPage)
  282. {
  283. page = 0;
  284. }
  285. for (int index = 0; index < 10; ++index)
  286. {
  287. date[index] = "未保存";
  288. ninzu[index] = "";
  289. IniKey iniKey = Preferences["scene"]["s" + (page * 10 + index + 1)];
  290. if (iniKey.Value != null && iniKey.Value.ToString() != "")
  291. {
  292. string[] strArray1 = iniKey.Value.Split('_');
  293. if (strArray1.Length >= 2)
  294. {
  295. string[] strArray2 = strArray1[0].Split(',');
  296. date[index] = strArray2[0];
  297. ninzu[index] = strArray2[1] + "人";
  298. }
  299. }
  300. }
  301. }
  302. GUI.Label(new Rect(GetPix(60), GetPix(32), GetPix(100), GetPix(25)),
  303. (page * 10 + 1).ToString() + " ~ " + (page * 10 + 10),
  304. style1);
  305. if (saveScene2 > 0 && string.IsNullOrEmpty(thum_byte_to_base64_) && File.Exists(thum_file_path_))
  306. {
  307. try
  308. {
  309. Texture2D tex = new Texture2D(1, 1, TextureFormat.ARGB32, false);
  310. tex.LoadImage(File.ReadAllBytes(thum_file_path_));
  311. float num2 = tex.width / (float)tex.height;
  312. Vector2 vector2 = new Vector2(480f, 270f);
  313. int newWidth = tex.width;
  314. int newHeight = tex.height;
  315. if (vector2.x < (double)tex.width && vector2.y < (double)tex.height)
  316. {
  317. newWidth = (int)vector2.x;
  318. newHeight = Mathf.RoundToInt(newWidth / num2);
  319. if (vector2.y < (double)newHeight)
  320. {
  321. newHeight = (int)vector2.y;
  322. newWidth = Mathf.RoundToInt(newHeight * num2);
  323. }
  324. }
  325. else if (vector2.x < (double)tex.width)
  326. {
  327. newWidth = (int)vector2.x;
  328. newHeight = Mathf.RoundToInt(newWidth / num2);
  329. }
  330. else if (vector2.y < (double)tex.height)
  331. {
  332. newHeight = (int)vector2.y;
  333. newWidth = Mathf.RoundToInt(newHeight * num2);
  334. }
  335. TextureScale.Bilinear(tex, newWidth, newHeight);
  336. thum_byte_to_base64_ = Convert.ToBase64String(tex.EncodeToPNG());
  337. DestroyImmediate(tex);
  338. Preferences["scene"]["ss" + saveScene2].Value = thum_byte_to_base64_;
  339. SaveConfig();
  340. thum_file_path_ = "";
  341. saveScene2 = 0;
  342. }
  343. catch { }
  344. }
  345. int offsetTop = GetPix(31) + GetPix(23) + GetPix(5);
  346. int UIHeight = GetPix(500);
  347. Rect saveSceneScrollRect = new Rect(0, offsetTop, rectWin.width, rectWin.height - offsetTop);
  348. Rect saveSceneScrollView = new Rect(0, 0, rectWin.width - 20, UIHeight);
  349. saveSceneScrollPos = GUI.BeginScrollView(saveSceneScrollRect, saveSceneScrollPos, saveSceneScrollView);
  350. int saveSlotOffset = 50;
  351. for (int index = 0; index < 10; ++index)
  352. {
  353. GUI.Label(new Rect(GetPix(5),
  354. GetPix(saveSlotOffset * index),
  355. GetPix(25),
  356. GetPix(25)),
  357. string.Concat(page * 10 + index + 1),
  358. style1);
  359. GUI.Label(new Rect(GetPix(25),
  360. GetPix(saveSlotOffset * index),
  361. GetPix(100),
  362. GetPix(25)),
  363. date[index],
  364. style1);
  365. GUI.Label(new Rect(GetPix(130),
  366. GetPix(saveSlotOffset * index),
  367. GetPix(100),
  368. GetPix(25)),
  369. ninzu[index],
  370. style1);
  371. if (GUI.Button(new Rect(GetPix(20),
  372. GetPix(18 + saveSlotOffset * index),
  373. GetPix(50),
  374. GetPix(20)),
  375. "保存",
  376. style2))
  377. {
  378. saveScene = page * 10 + index + 1;
  379. saveScene2 = saveScene;
  380. GameMain.Instance.SoundMgr.PlaySe("se002.ogg", false);
  381. isScreen2 = true;
  382. if (!isMessage)
  383. {
  384. ui_cam_hide_list_.Clear();
  385. foreach (UICamera uiCamera in NGUITools.FindActive<UICamera>())
  386. {
  387. if (uiCamera.GetComponent<Camera>().enabled)
  388. {
  389. uiCamera.GetComponent<Camera>().enabled = false;
  390. ui_cam_hide_list_.Add(uiCamera);
  391. }
  392. }
  393. }
  394. else
  395. {
  396. editUI = GameObject.Find("/UI Root/Camera");
  397. if (editUI != null)
  398. {
  399. editUI.SetActive(false);
  400. }
  401. if (GameMain.Instance.CMSystem.ViewFps)
  402. {
  403. UTY.GetChildObject(GameMain.Instance.gameObject, "SystemUI Root/FpsCounter", false).SetActive(false);
  404. }
  405. GameObject childObject1 = UTY.GetChildObject(GameMain.Instance.gameObject, "SystemUI Root/SystemDialog", false);
  406. GameObject childObject2 = UTY.GetChildObject(GameMain.Instance.gameObject, "SystemUI Root/SystemShortcut", false);
  407. childObject1.SetActive(false);
  408. childObject2.SetActive(false);
  409. }
  410. isGui = bGui;
  411. bGui = false;
  412. try
  413. {
  414. thum_byte_to_base64_ = string.Empty;
  415. thum_file_path_ = Path.Combine(Path.GetTempPath(), "cm3d2_" + Guid.NewGuid().ToString() + ".png");
  416. GameMain.Instance.MainCamera.ScreenShot(thum_file_path_, 1, true);
  417. }
  418. catch { }
  419. }
  420. if (date[index] != "未保存" && GUI.Button(new Rect(GetPix(100),
  421. GetPix(18 + saveSlotOffset * index),
  422. GetPix(50),
  423. GetPix(20)),
  424. "読込",
  425. style2))
  426. {
  427. loadScene = page * 10 + index + 1;
  428. GameMain.Instance.SoundMgr.PlaySe("se002.ogg", false);
  429. }
  430. }
  431. GUI.EndScrollView();
  432. GUI.DragWindow();
  433. }
  434. private void BGSelectWindow2(int winID)
  435. {
  436. GUIStyle guiStyle1 = "label";
  437. guiStyle1.fontSize = GetPix(12);
  438. guiStyle1.alignment = TextAnchor.UpperLeft;
  439. GUIStyle style1 = "label";
  440. style1.fontSize = GetPix(11);
  441. style1.alignment = TextAnchor.UpperLeft;
  442. GUIStyle style2 = "button";
  443. style2.fontSize = GetPix(20);
  444. GUIStyle buttonStyle = "button";
  445. buttonStyle.fontSize = GetPix(14);
  446. buttonStyle.alignment = TextAnchor.MiddleLeft;
  447. GUIStyle guiStyle2 = "button";
  448. guiStyle2.fontSize = GetPix(12);
  449. guiStyle2.alignment = TextAnchor.MiddleLeft;
  450. GUIStyle style3 = new GUIStyle("toggle")
  451. {
  452. fontSize = GetPix(13)
  453. };
  454. CharacterMgr characterMgr = GameMain.Instance.CharacterMgr;
  455. Maid maid = maidArray[selectMaidIndex];
  456. if (!kankyo2InitFlg)
  457. {
  458. listStyle2.normal.textColor = Color.white;
  459. listStyle2.normal.background = MakeTex(2, 2, new Color(0.0f, 0.0f, 0.0f, 0.5f));
  460. listStyle2.onHover.background = listStyle2.hover.background = new Texture2D(2, 2);
  461. listStyle2.padding.left = listStyle2.padding.right = listStyle2.padding.top = listStyle2.padding.bottom = GetPix(0);
  462. listStyle2.fontSize = GetPix(11);
  463. listStyle3.normal.textColor = Color.white;
  464. listStyle3.normal.background = MakeTex(2, 2, new Color(0.0f, 0.0f, 0.0f, 0.5f));
  465. listStyle3.onHover.background = listStyle3.hover.background = new Texture2D(2, 2);
  466. listStyle3.padding.left = listStyle3.padding.right = listStyle3.padding.top = GetPix(0);
  467. listStyle3.padding.bottom = GetPix(0);
  468. listStyle3.fontSize = GetPix(14);
  469. bgCombo2.selectedItemIndex = bgIndexB;
  470. bgCombo2List = new GUIContent[bgArray.Length];
  471. for (int index = 0; index < bgArray.Length; ++index)
  472. {
  473. bgCombo2List[index] = bgUiNames.TryGetValue(bgArray[index], out string name)
  474. ? new GUIContent(name)
  475. : new GUIContent(bgArray[index]);
  476. }
  477. slotCombo.selectedItemIndex = 0;
  478. slotComboList = slotArray.Select(s => slotUiNames.TryGetValue(s, out string name) ? name : s).Select(s => new GUIContent(s)).ToArray();
  479. itemCombo2.selectedItemIndex = 0;
  480. itemCombo2List = itemBArray.Select(s => itemComboUiName.TryGetValue(s, out string name) ? name : s)
  481. .Select(s => new GUIContent(s)).ToArray();
  482. kankyoCombo.selectedItemIndex = 0;
  483. kankyoComboList = new GUIContent[kankyoMax];
  484. for (int index = 0; index < kankyoMax; ++index)
  485. {
  486. IniKey iniKey = Preferences["kankyo"]["kankyo" + (index + 1)];
  487. kankyoComboList[index] = new GUIContent(iniKey.Value);
  488. }
  489. kankyo2InitFlg = true;
  490. }
  491. listStyle3.padding.top = GetPix(1);
  492. listStyle3.padding.bottom = GetPix(0);
  493. listStyle3.fontSize = GetPix(13);
  494. if (poseCombo.isClickedComboButton)
  495. {
  496. GUI.enabled = false;
  497. }
  498. if (poseGroupCombo.isClickedComboButton)
  499. {
  500. GUI.enabled = false;
  501. }
  502. if (sceneLevel == 3 || sceneLevel == 5 || isF6)
  503. {
  504. if (!isF6)
  505. {
  506. bool flag = true;
  507. if (faceFlg || poseFlg || sceneFlg || kankyoFlg || kankyo2Flg)
  508. {
  509. flag = false;
  510. }
  511. if (GUI.Toggle(new Rect(GetPix(2),
  512. GetPix(2),
  513. GetPix(39),
  514. GetPix(20)),
  515. flag,
  516. "配置",
  517. style3))
  518. {
  519. faceFlg = false;
  520. poseFlg = false;
  521. sceneFlg = false;
  522. kankyoFlg = false;
  523. kankyo2Flg = false;
  524. bGui = true;
  525. }
  526. }
  527. if (!yotogiFlg && GUI.Toggle(new Rect(GetPix(42),
  528. GetPix(2),
  529. GetPix(39),
  530. GetPix(20)),
  531. poseFlg,
  532. "操作",
  533. style3))
  534. {
  535. poseFlg = true;
  536. faceFlg = false;
  537. sceneFlg = false;
  538. kankyoFlg = false;
  539. kankyo2Flg = false;
  540. }
  541. if (GUI.Toggle(new Rect(GetPix(82), GetPix(2), GetPix(39), GetPix(20)),
  542. faceFlg,
  543. "表情",
  544. style3))
  545. {
  546. faceFlg = true;
  547. poseFlg = false;
  548. sceneFlg = false;
  549. kankyoFlg = false;
  550. kankyo2Flg = false;
  551. if (!faceFlg2)
  552. {
  553. isFaceInit = true;
  554. faceFlg2 = true;
  555. maidArray[selectMaidIndex].boMabataki = false;
  556. faceCombo.selectedItemIndex = faceIndex[selectMaidIndex];
  557. }
  558. isFaceInit = true;
  559. }
  560. if (GUI.Toggle(new Rect(GetPix(122), GetPix(2), GetPix(39), GetPix(20)),
  561. kankyoFlg,
  562. "環境",
  563. style3))
  564. {
  565. poseFlg = false;
  566. faceFlg = false;
  567. sceneFlg = false;
  568. kankyoFlg = true;
  569. kankyo2Flg = false;
  570. }
  571. if (GUI.Toggle(new Rect(GetPix(162), GetPix(2), GetPix(39), GetPix(20)),
  572. kankyo2Flg,
  573. "環2",
  574. style3))
  575. {
  576. poseFlg = false;
  577. faceFlg = false;
  578. sceneFlg = false;
  579. kankyoFlg = false;
  580. kankyo2Flg = true;
  581. }
  582. if (!line1)
  583. {
  584. line1 = MakeTex(2, 2, new Color(0.0f, 0.0f, 0.0f, 0.3f));
  585. line2 = MakeTex(2, 2, new Color(0.7f, 0.7f, 0.7f, 0.6f));
  586. }
  587. GUI.DrawTexture(new Rect(GetPix(5), GetPix(20), GetPix(200), 2f), line1);
  588. GUI.DrawTexture(new Rect(GetPix(5), GetPix(20), GetPix(200), 1f), line2);
  589. }
  590. if (isDanceStop)
  591. {
  592. isStop[selectMaidIndex] = true;
  593. isDanceStop = false;
  594. }
  595. if (kankyoCombo.isClickedComboButton || slotCombo.isClickedComboButton
  596. || itemCombo2.isClickedComboButton || bgCombo2.isClickedComboButton)
  597. {
  598. GUI.enabled = false;
  599. }
  600. int iconSize = GetPix(45);
  601. Rect position1;
  602. Rect viewRect;
  603. if (sceneLevel != 5)
  604. {
  605. position1 = new Rect(GetPix(7),
  606. GetPix(138),
  607. GetPix(44) * 4 + GetPix(20),
  608. rectWin.height - GetPix(148));
  609. viewRect = new Rect(0.0f,
  610. 0.0f,
  611. position1.width * 0.845f,
  612. Mathf.Ceil(sortList.Count / 4f) * iconSize + GetPix(10));
  613. }
  614. else
  615. {
  616. position1 = new Rect(GetPix(7),
  617. GetPix(138),
  618. GetPix(44) * 4 + GetPix(20),
  619. rectWin.height - GetPix(148));
  620. viewRect = new Rect(0.0f,
  621. 0.0f,
  622. position1.width * 0.845f,
  623. Mathf.Ceil(sortList.Count / 4f) * iconSize + GetPix(10));
  624. }
  625. bg2ScrollPos = GUI.BeginScrollView(position1, bg2ScrollPos, viewRect);
  626. for (int index = 0; index < sortList.Count; ++index)
  627. {
  628. SortItem sortItem = sortList[index];
  629. Rect position2 = new Rect(
  630. index % 4 * iconSize,
  631. index / 4 * iconSize,
  632. iconSize,
  633. iconSize
  634. );
  635. if (GUI.Button(position2, ""))
  636. {
  637. string menu = sortItem.menu;
  638. byte[] modBuf = null;
  639. bool ready = true;
  640. if (sortItem.isOfficialMod)
  641. {
  642. menu = sortItem.baseItem;
  643. using (FileStream fileStream = new FileStream(sortItem.menu, FileMode.Open))
  644. {
  645. if (fileStream == null)
  646. {
  647. ready = false;
  648. }
  649. else
  650. {
  651. modBuf = new byte[fileStream.Length];
  652. fileStream.Read(modBuf, 0, (int)fileStream.Length);
  653. }
  654. }
  655. }
  656. byte[] menuBuf = null;
  657. using (AFileBase afileBase = GameUty.FileOpen(menu, null))
  658. {
  659. if (ready = afileBase.IsValid())
  660. {
  661. menuBuf = afileBase.ReadAll();
  662. }
  663. }
  664. if (ready)
  665. {
  666. string[] meshInfo = ProcScriptBin(menuBuf);
  667. GameObject gameObject = ImportCM2.LoadSkinMesh_R(meshInfo[0], meshInfo, 1);
  668. gameObject.name = menu;
  669. if (sortItem.isOfficialMod)
  670. {
  671. gameObject.name += $"#{Path.GetFileName(sortItem.menu)}";
  672. ProcModScriptBin(modBuf, gameObject);
  673. }
  674. doguBObject.Add(gameObject);
  675. Vector3 zero1 = Vector3.zero;
  676. Vector3 zero2 = Vector3.zero;
  677. zero1.z = 0.4f;
  678. gameObject.transform.localPosition = zero1;
  679. gameObject.transform.localRotation = Quaternion.Euler(zero2);
  680. doguCnt = doguBObject.Count - 1;
  681. gDogu[doguCnt] = GameObject.CreatePrimitive(PrimitiveType.Cube);
  682. gDogu[doguCnt].GetComponent<Renderer>().material = m_material;
  683. gDogu[doguCnt].layer = 8;
  684. gDogu[doguCnt].GetComponent<Renderer>().enabled = false;
  685. gDogu[doguCnt].SetActive(false);
  686. gDogu[doguCnt].transform.position = gameObject.transform.position;
  687. mDogu[doguCnt] = gDogu[doguCnt].AddComponent<MouseDrag6>();
  688. mDogu[doguCnt].isScale = false;
  689. mDogu[doguCnt].obj = gDogu[doguCnt];
  690. mDogu[doguCnt].maid = gameObject;
  691. mDogu[doguCnt].angles = gameObject.transform.eulerAngles;
  692. gDogu[doguCnt].transform.localScale = new Vector3(cubeSize, cubeSize, cubeSize);
  693. mDogu[doguCnt].ido = 1;
  694. }
  695. }
  696. GUI.DrawTexture(position2, sortItem.tex);
  697. }
  698. GUI.EndScrollView();
  699. GUI.enabled = true;
  700. GUI.Label(new Rect(GetPix(3), GetPix(108), GetPix(100), GetPix(25)),
  701. "服装",
  702. style1);
  703. style1.fontSize = GetPix(9);
  704. GUI.Label(new Rect(GetPix(3), GetPix(119), GetPix(100), GetPix(25)),
  705. "アクセサリ",
  706. style1);
  707. style1.fontSize = GetPix(11);
  708. GUI.Label(new Rect(GetPix(3), GetPix(58), GetPix(100), GetPix(25)),
  709. "アイテム",
  710. style1);
  711. GUI.Label(new Rect(GetPix(3), GetPix(86), GetPix(100), GetPix(24)),
  712. "背景(小)",
  713. style1);
  714. if (kankyoCombo.isClickedComboButton || itemCombo2.isClickedComboButton || bgCombo2.isClickedComboButton)
  715. {
  716. GUI.enabled = false;
  717. }
  718. int num1 =
  719. slotCombo.List(new Rect(GetPix(51),
  720. GetPix(111),
  721. GetPix(100),
  722. GetPix(23)),
  723. slotComboList[slotIndex].text,
  724. slotComboList,
  725. buttonStyle,
  726. "box",
  727. listStyle3);
  728. GUI.enabled = true;
  729. if (kankyoCombo.isClickedComboButton || itemCombo2.isClickedComboButton)
  730. {
  731. GUI.enabled = false;
  732. }
  733. bgIndexB =
  734. bgCombo2.List(new Rect(GetPix(51),
  735. GetPix(83),
  736. GetPix(100),
  737. GetPix(23)),
  738. bgCombo2List[bgIndexB].text,
  739. bgCombo2List,
  740. buttonStyle,
  741. "box",
  742. listStyle3);
  743. if (GUI.Button(new Rect(GetPix(156), GetPix(83), GetPix(38), GetPix(23)),
  744. "追加",
  745. style2))
  746. {
  747. Object original = GameMain.Instance.BgMgr.CreateAssetBundle(bgArray[bgIndexB]);
  748. if (original == null)
  749. {
  750. original = Resources.Load("BG/" + bgArray[bgIndexB]);
  751. }
  752. GameObject gameObject = Instantiate(original) as GameObject;
  753. doguBObject.Add(gameObject);
  754. gameObject.name = "BG_" + bgArray[bgIndexB];
  755. Vector3 zero1 = Vector3.zero;
  756. Vector3 zero2 = Vector3.zero;
  757. zero1.z = 0.4f;
  758. gameObject.transform.localScale = new Vector3(0.1f, 0.1f, 0.1f);
  759. gameObject.transform.localPosition = zero1;
  760. gameObject.transform.localRotation = Quaternion.Euler(zero2);
  761. doguCnt = doguBObject.Count - 1;
  762. gDogu[doguCnt] = GameObject.CreatePrimitive(PrimitiveType.Cube);
  763. gDogu[doguCnt].GetComponent<Renderer>().material = m_material;
  764. gDogu[doguCnt].layer = 8;
  765. gDogu[doguCnt].GetComponent<Renderer>().enabled = false;
  766. gDogu[doguCnt].SetActive(false);
  767. gDogu[doguCnt].transform.position = gameObject.transform.position;
  768. mDogu[doguCnt] = gDogu[doguCnt].AddComponent<MouseDrag6>();
  769. mDogu[doguCnt].isScale = false;
  770. mDogu[doguCnt].obj = gDogu[doguCnt];
  771. mDogu[doguCnt].maid = gameObject;
  772. mDogu[doguCnt].angles = gameObject.transform.eulerAngles;
  773. gDogu[doguCnt].transform.localScale = new Vector3(cubeSize, cubeSize, cubeSize);
  774. mDogu[doguCnt].ido = 1;
  775. }
  776. GUI.enabled = true;
  777. if (kankyoCombo.isClickedComboButton)
  778. {
  779. GUI.enabled = false;
  780. }
  781. itemIndexB =
  782. itemCombo2.List(new Rect(GetPix(51),
  783. GetPix(55),
  784. GetPix(100),
  785. GetPix(23)),
  786. itemCombo2List[itemIndexB].text,
  787. itemCombo2List,
  788. buttonStyle,
  789. "box",
  790. listStyle3);
  791. if (GUI.Button(new Rect(GetPix(156), GetPix(55), GetPix(38), GetPix(23)),
  792. "追加",
  793. style2))
  794. {
  795. string str = itemBArray[itemIndexB].Split(',')[1];
  796. byte[] f_byBuf = null;
  797. using (AFileBase afileBase = GameUty.FileOpen(str, null))
  798. {
  799. NDebug.Assert(afileBase.IsValid(), "メニューファイルが存在しません。 :" + str);
  800. if (f_byBuf == null || f_byBuf.Length < afileBase.GetSize())
  801. {
  802. f_byBuf = new byte[afileBase.GetSize()];
  803. }
  804. afileBase.Read(ref f_byBuf, afileBase.GetSize());
  805. }
  806. string[] filename2 = ProcScriptBin(f_byBuf);
  807. GameObject gameObject = ImportCM2.LoadSkinMesh_R(filename2[0], filename2, 1);
  808. doguBObject.Add(gameObject);
  809. gameObject.name = str;
  810. Vector3 zero1 = Vector3.zero;
  811. Vector3 zero2 = Vector3.zero;
  812. zero1.z = 0.4f;
  813. switch (itemIndexB)
  814. {
  815. case 0:
  816. zero2.z = 90f;
  817. zero1.y = 0.04f;
  818. goto case 19;
  819. case 1:
  820. zero2.z = 90f;
  821. goto case 19;
  822. case 4:
  823. zero2.x = 90f;
  824. goto case 19;
  825. case 19:
  826. case 20:
  827. case 21:
  828. case 22:
  829. case 23:
  830. switch (gameObject.name)
  831. {
  832. case "HandItemL_Etoile_Saucer_I_.menu":
  833. case "HandItemL_Karte_I_.menu":
  834. case "HandItemL_Katuramuki_Daikon_I_.menu":
  835. case "HandItemR_BeerBottle(cap_off)_I_.menu":
  836. case "HandItemR_BeerBottle(cap_on)_I_.menu":
  837. case "HandItemR_BeerGlass_I_.menu":
  838. case "HandItemR_Etoile_Teacup_I_.menu":
  839. case "HandItemR_Jyouro_I_.menu":
  840. case "HandItemR_Ketchup_I_.menu":
  841. case "HandItemR_Kobin_I_.menu":
  842. case "HandItemR_MelonSoda_I_.menu":
  843. case "HandItemR_MilkBottle(cap_off)_I_.menu":
  844. case "HandItemR_MilkBottle(cap_on)_I_.menu":
  845. case "HandItemR_Mugcup_I_.menu":
  846. case "HandItemR_Natumikan_I_.menu":
  847. case "HandItemR_Nei_Heartful_I_.menu":
  848. case "HandItemR_Ochoko_I_.menu":
  849. case "HandItemR_Shaker_I_.menu":
  850. case "HandItemR_SmartPhone_I_.menu":
  851. case "HandItemR_Suika_I_.menu":
  852. case "HandItemR_Tomato_I_.menu":
  853. case "HandItemR_TropicalGlass_I_.menu":
  854. case "HandItemR_cocktail_blue_I_.menu":
  855. case "HandItemR_cocktail_red_I_.menu":
  856. case "HandItemR_cocktail_yellow_I_.menu":
  857. case "HandItemR_smoothie_green_I_.menu":
  858. case "HandItemR_smoothie_red_I_.menu":
  859. zero2.x = 0.0f;
  860. zero2.z = 90f;
  861. break;
  862. case "HandItemL_Karaoke_Mike_I_.menu":
  863. case "HandItemR_Crops_Suika_I_.menu":
  864. case "HandItemR_Curry_I_.menu":
  865. case "HandItemR_DVD1_I_.menu":
  866. case "HandItemR_DVD2_I_.menu":
  867. case "HandItemR_DVD3_I_.menu":
  868. case "HandItemR_DVD4_I_.menu":
  869. case "HandItemR_DVD5_I_.menu":
  870. case "HandItemR_Folk_I_.menu":
  871. case "HandItemR_Hanabi_I_.menu":
  872. case "HandItemR_Kushiyaki_I_.menu":
  873. case "HandItemR_Ninjin_I_.menu":
  874. case "HandItemR_Omurice1_I_.menu":
  875. case "HandItemR_Omurice2_I_.menu":
  876. case "HandItemR_Omurice3_I_.menu":
  877. case "HandItemR_Pasta_I_.menu":
  878. case "HandItemR_Satumaimo_I_.menu":
  879. case "HandItemR_Scoop_I_.menu":
  880. case "HandItemR_Senkouhanabi_I_.menu":
  881. case "HandItemR_Shell_I_.menu":
  882. case "HandItemR_Spoon_Curry_I_.menu":
  883. case "HandItemR_Spoon_Omurice_I_.menu":
  884. case "HandItemR_Tomorokoshi_I_.menu":
  885. case "HandItemR_Tomorokoshi_yaki_I_.menu":
  886. case "HandItemR_Uchiwa_I_.menu":
  887. zero2.z = 90f;
  888. break;
  889. }
  890. gameObject.transform.localPosition = zero1;
  891. gameObject.transform.localRotation = Quaternion.Euler(zero2);
  892. doguCnt = doguBObject.Count - 1;
  893. gDogu[doguCnt] = GameObject.CreatePrimitive(PrimitiveType.Cube);
  894. gDogu[doguCnt].GetComponent<Renderer>().material = m_material;
  895. gDogu[doguCnt].layer = 8;
  896. gDogu[doguCnt].GetComponent<Renderer>().enabled = false;
  897. gDogu[doguCnt].SetActive(false);
  898. gDogu[doguCnt].transform.position = gameObject.transform.position;
  899. mDogu[doguCnt] = gDogu[doguCnt].AddComponent<MouseDrag6>();
  900. mDogu[doguCnt].isScale = false;
  901. mDogu[doguCnt].obj = gDogu[doguCnt];
  902. mDogu[doguCnt].maid = gameObject;
  903. mDogu[doguCnt].angles = gameObject.transform.eulerAngles;
  904. gDogu[doguCnt].transform.localScale = new Vector3(cubeSize, cubeSize, cubeSize);
  905. mDogu[doguCnt].ido = 1;
  906. break;
  907. case 25:
  908. zero2.z = 90f;
  909. goto case 19;
  910. case 26:
  911. zero2.z = 90f;
  912. goto case 19;
  913. case 27:
  914. zero2.z = 90f;
  915. goto case 19;
  916. default:
  917. zero2.x = -90f;
  918. goto case 19;
  919. }
  920. }
  921. GUI.enabled = true;
  922. if (nameFlg)
  923. {
  924. inName2 = GUI.TextField(new Rect(GetPix(5),
  925. GetPix(27),
  926. GetPix(100),
  927. GetPix(20)),
  928. inName2);
  929. if (GUI.Button(new Rect(GetPix(110),
  930. GetPix(27),
  931. GetPix(35),
  932. GetPix(20)),
  933. "更新",
  934. style2))
  935. {
  936. nameFlg = false;
  937. GameMain.Instance.SoundMgr.PlaySe("se002.ogg", false);
  938. Preferences["kankyo"]["kankyo" + (kankyoCombo.selectedItemIndex + 1)].Value = inName2;
  939. SaveConfig();
  940. kankyoComboList = new GUIContent[kankyoMax];
  941. for (int index = 0; index < kankyoMax; ++index)
  942. {
  943. IniKey iniKey = Preferences["kankyo"]["kankyo" + (index + 1)];
  944. kankyoComboList[index] = new GUIContent(iniKey.Value);
  945. }
  946. }
  947. }
  948. else
  949. {
  950. if (GUI.Button(new Rect(GetPix(180),
  951. GetPix(27),
  952. GetPix(24),
  953. GetPix(20)),
  954. "名",
  955. style2))
  956. {
  957. nameFlg = true;
  958. inName2 = kankyoComboList[kankyoIndex].text;
  959. }
  960. kankyoIndex =
  961. kankyoCombo.List(new Rect(GetPix(4),
  962. GetPix(27),
  963. GetPix(91),
  964. GetPix(23)),
  965. kankyoComboList[kankyoIndex].text,
  966. kankyoComboList,
  967. buttonStyle,
  968. "box",
  969. listStyle3);
  970. if (GUI.Button(new Rect(GetPix(100),
  971. GetPix(27),
  972. GetPix(35),
  973. GetPix(20)),
  974. "保存",
  975. style2))
  976. {
  977. saveScene = 10000 + kankyoIndex;
  978. saveScene2 = saveScene;
  979. GameMain.Instance.SoundMgr.PlaySe("se002.ogg", false);
  980. try
  981. {
  982. thum_byte_to_base64_ = string.Empty;
  983. thum_file_path_ = Path.Combine(Path.GetTempPath(), "cm3d2_" + Guid.NewGuid().ToString() + ".png");
  984. GameMain.Instance.MainCamera.ScreenShot(thum_file_path_, 1, false);
  985. }
  986. catch { }
  987. }
  988. GUI.enabled = false;
  989. IniKey iniKey = Preferences["scene"]["s" + (10000 + kankyoIndex)];
  990. if (iniKey.Value != null && iniKey.Value.ToString() != "")
  991. {
  992. GUI.enabled = true;
  993. }
  994. if (GUI.Button(new Rect(GetPix(140),
  995. GetPix(27),
  996. GetPix(35),
  997. GetPix(20)),
  998. "読込",
  999. style2))
  1000. {
  1001. loadScene = 10000 + kankyoIndex;
  1002. kankyoLoadFlg = true;
  1003. GameMain.Instance.SoundMgr.PlaySe("se002.ogg", false);
  1004. }
  1005. }
  1006. GUI.enabled = true;
  1007. GUI.DragWindow();
  1008. if (num1 == slotIndex)
  1009. {
  1010. return;
  1011. }
  1012. slotIndex = num1;
  1013. sortList.Clear();
  1014. bg2ScrollPos = new Vector2(0.0f, 0.0f);
  1015. if (itemDataList.Count == 0)
  1016. {
  1017. #region menu files
  1018. foreach (string menuFile in GameUty.MenuFiles)
  1019. {
  1020. string fileName = Path.GetFileName(menuFile);
  1021. byte[] buf;
  1022. using (AFileBase aFileBase = GameUty.FileOpen(menuFile))
  1023. {
  1024. if (!aFileBase.IsValid())
  1025. {
  1026. continue;
  1027. }
  1028. buf = aFileBase.ReadAll();
  1029. }
  1030. ItemData item = new ItemData() { menu = fileName };
  1031. BinaryReader binaryReader = new BinaryReader(new MemoryStream(buf), Encoding.UTF8);
  1032. if (binaryReader.ReadString() != "CM3D2_MENU")
  1033. {
  1034. binaryReader.Close();
  1035. }
  1036. else
  1037. {
  1038. try
  1039. {
  1040. binaryReader.ReadInt32();
  1041. binaryReader.ReadString();
  1042. item.name = binaryReader.ReadString();
  1043. item.category = binaryReader.ReadString();
  1044. binaryReader.ReadString();
  1045. binaryReader.ReadInt32();
  1046. bool run = true;
  1047. do
  1048. {
  1049. int size;
  1050. do
  1051. {
  1052. size = binaryReader.ReadByte();
  1053. } while (size == 0);
  1054. for (int index = 0; index < size; ++index)
  1055. {
  1056. string header = binaryReader.ReadString();
  1057. if (header == "icons" || header == "icon")
  1058. {
  1059. run = false;
  1060. item.icon = binaryReader.ReadString();
  1061. break;
  1062. }
  1063. if (header == "priority")
  1064. {
  1065. int.TryParse(binaryReader.ReadString(), out item.priority);
  1066. break;
  1067. }
  1068. }
  1069. } while (run);
  1070. itemDataList.Add(item);
  1071. }
  1072. catch { }
  1073. binaryReader.Close();
  1074. }
  1075. }
  1076. #endregion
  1077. #region mod files
  1078. foreach (string modFile in Menu.GetModFiles())
  1079. {
  1080. byte[] buf = null;
  1081. try
  1082. {
  1083. using (FileStream fileStream = new FileStream(modFile, FileMode.Open))
  1084. {
  1085. if (fileStream == null)
  1086. {
  1087. continue;
  1088. }
  1089. buf = new byte[fileStream.Length];
  1090. fileStream.Read(buf, 0, (int)fileStream.Length);
  1091. }
  1092. }
  1093. catch { }
  1094. if (buf == null)
  1095. {
  1096. continue;
  1097. }
  1098. ItemData item = new ItemData()
  1099. {
  1100. isOfficialMod = true,
  1101. menu = modFile,
  1102. priority = 1000
  1103. };
  1104. BinaryReader binaryReader = new BinaryReader(new MemoryStream(buf), Encoding.UTF8);
  1105. if (binaryReader.ReadString() != "CM3D2_MOD")
  1106. {
  1107. binaryReader.Close();
  1108. }
  1109. else
  1110. {
  1111. try
  1112. {
  1113. binaryReader.ReadInt32();
  1114. string iconName = binaryReader.ReadString();
  1115. string baseItemPath = binaryReader.ReadString().Replace(":", " ");
  1116. item.baseItem = Path.GetFileName(baseItemPath);
  1117. item.name = binaryReader.ReadString();
  1118. item.category = binaryReader.ReadString();
  1119. binaryReader.ReadString();
  1120. string mpnValue = binaryReader.ReadString();
  1121. MPN mpn = MPN.null_mpn;
  1122. try
  1123. {
  1124. mpn = (MPN)Enum.Parse(typeof(MPN), mpnValue, true);
  1125. }
  1126. catch
  1127. {
  1128. binaryReader.Close();
  1129. continue;
  1130. }
  1131. if (mpn != MPN.null_mpn)
  1132. {
  1133. binaryReader.ReadString();
  1134. }
  1135. binaryReader.ReadString();
  1136. int size = binaryReader.ReadInt32();
  1137. for (int i = 0; i < size; i++)
  1138. {
  1139. string key = binaryReader.ReadString();
  1140. int count = binaryReader.ReadInt32();
  1141. byte[] data = binaryReader.ReadBytes(count);
  1142. if (string.Equals(key, iconName, StringComparison.InvariantCultureIgnoreCase))
  1143. {
  1144. Texture2D tex = new Texture2D(1, 1, TextureFormat.RGBA32, false);
  1145. tex.LoadImage(data);
  1146. item.tex = tex;
  1147. break;
  1148. }
  1149. }
  1150. itemDataList.Add(item);
  1151. }
  1152. catch { }
  1153. binaryReader.Close();
  1154. }
  1155. }
  1156. #endregion
  1157. }
  1158. if (slotIndex == 0)
  1159. {
  1160. return;
  1161. }
  1162. foreach (ItemData itemData in itemDataList)
  1163. {
  1164. if (itemData.category == slotArray[slotIndex] && itemData.priority > 0)
  1165. {
  1166. sortList.Add(new SortItem()
  1167. {
  1168. category = itemData.category,
  1169. priority = itemData.priority,
  1170. name = itemData.name,
  1171. icon = itemData.icon,
  1172. menu = itemData.menu,
  1173. tex = itemData.tex,
  1174. isOfficialMod = itemData.isOfficialMod,
  1175. baseItem = itemData.baseItem
  1176. });
  1177. }
  1178. }
  1179. IOrderedEnumerable<SortItem> sortedItemList = sortList
  1180. .OrderBy(item => item.priority)
  1181. .ThenBy(item => item.name);
  1182. List<SortItem> sortItemList = new List<SortItem>();
  1183. string previousMenu = "";
  1184. foreach (SortItem item in sortedItemList)
  1185. {
  1186. try
  1187. {
  1188. if (item.menu != previousMenu)
  1189. {
  1190. if (item.tex == null)
  1191. {
  1192. byte[] data = ImportCM.LoadTexture(GameUty.FileSystem, item.icon, false).data;
  1193. Texture2D texture2D = new Texture2D(50, 50, TextureFormat.RGB565, false);
  1194. texture2D.LoadImage(data);
  1195. item.tex = texture2D;
  1196. }
  1197. previousMenu = item.menu;
  1198. sortItemList.Add(item);
  1199. }
  1200. }
  1201. catch { }
  1202. }
  1203. sortList = sortItemList;
  1204. }
  1205. private void BGSelectWindow(int winID)
  1206. {
  1207. GUIStyle guistyle = "label";
  1208. guistyle.fontSize = GetPix(12);
  1209. guistyle.alignment = TextAnchor.UpperLeft;
  1210. GUIStyle guistyle2 = "label";
  1211. guistyle2.fontSize = GetPix(11);
  1212. guistyle2.alignment = TextAnchor.UpperLeft;
  1213. GUIStyle guistyle3 = "button";
  1214. guistyle3.fontSize = GetPix(20);
  1215. GUIStyle guistyle4 = "button";
  1216. guistyle4.fontSize = GetPix(14);
  1217. guistyle4.alignment = TextAnchor.MiddleLeft;
  1218. GUIStyle guistyle5 = "button";
  1219. guistyle5.fontSize = GetPix(12);
  1220. guistyle5.alignment = TextAnchor.MiddleLeft;
  1221. GUIStyle guistyle6 = new GUIStyle("toggle")
  1222. {
  1223. fontSize = GetPix(13)
  1224. };
  1225. CharacterMgr characterMgr = GameMain.Instance.CharacterMgr;
  1226. Maid maid = maidArray[selectMaidIndex];
  1227. if (!kankyoInitFlg)
  1228. {
  1229. listStyle2.normal.textColor = Color.white;
  1230. listStyle2.normal.background = MakeTex(2, 2, new Color(0f, 0f, 0f, 0.5f));
  1231. listStyle2.onHover.background = listStyle2.hover.background = new Texture2D(2, 2);
  1232. RectOffset padding = listStyle2.padding;
  1233. RectOffset padding2 = listStyle2.padding;
  1234. RectOffset padding3 = listStyle2.padding;
  1235. int num = listStyle2.padding.bottom = GetPix(0);
  1236. num = padding3.top = num;
  1237. num = padding2.right = num;
  1238. padding.left = num;
  1239. listStyle2.fontSize = GetPix(11);
  1240. listStyle3.normal.textColor = Color.white;
  1241. listStyle3.normal.background = MakeTex(2, 2, new Color(0f, 0f, 0f, 0.5f));
  1242. listStyle3.onHover.background = listStyle3.hover.background = new Texture2D(2, 2);
  1243. RectOffset padding4 = listStyle3.padding;
  1244. RectOffset padding5 = listStyle3.padding;
  1245. num = listStyle3.padding.top = GetPix(0);
  1246. num = padding5.right = num;
  1247. padding4.left = num;
  1248. listStyle3.padding.bottom = GetPix(0);
  1249. listStyle3.fontSize = GetPix(12);
  1250. bgmCombo.selectedItemIndex = bgmIndex;
  1251. if (sceneLevel == 5)
  1252. {
  1253. bgmCombo.selectedItemIndex = 2;
  1254. }
  1255. bgmComboList = bgmArray.Select(s => dancesDict.TryGetValue(s, out string name) ? name : s).Select(s => new GUIContent(s)).ToArray();
  1256. bgCombo.selectedItemIndex = bgIndex;
  1257. bgComboList = new GUIContent[bgArray.Length];
  1258. for (int j = 0; j < bgArray.Length; j++)
  1259. {
  1260. // Dicts merged during init
  1261. if (bgDict.TryGetValue(bgArray[j], out string name))
  1262. {
  1263. bgComboList[j] = new GUIContent(name);
  1264. }
  1265. else
  1266. {
  1267. bgComboList[j] = new GUIContent(bgArray[j]);
  1268. }
  1269. }
  1270. doguCombo.selectedItemIndex = 0;
  1271. doguComboList = new GUIContent[doguBArray.Length];
  1272. for (int j = 0; j < doguComboList.Length; j++)
  1273. {
  1274. // Dicts merged during init
  1275. if (doguUiNames.TryGetValue(doguBArray[j], out string name))
  1276. {
  1277. doguComboList[j] = new GUIContent(name);
  1278. }
  1279. else
  1280. {
  1281. doguComboList[j] = new GUIContent(doguBArray[j]);
  1282. }
  1283. }
  1284. parCombo.selectedItemIndex = 0;
  1285. parComboList = parArray.Select(s => parUiDict.TryGetValue(s, out string name) ? name : s).Select(s => new GUIContent(s)).ToArray();
  1286. lightCombo.selectedItemIndex = 0;
  1287. lightList = new List<GameObject>
  1288. {
  1289. GameMain.Instance.MainLight.gameObject
  1290. };
  1291. lightComboList = new GUIContent[lightList.Count];
  1292. for (int i = 0; i < lightList.Count; i++)
  1293. {
  1294. if (i == 0)
  1295. {
  1296. lightComboList[i] = new GUIContent("メイン");
  1297. }
  1298. else
  1299. {
  1300. lightComboList[i] = new GUIContent("追加" + i);
  1301. }
  1302. }
  1303. kankyoInitFlg = true;
  1304. }
  1305. listStyle3.padding.top = GetPix(1);
  1306. listStyle3.padding.bottom = GetPix(0);
  1307. listStyle3.fontSize = GetPix(12);
  1308. if (poseCombo.isClickedComboButton)
  1309. {
  1310. GUI.enabled = false;
  1311. }
  1312. if (poseGroupCombo.isClickedComboButton)
  1313. {
  1314. GUI.enabled = false;
  1315. }
  1316. if (sceneLevel == 3 || sceneLevel == 5 || isF6)
  1317. {
  1318. if (!isF6)
  1319. {
  1320. bool value = true;
  1321. if (faceFlg || poseFlg || sceneFlg || kankyoFlg || kankyo2Flg)
  1322. {
  1323. value = false;
  1324. }
  1325. if (GUI.Toggle(new Rect(GetPix(2),
  1326. GetPix(2),
  1327. GetPix(39),
  1328. GetPix(20)),
  1329. value,
  1330. "配置",
  1331. guistyle6))
  1332. {
  1333. faceFlg = false;
  1334. poseFlg = false;
  1335. sceneFlg = false;
  1336. kankyoFlg = false;
  1337. kankyo2Flg = false;
  1338. bGui = true;
  1339. }
  1340. }
  1341. if (!yotogiFlg)
  1342. {
  1343. if (GUI.Toggle(new Rect(GetPix(42),
  1344. GetPix(2),
  1345. GetPix(39),
  1346. GetPix(20)),
  1347. poseFlg,
  1348. "操作",
  1349. guistyle6))
  1350. {
  1351. poseFlg = true;
  1352. faceFlg = false;
  1353. sceneFlg = false;
  1354. kankyoFlg = false;
  1355. kankyo2Flg = false;
  1356. }
  1357. }
  1358. if (GUI.Toggle(new Rect(GetPix(82), GetPix(2), GetPix(39), GetPix(20)),
  1359. faceFlg,
  1360. "表情",
  1361. guistyle6))
  1362. {
  1363. faceFlg = true;
  1364. poseFlg = false;
  1365. sceneFlg = false;
  1366. kankyoFlg = false;
  1367. kankyo2Flg = false;
  1368. if (!faceFlg2)
  1369. {
  1370. isFaceInit = true;
  1371. faceFlg2 = true;
  1372. maidArray[selectMaidIndex].boMabataki = false;
  1373. faceCombo.selectedItemIndex = faceIndex[selectMaidIndex];
  1374. }
  1375. isFaceInit = true;
  1376. }
  1377. if (GUI.Toggle(new Rect(GetPix(122), GetPix(2), GetPix(39), GetPix(20)),
  1378. kankyoFlg,
  1379. "環境",
  1380. guistyle6))
  1381. {
  1382. poseFlg = false;
  1383. faceFlg = false;
  1384. sceneFlg = false;
  1385. kankyoFlg = true;
  1386. kankyo2Flg = false;
  1387. }
  1388. if (GUI.Toggle(new Rect(GetPix(162), GetPix(2), GetPix(39), GetPix(20)),
  1389. kankyo2Flg,
  1390. "環2",
  1391. guistyle6))
  1392. {
  1393. poseFlg = false;
  1394. faceFlg = false;
  1395. sceneFlg = false;
  1396. kankyoFlg = false;
  1397. kankyo2Flg = true;
  1398. }
  1399. if (!line1)
  1400. {
  1401. line1 = MakeTex(2, 2, new Color(0f, 0f, 0f, 0.3f));
  1402. line2 = MakeTex(2, 2, new Color(0.7f, 0.7f, 0.7f, 0.6f));
  1403. }
  1404. GUI.DrawTexture(new Rect(GetPix(5), GetPix(20), GetPix(200), 2f), line1);
  1405. GUI.DrawTexture(new Rect(GetPix(5), GetPix(20), GetPix(200), 1f), line2);
  1406. }
  1407. if (isDanceStop)
  1408. {
  1409. isStop[selectMaidIndex] = true;
  1410. isDanceStop = false;
  1411. }
  1412. yotogiFlg = false;
  1413. if (sceneLevel == 14)
  1414. {
  1415. if (GameObject.Find("/UI Root/YotogiPlayPanel/CommandViewer/SkillViewer/MaskGroup/SkillGroup/CommandParent/CommandUnit"))
  1416. {
  1417. yotogiFlg = true;
  1418. }
  1419. }
  1420. if (!isF6)
  1421. {
  1422. if (GUI.Button(new Rect(GetPix(157),
  1423. GetPix(32),
  1424. GetPix(46),
  1425. GetPix(35)),
  1426. "シーン\n 管 理",
  1427. guistyle3))
  1428. {
  1429. sceneFlg = true;
  1430. faceFlg = false;
  1431. poseFlg = false;
  1432. kankyoFlg = false;
  1433. kankyo2Flg = false;
  1434. bGui = true;
  1435. for (int i = 0; i < 10; i++)
  1436. {
  1437. date[i] = "未保存";
  1438. ninzu[i] = "";
  1439. IniKey iniKey = Preferences["scene"]["s" + (page * 10 + i + 1)];
  1440. if (iniKey.Value != null && iniKey.Value.ToString() != "")
  1441. {
  1442. string[] array = iniKey.Value.Split(new char[] { '_' });
  1443. if (array.Length >= 2)
  1444. {
  1445. string[] array2 = array[0].Split(new char[] { ',' });
  1446. date[i] = array2[0];
  1447. ninzu[i] = array2[1] + "人";
  1448. }
  1449. }
  1450. }
  1451. }
  1452. }
  1453. if (doguCombo.isClickedComboButton || parCombo.isClickedComboButton || bgCombo.isClickedComboButton
  1454. || bgmCombo.isClickedComboButton || lightCombo.isClickedComboButton)
  1455. {
  1456. GUI.enabled = false;
  1457. }
  1458. int num2 = -1;
  1459. if (lightIndex[selectLightIndex] == 0)
  1460. {
  1461. isIdx1 = true;
  1462. }
  1463. if (lightIndex[selectLightIndex] == 1)
  1464. {
  1465. isIdx2 = true;
  1466. }
  1467. if (lightIndex[selectLightIndex] == 2)
  1468. {
  1469. isIdx3 = true;
  1470. }
  1471. if (lightIndex[selectLightIndex] == 3)
  1472. {
  1473. isIdx4 = true;
  1474. }
  1475. int offsetTop = GetPix(80);
  1476. int UIHeight = GetPix(550);
  1477. Rect BGWindowScrollRect = new Rect(0, offsetTop, rectWin.width, rectWin.height - offsetTop);
  1478. Rect BGWindowScrollView = new Rect(0, offsetTop, rectWin.width - 20, UIHeight);
  1479. bgScrollPos = GUI.BeginScrollView(BGWindowScrollRect, bgScrollPos, BGWindowScrollView);
  1480. if (GUI.Toggle(new Rect(GetPix(5), GetPix(215), GetPix(45), GetPix(20)),
  1481. isIdx1,
  1482. "通常",
  1483. guistyle6))
  1484. {
  1485. if (lightIndex[selectLightIndex] != 0)
  1486. {
  1487. isIdx1 = true;
  1488. isIdx2 = false;
  1489. isIdx3 = false;
  1490. isIdx4 = false;
  1491. num2 = 0;
  1492. }
  1493. }
  1494. if (GUI.Toggle(new Rect(GetPix(50), GetPix(215), GetPix(45), GetPix(20)),
  1495. isIdx2,
  1496. "Spot",
  1497. guistyle6))
  1498. {
  1499. if (lightIndex[selectLightIndex] != 1)
  1500. {
  1501. isIdx1 = false;
  1502. isIdx2 = true;
  1503. isIdx3 = false;
  1504. isIdx4 = false;
  1505. num2 = 1;
  1506. }
  1507. }
  1508. if (GUI.Toggle(new Rect(GetPix(99), GetPix(215), GetPix(45), GetPix(20)),
  1509. isIdx3,
  1510. "Point",
  1511. guistyle6))
  1512. {
  1513. if (lightIndex[selectLightIndex] != 2)
  1514. {
  1515. isIdx1 = false;
  1516. isIdx2 = false;
  1517. isIdx3 = true;
  1518. isIdx4 = false;
  1519. num2 = 2;
  1520. }
  1521. }
  1522. if (selectLightIndex == 0)
  1523. {
  1524. if (GUI.Toggle(new Rect(GetPix(150),
  1525. GetPix(215),
  1526. GetPix(45),
  1527. GetPix(20)),
  1528. isIdx4,
  1529. "単色",
  1530. guistyle6))
  1531. {
  1532. if (lightIndex[selectLightIndex] != 3)
  1533. {
  1534. isIdx1 = false;
  1535. isIdx2 = false;
  1536. isIdx3 = false;
  1537. isIdx4 = true;
  1538. num2 = 3;
  1539. }
  1540. }
  1541. }
  1542. else if (GUI.Toggle(new Rect(GetPix(150),
  1543. GetPix(215),
  1544. GetPix(45),
  1545. GetPix(20)),
  1546. isIdx4,
  1547. "無効",
  1548. guistyle6))
  1549. {
  1550. if (lightIndex[selectLightIndex] != 3)
  1551. {
  1552. isIdx1 = false;
  1553. isIdx2 = false;
  1554. isIdx3 = false;
  1555. isIdx4 = true;
  1556. num2 = 3;
  1557. }
  1558. }
  1559. if (num2 >= 0)
  1560. {
  1561. lightIndex[selectLightIndex] = num2;
  1562. if (selectLightIndex == 0)
  1563. {
  1564. GameMain.Instance.MainLight.Reset();
  1565. GameMain.Instance.MainLight.SetIntensity(0.95f);
  1566. GameMain.Instance.MainLight.GetComponent<Light>().spotAngle = 50f;
  1567. GameMain.Instance.MainLight.GetComponent<Light>().range = 10f;
  1568. GameMain.Instance.MainLight.gameObject.transform.position = new Vector3(0f, 2f, 0f);
  1569. if (lightIndex[selectLightIndex] == 0)
  1570. {
  1571. GameMain.Instance.MainLight.GetComponent<Light>().type = LightType.Directional;
  1572. bgObject.SetActive(true);
  1573. mainCamera.GetComponent<Camera>().backgroundColor = new Color(0f, 0f, 0f);
  1574. }
  1575. else if (lightIndex[selectLightIndex] == 1)
  1576. {
  1577. GameMain.Instance.MainLight.transform.eulerAngles += Vector3.right * 40f;
  1578. GameMain.Instance.MainLight.GetComponent<Light>().type = LightType.Spot;
  1579. bgObject.SetActive(true);
  1580. mainCamera.GetComponent<Camera>().backgroundColor = new Color(0f, 0f, 0f);
  1581. }
  1582. else if (lightIndex[selectLightIndex] == 2)
  1583. {
  1584. GameMain.Instance.MainLight.GetComponent<Light>().type = LightType.Point;
  1585. bgObject.SetActive(true);
  1586. mainCamera.GetComponent<Camera>().backgroundColor = new Color(0f, 0f, 0f);
  1587. }
  1588. else if (lightIndex[selectLightIndex] == 3)
  1589. {
  1590. GameMain.Instance.MainLight.GetComponent<Light>().type = LightType.Directional;
  1591. mainCamera.GetComponent<Camera>().backgroundColor = new Color(lightColorR[0], lightColorG[0], lightColorB[0]);
  1592. bgObject.SetActive(false);
  1593. }
  1594. }
  1595. else
  1596. {
  1597. lightList[selectLightIndex].SetActive(true);
  1598. if (lightIndex[selectLightIndex] == 0)
  1599. {
  1600. lightList[selectLightIndex].GetComponent<Light>().type = LightType.Directional;
  1601. }
  1602. else if (lightIndex[selectLightIndex] == 1)
  1603. {
  1604. lightList[selectLightIndex].transform.eulerAngles += Vector3.right * 40f;
  1605. lightList[selectLightIndex].GetComponent<Light>().type = LightType.Spot;
  1606. }
  1607. else if (lightIndex[selectLightIndex] == 2)
  1608. {
  1609. lightList[selectLightIndex].GetComponent<Light>().type = LightType.Point;
  1610. }
  1611. else if (lightIndex[selectLightIndex] == 3)
  1612. {
  1613. lightList[selectLightIndex].GetComponent<Light>().type = LightType.Directional;
  1614. lightList[selectLightIndex].SetActive(false);
  1615. }
  1616. }
  1617. lightColorR[selectLightIndex] = 1f;
  1618. lightColorG[selectLightIndex] = 1f;
  1619. lightColorB[selectLightIndex] = 1f;
  1620. lightX[selectLightIndex] = 40f;
  1621. lightY[selectLightIndex] = 180f;
  1622. lightAkarusa[selectLightIndex] = 0.95f;
  1623. lightKage[selectLightIndex] = 0.098f;
  1624. lightRange[selectLightIndex] = 50f;
  1625. if (lightIndex[selectLightIndex] == 1)
  1626. {
  1627. lightX[selectLightIndex] = 90f;
  1628. }
  1629. }
  1630. GUI.Label(new Rect(GetPix(10), GetPix(138), GetPix(100), GetPix(25)),
  1631. "キューブ表示",
  1632. guistyle2);
  1633. guistyle6.fontSize = GetPix(12);
  1634. isCube2 = GUI.Toggle(new Rect(GetPix(5),
  1635. GetPix(153),
  1636. GetPix(55),
  1637. GetPix(20)),
  1638. isCube2,
  1639. "大道具(",
  1640. guistyle6);
  1641. if (!isF6)
  1642. {
  1643. isCube = GUI.Toggle(new Rect(GetPix(102),
  1644. GetPix(153),
  1645. GetPix(54),
  1646. GetPix(20)),
  1647. isCube,
  1648. "メイド",
  1649. guistyle6);
  1650. }
  1651. bool flag = GUI.Toggle(new Rect(GetPix(160),
  1652. GetPix(153),
  1653. GetPix(44),
  1654. GetPix(20)),
  1655. isCube3,
  1656. "背景",
  1657. guistyle6);
  1658. guistyle6.fontSize = GetPix(13);
  1659. bool flag2 = GUI.Toggle(new Rect(GetPix(61),
  1660. GetPix(153),
  1661. GetPix(38),
  1662. GetPix(20)),
  1663. isCubeS,
  1664. "小)",
  1665. guistyle6);
  1666. if (isCubeS != flag2)
  1667. {
  1668. isCubeS = flag2;
  1669. if (isCubeS)
  1670. {
  1671. cubeSize = 0.05f;
  1672. }
  1673. else
  1674. {
  1675. cubeSize = 0.12f;
  1676. }
  1677. for (int i = 0; i < doguBObject.Count; i++)
  1678. {
  1679. gDogu[i].transform.localScale = new Vector3(cubeSize, cubeSize, cubeSize);
  1680. }
  1681. }
  1682. if (isCube3 != flag)
  1683. {
  1684. isCube3 = flag;
  1685. if (gBg == null)
  1686. {
  1687. gBg = GameObject.CreatePrimitive(PrimitiveType.Cube);
  1688. gBg.GetComponent<Renderer>().material = m_material;
  1689. gBg.layer = 8;
  1690. gBg.GetComponent<Renderer>().enabled = false;
  1691. gBg.SetActive(false);
  1692. gBg.transform.position = bgObject.transform.position;
  1693. mBg = gBg.AddComponent<MouseDrag6>();
  1694. mBg.obj = gBg;
  1695. mBg.maid = bgObject;
  1696. mBg.angles = bg.eulerAngles;
  1697. gBg.transform.localScale = new Vector3(0.12f, 0.12f, 0.12f);
  1698. mBg.ido = 1;
  1699. mBg.isScale = false;
  1700. }
  1701. if (isCube3)
  1702. {
  1703. gBg.SetActive(true);
  1704. }
  1705. else
  1706. {
  1707. gBg.SetActive(false);
  1708. }
  1709. }
  1710. int num3 = 0;
  1711. if (lightIndex[selectLightIndex] == 0 || lightIndex[selectLightIndex] == 1
  1712. || (selectLightIndex == 0 && lightIndex[selectLightIndex] == 3))
  1713. {
  1714. GUI.Label(new Rect(GetPix(10), GetPix(237), GetPix(100), GetPix(25)),
  1715. "向きX",
  1716. guistyle2);
  1717. lightX[selectLightIndex] =
  1718. GUI.HorizontalSlider(new Rect(GetPix(8),
  1719. GetPix(251),
  1720. GetPix(192),
  1721. GetPix(20)),
  1722. lightX[selectLightIndex],
  1723. 220f,
  1724. -140f);
  1725. GUI.Label(new Rect(GetPix(10), GetPix(261), GetPix(100), GetPix(25)),
  1726. "向きY",
  1727. guistyle2);
  1728. lightY[selectLightIndex] =
  1729. GUI.HorizontalSlider(new Rect(GetPix(8),
  1730. GetPix(275),
  1731. GetPix(192),
  1732. GetPix(20)),
  1733. lightY[selectLightIndex],
  1734. 0f,
  1735. 360f);
  1736. }
  1737. else
  1738. {
  1739. num3 = 50;
  1740. }
  1741. if (lightIndex[selectLightIndex] != 3 || selectLightIndex <= 0)
  1742. {
  1743. GUI.Label(new Rect(GetPix(10),
  1744. GetPix(285 - num3),
  1745. GetPix(100),
  1746. GetPix(25)),
  1747. "明るさ",
  1748. guistyle2);
  1749. lightAkarusa[selectLightIndex] =
  1750. GUI.HorizontalSlider(new Rect(GetPix(8),
  1751. GetPix(299 - num3),
  1752. GetPix(192),
  1753. GetPix(20)),
  1754. lightAkarusa[selectLightIndex],
  1755. 0f,
  1756. 1.9f);
  1757. if (lightIndex[selectLightIndex] == 0 || lightIndex[selectLightIndex] == 3)
  1758. {
  1759. if (selectLightIndex == 0)
  1760. {
  1761. GUI.Label(new Rect(GetPix(10),
  1762. GetPix(309 - num3),
  1763. GetPix(100),
  1764. GetPix(25)),
  1765. "影",
  1766. guistyle2);
  1767. lightKage[selectLightIndex] =
  1768. GUI.HorizontalSlider(new Rect(GetPix(8),
  1769. GetPix(323 - num3),
  1770. GetPix(192),
  1771. GetPix(20)),
  1772. lightKage[selectLightIndex],
  1773. 0f,
  1774. 1f);
  1775. }
  1776. else
  1777. {
  1778. num3 = 25;
  1779. }
  1780. }
  1781. else if (lightIndex[selectLightIndex] == 1 || lightIndex[selectLightIndex] == 2)
  1782. {
  1783. GUI.Label(new Rect(GetPix(10),
  1784. GetPix(311 - num3),
  1785. GetPix(100),
  1786. GetPix(25)),
  1787. "範囲",
  1788. guistyle2);
  1789. lightRange[selectLightIndex] =
  1790. GUI.HorizontalSlider(new Rect(GetPix(8),
  1791. GetPix(325 - num3),
  1792. GetPix(192),
  1793. GetPix(20)),
  1794. lightRange[selectLightIndex],
  1795. 0f,
  1796. 150f);
  1797. }
  1798. else
  1799. {
  1800. num3 = 75;
  1801. }
  1802. GUI.Label(new Rect(GetPix(10),
  1803. GetPix(333 - num3),
  1804. GetPix(100),
  1805. GetPix(25)),
  1806. "赤",
  1807. guistyle2);
  1808. lightColorR[selectLightIndex] =
  1809. GUI.HorizontalSlider(new Rect(GetPix(8),
  1810. GetPix(347 - num3),
  1811. GetPix(92),
  1812. GetPix(20)),
  1813. lightColorR[selectLightIndex],
  1814. 0f,
  1815. 1f);
  1816. GUI.Label(new Rect(GetPix(108),
  1817. GetPix(333 - num3),
  1818. GetPix(100),
  1819. GetPix(25)),
  1820. "緑",
  1821. guistyle2);
  1822. lightColorG[selectLightIndex] =
  1823. GUI.HorizontalSlider(new Rect(GetPix(108),
  1824. GetPix(347 - num3),
  1825. GetPix(92),
  1826. GetPix(20)),
  1827. lightColorG[selectLightIndex],
  1828. 0f,
  1829. 1f);
  1830. GUI.Label(new Rect(GetPix(10),
  1831. GetPix(357 - num3),
  1832. GetPix(100),
  1833. GetPix(25)),
  1834. "青",
  1835. guistyle2);
  1836. lightColorB[selectLightIndex] =
  1837. GUI.HorizontalSlider(new Rect(GetPix(8),
  1838. GetPix(371 - num3),
  1839. GetPix(92),
  1840. GetPix(20)),
  1841. lightColorB[selectLightIndex],
  1842. 0f,
  1843. 1f);
  1844. }
  1845. if (GUI.Toggle(new Rect(GetPix(5), GetPix(391), GetPix(67), GetPix(20)),
  1846. isBloomS,
  1847. "ブルーム",
  1848. guistyle6))
  1849. {
  1850. isBloomS = true;
  1851. isDepthS = false;
  1852. isBlurS = false;
  1853. isFogS = false;
  1854. }
  1855. if (isBloomS)
  1856. {
  1857. isBloom = GUI.Toggle(new Rect(GetPix(8),
  1858. GetPix(412),
  1859. GetPix(40),
  1860. GetPix(20)),
  1861. isBloom,
  1862. "有効",
  1863. guistyle6);
  1864. if (!isBloom)
  1865. {
  1866. GUI.enabled = false;
  1867. }
  1868. GUI.Label(new Rect(GetPix(10), GetPix(430), GetPix(100), GetPix(25)),
  1869. "強さ",
  1870. guistyle2);
  1871. bloom1 = GUI.HorizontalSlider(new Rect(GetPix(8),
  1872. GetPix(445),
  1873. GetPix(92),
  1874. GetPix(20)),
  1875. bloom1,
  1876. 0f,
  1877. 5.7f);
  1878. GUI.Label(new Rect(GetPix(110), GetPix(430), GetPix(100), GetPix(25)),
  1879. "広さ",
  1880. guistyle2);
  1881. bloom2 = GUI.HorizontalSlider(new Rect(GetPix(108),
  1882. GetPix(445),
  1883. GetPix(92),
  1884. GetPix(20)),
  1885. bloom2,
  1886. 0f,
  1887. 15f);
  1888. GUI.Label(new Rect(GetPix(10), GetPix(455), GetPix(100), GetPix(25)),
  1889. "赤",
  1890. guistyle2);
  1891. bloom3 = GUI.HorizontalSlider(new Rect(GetPix(8),
  1892. GetPix(470),
  1893. GetPix(92),
  1894. GetPix(20)),
  1895. bloom3,
  1896. 0f,
  1897. 0.5f);
  1898. GUI.Label(new Rect(GetPix(110), GetPix(455), GetPix(100), GetPix(25)),
  1899. "緑",
  1900. guistyle2);
  1901. bloom4 = GUI.HorizontalSlider(new Rect(GetPix(108),
  1902. GetPix(470),
  1903. GetPix(92),
  1904. GetPix(20)),
  1905. bloom4,
  1906. 0f,
  1907. 0.5f);
  1908. GUI.Label(new Rect(GetPix(10), GetPix(480), GetPix(100), GetPix(25)),
  1909. "青",
  1910. guistyle2);
  1911. bloom5 = GUI.HorizontalSlider(new Rect(GetPix(8),
  1912. GetPix(495),
  1913. GetPix(92),
  1914. GetPix(20)),
  1915. bloom5,
  1916. 0f,
  1917. 0.5f);
  1918. isBloomA = GUI.Toggle(new Rect(GetPix(110),
  1919. GetPix(491),
  1920. GetPix(50),
  1921. GetPix(20)),
  1922. isBloomA,
  1923. "HDR",
  1924. guistyle6);
  1925. if (!doguCombo.isClickedComboButton && !parCombo.isClickedComboButton && !bgCombo.isClickedComboButton
  1926. && !bgmCombo.isClickedComboButton)
  1927. {
  1928. GUI.enabled = true;
  1929. }
  1930. }
  1931. if (GUI.Toggle(new Rect(GetPix(73), GetPix(391), GetPix(40), GetPix(20)),
  1932. isDepthS,
  1933. "深度",
  1934. guistyle6))
  1935. {
  1936. isBloomS = false;
  1937. isDepthS = true;
  1938. isBlurS = false;
  1939. isFogS = false;
  1940. }
  1941. if (isDepthS)
  1942. {
  1943. isDepth = GUI.Toggle(new Rect(GetPix(8),
  1944. GetPix(412),
  1945. GetPix(40),
  1946. GetPix(20)),
  1947. isDepth,
  1948. "有効",
  1949. guistyle6);
  1950. if (!isDepth)
  1951. {
  1952. GUI.enabled = false;
  1953. }
  1954. GUI.Label(new Rect(GetPix(10), GetPix(430), GetPix(100), GetPix(25)),
  1955. "焦点距離",
  1956. guistyle2);
  1957. depth1 = GUI.HorizontalSlider(new Rect(GetPix(8),
  1958. GetPix(445),
  1959. GetPix(192),
  1960. GetPix(20)),
  1961. depth1,
  1962. 0f,
  1963. 10f);
  1964. GUI.Label(new Rect(GetPix(10), GetPix(455), GetPix(100), GetPix(25)),
  1965. "焦点領域サイズ",
  1966. guistyle2);
  1967. depth2 = GUI.HorizontalSlider(new Rect(GetPix(8),
  1968. GetPix(470),
  1969. GetPix(92),
  1970. GetPix(20)),
  1971. depth2,
  1972. 0f,
  1973. 2f);
  1974. GUI.Label(new Rect(GetPix(110), GetPix(455), GetPix(100), GetPix(25)),
  1975. "カメラ絞り",
  1976. guistyle2);
  1977. depth3 = GUI.HorizontalSlider(new Rect(GetPix(108),
  1978. GetPix(470),
  1979. GetPix(92),
  1980. GetPix(20)),
  1981. depth3,
  1982. 0f,
  1983. 60f);
  1984. GUI.Label(new Rect(GetPix(10), GetPix(480), GetPix(100), GetPix(25)),
  1985. "ブレ",
  1986. guistyle2);
  1987. depth4 = GUI.HorizontalSlider(new Rect(GetPix(8),
  1988. GetPix(495),
  1989. GetPix(92),
  1990. GetPix(20)),
  1991. depth4,
  1992. 0f,
  1993. 10f);
  1994. isDepthA = GUI.Toggle(new Rect(GetPix(110),
  1995. GetPix(491),
  1996. GetPix(100),
  1997. GetPix(20)),
  1998. isDepthA,
  1999. "深度表示",
  2000. guistyle6);
  2001. if (!doguCombo.isClickedComboButton && !parCombo.isClickedComboButton && !bgCombo.isClickedComboButton
  2002. && !bgmCombo.isClickedComboButton)
  2003. {
  2004. GUI.enabled = true;
  2005. }
  2006. }
  2007. if (GUI.Toggle(new Rect(GetPix(114), GetPix(391), GetPix(40), GetPix(20)),
  2008. isBlurS,
  2009. "光学",
  2010. guistyle6))
  2011. {
  2012. isBloomS = false;
  2013. isDepthS = false;
  2014. isBlurS = true;
  2015. isFogS = false;
  2016. }
  2017. if (isBlurS)
  2018. {
  2019. isBlur = GUI.Toggle(new Rect(GetPix(8),
  2020. GetPix(412),
  2021. GetPix(40),
  2022. GetPix(20)),
  2023. isBlur,
  2024. "有効",
  2025. guistyle6);
  2026. if (!isBlur)
  2027. {
  2028. GUI.enabled = false;
  2029. }
  2030. GUI.Label(new Rect(GetPix(10), GetPix(430), GetPix(100), GetPix(25)),
  2031. "強さ",
  2032. guistyle2);
  2033. blur1 = GUI.HorizontalSlider(new Rect(GetPix(8),
  2034. GetPix(445),
  2035. GetPix(92),
  2036. GetPix(20)),
  2037. blur1,
  2038. -40f,
  2039. 70f);
  2040. GUI.Label(new Rect(GetPix(108), GetPix(430), GetPix(100), GetPix(25)),
  2041. "ブラー",
  2042. guistyle2);
  2043. blur2 = GUI.HorizontalSlider(new Rect(GetPix(108),
  2044. GetPix(445),
  2045. GetPix(92),
  2046. GetPix(20)),
  2047. blur2,
  2048. 0f,
  2049. 5f);
  2050. GUI.Label(new Rect(GetPix(10), GetPix(455), GetPix(100), GetPix(25)),
  2051. "ブレ",
  2052. guistyle2);
  2053. blur3 = GUI.HorizontalSlider(new Rect(GetPix(8),
  2054. GetPix(470),
  2055. GetPix(92),
  2056. GetPix(20)),
  2057. blur3,
  2058. 0f,
  2059. 40f);
  2060. GUI.Label(new Rect(GetPix(108), GetPix(455), GetPix(100), GetPix(25)),
  2061. "色収差",
  2062. guistyle2);
  2063. blur4 = GUI.HorizontalSlider(new Rect(GetPix(108),
  2064. GetPix(470),
  2065. GetPix(92),
  2066. GetPix(20)),
  2067. blur4,
  2068. -30f,
  2069. 30f);
  2070. if (!doguCombo.isClickedComboButton && !parCombo.isClickedComboButton && !bgCombo.isClickedComboButton
  2071. && !bgmCombo.isClickedComboButton)
  2072. {
  2073. GUI.enabled = true;
  2074. }
  2075. }
  2076. if (GUI.Toggle(new Rect(GetPix(155), GetPix(391), GetPix(60), GetPix(20)),
  2077. isFogS,
  2078. "フォグ",
  2079. guistyle6))
  2080. {
  2081. isBloomS = false;
  2082. isDepthS = false;
  2083. isBlurS = false;
  2084. isFogS = true;
  2085. }
  2086. if (isFogS)
  2087. {
  2088. isFog = GUI.Toggle(new Rect(GetPix(8),
  2089. GetPix(412),
  2090. GetPix(40),
  2091. GetPix(20)),
  2092. isFog,
  2093. "有効",
  2094. guistyle6);
  2095. if (!isFog)
  2096. {
  2097. GUI.enabled = false;
  2098. }
  2099. GUI.Label(new Rect(GetPix(110), GetPix(406), GetPix(100), GetPix(24)),
  2100. "発生距離",
  2101. guistyle2);
  2102. fog1 = GUI.HorizontalSlider(new Rect(GetPix(108),
  2103. GetPix(420),
  2104. GetPix(92),
  2105. GetPix(20)),
  2106. fog1,
  2107. 0f,
  2108. 30f);
  2109. GUI.Label(new Rect(GetPix(10), GetPix(430), GetPix(100), GetPix(25)),
  2110. "密度",
  2111. guistyle2);
  2112. fog2 = GUI.HorizontalSlider(new Rect(GetPix(8),
  2113. GetPix(445),
  2114. GetPix(92),
  2115. GetPix(20)),
  2116. fog2,
  2117. 0f,
  2118. 10f);
  2119. GUI.Label(new Rect(GetPix(110), GetPix(430), GetPix(100), GetPix(25)),
  2120. "強度",
  2121. guistyle2);
  2122. fog3 = GUI.HorizontalSlider(new Rect(GetPix(108),
  2123. GetPix(445),
  2124. GetPix(92),
  2125. GetPix(20)),
  2126. fog3,
  2127. -5f,
  2128. 20f);
  2129. GUI.Label(new Rect(GetPix(10), GetPix(455), GetPix(100), GetPix(25)),
  2130. "高さ",
  2131. guistyle2);
  2132. fog4 = GUI.HorizontalSlider(new Rect(GetPix(8),
  2133. GetPix(470),
  2134. GetPix(92),
  2135. GetPix(20)),
  2136. fog4,
  2137. -10f,
  2138. 10f);
  2139. GUI.Label(new Rect(GetPix(110), GetPix(455), GetPix(100), GetPix(25)),
  2140. "赤",
  2141. guistyle2);
  2142. fog5 = GUI.HorizontalSlider(new Rect(GetPix(108),
  2143. GetPix(470),
  2144. GetPix(92),
  2145. GetPix(20)),
  2146. fog5,
  2147. 0f,
  2148. 1f);
  2149. GUI.Label(new Rect(GetPix(10), GetPix(480), GetPix(100), GetPix(25)),
  2150. "緑",
  2151. guistyle2);
  2152. fog6 = GUI.HorizontalSlider(new Rect(GetPix(8),
  2153. GetPix(495),
  2154. GetPix(92),
  2155. GetPix(20)),
  2156. fog6,
  2157. 0f,
  2158. 1f);
  2159. GUI.Label(new Rect(GetPix(110), GetPix(480), GetPix(100), GetPix(25)),
  2160. "青",
  2161. guistyle2);
  2162. fog7 = GUI.HorizontalSlider(new Rect(GetPix(108),
  2163. GetPix(495),
  2164. GetPix(92),
  2165. GetPix(20)),
  2166. fog7,
  2167. 0f,
  2168. 1f);
  2169. if (!doguCombo.isClickedComboButton && !parCombo.isClickedComboButton && !bgCombo.isClickedComboButton
  2170. && !bgmCombo.isClickedComboButton)
  2171. {
  2172. GUI.enabled = true;
  2173. }
  2174. }
  2175. isSepian = GUI.Toggle(new Rect(GetPix(5),
  2176. GetPix(515),
  2177. GetPix(80),
  2178. GetPix(20)),
  2179. isSepian,
  2180. "セピア",
  2181. guistyle6);
  2182. GUI.Label(new Rect(GetPix(108), GetPix(512), GetPix(100), GetPix(25)),
  2183. "ぼかし",
  2184. guistyle2);
  2185. bokashi = GUI.HorizontalSlider(new Rect(GetPix(108),
  2186. GetPix(527),
  2187. GetPix(92),
  2188. GetPix(20)),
  2189. bokashi,
  2190. 0f,
  2191. 18f);
  2192. if (GUI.Toggle(new Rect(GetPix(5), GetPix(545), GetPix(80), GetPix(20)),
  2193. isHairSetting,
  2194. "髪の設定",
  2195. guistyle6))
  2196. {
  2197. isHairSetting = true;
  2198. isSkirtSetting = false;
  2199. }
  2200. if (isHairSetting)
  2201. {
  2202. bool flag3 = GUI.Toggle(new Rect(GetPix(5),
  2203. GetPix(566),
  2204. GetPix(40),
  2205. GetPix(20)),
  2206. isKamiyure,
  2207. "有効",
  2208. guistyle6);
  2209. if (isKamiyure != flag3)
  2210. {
  2211. isKamiyure = flag3;
  2212. if (isKamiyure)
  2213. {
  2214. Preferences["config"]["hair_setting"].Value = "true";
  2215. Preferences["config"]["hair_radius"].Value = kamiyure4.ToString();
  2216. Preferences["config"]["hair_elasticity"].Value = kamiyure3.ToString();
  2217. Preferences["config"]["hair_damping"].Value = kamiyure2.ToString();
  2218. SaveConfig();
  2219. }
  2220. else
  2221. {
  2222. Preferences["config"]["hair_setting"].Value = "false";
  2223. SaveConfig();
  2224. for (int j = 0; j < maidCnt; j++)
  2225. {
  2226. for (int k = 0; k < maidArray[j].body0.goSlot.Count; k++)
  2227. {
  2228. if (k >= 3 && k <= 6)
  2229. {
  2230. if (maidArray[j].body0.goSlot[k].obj != null)
  2231. {
  2232. DynamicBone component = maidArray[j].body0.goSlot[k].obj.GetComponent<DynamicBone>();
  2233. if (component != null)
  2234. {
  2235. component.m_Damping = 0.6f;
  2236. component.m_Elasticity = 1f;
  2237. if (k == 5)
  2238. {
  2239. component.m_Elasticity = 0.05f;
  2240. }
  2241. component.m_Radius = 0.02f;
  2242. component.UpdateParameters();
  2243. }
  2244. }
  2245. }
  2246. }
  2247. }
  2248. }
  2249. }
  2250. if (!isKamiyure)
  2251. {
  2252. GUI.enabled = false;
  2253. }
  2254. GUI.Label(new Rect(GetPix(108), GetPix(565), GetPix(100), GetPix(25)),
  2255. "当たり判定半径",
  2256. guistyle2);
  2257. float num4 = GUI.HorizontalSlider(new Rect(GetPix(108),
  2258. GetPix(579),
  2259. GetPix(92),
  2260. GetPix(20)),
  2261. kamiyure4,
  2262. 0f,
  2263. 0.04f);
  2264. if (kamiyure4 != num4)
  2265. {
  2266. kamiyure4 = num4;
  2267. Preferences["config"]["hair_radius"].Value = kamiyure4.ToString();
  2268. SaveConfig();
  2269. }
  2270. GUI.Label(new Rect(GetPix(108), GetPix(590), GetPix(100), GetPix(25)),
  2271. "減衰率",
  2272. guistyle2);
  2273. float num5 = GUI.HorizontalSlider(new Rect(GetPix(108),
  2274. GetPix(604),
  2275. GetPix(92),
  2276. GetPix(20)),
  2277. kamiyure2,
  2278. 0.2f,
  2279. 1f);
  2280. if (kamiyure2 != num5)
  2281. {
  2282. kamiyure2 = num5;
  2283. Preferences["config"]["hair_damping"].Value = kamiyure2.ToString();
  2284. SaveConfig();
  2285. }
  2286. GUI.Label(new Rect(GetPix(10), GetPix(590), GetPix(100), GetPix(25)),
  2287. "復元率",
  2288. guistyle2);
  2289. float num6 = GUI.HorizontalSlider(new Rect(GetPix(8),
  2290. GetPix(604),
  2291. GetPix(92),
  2292. GetPix(20)),
  2293. kamiyure3,
  2294. 0f,
  2295. 2f);
  2296. if (kamiyure3 != num6)
  2297. {
  2298. kamiyure3 = num6;
  2299. Preferences["config"]["hair_elasticity"].Value = kamiyure3.ToString();
  2300. SaveConfig();
  2301. }
  2302. GUI.enabled = true;
  2303. }
  2304. if (GUI.Toggle(new Rect(GetPix(105), GetPix(545), GetPix(100), GetPix(20)),
  2305. isSkirtSetting,
  2306. "スカート設定",
  2307. guistyle6))
  2308. {
  2309. isHairSetting = false;
  2310. isSkirtSetting = true;
  2311. }
  2312. if (isSkirtSetting)
  2313. {
  2314. bool flag4 = GUI.Toggle(new Rect(GetPix(5),
  2315. GetPix(566),
  2316. GetPix(40),
  2317. GetPix(20)),
  2318. isSkirtyure,
  2319. "有効",
  2320. guistyle6);
  2321. if (isSkirtyure != flag4)
  2322. {
  2323. isSkirtyure = flag4;
  2324. if (isSkirtyure)
  2325. {
  2326. Preferences["config"]["skirt_setting"].Value = "true";
  2327. Preferences["config"]["skirt_radius"].Value = skirtyure4.ToString();
  2328. Preferences["config"]["skirt_elasticity"].Value = skirtyure3.ToString();
  2329. Preferences["config"]["skirt_damping"].Value = skirtyure2.ToString();
  2330. SaveConfig();
  2331. }
  2332. else
  2333. {
  2334. Preferences["config"]["skirt_setting"].Value = "false";
  2335. SaveConfig();
  2336. for (int j = 0; j < maidCnt; j++)
  2337. {
  2338. for (int k = 0; k < maidArray[j].body0.goSlot.Count; k++)
  2339. {
  2340. if (maidArray[j].body0.goSlot[k].obj != null)
  2341. {
  2342. DynamicSkirtBone fieldValue =
  2343. GetFieldValue<BoneHair3, DynamicSkirtBone>(maidArray[j].body0.goSlot[k].bonehair3,
  2344. "m_SkirtBone");
  2345. if (fieldValue != null)
  2346. {
  2347. fieldValue.m_fPanierForce = 0.05f;
  2348. fieldValue.m_fPanierForceDistanceThreshold = 0.1f;
  2349. fieldValue.m_fRegDefaultRadius = 0.1f;
  2350. }
  2351. }
  2352. }
  2353. }
  2354. }
  2355. }
  2356. if (!isSkirtyure)
  2357. {
  2358. GUI.enabled = false;
  2359. }
  2360. GUI.Label(new Rect(GetPix(108), GetPix(565), GetPix(100), GetPix(25)),
  2361. "足側カプセル半径",
  2362. guistyle2);
  2363. float num4 = GUI.HorizontalSlider(new Rect(GetPix(108),
  2364. GetPix(579),
  2365. GetPix(92),
  2366. GetPix(20)),
  2367. skirtyure4,
  2368. 0f,
  2369. 0.2f);
  2370. if (skirtyure4 != num4)
  2371. {
  2372. skirtyure4 = num4;
  2373. Preferences["config"]["skirt_radius"].Value = skirtyure4.ToString();
  2374. SaveConfig();
  2375. }
  2376. GUI.Label(new Rect(GetPix(108), GetPix(590), GetPix(100), GetPix(25)),
  2377. "足との距離パニエ力",
  2378. guistyle2);
  2379. float num5 = GUI.HorizontalSlider(new Rect(GetPix(108),
  2380. GetPix(604),
  2381. GetPix(92),
  2382. GetPix(20)),
  2383. skirtyure2,
  2384. 0f,
  2385. 0.2f);
  2386. if (skirtyure2 != num5)
  2387. {
  2388. skirtyure2 = num5;
  2389. Preferences["config"]["skirt_damping"].Value = skirtyure2.ToString();
  2390. SaveConfig();
  2391. }
  2392. GUI.Label(new Rect(GetPix(10), GetPix(590), GetPix(100), GetPix(25)),
  2393. "パニエ力",
  2394. guistyle2);
  2395. float num6 = GUI.HorizontalSlider(new Rect(GetPix(8),
  2396. GetPix(604),
  2397. GetPix(92),
  2398. GetPix(20)),
  2399. skirtyure3,
  2400. 0f,
  2401. 0.1f);
  2402. if (skirtyure3 != num6)
  2403. {
  2404. skirtyure3 = num6;
  2405. Preferences["config"]["skirt_elasticity"].Value = skirtyure3.ToString();
  2406. SaveConfig();
  2407. }
  2408. GUI.enabled = true;
  2409. }
  2410. GUI.enabled = true;
  2411. GUI.DrawTexture(new Rect(GetPix(5), GetPix(389), GetPix(195), 2f), line1);
  2412. GUI.DrawTexture(new Rect(GetPix(5), GetPix(389), GetPix(195), 1f), line2);
  2413. if (doguCombo.isClickedComboButton || parCombo.isClickedComboButton || bgCombo.isClickedComboButton
  2414. || bgmCombo.isClickedComboButton)
  2415. {
  2416. GUI.enabled = false;
  2417. }
  2418. GUI.DrawTexture(new Rect(GetPix(5), GetPix(176), GetPix(195), 2f), line1);
  2419. GUI.DrawTexture(new Rect(GetPix(5), GetPix(176), GetPix(195), 1f), line2);
  2420. GUI.Label(new Rect(GetPix(8), GetPix(187), GetPix(100), GetPix(25)),
  2421. "照明",
  2422. guistyle2);
  2423. listStyle3.padding.top = GetPix(3);
  2424. listStyle3.padding.bottom = GetPix(2);
  2425. listStyle3.fontSize = GetPix(13);
  2426. int num7 = lightCombo.List(new Rect(GetPix(34),
  2427. GetPix(185),
  2428. GetPix(78),
  2429. GetPix(23)),
  2430. lightComboList[selectLightIndex].text,
  2431. lightComboList,
  2432. guistyle4,
  2433. "box",
  2434. listStyle3);
  2435. if (num7 != selectLightIndex)
  2436. {
  2437. selectLightIndex = num7;
  2438. isIdx1 = false;
  2439. isIdx2 = false;
  2440. isIdx3 = false;
  2441. isIdx4 = false;
  2442. }
  2443. if (GUI.Button(new Rect(GetPix(115), GetPix(185), GetPix(35), GetPix(23)),
  2444. "追加",
  2445. guistyle3))
  2446. {
  2447. GameObject gameObject = new GameObject("Light");
  2448. gameObject.AddComponent<Light>();
  2449. lightList.Add(gameObject);
  2450. lightColorR.Add(1f);
  2451. lightColorG.Add(1f);
  2452. lightColorB.Add(1f);
  2453. lightIndex.Add(0);
  2454. lightX.Add(40f);
  2455. lightY.Add(180f);
  2456. lightAkarusa.Add(0.95f);
  2457. lightKage.Add(0.098f);
  2458. lightRange.Add(50f);
  2459. gameObject.transform.position = GameMain.Instance.MainLight.transform.position;
  2460. selectLightIndex = lightList.Count - 1;
  2461. lightComboList = new GUIContent[lightList.Count];
  2462. for (int i = 0; i < lightList.Count; i++)
  2463. {
  2464. if (i == 0)
  2465. {
  2466. lightComboList[i] = new GUIContent("メイン");
  2467. }
  2468. else
  2469. {
  2470. lightComboList[i] = new GUIContent("追加" + i);
  2471. }
  2472. }
  2473. lightCombo.selectedItemIndex = selectLightIndex;
  2474. gameObject.GetComponent<Light>().intensity = 0.95f;
  2475. gameObject.GetComponent<Light>().spotAngle = 50f;
  2476. gameObject.GetComponent<Light>().range = 10f;
  2477. gameObject.GetComponent<Light>().type = LightType.Directional;
  2478. gameObject.GetComponent<Light>().color = new Color(0.5f, 1f, 0f);
  2479. if (gLight[selectLightIndex] == null)
  2480. {
  2481. gLight[selectLightIndex] = GameObject.CreatePrimitive(PrimitiveType.Cube);
  2482. Material material = new Material(Shader.Find("Transparent/Diffuse"))
  2483. {
  2484. color = new Color(0.5f, 0.5f, 1f, 0.8f)
  2485. };
  2486. gLight[selectLightIndex].GetComponent<Renderer>().material = material;
  2487. gLight[selectLightIndex].layer = 8;
  2488. gLight[selectLightIndex].GetComponent<Renderer>().enabled = false;
  2489. gLight[selectLightIndex].SetActive(false);
  2490. gLight[selectLightIndex].transform.position = gameObject.transform.position;
  2491. mLight[selectLightIndex] = gLight[selectLightIndex].AddComponent<MouseDrag6>();
  2492. mLight[selectLightIndex].obj = gLight[selectLightIndex];
  2493. mLight[selectLightIndex].maid = gameObject.gameObject;
  2494. mLight[selectLightIndex].angles = gameObject.gameObject.transform.eulerAngles;
  2495. gLight[selectLightIndex].transform.localScale = new Vector3(0.12f, 0.12f, 0.12f);
  2496. mLight[selectLightIndex].ido = 1;
  2497. mLight[selectLightIndex].isScale = false;
  2498. }
  2499. }
  2500. if (GUI.Button(new Rect(GetPix(153), GetPix(185), GetPix(23), GetPix(23)),
  2501. "R",
  2502. guistyle3))
  2503. {
  2504. for (int i = 1; i < lightList.Count; i++)
  2505. {
  2506. Destroy(lightList[i]);
  2507. }
  2508. lightIndex = new List<int>
  2509. {
  2510. 0
  2511. };
  2512. lightColorR = new List<float>
  2513. {
  2514. 1f
  2515. };
  2516. lightColorG = new List<float>
  2517. {
  2518. 1f
  2519. };
  2520. lightColorB = new List<float>
  2521. {
  2522. 1f
  2523. };
  2524. lightX = new List<float>
  2525. {
  2526. 40f
  2527. };
  2528. lightY = new List<float>
  2529. {
  2530. 180f
  2531. };
  2532. lightAkarusa = new List<float>
  2533. {
  2534. 0.95f
  2535. };
  2536. lightKage = new List<float>
  2537. {
  2538. 0.098f
  2539. };
  2540. lightRange = new List<float>
  2541. {
  2542. 50f
  2543. };
  2544. lightCombo.selectedItemIndex = 0;
  2545. lightList = new List<GameObject>
  2546. {
  2547. GameMain.Instance.MainLight.gameObject
  2548. };
  2549. lightComboList = new GUIContent[lightList.Count];
  2550. for (int i = 0; i < lightList.Count; i++)
  2551. {
  2552. if (i == 0)
  2553. {
  2554. lightComboList[i] = new GUIContent("メイン");
  2555. }
  2556. else
  2557. {
  2558. lightComboList[i] = new GUIContent("追加" + i);
  2559. }
  2560. }
  2561. selectLightIndex = 0;
  2562. GameMain.Instance.MainLight.Reset();
  2563. GameMain.Instance.MainLight.SetIntensity(0.95f);
  2564. GameMain.Instance.MainLight.GetComponent<Light>().spotAngle = 50f;
  2565. GameMain.Instance.MainLight.GetComponent<Light>().range = 10f;
  2566. GameMain.Instance.MainLight.gameObject.transform.position = new Vector3(0f, 2f, 0f);
  2567. GameMain.Instance.MainLight.GetComponent<Light>().type = LightType.Directional;
  2568. bgObject.SetActive(true);
  2569. mainCamera.GetComponent<Camera>().backgroundColor = new Color(0f, 0f, 0f);
  2570. isIdx1 = false;
  2571. isIdx2 = false;
  2572. isIdx3 = false;
  2573. isIdx4 = false;
  2574. }
  2575. GUI.enabled = true;
  2576. if (doguCombo.isClickedComboButton || bgCombo.isClickedComboButton || bgmCombo.isClickedComboButton)
  2577. {
  2578. GUI.enabled = false;
  2579. }
  2580. listStyle3.padding.top = GetPix(0);
  2581. listStyle3.padding.bottom = GetPix(0);
  2582. listStyle3.fontSize = GetPix(12);
  2583. GUI.Label(new Rect(GetPix(8), GetPix(116), GetPix(150), GetPix(25)),
  2584. "大道具2",
  2585. guistyle2);
  2586. parIndex = parCombo.List(new Rect(GetPix(51),
  2587. GetPix(113),
  2588. GetPix(100),
  2589. GetPix(23)),
  2590. parComboList[parIndex].text,
  2591. parComboList,
  2592. guistyle4,
  2593. "box",
  2594. listStyle3);
  2595. if (GUI.Button(new Rect(GetPix(156), GetPix(113), GetPix(38), GetPix(23)),
  2596. "追加",
  2597. guistyle3))
  2598. {
  2599. GameObject gameObject2 = null;
  2600. bool flag5 = false;
  2601. bool flag6 = false;
  2602. if (parArray[parIndex].Contains("#"))
  2603. {
  2604. string[] array3 = parArray[parIndex].Split(new char[] { '#' });
  2605. gameObject2 = GameMain.Instance.BgMgr.CreateAssetBundle(array3[1]);
  2606. if (gameObject2 != null)
  2607. {
  2608. gameObject2 = Instantiate(gameObject2);
  2609. MeshRenderer[] componentsInChildren = gameObject2.GetComponentsInChildren<MeshRenderer>();
  2610. for (int k = 0; k < componentsInChildren.Length; k++)
  2611. {
  2612. if (componentsInChildren[k] != null)
  2613. {
  2614. componentsInChildren[k].shadowCastingMode = ShadowCastingMode.Off;
  2615. }
  2616. }
  2617. }
  2618. flag5 = true;
  2619. if (!parArray[parIndex].Contains("Odogu_"))
  2620. {
  2621. flag6 = true;
  2622. }
  2623. doguBObject.Add(gameObject2);
  2624. }
  2625. else if (!parArray[parIndex].StartsWith("mirror") && parArray[parIndex].IndexOf(":") < 0)
  2626. {
  2627. Object @object = Resources.Load("Prefab/" + parArray[parIndex]);
  2628. gameObject2 = Instantiate(@object) as GameObject;
  2629. doguBObject.Add(gameObject2);
  2630. }
  2631. else if (parArray[parIndex].StartsWith("mirror"))
  2632. {
  2633. Material material2 = new Material(Shader.Find("Mirror"));
  2634. GameObject gameObject3 = GameObject.CreatePrimitive(PrimitiveType.Plane);
  2635. gameObject3.GetComponent<Renderer>().material = material2;
  2636. gameObject3.AddComponent<MirrorReflection2>();
  2637. MirrorReflection2 component2 = gameObject3.GetComponent<MirrorReflection2>();
  2638. component2.m_TextureSize = 2048;
  2639. component2.m_ClipPlaneOffset = 0.07f;
  2640. gameObject3.GetComponent<Renderer>().enabled = true;
  2641. gameObject2 = gameObject3;
  2642. doguBObject.Add(gameObject2);
  2643. }
  2644. else
  2645. {
  2646. string[] array3 = parArray[parIndex].Split(new char[] { ':' });
  2647. Object @object = GameMain.Instance.BgMgr.CreateAssetBundle(array3[0]);
  2648. if (@object == null)
  2649. {
  2650. @object = Resources.Load("BG/" + array3[0]);
  2651. }
  2652. GameObject gameObject4 = Instantiate(@object) as GameObject;
  2653. int num8 = 0;
  2654. int.TryParse(array3[1], out int num9);
  2655. foreach (object obj in gameObject4.transform)
  2656. {
  2657. Transform transform = (Transform)obj;
  2658. if (num9 == num8)
  2659. {
  2660. gameObject2 = transform.gameObject;
  2661. break;
  2662. }
  2663. num8++;
  2664. }
  2665. doguBObject.Add(gameObject2);
  2666. gameObject2.transform.parent = null;
  2667. Destroy(gameObject4);
  2668. gameObject4.SetActive(false);
  2669. }
  2670. gameObject2.name = parArray[parIndex];
  2671. Vector3 zero = Vector3.zero;
  2672. Vector3 zero2 = Vector3.zero;
  2673. switch (parIndex)
  2674. {
  2675. case 0:
  2676. zero.z = -0.6f;
  2677. zero.y = 0.96f;
  2678. zero2.z = 180f;
  2679. zero2.x = -90f;
  2680. gameObject2.transform.localScale = new Vector3(0.2f, 0.4f, 0.2f);
  2681. break;
  2682. case 1:
  2683. zero.z = -0.6f;
  2684. zero.y = 0.96f;
  2685. zero2.z = 180f;
  2686. zero2.x = -90f;
  2687. gameObject2.transform.localScale = new Vector3(0.1f, 0.4f, 0.2f);
  2688. break;
  2689. case 2:
  2690. zero.z = -0.6f;
  2691. zero.y = 0.85f;
  2692. zero2.z = 180f;
  2693. zero2.x = -90f;
  2694. gameObject2.transform.localScale = new Vector3(0.03f, 0.18f, 0.124f);
  2695. break;
  2696. case 3:
  2697. case 4:
  2698. case 5:
  2699. case 6:
  2700. case 7:
  2701. case 8:
  2702. case 9:
  2703. case 10:
  2704. case 11:
  2705. case 12:
  2706. case 13:
  2707. case 14:
  2708. case 15:
  2709. case 16:
  2710. case 17:
  2711. zero.z = 0.5f;
  2712. zero2.x = -90f;
  2713. break;
  2714. }
  2715. if (flag5)
  2716. {
  2717. zero.z = 0.4f;
  2718. if (flag6)
  2719. {
  2720. zero2.x = -90f;
  2721. }
  2722. }
  2723. if (gameObject2.name == "Salon_Entrance:3" || gameObject2.name == "Salon_Entrance:4"
  2724. || gameObject2.name == "Salon_Entrance:1"
  2725. || gameObject2.name == "Salon_Entrance:2"
  2726. || gameObject2.name == "Salon_Entrance:0" || gameObject2.name == "Shitsumu:23"
  2727. || gameObject2.name == "Shitsumu_Night:23")
  2728. {
  2729. zero.z = 0.5f;
  2730. zero2.x = -90f;
  2731. }
  2732. if (gameObject2.name == "Pool:26")
  2733. {
  2734. zero.z = 0.5f;
  2735. zero2.x = -90f;
  2736. zero2.z = 90f;
  2737. zero.y = 0.15f;
  2738. }
  2739. if (gameObject2.name == "Particle/pstarY_act2")
  2740. {
  2741. zero2.y = 90f;
  2742. }
  2743. gameObject2.transform.localPosition = zero;
  2744. gameObject2.transform.localRotation = Quaternion.Euler(zero2);
  2745. doguCnt = doguBObject.Count - 1;
  2746. gDogu[doguCnt] = GameObject.CreatePrimitive(PrimitiveType.Cube);
  2747. gDogu[doguCnt].GetComponent<Renderer>().material = m_material;
  2748. gDogu[doguCnt].layer = 8;
  2749. gDogu[doguCnt].GetComponent<Renderer>().enabled = false;
  2750. gDogu[doguCnt].SetActive(false);
  2751. gDogu[doguCnt].transform.position = gameObject2.transform.position;
  2752. mDogu[doguCnt] = gDogu[doguCnt].AddComponent<MouseDrag6>();
  2753. mDogu[doguCnt].obj = gDogu[doguCnt];
  2754. mDogu[doguCnt].maid = gameObject2;
  2755. mDogu[doguCnt].angles = gameObject2.transform.eulerAngles;
  2756. gDogu[doguCnt].transform.localScale = new Vector3(cubeSize, cubeSize, cubeSize);
  2757. mDogu[doguCnt].ido = 1;
  2758. mDogu[doguCnt].isScale = false;
  2759. if (gameObject2.name == "Particle/pLineY")
  2760. {
  2761. mDogu[doguCnt].count = 180;
  2762. gameObject2.transform.localScale = new Vector3(3f, 3f, 3f);
  2763. }
  2764. if (gameObject2.name == "Particle/pLineP02")
  2765. {
  2766. mDogu[doguCnt].count = 115;
  2767. gameObject2.transform.localScale = new Vector3(3f, 3f, 3f);
  2768. }
  2769. if (gameObject2.name == "Particle/pLine_act2")
  2770. {
  2771. mDogu[doguCnt].count = 90;
  2772. gameObject2.transform.localScale = new Vector3(3f, 3f, 3f);
  2773. }
  2774. if (gameObject2.name == "Particle/pHeart01")
  2775. {
  2776. mDogu[doguCnt].count = 77;
  2777. }
  2778. if (parIndex < 3)
  2779. {
  2780. mDogu[doguCnt].isScale = true;
  2781. mDogu[doguCnt].isScale2 = true;
  2782. mDogu[doguCnt].scale2 = gameObject2.transform.localScale;
  2783. if (parIndex == 0)
  2784. {
  2785. mDogu[doguCnt].scale = new Vector3(gameObject2.transform.localScale.x * 5f,
  2786. gameObject2.transform.localScale.y * 5f,
  2787. gameObject2.transform.localScale.z * 5f);
  2788. }
  2789. if (parIndex == 1)
  2790. {
  2791. mDogu[doguCnt].scale = new Vector3(gameObject2.transform.localScale.x * 10f,
  2792. gameObject2.transform.localScale.y * 10f,
  2793. gameObject2.transform.localScale.z * 10f);
  2794. }
  2795. if (parIndex == 2)
  2796. {
  2797. mDogu[doguCnt].scale = new Vector3(gameObject2.transform.localScale.x * 33f,
  2798. gameObject2.transform.localScale.y * 33f,
  2799. gameObject2.transform.localScale.z * 33f);
  2800. }
  2801. }
  2802. if (gameObject2.GetComponent<Collider>() != null)
  2803. {
  2804. gameObject2.GetComponent<Collider>().enabled = false;
  2805. }
  2806. }
  2807. GUI.enabled = true;
  2808. if (bgCombo.isClickedComboButton || bgmCombo.isClickedComboButton)
  2809. {
  2810. GUI.enabled = false;
  2811. }
  2812. GUI.Label(new Rect(GetPix(8), GetPix(88), GetPix(100), GetPix(25)),
  2813. "大道具1",
  2814. guistyle2);
  2815. doguBIndex =
  2816. doguCombo.List(new Rect(GetPix(51),
  2817. GetPix(85),
  2818. GetPix(100),
  2819. GetPix(23)),
  2820. doguComboList[doguBIndex].text,
  2821. doguComboList,
  2822. guistyle4,
  2823. "box",
  2824. listStyle3);
  2825. if (GUI.Button(new Rect(GetPix(156), GetPix(85), GetPix(38), GetPix(23)),
  2826. "追加",
  2827. guistyle3))
  2828. {
  2829. GameObject gameObject2 = null;
  2830. if (doguDict.TryGetValue(doguBArray[doguBIndex], out PhotoBGObjectData objResult))
  2831. {
  2832. if (!string.IsNullOrEmpty(objResult.create_prefab_name))
  2833. {
  2834. Object tmpObj = Resources.Load("Prefab/" + objResult.create_prefab_name);
  2835. if (tmpObj == null)
  2836. {
  2837. gameObject2 = null;
  2838. }
  2839. else
  2840. {
  2841. gameObject2 = Instantiate(tmpObj) as GameObject;
  2842. }
  2843. }
  2844. else if (!string.IsNullOrEmpty(objResult.create_asset_bundle_name))
  2845. {
  2846. GameObject gameObject3 = GameMain.Instance.BgMgr.CreateAssetBundle(objResult.create_asset_bundle_name);
  2847. if (gameObject3 == null)
  2848. {
  2849. gameObject2 = null;
  2850. }
  2851. else
  2852. {
  2853. gameObject2 = Instantiate(gameObject3);
  2854. }
  2855. }
  2856. else if (!string.IsNullOrEmpty(objResult.direct_file))
  2857. {
  2858. BasePhotoCustomObject basePhotoCustomObject =
  2859. BasePhotoCustomObject.InstantiateFromFile(transform.gameObject, objResult.direct_file);
  2860. gameObject2 = basePhotoCustomObject.gameObject;
  2861. }
  2862. if (gameObject2 != null)
  2863. {
  2864. doguBObject.Add(gameObject2);
  2865. }
  2866. }
  2867. else if (!doguBArray[doguBIndex].StartsWith("mirror"))
  2868. {
  2869. Object @object;
  2870. if (doguBArray[doguBIndex].StartsWith("BG"))
  2871. {
  2872. string text2 = doguBArray[doguBIndex].Replace("BG", "");
  2873. @object = GameMain.Instance.BgMgr.CreateAssetBundle(text2);
  2874. if (@object == null)
  2875. {
  2876. @object = Resources.Load("BG/" + text2);
  2877. }
  2878. }
  2879. else
  2880. {
  2881. @object = Resources.Load("Prefab/" + doguBArray[doguBIndex]);
  2882. }
  2883. gameObject2 = Instantiate(@object) as GameObject;
  2884. doguBObject.Add(gameObject2);
  2885. }
  2886. else
  2887. {
  2888. Material material2 = new Material(Shader.Find("Mirror"));
  2889. GameObject gameObject3 = GameObject.CreatePrimitive(PrimitiveType.Plane);
  2890. gameObject3.transform.localScale = new Vector3(0.3f, 1f, 0.3f);
  2891. gameObject3.GetComponent<Renderer>().material = material2;
  2892. gameObject3.AddComponent<MirrorReflection2>();
  2893. MirrorReflection2 component2 = gameObject3.GetComponent<MirrorReflection2>();
  2894. component2.m_TextureSize = 2048;
  2895. component2.m_ClipPlaneOffset = 0f;
  2896. gameObject3.GetComponent<Renderer>().enabled = true;
  2897. gameObject2 = gameObject3;
  2898. doguBObject.Add(gameObject2);
  2899. }
  2900. gameObject2.name = doguBArray[doguBIndex];
  2901. Vector3 zero = Vector3.zero;
  2902. Vector3 zero2 = Vector3.zero;
  2903. string text = gameObject2.name;
  2904. switch (text)
  2905. {
  2906. case "Odogu_XmasTreeMini_photo_ver":
  2907. zero.z = 0.6f;
  2908. gameObject2.transform.localScale = new Vector3(4.5f, 4.5f, 4.5f);
  2909. foreach (object obj2 in gameObject2.transform)
  2910. {
  2911. Transform transform2 = (Transform)obj2;
  2912. if (transform2.GetComponent<Collider>() != null)
  2913. {
  2914. transform2.GetComponent<Collider>().enabled = false;
  2915. }
  2916. }
  2917. goto IL_A0BF;
  2918. case "Odogu_KadomatsuMini_photo_ver":
  2919. zero.z = 0.6f;
  2920. gameObject2.transform.localScale = new Vector3(3.5f, 3.5f, 3.5f);
  2921. foreach (object obj3 in gameObject2.transform)
  2922. {
  2923. Transform transform2 = (Transform)obj3;
  2924. if (transform2.GetComponent<Collider>() != null)
  2925. {
  2926. transform2.GetComponent<Collider>().enabled = false;
  2927. }
  2928. }
  2929. goto IL_A0BF;
  2930. case "Odogu_ClassRoomDesk":
  2931. zero.z = 0.5f;
  2932. zero2.x = -90f;
  2933. goto IL_A0BF;
  2934. case "Odogu_SimpleTable":
  2935. zero.z = 0.5f;
  2936. zero2.x = -90f;
  2937. goto IL_A0BF;
  2938. case "Odogu_DildoBox":
  2939. zero.z = 0.5f;
  2940. zero2.x = -90f;
  2941. goto IL_A0BF;
  2942. case "PlayAreaOut":
  2943. zero.z = 0.5f;
  2944. zero.y = 0.2f;
  2945. goto IL_A0BF;
  2946. case "Odogu_Dresser_photo_ver":
  2947. GameObject.Find("Prim.00000000").GetComponent<Collider>().enabled = false;
  2948. GameObject.Find("Prim.00000001").GetComponent<Collider>().enabled = false;
  2949. GameObject.Find("Prim.00000002").GetComponent<Collider>().enabled = false;
  2950. GameObject.Find("Prim.00000004").GetComponent<Collider>().enabled = false;
  2951. goto IL_A0BF;
  2952. case "BGodogu_bbqgrill":
  2953. case "BGodogu_bucket":
  2954. case "BGodogu_coolerbox":
  2955. case "BGodogu_game_darts":
  2956. case "BGodogu_game_dartsboard":
  2957. case "BGodogu_nabe_huta":
  2958. case "BGodogu_nabe_water":
  2959. case "BGodogu_natumikan":
  2960. case "BGodogu_rb_chair":
  2961. case "BGodogu_rb_duck":
  2962. case "BGodogu_rb_obon":
  2963. case "BGodogu_rb_tokkuri":
  2964. case "BGodogu_saracorn":
  2965. case "BGodogu_saraimo":
  2966. case "BGodogu_saratomato":
  2967. case "BGodogu_sunanoshiro":
  2968. case "BGodogu_sunanoyama":
  2969. case "BGodogu_tsutsuhanabi":
  2970. case "BGodogu_ukiwa":
  2971. case "BGodogu_vf_crops_corn":
  2972. case "BGodogu_vf_crops_gekkabijin":
  2973. case "BGodogu_vf_crops_gekkabijinflower":
  2974. case "BGodogu_vf_crops_himawari":
  2975. case "BGodogu_vf_crops_natsumikan":
  2976. case "BGodogu_vf_crops_suika":
  2977. case "BGodogu_vf_crops_zakuro":
  2978. case "BGodogu_villa_table":
  2979. case "BGodogu_villa_tvrimocon":
  2980. case "BGodogu_villabr_sideboard":
  2981. case "BGOdogu_Game_Nei_USB":
  2982. case "BGOdogu_Game_Wanage":
  2983. case "BGOdogu_Game_Wa":
  2984. case "BGodogu_pafe":
  2985. case "BGodogu_furaidopoteto":
  2986. case "BGodogu_karaoketable":
  2987. case "BGodogu_omuriceh":
  2988. case "BGodogu_omuricekao1":
  2989. case "BGodogu_omuricekao2":
  2990. case "BGodogu_omuriceoppai":
  2991. case "BGodogu_kakigori":
  2992. case "BGodogu_pretzel_sara":
  2993. case "BGodogu_karaoke_box":
  2994. case "Odogu_StandMike":
  2995. case "Odogu_StandMikeBase":
  2996. case "Odogu_HeroineChair_muku":
  2997. case "Odogu_HeroineChair_mazime":
  2998. case "Odogu_HeroineChair_rindere":
  2999. case "Odogu_HeroineChair_tsumdere":
  3000. case "Odogu_HeroineChair_cooldere":
  3001. case "Odogu_HeroineChair_junshin":
  3002. case "Odogu_TabletPC":
  3003. case "Odogu_Styluspen_black":
  3004. case "Odogu_Styluspen_white":
  3005. case "Odogu_Styluspen_red":
  3006. case "Odogu_Styluspen_blue":
  3007. case "Odogu_Styluspen_yellow":
  3008. case "Odogu_Styluspen_green":
  3009. case "Odogu_Omurice1":
  3010. case "Odogu_Omurice3":
  3011. case "Odogu_OmuriceH":
  3012. case "Odogu_OmuriceKao1":
  3013. case "Odogu_OmuriceKao2":
  3014. case "Odogu_OmuriceOppai":
  3015. case "Odogu_AcquaPazza":
  3016. case "Odogu_Sandwich":
  3017. case "Odogu_vichyssoise":
  3018. case "Odogu_BirthdayCake":
  3019. case "Odogu_Shortcake":
  3020. case "Odogu_MontBlanc":
  3021. case "Odogu_Pafe":
  3022. case "Odogu_Smoothie_Red":
  3023. case "Odogu_Smoothie_Green":
  3024. case "Odogu_Cocktail_Red":
  3025. case "Odogu_Cocktail_Blue":
  3026. case "Odogu_Cocktail_Yellow":
  3027. case "Odogu_Coffiecup":
  3028. case "Odogu_WineBottle(cap_off)":
  3029. case "Odogu_WineBottle(cap_on)":
  3030. case "Odogu_Jyouro":
  3031. case "Odogu_Planter_Red":
  3032. case "Odogu_Planter_Lightblue":
  3033. case "Odogu_MariGold":
  3034. case "Odogu_CasinoChip_10":
  3035. case "Odogu_CasinoChip_100":
  3036. case "Odogu_CasinoChip_1000":
  3037. case "Odogu_CardShooter":
  3038. case "Odogu_CardsDeck":
  3039. case "Odogu_Card_s1":
  3040. case "Odogu_Card_s2":
  3041. case "Odogu_Card_s3":
  3042. case "Odogu_Card_s4":
  3043. case "Odogu_Card_s5":
  3044. case "Odogu_Card_s6":
  3045. case "Odogu_Card_s7":
  3046. case "Odogu_Card_s8":
  3047. case "Odogu_Card_s9":
  3048. case "Odogu_Card_s10":
  3049. case "Odogu_Card_s11":
  3050. case "Odogu_Card_s12":
  3051. case "Odogu_Card_s13":
  3052. case "Odogu_Card_h1":
  3053. case "Odogu_Card_h2":
  3054. case "Odogu_Card_h3":
  3055. case "Odogu_Card_h4":
  3056. case "Odogu_Card_h5":
  3057. case "Odogu_Card_h6":
  3058. case "Odogu_Card_h7":
  3059. case "Odogu_Card_h8":
  3060. case "Odogu_Card_h9":
  3061. case "Odogu_Card_h10":
  3062. case "Odogu_Card_h11":
  3063. case "Odogu_Card_h12":
  3064. case "Odogu_Card_h13":
  3065. case "Odogu_Card_d1":
  3066. case "Odogu_Card_d2":
  3067. case "Odogu_Card_d3":
  3068. case "Odogu_Card_d4":
  3069. case "Odogu_Card_d5":
  3070. case "Odogu_Card_d6":
  3071. case "Odogu_Card_d7":
  3072. case "Odogu_Card_d8":
  3073. case "Odogu_Card_d9":
  3074. case "Odogu_Card_d10":
  3075. case "Odogu_Card_d11":
  3076. case "Odogu_Card_d12":
  3077. case "Odogu_Card_d13":
  3078. case "Odogu_Card_c1":
  3079. case "Odogu_Card_c2":
  3080. case "Odogu_Card_c3":
  3081. case "Odogu_Card_c4":
  3082. case "Odogu_Card_c5":
  3083. case "Odogu_Card_c6":
  3084. case "Odogu_Card_c7":
  3085. case "Odogu_Card_c8":
  3086. case "Odogu_Card_c9":
  3087. case "Odogu_Card_c10":
  3088. case "Odogu_Card_c11":
  3089. case "Odogu_Card_c12":
  3090. case "Odogu_Card_c13":
  3091. case "Odogu_Card_joker":
  3092. zero.z = 0.5f;
  3093. zero2.x = -90f;
  3094. goto IL_A0BF;
  3095. }
  3096. zero.z = 0.5f;
  3097. if (gameObject2.name.StartsWith("Odogu_"))
  3098. {
  3099. foreach (object obj4 in gameObject2.transform)
  3100. {
  3101. Transform transform2 = (Transform)obj4;
  3102. if (transform2.GetComponent<Collider>() != null)
  3103. {
  3104. transform2.GetComponent<Collider>().enabled = false;
  3105. }
  3106. }
  3107. }
  3108. else if (gameObject2.GetComponent<Collider>() != null)
  3109. {
  3110. gameObject2.GetComponent<Collider>().enabled = false;
  3111. }
  3112. IL_A0BF:
  3113. gameObject2.transform.localPosition = zero;
  3114. gameObject2.transform.localRotation = Quaternion.Euler(zero2);
  3115. doguCnt = doguBObject.Count - 1;
  3116. gDogu[doguCnt] = GameObject.CreatePrimitive(PrimitiveType.Cube);
  3117. gDogu[doguCnt].GetComponent<Renderer>().material = m_material;
  3118. gDogu[doguCnt].layer = 8;
  3119. gDogu[doguCnt].GetComponent<Renderer>().enabled = false;
  3120. gDogu[doguCnt].SetActive(false);
  3121. gDogu[doguCnt].transform.position = gameObject2.transform.position;
  3122. mDogu[doguCnt] = gDogu[doguCnt].AddComponent<MouseDrag6>();
  3123. mDogu[doguCnt].isScale = false;
  3124. mDogu[doguCnt].obj = gDogu[doguCnt];
  3125. mDogu[doguCnt].maid = gameObject2;
  3126. mDogu[doguCnt].angles = gameObject2.transform.eulerAngles;
  3127. gDogu[doguCnt].transform.localScale = new Vector3(cubeSize, cubeSize, cubeSize);
  3128. mDogu[doguCnt].ido = 1;
  3129. if (doguBIndex == 6 || doguBIndex == 7)
  3130. {
  3131. mDogu[doguCnt].isScale2 = true;
  3132. mDogu[doguCnt].scale2 = gameObject2.transform.localScale;
  3133. }
  3134. }
  3135. GUI.EndScrollView();
  3136. GUI.enabled = true;
  3137. if (bgmCombo.isClickedComboButton)
  3138. {
  3139. GUI.enabled = false;
  3140. }
  3141. listStyle3.padding.top = GetPix(1);
  3142. listStyle3.padding.bottom = GetPix(0);
  3143. listStyle3.fontSize = GetPix(12);
  3144. int num10 = bgCombo.List(new Rect(GetPix(31),
  3145. GetPix(53),
  3146. GetPix(95),
  3147. GetPix(23)),
  3148. bgComboList[bgIndex].text,
  3149. bgComboList,
  3150. guistyle4,
  3151. "box",
  3152. listStyle3);
  3153. if (GUI.Button(new Rect(GetPix(5), GetPix(53), GetPix(23), GetPix(23)),
  3154. "<",
  3155. guistyle3))
  3156. {
  3157. num10--;
  3158. if (num10 <= -1)
  3159. {
  3160. num10 = bgArray.Length - 1;
  3161. }
  3162. }
  3163. if (GUI.Button(new Rect(GetPix(129), GetPix(53), GetPix(23), GetPix(23)),
  3164. ">",
  3165. guistyle3))
  3166. {
  3167. num10++;
  3168. if (num10 == bgArray.Length)
  3169. {
  3170. num10 = 0;
  3171. }
  3172. }
  3173. if (bgIndex != num10)
  3174. {
  3175. bgIndex = num10;
  3176. bg.localScale = new Vector3(1f, 1f, 1f);
  3177. if (bgArray[bgIndex].Length == 36)
  3178. {
  3179. GameMain.Instance.BgMgr.ChangeBgMyRoom(bgArray[bgIndex]);
  3180. }
  3181. else
  3182. {
  3183. GameMain.Instance.BgMgr.ChangeBg(bgArray[bgIndex]);
  3184. }
  3185. bgCombo.selectedItemIndex = bgIndex;
  3186. if (bgArray[bgIndex] == "karaokeroom")
  3187. {
  3188. bg.transform.position = bgObject.transform.position;
  3189. Vector3 zero = Vector3.zero;
  3190. Vector3 zero2 = Vector3.zero;
  3191. zero2.y = 90f;
  3192. zero.z = 4f;
  3193. zero.x = 1f;
  3194. bg.transform.localPosition = zero;
  3195. bg.transform.localRotation = Quaternion.Euler(zero2);
  3196. }
  3197. }
  3198. GUI.enabled = true;
  3199. int num11 = bgmCombo.List(new Rect(GetPix(31),
  3200. GetPix(25),
  3201. GetPix(95),
  3202. GetPix(23)),
  3203. bgmComboList[bgmIndex].text,
  3204. bgmComboList,
  3205. guistyle4,
  3206. "box",
  3207. listStyle3);
  3208. if (GUI.Button(new Rect(GetPix(5), GetPix(25), GetPix(23), GetPix(23)),
  3209. "<",
  3210. guistyle3))
  3211. {
  3212. num11--;
  3213. if (num11 <= -1)
  3214. {
  3215. num11 = bgmArray.Length - 1;
  3216. }
  3217. }
  3218. if (GUI.Button(new Rect(GetPix(129), GetPix(25), GetPix(23), GetPix(23)),
  3219. ">",
  3220. guistyle3))
  3221. {
  3222. num11++;
  3223. if (num11 == bgmArray.Length)
  3224. {
  3225. num11 = 0;
  3226. }
  3227. }
  3228. if (bgmIndex != num11)
  3229. {
  3230. bgmIndex = num11;
  3231. GameMain.Instance.SoundMgr.PlayBGM(bgmArray[bgmIndex] + ".ogg", 0f, true);
  3232. bgmCombo.selectedItemIndex = bgmIndex;
  3233. }
  3234. GUI.DragWindow();
  3235. if (bgmCombo.isClickedComboButton)
  3236. {
  3237. GUI.enabled = false;
  3238. }
  3239. }
  3240. private void PoseWindow(int winID)
  3241. {
  3242. GUIStyle style1 = "label";
  3243. style1.fontSize = GetPix(12);
  3244. style1.alignment = TextAnchor.UpperLeft;
  3245. GUIStyle style2 = "label";
  3246. style2.fontSize = GetPix(11);
  3247. style2.alignment = TextAnchor.UpperLeft;
  3248. GUIStyle style3 = "button";
  3249. style3.fontSize = GetPix(20);
  3250. GUIStyle buttonStyle1 = "button";
  3251. buttonStyle1.fontSize = GetPix(14);
  3252. buttonStyle1.alignment = TextAnchor.MiddleLeft;
  3253. GUIStyle buttonStyle2 = "button";
  3254. buttonStyle2.fontSize = GetPix(12);
  3255. buttonStyle2.alignment = TextAnchor.MiddleLeft;
  3256. GUIStyle style4 = new GUIStyle("toggle")
  3257. {
  3258. fontSize = GetPix(13)
  3259. };
  3260. CharacterMgr characterMgr = GameMain.Instance.CharacterMgr;
  3261. Maid maid = maidArray[selectMaidIndex];
  3262. if (!poseInitFlg)
  3263. {
  3264. listStyle2.normal.textColor = Color.white;
  3265. listStyle2.normal.background = MakeTex(2, 2, new Color(0.0f, 0.0f, 0.0f, 0.5f));
  3266. listStyle2.onHover.background = listStyle2.hover.background = new Texture2D(2, 2);
  3267. listStyle2.padding.left = listStyle2.padding.right = listStyle2.padding.top = listStyle2.padding.bottom = GetPix(0);
  3268. listStyle2.fontSize = GetPix(12);
  3269. listStyle3.normal.textColor = Color.white;
  3270. listStyle3.normal.background = MakeTex(2, 2, new Color(0.0f, 0.0f, 0.0f, 0.5f));
  3271. listStyle3.onHover.background = listStyle3.hover.background = new Texture2D(2, 2);
  3272. listStyle3.padding.left = listStyle3.padding.right = listStyle3.padding.top = GetPix(1);
  3273. listStyle3.padding.bottom = GetPix(0);
  3274. listStyle3.fontSize = GetPix(12);
  3275. listStyle4.normal.textColor = Color.white;
  3276. listStyle4.normal.background = MakeTex(2, 2, new Color(0.0f, 0.0f, 0.0f, 0.5f));
  3277. listStyle4.onHover.background = listStyle4.hover.background = new Texture2D(2, 2);
  3278. listStyle4.padding.left = listStyle4.padding.right = listStyle4.padding.top = 3;
  3279. listStyle4.padding.bottom = 3;
  3280. listStyle4.fontSize = GetPix(13);
  3281. poseCombo.selectedItemIndex = 0;
  3282. int group = (int)groupList[0];
  3283. poseComboList = new GUIContent[group];
  3284. for (int index = 0; index < group; ++index)
  3285. {
  3286. poseComboList[index] = new GUIContent((index + 1).ToString() + ":" + poseArray[index]);
  3287. }
  3288. poseGroupCombo.selectedItemIndex = 0;
  3289. poseGroupComboList = new GUIContent[poseGroupArray.Length + 1];
  3290. poseGroupComboList[0] = new GUIContent("1:通常");
  3291. for (int index = 0; index < poseGroupArray.Length; ++index)
  3292. {
  3293. if (poseGroupArray[index] == "maid_dressroom01")
  3294. {
  3295. poseGroupComboList[index + 1] = new GUIContent((index + 2).ToString() + ":立ち");
  3296. }
  3297. if (poseGroupArray[index] == "tennis_kamae_f")
  3298. {
  3299. poseGroupComboList[index + 1] = new GUIContent((index + 2).ToString() + ":中腰");
  3300. }
  3301. if (poseGroupArray[index] == "senakanagasi_f")
  3302. {
  3303. poseGroupComboList[index + 1] = new GUIContent((index + 2).ToString() + ":膝をつく");
  3304. }
  3305. if (poseGroupArray[index] == "work_hansei")
  3306. {
  3307. poseGroupComboList[index + 1] = new GUIContent((index + 2).ToString() + ":座り");
  3308. }
  3309. if (poseGroupArray[index] == "inu_taiki_f")
  3310. {
  3311. poseGroupComboList[index + 1] = new GUIContent((index + 2).ToString() + ":四つん這い");
  3312. }
  3313. if (poseGroupArray[index] == "syagami_pose_f")
  3314. {
  3315. poseGroupComboList[index + 1] = new GUIContent((index + 2).ToString() + ":床座り");
  3316. }
  3317. if (poseGroupArray[index] == "densyasuwari_taiki_f")
  3318. {
  3319. poseGroupComboList[index + 1] = new GUIContent((index + 2).ToString() + ":椅子座り");
  3320. }
  3321. if (poseGroupArray[index] == "work_kaiwa")
  3322. {
  3323. poseGroupComboList[index + 1] = new GUIContent((index + 2).ToString() + ":ソファー座り");
  3324. }
  3325. if (poseGroupArray[index] == "dance_cm3d2_001_f1,14.14")
  3326. {
  3327. poseGroupComboList[index + 1] = new GUIContent((index + 2).ToString() + ":ドキドキ☆Fallin' Love");
  3328. }
  3329. if (poseGroupArray[index] == "dance_cm3d_001_f1,39.25")
  3330. {
  3331. poseGroupComboList[index + 1] = new GUIContent((index + 2).ToString() + ":entrance to you");
  3332. }
  3333. if (poseGroupArray[index] == "dance_cm3d_002_end_f1,50.71")
  3334. {
  3335. poseGroupComboList[index + 1] = new GUIContent((index + 2).ToString() + ":scarlet leap");
  3336. }
  3337. if (poseGroupArray[index] == "dance_cm3d2_002_smt_f,7.76,")
  3338. {
  3339. poseGroupComboList[index + 1] = new GUIContent((index + 2).ToString() + ":stellar my tears");
  3340. }
  3341. if (poseGroupArray[index] == "dance_cm3d_003_sp2_f1,90.15")
  3342. {
  3343. poseGroupComboList[index + 1] = new GUIContent((index + 2).ToString() + ":rhythmix to you");
  3344. }
  3345. if (poseGroupArray[index] == "dance_cm3d2_003_hs_f1,0.01,")
  3346. {
  3347. poseGroupComboList[index + 1] = new GUIContent((index + 2).ToString() + ":happy!happy!スキャンダル!!");
  3348. }
  3349. if (poseGroupArray[index] == "dance_cm3d_004_kano_f1,124.93")
  3350. {
  3351. poseGroupComboList[index + 1] = new GUIContent((index + 2).ToString() + ":Can Know Two Close");
  3352. }
  3353. if (poseGroupArray[index] == "dance_cm3d2_004_sse_f1,0.01")
  3354. {
  3355. poseGroupComboList[index + 1] = new GUIContent((index + 2).ToString() + ":sweet sweet everyday");
  3356. }
  3357. if (poseGroupArray[index] == "turusi_sex_in_taiki_f")
  3358. {
  3359. poseGroupComboList[index + 1] = new GUIContent((index + 2).ToString() + ":拘束");
  3360. }
  3361. if (poseGroupArray[index] == "rosyutu_pose01_f")
  3362. {
  3363. poseGroupComboList[index + 1] = new GUIContent((index + 2).ToString() + ":エロ");
  3364. }
  3365. if (poseGroupArray[index] == "rosyutu_aruki_f_once_,1.37")
  3366. {
  3367. poseGroupComboList[index + 1] = new GUIContent((index + 2).ToString() + ":歩き");
  3368. }
  3369. if (poseGroupArray[index] == "stand_desk1")
  3370. {
  3371. poseGroupComboList[index + 1] = new GUIContent((index + 2).ToString() + ":その他");
  3372. }
  3373. if (poseGroupArray[index] == poseArray5[0])
  3374. {
  3375. poseGroupComboList[index + 1] = new GUIContent((index + 2).ToString() + ":ダンスMC");
  3376. }
  3377. if (poseGroupArray[index] == poseArray6[0])
  3378. {
  3379. poseGroupComboList[index + 1] = new GUIContent((index + 2).ToString() + ":ダンス");
  3380. }
  3381. if (existPose && strS != "")
  3382. {
  3383. if (index == poseGroupArray.Length - 4)
  3384. {
  3385. poseGroupComboList[index + 1] = new GUIContent((index + 2).ToString() + ":通常2");
  3386. }
  3387. if (index == poseGroupArray.Length - 3)
  3388. {
  3389. poseGroupComboList[index + 1] = new GUIContent((index + 2).ToString() + ":エロ2");
  3390. }
  3391. if (index == poseGroupArray.Length - 2)
  3392. {
  3393. poseGroupComboList[index + 1] = new GUIContent("98:撮影モード");
  3394. }
  3395. if (index == poseGroupArray.Length - 1)
  3396. {
  3397. poseGroupComboList[index + 1] = new GUIContent("99:登録ポーズ");
  3398. }
  3399. }
  3400. else if (existPose && strS == "")
  3401. {
  3402. if (index == poseGroupArray.Length - 3)
  3403. {
  3404. poseGroupComboList[index + 1] = new GUIContent((index + 2).ToString() + ":通常2");
  3405. }
  3406. if (index == poseGroupArray.Length - 2)
  3407. {
  3408. poseGroupComboList[index + 1] = new GUIContent((index + 2).ToString() + ":エロ2");
  3409. }
  3410. if (index == poseGroupArray.Length - 1)
  3411. {
  3412. poseGroupComboList[index + 1] = new GUIContent("99:登録ポーズ");
  3413. }
  3414. }
  3415. else if (!existPose && strS != "")
  3416. {
  3417. if (index == poseGroupArray.Length - 3)
  3418. {
  3419. poseGroupComboList[index + 1] = new GUIContent((index + 2).ToString() + ":通常2");
  3420. }
  3421. if (index == poseGroupArray.Length - 2)
  3422. {
  3423. poseGroupComboList[index + 1] = new GUIContent((index + 2).ToString() + ":エロ2");
  3424. }
  3425. if (index == poseGroupArray.Length - 1)
  3426. {
  3427. poseGroupComboList[index + 1] = new GUIContent("98:撮影モード");
  3428. }
  3429. }
  3430. else
  3431. {
  3432. if (index == poseGroupArray.Length - 2)
  3433. {
  3434. poseGroupComboList[index + 1] = new GUIContent((index + 2).ToString() + ":通常2");
  3435. }
  3436. if (index == poseGroupArray.Length - 1)
  3437. {
  3438. poseGroupComboList[index + 1] = new GUIContent((index + 2).ToString() + ":エロ2");
  3439. }
  3440. }
  3441. }
  3442. poseInitFlg = true;
  3443. itemCombo.selectedItemIndex = 0;
  3444. int length = itemArray.Length;
  3445. itemComboList = new GUIContent[length - 1];
  3446. for (int index = 0; index < length; ++index)
  3447. {
  3448. if (index == 0)
  3449. {
  3450. itemComboList[index] = new GUIContent("アイテム無し");
  3451. }
  3452. else
  3453. {
  3454. switch (itemArray[index])
  3455. {
  3456. case "handitem,HandItemR_WineGlass_I_.menu":
  3457. itemComboList[index] = new GUIContent(index.ToString() + ":ワイングラス");
  3458. break;
  3459. case "handitem,HandItemR_WineBottle_I_.menu":
  3460. itemComboList[index] = new GUIContent(index.ToString() + ":ワインボトル");
  3461. break;
  3462. case "handitem,handitemr_racket_I_.menu":
  3463. itemComboList[index] = new GUIContent(index.ToString() + ":ラケット");
  3464. break;
  3465. case "handitem,HandItemR_Hataki_I_.menu":
  3466. itemComboList[index] = new GUIContent(index.ToString() + ":ハタキ");
  3467. break;
  3468. case "handitem,HandItemR_Mop_I_.menu":
  3469. itemComboList[index] = new GUIContent(index.ToString() + ":モップ");
  3470. break;
  3471. case "handitem,HandItemR_Houki_I_.menu":
  3472. itemComboList[index] = new GUIContent(index.ToString() + ":ほうき");
  3473. break;
  3474. case "handitem,HandItemR_Zoukin2_I_.menu":
  3475. itemComboList[index] = new GUIContent(index.ToString() + ":雑巾");
  3476. break;
  3477. case "handitem,HandItemR_Chu-B_Lip_I_.menu":
  3478. itemComboList[index] = new GUIContent(index.ToString() + ":Chu-B Lip");
  3479. break;
  3480. case "handitem,HandItemR_Mimikaki_I_.menu":
  3481. itemComboList[index] = new GUIContent(index.ToString() + ":耳かき");
  3482. break;
  3483. case "handitem,HandItemR_Pen_I_.menu":
  3484. itemComboList[index] = new GUIContent(index.ToString() + ":ペン");
  3485. break;
  3486. case "handitem,HandItemR_Otama_I_.menu":
  3487. itemComboList[index] = new GUIContent(index.ToString() + ":おたま");
  3488. break;
  3489. case "handitem,HandItemR_Houchou_I_.menu":
  3490. itemComboList[index] = new GUIContent(index.ToString() + ":包丁");
  3491. break;
  3492. case "handitem,HandItemR_Book_I_.menu":
  3493. itemComboList[index] = new GUIContent(index.ToString() + ":本");
  3494. break;
  3495. case "handitem,HandItemR_Puff_I_.menu":
  3496. itemComboList[index] = new GUIContent(index.ToString() + ":パフ");
  3497. break;
  3498. case "handitem,HandItemR_Rip_I_.menu":
  3499. itemComboList[index] = new GUIContent(index.ToString() + ":リップ");
  3500. break;
  3501. case "handitem,HandItemD_Shisyuu_Hari_I_.menu":
  3502. itemComboList[index] = new GUIContent(index.ToString() + ":刺繍");
  3503. break;
  3504. case "handitem,HandItemD_Sara_Sponge_I_.menu":
  3505. itemComboList[index] = new GUIContent(index.ToString() + ":皿・スポンジ");
  3506. break;
  3507. case "kousoku_upper,KousokuU_TekaseOne_I_.menu":
  3508. itemComboList[index] = new GUIContent(index.ToString() + ":手枷1");
  3509. break;
  3510. case "kousoku_upper,KousokuU_TekaseTwo_I_.menu":
  3511. itemComboList[index] = new GUIContent(index.ToString() + ":手枷2");
  3512. break;
  3513. case "kousoku_lower,KousokuL_AshikaseUp_I_.menu":
  3514. itemComboList[index] = new GUIContent(index.ToString() + ":足枷");
  3515. break;
  3516. case "handitem,HandItemR_Usuba_Houchou_I_.menu":
  3517. itemComboList[index] = new GUIContent(index.ToString() + "薄刃包丁");
  3518. break;
  3519. case "handitem,HandItemR_Chusyaki_I_.menu":
  3520. itemComboList[index] = new GUIContent(index.ToString() + "注射器");
  3521. break;
  3522. case "handitem,HandItemR_Nei_Heartful_I_.menu":
  3523. itemComboList[index] = new GUIContent(index.ToString() + "ハートフルねい人形");
  3524. break;
  3525. case "handitem,HandItemR_Shaker_I_.menu":
  3526. itemComboList[index] = new GUIContent(index.ToString() + "シェイカー");
  3527. break;
  3528. case "handitem,HandItemR_SmartPhone_I_.menu":
  3529. itemComboList[index] = new GUIContent(index.ToString() + "スマートフォン");
  3530. break;
  3531. case "kousoku_upper,KousokuU_Ushirode_I_.menu":
  3532. itemComboList[index - 1] = new GUIContent((index - 1).ToString() + ":後ろ手拘束具");
  3533. break;
  3534. case "kousoku_upper,KousokuU_SMRoom_Haritsuke_I_.menu":
  3535. itemComboList[index - 1] = new GUIContent((index - 1).ToString() + ":磔台・手枷足枷");
  3536. break;
  3537. case "kousoku_upper,KousokuU_SMRoom2_Haritsuke_I_.menu":
  3538. itemComboList[index - 1] = new GUIContent((index - 1).ToString() + ":磔台・手枷足枷2");
  3539. break;
  3540. case "handitem,HandItemL_Dance_Hataki_I_.menu":
  3541. itemComboList[index - 1] = new GUIContent((index - 1).ToString() + ":ダンスハタキ");
  3542. break;
  3543. case "handitem,HandItemL_Dance_Mop_I_.menu":
  3544. itemComboList[index - 1] = new GUIContent((index - 1).ToString() + ":ダンスモップ");
  3545. break;
  3546. case "handitem,HandItemL_Dance_Zoukin_I_.menu":
  3547. itemComboList[index - 1] = new GUIContent((index - 1).ToString() + ":ダンス雑巾");
  3548. break;
  3549. case "handitem,HandItemL_Kozara_I_.menu":
  3550. itemComboList[index - 1] = new GUIContent((index - 1).ToString() + ":小皿");
  3551. break;
  3552. case "handitem,HandItemR_Teacup_I_.menu":
  3553. itemComboList[index - 1] = new GUIContent((index - 1).ToString() + ":ティーカップ");
  3554. break;
  3555. case "handitem,HandItemL_Teasaucer_I_.menu":
  3556. itemComboList[index - 1] = new GUIContent((index - 1).ToString() + ":ティーソーサー");
  3557. break;
  3558. case "handitem,HandItemR_Wholecake_I_.menu":
  3559. itemComboList[index - 1] = new GUIContent("ホールケーキ");
  3560. break;
  3561. case "handitem,HandItemR_Menu_I_.menu":
  3562. itemComboList[index - 1] = new GUIContent("メニュー表");
  3563. break;
  3564. case "handitem,HandItemR_Vibe_I_.menu":
  3565. itemComboList[index - 1] = new GUIContent((index - 1).ToString() + ":バイブ");
  3566. break;
  3567. case "handitem,HandItemR_VibePink_I_.menu":
  3568. itemComboList[index - 1] = new GUIContent((index - 1).ToString() + ":ピンクバイブ");
  3569. break;
  3570. case "handitem,HandItemR_VibeBig_I_.menu":
  3571. itemComboList[index - 1] = new GUIContent((index - 1).ToString() + ":太バイブ");
  3572. break;
  3573. case "handitem,HandItemR_AnalVibe_I_.menu":
  3574. itemComboList[index - 1] = new GUIContent((index - 1).ToString() + ":アナルバイブ");
  3575. break;
  3576. case "handitem,HandItemH_SoutouVibe_I_.menu":
  3577. itemComboList[index - 1] = new GUIContent((index - 1).ToString() + ":前:双頭バイブ");
  3578. break;
  3579. case "accvag,accVag_Vibe_I_.menu":
  3580. itemComboList[index - 1] = new GUIContent((index - 1).ToString() + ":前:バイブ");
  3581. break;
  3582. case "accvag,accVag_VibeBig_I_.menu":
  3583. itemComboList[index - 1] = new GUIContent((index - 1).ToString() + ":前:太バイブ");
  3584. break;
  3585. case "accvag,accVag_VibePink_I_.menu":
  3586. itemComboList[index - 1] = new GUIContent((index - 1).ToString() + ":前:ピンクバイブ");
  3587. break;
  3588. case "accanl,accAnl_AnalVibe_I_.menu":
  3589. itemComboList[index - 1] = new GUIContent((index - 1).ToString() + ":後:アナルバイブ");
  3590. break;
  3591. case "accanl,accAnl_Photo_NomalVibe_I_.menu":
  3592. itemComboList[index - 1] = new GUIContent((index - 1).ToString() + ":後:バイブ");
  3593. break;
  3594. case "accanl,accAnl_Photo_VibeBig_I_.menu":
  3595. itemComboList[index - 1] = new GUIContent((index - 1).ToString() + ":後:太バイブ");
  3596. break;
  3597. case "accanl,accAnl_Photo_VibePink_I_.menu":
  3598. itemComboList[index - 1] = new GUIContent((index - 1).ToString() + ":後:ピンクバイブ");
  3599. break;
  3600. case "handitem,HandItemL_Etoile_Saucer_I_.menu":
  3601. itemComboList[index - 1] = new GUIContent((index - 1).ToString() + "ティーソーサー");
  3602. break;
  3603. case "handitem,HandItemR_Etoile_Teacup_I_.menu":
  3604. itemComboList[index - 1] = new GUIContent((index - 1).ToString() + "ティーカップ");
  3605. break;
  3606. case "handitem,HandItemL_Katuramuki_Daikon_I_.menu":
  3607. itemComboList[index - 1] = new GUIContent((index - 1).ToString() + "桂むき大根");
  3608. break;
  3609. case "handitem,HandItemL_Karte_I_.menu":
  3610. itemComboList[index - 1] = new GUIContent((index - 1).ToString() + "カルテ");
  3611. break;
  3612. case "handitem,HandItemL_Cracker_I_.menu":
  3613. itemComboList[index - 1] = new GUIContent((index - 1).ToString() + "クラッカー");
  3614. break;
  3615. }
  3616. if (index == 12)
  3617. {
  3618. itemComboList[index] = new GUIContent(index.ToString() + ":手枷・足枷");
  3619. }
  3620. if (index == 13)
  3621. {
  3622. itemComboList[index] = new GUIContent(index.ToString() + ":手枷・足枷(下)");
  3623. }
  3624. if (index == 24)
  3625. {
  3626. itemComboList[index - 1] = new GUIContent((index - 1).ToString() + ":カップ&ソーサー");
  3627. }
  3628. }
  3629. }
  3630. }
  3631. if (poseCombo.isClickedComboButton)
  3632. {
  3633. GUI.enabled = false;
  3634. }
  3635. if (poseGroupCombo.isClickedComboButton)
  3636. {
  3637. GUI.enabled = false;
  3638. }
  3639. if (sceneLevel == 3 || sceneLevel == 5 || isF6)
  3640. {
  3641. if (!isF6)
  3642. {
  3643. bool flag = true;
  3644. if (faceFlg || poseFlg || sceneFlg || kankyoFlg || kankyo2Flg)
  3645. {
  3646. flag = false;
  3647. }
  3648. if (GUI.Toggle(new Rect(GetPix(2),
  3649. GetPix(2),
  3650. GetPix(39),
  3651. GetPix(20)),
  3652. flag,
  3653. "配置",
  3654. style4))
  3655. {
  3656. faceFlg = false;
  3657. poseFlg = false;
  3658. sceneFlg = false;
  3659. kankyoFlg = false;
  3660. kankyo2Flg = false;
  3661. bGui = true;
  3662. }
  3663. }
  3664. if (!yotogiFlg && GUI.Toggle(new Rect(GetPix(41),
  3665. GetPix(2),
  3666. GetPix(39),
  3667. GetPix(20)),
  3668. poseFlg,
  3669. "操作",
  3670. style4))
  3671. {
  3672. poseFlg = true;
  3673. faceFlg = false;
  3674. sceneFlg = false;
  3675. kankyoFlg = false;
  3676. kankyo2Flg = false;
  3677. }
  3678. if (GUI.Toggle(new Rect(GetPix(80), GetPix(2), GetPix(39), GetPix(20)),
  3679. faceFlg,
  3680. "表情",
  3681. style4))
  3682. {
  3683. faceFlg = true;
  3684. poseFlg = false;
  3685. sceneFlg = false;
  3686. kankyoFlg = false;
  3687. kankyo2Flg = false;
  3688. if (!faceFlg2)
  3689. {
  3690. isFaceInit = true;
  3691. faceFlg2 = true;
  3692. maidArray[selectMaidIndex].boMabataki = false;
  3693. faceCombo.selectedItemIndex = faceIndex[selectMaidIndex];
  3694. }
  3695. isFaceInit = true;
  3696. }
  3697. if (GUI.Toggle(new Rect(GetPix(119), GetPix(2), GetPix(39), GetPix(20)),
  3698. kankyoFlg,
  3699. "環境",
  3700. style4))
  3701. {
  3702. poseFlg = false;
  3703. faceFlg = false;
  3704. sceneFlg = false;
  3705. kankyoFlg = true;
  3706. kankyo2Flg = false;
  3707. }
  3708. if (!line1)
  3709. {
  3710. line1 = MakeTex(2, 2, new Color(0.0f, 0.0f, 0.0f, 0.3f));
  3711. line2 = MakeTex(2, 2, new Color(0.7f, 0.7f, 0.7f, 0.6f));
  3712. }
  3713. GUI.DrawTexture(new Rect(GetPix(5), GetPix(20), GetPix(160), 2f), line1);
  3714. GUI.DrawTexture(new Rect(GetPix(5), GetPix(20), GetPix(160), 1f), line2);
  3715. style1.fontSize = GetPix(13);
  3716. style1.alignment = TextAnchor.MiddleCenter;
  3717. GUI.Label(new Rect(GetPix(125), GetPix(25), GetPix(40), GetPix(25)),
  3718. string.Concat(selectMaidIndex + 1),
  3719. style1);
  3720. style1.fontSize = GetPix(11);
  3721. style1.alignment = TextAnchor.UpperLeft;
  3722. }
  3723. if (sceneLevel > 0)
  3724. {
  3725. int selectMaidIndex = this.selectMaidIndex;
  3726. if (sceneLevel == 3 || sceneLevel == 5 && (isF7 || maidCnt > 1))
  3727. {
  3728. if (GUI.Button(new Rect(GetPix(5),
  3729. GetPix(53),
  3730. GetPix(23),
  3731. GetPix(32)),
  3732. "<",
  3733. style3))
  3734. {
  3735. --this.selectMaidIndex;
  3736. if (this.selectMaidIndex < 0)
  3737. {
  3738. this.selectMaidIndex = selectList.Count - 1;
  3739. }
  3740. isPoseInit = true;
  3741. poseFlg = true;
  3742. copyIndex = 0;
  3743. poseCombo.selectedItemIndex = poseIndex[this.selectMaidIndex];
  3744. faceCombo.selectedItemIndex = faceIndex[this.selectMaidIndex];
  3745. }
  3746. if (GUI.Button(new Rect(GetPix(135),
  3747. GetPix(53),
  3748. GetPix(23),
  3749. GetPix(32)),
  3750. ">",
  3751. style3))
  3752. {
  3753. ++this.selectMaidIndex;
  3754. if (selectList.Count <= this.selectMaidIndex)
  3755. {
  3756. this.selectMaidIndex = 0;
  3757. }
  3758. isPoseInit = true;
  3759. poseFlg = true;
  3760. copyIndex = 0;
  3761. poseCombo.selectedItemIndex = poseIndex[this.selectMaidIndex];
  3762. faceCombo.selectedItemIndex = faceIndex[this.selectMaidIndex];
  3763. }
  3764. }
  3765. if (maidArray[this.selectMaidIndex].GetThumIcon())
  3766. {
  3767. GUI.DrawTexture(new Rect(GetPix(30),
  3768. GetPix(25),
  3769. GetPix(60),
  3770. GetPix(60)),
  3771. maidArray[this.selectMaidIndex].GetThumIcon());
  3772. }
  3773. GUI.Label(new Rect(GetPix(90), GetPix(50), GetPix(140), GetPix(210)),
  3774. maidArray[this.selectMaidIndex].status.lastName + "\n" + maidArray[this.selectMaidIndex].status.firstName,
  3775. style1);
  3776. }
  3777. if (!isF6)
  3778. {
  3779. if (isDanceStop)
  3780. {
  3781. isStop[selectMaidIndex] = true;
  3782. isDanceStop = false;
  3783. }
  3784. if (sceneLevel == 5 && maidCnt > 1)
  3785. {
  3786. bool flag = false;
  3787. if (selectMaidIndex == isEditNo)
  3788. {
  3789. flag = true;
  3790. }
  3791. isEdit[selectMaidIndex] =
  3792. GUI.Toggle(new Rect(GetPix(5),
  3793. GetPix(25),
  3794. GetPix(50),
  3795. GetPix(16)),
  3796. flag,
  3797. "Edit",
  3798. style4);
  3799. if (isEdit[selectMaidIndex] && selectMaidIndex != isEditNo)
  3800. {
  3801. isEditNo = selectMaidIndex;
  3802. for (int index = 0; index < maidCnt; ++index)
  3803. {
  3804. if (index != isEditNo)
  3805. {
  3806. isEdit[index] = false;
  3807. }
  3808. }
  3809. SceneEdit component = GameObject.Find("__SceneEdit__").GetComponent<SceneEdit>();
  3810. SetFieldValue<SceneEdit, Maid>(component, "m_maid", maidArray[selectMaidIndex]);
  3811. component.PartsTypeCamera(MPN.stkg);
  3812. editSelectMaid = maidArray[selectMaidIndex];
  3813. if (selectList[selectMaidIndex] != null && goSlot[(int)selectList[selectMaidIndex]] != null)
  3814. {
  3815. maidArray[selectMaidIndex].body0.goSlot =
  3816. new List<TBodySkin>(goSlot[(int)selectList[selectMaidIndex]]);
  3817. for (int index = 0; index < bodyHit[(int)selectList[selectMaidIndex]].Count; ++index)
  3818. {
  3819. maidArray[selectMaidIndex].body0.goSlot[index].bonehair.bodyhit =
  3820. bodyHit[(int)selectList[selectMaidIndex]][index];
  3821. }
  3822. }
  3823. }
  3824. }
  3825. GUI.enabled = !poseGroupCombo.isClickedComboButton;
  3826. if (isLock[selectMaidIndex])
  3827. {
  3828. GUI.enabled = false;
  3829. }
  3830. int result;
  3831. Transform transform;
  3832. if (GUI.Button(new Rect(GetPix(5), GetPix(125), GetPix(23), GetPix(23)),
  3833. "<",
  3834. style3))
  3835. {
  3836. --poseIndex[selectMaidIndex];
  3837. if (poseGroupIndex > 0)
  3838. {
  3839. if ((int)groupList[poseGroupIndex - 1] > poseIndex[selectMaidIndex])
  3840. {
  3841. poseIndex[selectMaidIndex] = poseGroupIndex < groupList.Count
  3842. ? (int)groupList[poseGroupIndex] - 1
  3843. : poseArray.Length - 1;
  3844. }
  3845. }
  3846. else if (poseIndex[selectMaidIndex] < 0)
  3847. {
  3848. poseIndex[selectMaidIndex] = (int)groupList[poseGroupIndex] - 1;
  3849. }
  3850. isPoseInit = true;
  3851. poseCombo.selectedItemIndex = poseGroupIndex <= 0
  3852. ? poseIndex[selectMaidIndex]
  3853. : poseIndex[selectMaidIndex] - (int)groupList[poseGroupIndex - 1];
  3854. if (!isLock[selectMaidIndex] && maid && maid.Visible)
  3855. {
  3856. string[] strArray = poseArray[poseIndex[selectMaidIndex]].Split(',');
  3857. isStop[selectMaidIndex] = false;
  3858. poseCount[selectMaidIndex] = 20;
  3859. if (strArray[0].Contains("_momi") || strArray[0].Contains("paizuri_"))
  3860. {
  3861. maid.body0.MuneYureL(0.0f);
  3862. maid.body0.MuneYureR(0.0f);
  3863. }
  3864. else
  3865. {
  3866. maid.body0.MuneYureL(1f);
  3867. maid.body0.MuneYureR(1f);
  3868. }
  3869. if (strArray[0].Contains("MultipleMaidsPose"))
  3870. {
  3871. string path = strArray[0].Split('/')[1];
  3872. byte[] numArray = new byte[0];
  3873. try
  3874. {
  3875. using (FileStream fileStream = new FileStream(path, FileMode.Open, FileAccess.Read))
  3876. {
  3877. numArray = new byte[fileStream.Length];
  3878. fileStream.Read(numArray, 0, numArray.Length);
  3879. }
  3880. }
  3881. catch { }
  3882. if (0 < numArray.Length)
  3883. {
  3884. long hashCode = Path.GetFileName(path).GetHashCode();
  3885. maid.body0.CrossFade(hashCode.ToString(), numArray, false, false, false, 0.0f, 1f);
  3886. Maid.AutoTwist[] autoTwistArray = new Maid.AutoTwist[6]
  3887. {
  3888. Maid.AutoTwist.ShoulderL, Maid.AutoTwist.ShoulderR, Maid.AutoTwist.WristL, Maid.AutoTwist.WristR,
  3889. Maid.AutoTwist.ThighL, Maid.AutoTwist.ThighR
  3890. };
  3891. foreach (Maid.AutoTwist f_eType in autoTwistArray)
  3892. {
  3893. maid.SetAutoTwist(f_eType, true);
  3894. }
  3895. }
  3896. }
  3897. else if (strArray[0].StartsWith("p") && int.TryParse(strArray[0].Substring(1), out result))
  3898. {
  3899. loadPose[selectMaidIndex] = strArray[0];
  3900. }
  3901. else if (!strArray[0].StartsWith("dance_"))
  3902. {
  3903. maidArray[selectMaidIndex].CrossFade(strArray[0] + ".anm", false, true, false, 0.0f, 1f);
  3904. }
  3905. else
  3906. {
  3907. if (!maid.body0.m_Bones.GetComponent<Animation>().GetClip(strArray[0] + ".anm"))
  3908. {
  3909. maid.body0.LoadAnime(strArray[0] + ".anm", GameUty.FileSystem, strArray[0] + ".anm", false, false);
  3910. }
  3911. maid.body0.m_Bones.GetComponent<Animation>().Play(strArray[0] + ".anm");
  3912. }
  3913. if (strArray.Length > 1)
  3914. {
  3915. maid.body0.m_Bones.GetComponent<Animation>()[strArray[0] + ".anm"].time = float.Parse(strArray[1]);
  3916. isDanceStop = true;
  3917. if (strArray.Length > 2)
  3918. {
  3919. transform = CMT.SearchObjName(maidArray[selectMaidIndex].body0.m_Bones.transform, "Bip01", true);
  3920. isPoseIti[selectMaidIndex] = true;
  3921. poseIti[selectMaidIndex] = maidArray[selectMaidIndex].transform.position;
  3922. maidArray[selectMaidIndex].transform.position = new Vector3(100f, 100f, 100f);
  3923. }
  3924. }
  3925. }
  3926. }
  3927. if (GUI.Button(new Rect(GetPix(135),
  3928. GetPix(125),
  3929. GetPix(23),
  3930. GetPix(23)),
  3931. ">",
  3932. style3))
  3933. {
  3934. ++poseIndex[selectMaidIndex];
  3935. if (poseIndex[selectMaidIndex] > (int)groupList[groupList.Count - 1])
  3936. {
  3937. if (poseIndex[selectMaidIndex] >= poseArray.Length)
  3938. {
  3939. poseIndex[selectMaidIndex] = (int)groupList[poseGroupIndex - 1];
  3940. }
  3941. }
  3942. else if (poseIndex[selectMaidIndex] >= (int)groupList[poseGroupIndex])
  3943. {
  3944. poseIndex[selectMaidIndex] = poseGroupIndex <= 0 ? 0 : (int)groupList[poseGroupIndex - 1];
  3945. }
  3946. isPoseInit = true;
  3947. poseCombo.selectedItemIndex = poseGroupIndex <= 0
  3948. ? poseIndex[selectMaidIndex]
  3949. : poseIndex[selectMaidIndex] - (int)groupList[poseGroupIndex - 1];
  3950. if (!isLock[selectMaidIndex] && maid && maid.Visible)
  3951. {
  3952. string[] strArray = poseArray[poseIndex[selectMaidIndex]].Split(',');
  3953. isStop[selectMaidIndex] = false;
  3954. poseCount[selectMaidIndex] = 20;
  3955. if (strArray[0].Contains("_momi") || strArray[0].Contains("paizuri_"))
  3956. {
  3957. maid.body0.MuneYureL(0.0f);
  3958. maid.body0.MuneYureR(0.0f);
  3959. }
  3960. else
  3961. {
  3962. maid.body0.MuneYureL(1f);
  3963. maid.body0.MuneYureR(1f);
  3964. }
  3965. if (strArray[0].Contains("MultipleMaidsPose"))
  3966. {
  3967. string path = strArray[0].Split('/')[1];
  3968. byte[] numArray = new byte[0];
  3969. try
  3970. {
  3971. using (FileStream fileStream = new FileStream(path, FileMode.Open, FileAccess.Read))
  3972. {
  3973. numArray = new byte[fileStream.Length];
  3974. fileStream.Read(numArray, 0, numArray.Length);
  3975. }
  3976. }
  3977. catch { }
  3978. if (0 < numArray.Length)
  3979. {
  3980. long hashCode = Path.GetFileName(path).GetHashCode();
  3981. maid.body0.CrossFade(hashCode.ToString(), numArray, false, false, false, 0.0f, 1f);
  3982. Maid.AutoTwist[] autoTwistArray = new Maid.AutoTwist[6]
  3983. {
  3984. Maid.AutoTwist.ShoulderL, Maid.AutoTwist.ShoulderR, Maid.AutoTwist.WristL, Maid.AutoTwist.WristR,
  3985. Maid.AutoTwist.ThighL, Maid.AutoTwist.ThighR
  3986. };
  3987. foreach (Maid.AutoTwist f_eType in autoTwistArray)
  3988. {
  3989. maid.SetAutoTwist(f_eType, true);
  3990. }
  3991. }
  3992. }
  3993. else if (strArray[0].StartsWith("p") && int.TryParse(strArray[0].Substring(1), out result))
  3994. {
  3995. loadPose[selectMaidIndex] = strArray[0];
  3996. }
  3997. else if (!strArray[0].StartsWith("dance_"))
  3998. {
  3999. maidArray[selectMaidIndex].CrossFade(strArray[0] + ".anm", false, true, false, 0.0f, 1f);
  4000. }
  4001. else
  4002. {
  4003. if (!maid.body0.m_Bones.GetComponent<Animation>().GetClip(strArray[0] + ".anm"))
  4004. {
  4005. maid.body0.LoadAnime(strArray[0] + ".anm", GameUty.FileSystem, strArray[0] + ".anm", false, false);
  4006. }
  4007. maid.body0.m_Bones.GetComponent<Animation>().Play(strArray[0] + ".anm");
  4008. }
  4009. if (strArray.Length > 1)
  4010. {
  4011. maid.body0.m_Bones.GetComponent<Animation>()[strArray[0] + ".anm"].time = float.Parse(strArray[1]);
  4012. isDanceStop = true;
  4013. if (strArray.Length > 2)
  4014. {
  4015. transform = CMT.SearchObjName(maidArray[selectMaidIndex].body0.m_Bones.transform, "Bip01", true);
  4016. isPoseIti[selectMaidIndex] = true;
  4017. poseIti[selectMaidIndex] = maidArray[selectMaidIndex].transform.position;
  4018. maidArray[selectMaidIndex].transform.position = new Vector3(100f, 100f, 100f);
  4019. }
  4020. }
  4021. }
  4022. }
  4023. GUI.enabled = true;
  4024. int index1 = -1;
  4025. for (int index2 = 0; index2 < groupList.Count; ++index2)
  4026. {
  4027. if (poseIndex[selectMaidIndex] < (int)groupList[index2])
  4028. {
  4029. index1 = index2;
  4030. break;
  4031. }
  4032. }
  4033. int length1 = (int)groupList[0];
  4034. int num1 = 0;
  4035. if (index1 > 0)
  4036. {
  4037. length1 = (int)groupList[index1] - (int)groupList[index1 - 1];
  4038. num1 = (int)groupList[index1 - 1];
  4039. }
  4040. if (index1 < 0)
  4041. {
  4042. index1 = groupList.Count;
  4043. length1 = poseArray.Length - (int)groupList[index1 - 1];
  4044. num1 = (int)groupList[index1 - 1];
  4045. }
  4046. if (poseGroupCombo.selectedItemIndex != index1)
  4047. {
  4048. poseComboList = new GUIContent[length1];
  4049. int index2 = 0;
  4050. for (int index3 = num1; index3 < num1 + length1; ++index3)
  4051. {
  4052. bool flag = false;
  4053. foreach (IniKey key in Preferences["pose"].Keys)
  4054. {
  4055. if (poseArray[index3] == key.Key)
  4056. {
  4057. IniKey iniKey = Preferences["pose"][key.Key];
  4058. if (iniKey.Value != null && iniKey.Value.ToString() != "" && iniKey.Value.ToString() != "del")
  4059. {
  4060. poseComboList[index2] =
  4061. new GUIContent((index2 + 1).ToString() + ":" + iniKey.Value.Split('_')[0]
  4062. + "                    " + key.Key);
  4063. flag = true;
  4064. }
  4065. }
  4066. }
  4067. if (!flag)
  4068. {
  4069. poseComboList[index2] = new GUIContent((index2 + 1).ToString() + ":" + poseArray[index3]);
  4070. }
  4071. ++index2;
  4072. }
  4073. poseGroupCombo.selectedItemIndex = index1;
  4074. poseGroupIndex = index1;
  4075. poseCombo.selectedItemIndex = 0;
  4076. }
  4077. GUI.enabled = !poseCombo.isClickedComboButton && !poseGroupCombo.isClickedComboButton;
  4078. isLook[selectMaidIndex] =
  4079. GUI.Toggle(new Rect(GetPix(8),
  4080. GetPix(155),
  4081. GetPix(65),
  4082. GetPix(16)),
  4083. isLook[selectMaidIndex],
  4084. "顔の向き",
  4085. style4);
  4086. isPoseEdit = GUI.Toggle(new Rect(GetPix(86),
  4087. GetPix(155),
  4088. GetPix(90),
  4089. GetPix(16)),
  4090. isPoseEdit,
  4091. "ポーズ登録",
  4092. style4);
  4093. if (isPoseEdit)
  4094. {
  4095. inName3 = GUI.TextField(new Rect(GetPix(5),
  4096. GetPix(180),
  4097. GetPix(100),
  4098. GetPix(20)),
  4099. inName3);
  4100. if (GUI.Button(new Rect(GetPix(107),
  4101. GetPix(180),
  4102. GetPix(35),
  4103. GetPix(20)),
  4104. "追加",
  4105. style3))
  4106. {
  4107. isSavePose = true;
  4108. GameMain.Instance.SoundMgr.PlaySe("se002.ogg", false);
  4109. existPose = true;
  4110. GUI.FocusControl("");
  4111. }
  4112. if (poseGroupComboList[poseGroupCombo.selectedItemIndex].text != "99:登録ポーズ")
  4113. {
  4114. GUI.enabled = false;
  4115. }
  4116. if (GUI.Button(new Rect(GetPix(144),
  4117. GetPix(180),
  4118. GetPix(24),
  4119. GetPix(20)),
  4120. "削",
  4121. style3))
  4122. {
  4123. GameMain.Instance.SoundMgr.PlaySe("se002.ogg", false);
  4124. List<string> stringList1 = new List<string>();
  4125. stringList1.AddRange(poseArray);
  4126. if (poseComboList[poseCombo.selectedItemIndex].text.Contains("MultipleMaidsPose"))
  4127. {
  4128. string pose = poseArray[poseIndex[selectMaidIndex]];
  4129. stringList1.Remove(pose);
  4130. string path = poseArray[poseIndex[selectMaidIndex]].Split('/')[1].Replace("                    ", "");
  4131. if (File.Exists(path))
  4132. {
  4133. File.Delete(path);
  4134. }
  4135. }
  4136. else
  4137. {
  4138. string[] strArray = poseComboList[poseCombo.selectedItemIndex].text.Split('p');
  4139. string str = strArray[strArray.Length - 1];
  4140. IniKey iniKey = Preferences["pose"]["p" + str];
  4141. if (iniKey.Value != "" || iniKey.Value != "del")
  4142. {
  4143. Preferences["pose"]["p" + str].Value = "del";
  4144. SaveConfig();
  4145. }
  4146. stringList1.Remove("p" + str);
  4147. }
  4148. GUI.FocusControl("");
  4149. poseArray = stringList1.ToArray();
  4150. int index2 = -1;
  4151. for (int index3 = 0; index3 < groupList.Count; ++index3)
  4152. {
  4153. if (poseIndex[selectMaidIndex] < (int)groupList[index3])
  4154. {
  4155. index2 = index3;
  4156. break;
  4157. }
  4158. }
  4159. int length2 = (int)groupList[0];
  4160. int num2 = 0;
  4161. if (index2 > 0)
  4162. {
  4163. length2 = (int)groupList[index2] - (int)groupList[index2 - 1];
  4164. num2 = (int)groupList[index2 - 1];
  4165. }
  4166. if (index2 < 0)
  4167. {
  4168. index2 = groupList.Count;
  4169. length2 = poseArray.Length - (int)groupList[index2 - 1];
  4170. num2 = (int)groupList[index2 - 1];
  4171. }
  4172. poseComboList = new GUIContent[length2];
  4173. int index4 = 0;
  4174. bool existEdit = false;
  4175. for (int index3 = num2; index3 < num2 + length2; ++index3)
  4176. {
  4177. bool flag = false;
  4178. foreach (IniKey key in Preferences["pose"].Keys)
  4179. {
  4180. if (poseArray[index3] == key.Key)
  4181. {
  4182. IniKey iniKey = Preferences["pose"][key.Key];
  4183. if (iniKey.Value != null && iniKey.Value.ToString() != "" && iniKey.Value.ToString() != "del")
  4184. {
  4185. poseComboList[index4] =
  4186. new GUIContent((index4 + 1).ToString() + ":" + iniKey.Value.Split('_')[0]
  4187. + "                    " + key.Key);
  4188. flag = true;
  4189. existEdit = true;
  4190. }
  4191. }
  4192. }
  4193. if (!flag)
  4194. {
  4195. poseComboList[index4] = new GUIContent((index4 + 1).ToString() + ":" + poseArray[index3]);
  4196. }
  4197. ++index4;
  4198. }
  4199. ((Action<string, List<string>>)((path, result_list) =>
  4200. {
  4201. string[] files = Directory.GetFiles(path);
  4202. countS = 0;
  4203. for (int index = 0; index < files.Length; ++index)
  4204. {
  4205. if (Path.GetExtension(files[index]) == ".anm")
  4206. {
  4207. existEdit = true;
  4208. break;
  4209. }
  4210. }
  4211. }))(Path.GetFullPath(".\\") + "Mod\\MultipleMaidsPose", new List<string>());
  4212. if (!existEdit)
  4213. {
  4214. poseIniStr = "";
  4215. List<string> stringList2 = new List<string>(50 + poseGroupArray2.Length);
  4216. stringList2.AddRange(poseGroupArray2);
  4217. stringList2.AddRange(poseGroupArrayVP);
  4218. stringList2.AddRange(poseGroupArrayFB);
  4219. stringList2.AddRange(poseGroupArray3);
  4220. stringList2.Add(poseArray5[0]);
  4221. stringList2.Add(poseArray6[0]);
  4222. stringList2.Add(strList2[0]);
  4223. stringList2.Add(strListE2[0]);
  4224. existPose = false;
  4225. poseGroupArray = stringList2.ToArray();
  4226. groupList = new ArrayList();
  4227. for (int index3 = 0; index3 < poseArray.Length; ++index3)
  4228. {
  4229. for (int index5 = 0; index5 < poseGroupArray.Length; ++index5)
  4230. {
  4231. if (poseGroupArray[index5] == poseArray[index3])
  4232. {
  4233. groupList.Add(index3);
  4234. if (poseGroupArray[index5] == strList2[0])
  4235. {
  4236. sPoseCount = index3;
  4237. }
  4238. }
  4239. }
  4240. }
  4241. poseIndex[selectMaidIndex] = 0;
  4242. poseGroupComboList = new GUIContent[poseGroupArray.Length + 1];
  4243. poseGroupComboList[0] = new GUIContent("1:通常");
  4244. for (int index3 = 0; index3 < poseGroupArray.Length; ++index3)
  4245. {
  4246. if (poseGroupArray[index3] == "maid_dressroom01")
  4247. {
  4248. poseGroupComboList[index3 + 1] = new GUIContent((index3 + 2).ToString() + ":立ち");
  4249. }
  4250. if (poseGroupArray[index3] == "tennis_kamae_f")
  4251. {
  4252. poseGroupComboList[index3 + 1] = new GUIContent((index3 + 2).ToString() + ":中腰");
  4253. }
  4254. if (poseGroupArray[index3] == "senakanagasi_f")
  4255. {
  4256. poseGroupComboList[index3 + 1] = new GUIContent((index3 + 2).ToString() + ":膝をつく");
  4257. }
  4258. if (poseGroupArray[index3] == "work_hansei")
  4259. {
  4260. poseGroupComboList[index3 + 1] = new GUIContent((index3 + 2).ToString() + ":座り");
  4261. }
  4262. if (poseGroupArray[index3] == "inu_taiki_f")
  4263. {
  4264. poseGroupComboList[index3 + 1] = new GUIContent((index3 + 2).ToString() + ":四つん這い");
  4265. }
  4266. if (poseGroupArray[index3] == "syagami_pose_f")
  4267. {
  4268. poseGroupComboList[index3 + 1] = new GUIContent((index3 + 2).ToString() + ":床座り");
  4269. }
  4270. if (poseGroupArray[index3] == "densyasuwari_taiki_f")
  4271. {
  4272. poseGroupComboList[index3 + 1] = new GUIContent((index3 + 2).ToString() + ":椅子座り");
  4273. }
  4274. if (poseGroupArray[index3] == "work_kaiwa")
  4275. {
  4276. poseGroupComboList[index3 + 1] = new GUIContent((index3 + 2).ToString() + ":ソファー座り");
  4277. }
  4278. if (poseGroupArray[index3] == "dance_cm3d2_001_f1,14.14")
  4279. {
  4280. poseGroupComboList[index3 + 1] = new GUIContent((index3 + 2).ToString() + ":ドキドキ☆Fallin' Love");
  4281. }
  4282. if (poseGroupArray[index3] == "dance_cm3d_001_f1,39.25")
  4283. {
  4284. poseGroupComboList[index3 + 1] = new GUIContent((index3 + 2).ToString() + ":entrance to you");
  4285. }
  4286. if (poseGroupArray[index3] == "dance_cm3d_002_end_f1,50.71")
  4287. {
  4288. poseGroupComboList[index3 + 1] = new GUIContent((index3 + 2).ToString() + ":scarlet leap");
  4289. }
  4290. if (poseGroupArray[index3] == "dance_cm3d2_002_smt_f,7.76,")
  4291. {
  4292. poseGroupComboList[index3 + 1] = new GUIContent((index3 + 2).ToString() + ":stellar my tears");
  4293. }
  4294. if (poseGroupArray[index3] == "dance_cm3d_003_sp2_f1,90.15")
  4295. {
  4296. poseGroupComboList[index3 + 1] = new GUIContent((index3 + 2).ToString() + ":rhythmix to you");
  4297. }
  4298. if (poseGroupArray[index3] == "dance_cm3d2_003_hs_f1,0.01,")
  4299. {
  4300. poseGroupComboList[index3 + 1] = new GUIContent((index3 + 2).ToString() + ":happy!happy!スキャンダル!!");
  4301. }
  4302. if (poseGroupArray[index3] == "dance_cm3d_004_kano_f1,124.93")
  4303. {
  4304. poseGroupComboList[index3 + 1] = new GUIContent((index3 + 2).ToString() + ":Can Know Two Close");
  4305. }
  4306. if (poseGroupArray[index3] == "dance_cm3d2_004_sse_f1,0.01")
  4307. {
  4308. poseGroupComboList[index3 + 1] = new GUIContent((index3 + 2).ToString() + ":sweet sweet everyday");
  4309. }
  4310. if (poseGroupArray[index3] == "turusi_sex_in_taiki_f")
  4311. {
  4312. poseGroupComboList[index3 + 1] = new GUIContent((index3 + 2).ToString() + ":拘束");
  4313. }
  4314. if (poseGroupArray[index3] == "rosyutu_pose01_f")
  4315. {
  4316. poseGroupComboList[index3 + 1] = new GUIContent((index3 + 2).ToString() + ":エロ");
  4317. }
  4318. if (poseGroupArray[index3] == "rosyutu_aruki_f_once_,1.37")
  4319. {
  4320. poseGroupComboList[index3 + 1] = new GUIContent((index3 + 2).ToString() + ":歩き");
  4321. }
  4322. if (poseGroupArray[index3] == "stand_desk1")
  4323. {
  4324. poseGroupComboList[index3 + 1] = new GUIContent((index3 + 2).ToString() + ":その他");
  4325. }
  4326. if (poseGroupArray[index3] == poseArray5[0])
  4327. {
  4328. poseGroupComboList[index3 + 1] = new GUIContent((index3 + 2).ToString() + ":ダンスMC");
  4329. }
  4330. if (poseGroupArray[index3] == poseArray6[0])
  4331. {
  4332. poseGroupComboList[index3 + 1] = new GUIContent((index3 + 2).ToString() + ":ダンス");
  4333. }
  4334. if (index3 == poseGroupArray.Length - 2)
  4335. {
  4336. poseGroupComboList[index3 + 1] = new GUIContent((index3 + 2).ToString() + ":通常2");
  4337. }
  4338. if (index3 == poseGroupArray.Length - 1)
  4339. {
  4340. poseGroupComboList[index3 + 1] = new GUIContent((index3 + 2).ToString() + ":エロ2");
  4341. }
  4342. }
  4343. }
  4344. else
  4345. {
  4346. poseGroupCombo.selectedItemIndex = index2;
  4347. poseGroupIndex = index2;
  4348. poseCombo.selectedItemIndex = 0;
  4349. poseIndex[selectMaidIndex] = (int)groupList[groupList.Count - 1];
  4350. if (poseArray.Length <= poseIndex[selectMaidIndex])
  4351. {
  4352. --poseIndex[selectMaidIndex];
  4353. }
  4354. }
  4355. }
  4356. GUI.enabled = !poseCombo.isClickedComboButton && !poseGroupCombo.isClickedComboButton;
  4357. }
  4358. else
  4359. {
  4360. if (!isLook[selectMaidIndex])
  4361. {
  4362. GUI.enabled = false;
  4363. }
  4364. GUI.Label(new Rect(GetPix(8), GetPix(175), GetPix(100), GetPix(25)),
  4365. "顔の向きX",
  4366. style2);
  4367. lookX[selectMaidIndex] =
  4368. GUI.HorizontalSlider(new Rect(GetPix(8),
  4369. GetPix(191),
  4370. GetPix(70),
  4371. GetPix(20)),
  4372. lookX[selectMaidIndex],
  4373. -0.6f,
  4374. 0.6f);
  4375. GUI.Label(new Rect(GetPix(88),
  4376. GetPix(175),
  4377. GetPix(100),
  4378. GetPix(25)),
  4379. "顔の向きY",
  4380. style2);
  4381. lookY[selectMaidIndex] =
  4382. GUI.HorizontalSlider(new Rect(GetPix(88),
  4383. GetPix(191),
  4384. GetPix(70),
  4385. GetPix(20)),
  4386. lookY[selectMaidIndex],
  4387. 0.5f,
  4388. -0.55f);
  4389. GUI.enabled = !poseCombo.isClickedComboButton && !poseGroupCombo.isClickedComboButton;
  4390. }
  4391. int index6 = poseGroupIndex <= 0
  4392. ? poseIndex[selectMaidIndex]
  4393. : poseIndex[selectMaidIndex] - (int)groupList[poseGroupIndex - 1];
  4394. string[] strArray1;
  4395. if (GUI.Button(new Rect(GetPix(5), GetPix(215), GetPix(23), GetPix(23)),
  4396. "<",
  4397. style3))
  4398. {
  4399. --itemIndex[selectMaidIndex];
  4400. if (itemIndex[selectMaidIndex] <= -1)
  4401. {
  4402. itemIndex[selectMaidIndex] = itemArray.Length - 2;
  4403. }
  4404. strArray1 = new string[2];
  4405. string[] strArray2 = itemArray[itemIndex[selectMaidIndex]].Split(',');
  4406. if (itemIndex[selectMaidIndex] > 13)
  4407. {
  4408. strArray2 = itemArray[itemIndex[selectMaidIndex] + 1].Split(',');
  4409. }
  4410. maid.DelProp(MPN.handitem, true);
  4411. maid.DelProp(MPN.accvag, true);
  4412. maid.DelProp(MPN.accanl, true);
  4413. bool flag = false;
  4414. if (itemIndex[selectMaidIndex] == 12 || itemIndex[selectMaidIndex] == 13 || itemIndex[selectMaidIndex] == 23)
  4415. {
  4416. flag = true;
  4417. }
  4418. if (!flag)
  4419. {
  4420. maid.DelProp(MPN.kousoku_upper, true);
  4421. maid.DelProp(MPN.kousoku_lower, true);
  4422. }
  4423. if (strArray2[0] != "")
  4424. {
  4425. maid.SetProp(strArray2[0], strArray2[1], 0, true, false);
  4426. }
  4427. if (itemIndex[selectMaidIndex] == 12)
  4428. {
  4429. string[] strArray3 = itemArray[itemIndex[selectMaidIndex] - 1].Split(',');
  4430. maid.SetProp(strArray3[0], strArray3[1], 0, true, false);
  4431. }
  4432. if (itemIndex[selectMaidIndex] == 13)
  4433. {
  4434. string[] strArray3 = itemArray[itemIndex[selectMaidIndex] + 1].Split(',');
  4435. maid.SetProp(strArray3[0], strArray3[1], 0, true, false);
  4436. }
  4437. if (itemIndex[selectMaidIndex] == 23)
  4438. {
  4439. string[] strArray3 = itemArray[itemIndex[selectMaidIndex]].Split(',');
  4440. maid.SetProp(strArray3[0], strArray3[1], 0, true, false);
  4441. cafeFlg[selectMaidIndex] = true;
  4442. }
  4443. maid.AllProcPropSeqStart();
  4444. itemCombo.selectedItemIndex = itemIndex[selectMaidIndex];
  4445. }
  4446. if (GUI.Button(new Rect(GetPix(135),
  4447. GetPix(215),
  4448. GetPix(23),
  4449. GetPix(23)),
  4450. ">",
  4451. style3))
  4452. {
  4453. ++itemIndex[selectMaidIndex];
  4454. if (itemIndex[selectMaidIndex] >= itemArray.Length - 1)
  4455. {
  4456. itemIndex[selectMaidIndex] = 0;
  4457. }
  4458. strArray1 = new string[2];
  4459. string[] strArray2 = itemArray[itemIndex[selectMaidIndex]].Split(',');
  4460. if (itemIndex[selectMaidIndex] > 13)
  4461. {
  4462. strArray2 = itemArray[itemIndex[selectMaidIndex] + 1].Split(',');
  4463. }
  4464. maid.DelProp(MPN.handitem, true);
  4465. maid.DelProp(MPN.accvag, true);
  4466. maid.DelProp(MPN.accanl, true);
  4467. bool flag = false;
  4468. if (itemIndex[selectMaidIndex] == 12 || itemIndex[selectMaidIndex] == 13)
  4469. {
  4470. flag = true;
  4471. }
  4472. if (!flag)
  4473. {
  4474. maid.DelProp(MPN.kousoku_upper, true);
  4475. maid.DelProp(MPN.kousoku_lower, true);
  4476. }
  4477. if (strArray2[0] != "")
  4478. {
  4479. maid.SetProp(strArray2[0], strArray2[1], 0, true, false);
  4480. }
  4481. if (itemIndex[selectMaidIndex] == 12)
  4482. {
  4483. string[] strArray3 = itemArray[itemIndex[selectMaidIndex] - 1].Split(',');
  4484. maid.SetProp(strArray3[0], strArray3[1], 0, true, false);
  4485. }
  4486. if (itemIndex[selectMaidIndex] == 13)
  4487. {
  4488. string[] strArray3 = itemArray[itemIndex[selectMaidIndex] + 1].Split(',');
  4489. maid.SetProp(strArray3[0], strArray3[1], 0, true, false);
  4490. }
  4491. if (itemIndex[selectMaidIndex] == 23)
  4492. {
  4493. string[] strArray3 = itemArray[itemIndex[selectMaidIndex]].Split(',');
  4494. maid.SetProp(strArray3[0], strArray3[1], 0, true, false);
  4495. cafeFlg[selectMaidIndex] = true;
  4496. }
  4497. maid.AllProcPropSeqStart();
  4498. itemCombo.selectedItemIndex = itemIndex[selectMaidIndex];
  4499. }
  4500. if (itemCombo.isClickedComboButton)
  4501. {
  4502. GUI.enabled = false;
  4503. }
  4504. int offsetTop = GetPix(240);
  4505. int UIHeight = GetPix(330);
  4506. Rect poseWindowScrollRect = new Rect(0, offsetTop, rectWin.width, rectWin.height - offsetTop);
  4507. Rect poseWindowScrollView = new Rect(0, offsetTop, rectWin.width - 20, UIHeight);
  4508. poseScrollPos = GUI.BeginScrollView(poseWindowScrollRect, poseScrollPos, poseWindowScrollView);
  4509. isWear = GUI.Toggle(new Rect(GetPix(5),
  4510. GetPix(248),
  4511. GetPix(70),
  4512. GetPix(20)),
  4513. isWear,
  4514. "トップス",
  4515. style4);
  4516. isSkirt = GUI.Toggle(new Rect(GetPix(90),
  4517. GetPix(248),
  4518. GetPix(70),
  4519. GetPix(20)),
  4520. isSkirt,
  4521. "ボトムス",
  4522. style4);
  4523. isBra = GUI.Toggle(new Rect(GetPix(5),
  4524. GetPix(273),
  4525. GetPix(80),
  4526. GetPix(20)),
  4527. isBra,
  4528. "ブラジャー",
  4529. style4);
  4530. isPanz = GUI.Toggle(new Rect(GetPix(90),
  4531. GetPix(273),
  4532. GetPix(60),
  4533. GetPix(20)),
  4534. isPanz,
  4535. "パンツ",
  4536. style4);
  4537. isHeadset = GUI.Toggle(new Rect(GetPix(5),
  4538. GetPix(298),
  4539. GetPix(70),
  4540. GetPix(20)),
  4541. isHeadset,
  4542. "ヘッド",
  4543. style4);
  4544. isMegane = GUI.Toggle(new Rect(GetPix(95),
  4545. GetPix(298),
  4546. GetPix(70),
  4547. GetPix(20)),
  4548. isMegane,
  4549. "メガネ",
  4550. style4);
  4551. isAccUde = GUI.Toggle(new Rect(GetPix(5),
  4552. GetPix(323),
  4553. GetPix(40),
  4554. GetPix(20)),
  4555. isAccUde,
  4556. "腕",
  4557. style4);
  4558. isGlove = GUI.Toggle(new Rect(GetPix(50),
  4559. GetPix(323),
  4560. GetPix(40),
  4561. GetPix(20)),
  4562. isGlove,
  4563. "手袋",
  4564. style4);
  4565. isAccSenaka = GUI.Toggle(new Rect(GetPix(95),
  4566. GetPix(323),
  4567. GetPix(40),
  4568. GetPix(20)),
  4569. isAccSenaka,
  4570. "背中",
  4571. style4);
  4572. isStkg = GUI.Toggle(new Rect(GetPix(5),
  4573. GetPix(348),
  4574. GetPix(40),
  4575. GetPix(20)),
  4576. isStkg,
  4577. "靴下",
  4578. style4);
  4579. isShoes = GUI.Toggle(new Rect(GetPix(50),
  4580. GetPix(348),
  4581. GetPix(40),
  4582. GetPix(20)),
  4583. isShoes,
  4584. "靴",
  4585. style4);
  4586. isMaid = GUI.Toggle(new Rect(GetPix(95),
  4587. GetPix(348),
  4588. GetPix(70),
  4589. GetPix(20)),
  4590. isMaid,
  4591. "メイド",
  4592. style4);
  4593. mekure1[selectMaidIndex] =
  4594. GUI.Toggle(new Rect(GetPix(5),
  4595. GetPix(373),
  4596. GetPix(62),
  4597. GetPix(20)),
  4598. mekure1[selectMaidIndex],
  4599. "めくれ前",
  4600. style4);
  4601. mekure2[selectMaidIndex] =
  4602. GUI.Toggle(new Rect(GetPix(67),
  4603. GetPix(373),
  4604. GetPix(40),
  4605. GetPix(20)),
  4606. mekure2[selectMaidIndex],
  4607. "後ろ",
  4608. style4);
  4609. zurasi[selectMaidIndex] =
  4610. GUI.Toggle(new Rect(GetPix(105),
  4611. GetPix(373),
  4612. GetPix(50),
  4613. GetPix(20)),
  4614. zurasi[selectMaidIndex],
  4615. "ずらし",
  4616. style4);
  4617. voice1[selectMaidIndex] =
  4618. GUI.Toggle(new Rect(GetPix(5),
  4619. GetPix(530),
  4620. GetPix(70),
  4621. GetPix(20)),
  4622. zFlg[selectMaidIndex],
  4623. "ボイス",
  4624. style4);
  4625. voice2[selectMaidIndex] =
  4626. GUI.Toggle(new Rect(GetPix(70),
  4627. GetPix(530),
  4628. GetPix(70),
  4629. GetPix(20)),
  4630. xFlg[selectMaidIndex],
  4631. "Hボイス",
  4632. style4);
  4633. GUI.enabled = !poseCombo.isClickedComboButton && !poseGroupCombo.isClickedComboButton && !itemCombo.isClickedComboButton;
  4634. GUI.DrawTexture(new Rect(GetPix(5), GetPix(402), GetPix(160), 2f), line1);
  4635. GUI.DrawTexture(new Rect(GetPix(5), GetPix(402), GetPix(160), 1f), line2);
  4636. isIK[selectMaidIndex] =
  4637. GUI.Toggle(new Rect(GetPix(5),
  4638. GetPix(411),
  4639. GetPix(30),
  4640. GetPix(20)),
  4641. isIK[selectMaidIndex],
  4642. "IK",
  4643. style4);
  4644. if (!isLock[selectMaidIndex])
  4645. {
  4646. GUI.enabled = false;
  4647. }
  4648. isLock[selectMaidIndex] =
  4649. GUI.Toggle(new Rect(GetPix(45),
  4650. GetPix(411),
  4651. GetPix(40),
  4652. GetPix(20)),
  4653. isLock[selectMaidIndex],
  4654. "解除",
  4655. style4);
  4656. GUI.enabled = !poseCombo.isClickedComboButton && !poseGroupCombo.isClickedComboButton && !itemCombo.isClickedComboButton;
  4657. if (!isIK[selectMaidIndex])
  4658. {
  4659. GUI.enabled = false;
  4660. }
  4661. isBone[selectMaidIndex] =
  4662. GUI.Toggle(new Rect(GetPix(100),
  4663. GetPix(411),
  4664. GetPix(60),
  4665. GetPix(20)),
  4666. isBone[selectMaidIndex],
  4667. "ボーン",
  4668. style4);
  4669. GUI.enabled = !poseCombo.isClickedComboButton && !poseGroupCombo.isClickedComboButton;
  4670. if (isBone[selectMaidIndex] != isBoneN[selectMaidIndex])
  4671. {
  4672. isBoneN[selectMaidIndex] = isBone[selectMaidIndex];
  4673. isChange[selectMaidIndex] = true;
  4674. }
  4675. if (!isLock[selectMaidIndex] && unLockFlg != isLock[selectMaidIndex])
  4676. {
  4677. string[] strArray2 = poseArray[poseIndex[selectMaidIndex]].Split(',');
  4678. isStop[selectMaidIndex] = false;
  4679. poseCount[selectMaidIndex] = 20;
  4680. if (strArray2[0].Contains("_momi") || strArray2[0].Contains("paizuri_"))
  4681. {
  4682. maid.body0.MuneYureL(0.0f);
  4683. maid.body0.MuneYureR(0.0f);
  4684. }
  4685. else
  4686. {
  4687. maid.body0.MuneYureL(1f);
  4688. maid.body0.MuneYureR(1f);
  4689. }
  4690. if (strArray2[0].Contains("MultipleMaidsPose"))
  4691. {
  4692. string path = strArray2[0].Split('/')[1];
  4693. byte[] numArray = new byte[0];
  4694. try
  4695. {
  4696. using (FileStream fileStream = new FileStream(path, FileMode.Open, FileAccess.Read))
  4697. {
  4698. numArray = new byte[fileStream.Length];
  4699. fileStream.Read(numArray, 0, numArray.Length);
  4700. }
  4701. }
  4702. catch { }
  4703. if (0 < numArray.Length)
  4704. {
  4705. long hashCode = Path.GetFileName(path).GetHashCode();
  4706. maid.body0.CrossFade(hashCode.ToString(), numArray, false, false, false, 0.0f, 1f);
  4707. Maid.AutoTwist[] autoTwistArray = new Maid.AutoTwist[6]
  4708. {
  4709. Maid.AutoTwist.ShoulderL, Maid.AutoTwist.ShoulderR, Maid.AutoTwist.WristL, Maid.AutoTwist.WristR,
  4710. Maid.AutoTwist.ThighL, Maid.AutoTwist.ThighR
  4711. };
  4712. foreach (Maid.AutoTwist f_eType in autoTwistArray)
  4713. {
  4714. maid.SetAutoTwist(f_eType, true);
  4715. }
  4716. }
  4717. }
  4718. else if (strArray2[0].StartsWith("p") && int.TryParse(strArray2[0].Substring(1), out result))
  4719. {
  4720. loadPose[selectMaidIndex] = strArray2[0];
  4721. }
  4722. else if (!strArray2[0].StartsWith("dance_"))
  4723. {
  4724. maidArray[selectMaidIndex].CrossFade(strArray2[0] + ".anm", false, true, false, 0.0f, 1f);
  4725. }
  4726. else
  4727. {
  4728. if (!maid.body0.m_Bones.GetComponent<Animation>().GetClip(strArray2[0] + ".anm"))
  4729. {
  4730. maid.body0.LoadAnime(strArray2[0] + ".anm", GameUty.FileSystem, strArray2[0] + ".anm", false, false);
  4731. }
  4732. maid.body0.m_Bones.GetComponent<Animation>().Play(strArray2[0] + ".anm");
  4733. }
  4734. if (strArray2.Length > 1)
  4735. {
  4736. maid.body0.m_Bones.GetComponent<Animation>()[strArray2[0] + ".anm"].time = float.Parse(strArray2[1]);
  4737. isDanceStop = true;
  4738. if (strArray2.Length > 2)
  4739. {
  4740. transform = CMT.SearchObjName(maidArray[selectMaidIndex].body0.m_Bones.transform, "Bip01", true);
  4741. isPoseIti[selectMaidIndex] = true;
  4742. poseIti[selectMaidIndex] = maidArray[selectMaidIndex].transform.position;
  4743. maidArray[selectMaidIndex].transform.position = new Vector3(100f, 100f, 100f);
  4744. }
  4745. }
  4746. mHandL[selectMaidIndex].initFlg = false;
  4747. mHandR[selectMaidIndex].initFlg = false;
  4748. mFootL[selectMaidIndex].initFlg = false;
  4749. mFootR[selectMaidIndex].initFlg = false;
  4750. pHandL[selectMaidIndex] = 0;
  4751. pHandR[selectMaidIndex] = 0;
  4752. hanten[selectMaidIndex] = false;
  4753. hantenn[selectMaidIndex] = false;
  4754. muneIKL[selectMaidIndex] = false;
  4755. muneIKR[selectMaidIndex] = false;
  4756. maid.body0.jbMuneL.enabled = true;
  4757. maid.body0.jbMuneR.enabled = true;
  4758. if (!GameMain.Instance.VRMode)
  4759. {
  4760. maidArray[selectMaidIndex].body0.quaDefEyeL.eulerAngles = eyeL[(int)selectList[selectMaidIndex]];
  4761. maidArray[selectMaidIndex].body0.quaDefEyeR.eulerAngles = eyeR[(int)selectList[selectMaidIndex]];
  4762. }
  4763. }
  4764. unLockFlg = isLock[selectMaidIndex];
  4765. GUI.enabled = !poseCombo.isClickedComboButton && !poseGroupCombo.isClickedComboButton && !itemCombo.isClickedComboButton;
  4766. if (!isIK[selectMaidIndex])
  4767. {
  4768. GUI.enabled = false;
  4769. }
  4770. hanten[selectMaidIndex] =
  4771. GUI.Toggle(new Rect(GetPix(5),
  4772. GetPix(479),
  4773. GetPix(70),
  4774. GetPix(20)),
  4775. hanten[selectMaidIndex],
  4776. "左右反転",
  4777. style4);
  4778. bool flag1 = GUI.Toggle(new Rect(GetPix(80),
  4779. GetPix(479),
  4780. GetPix(100),
  4781. GetPix(20)),
  4782. kotei[selectMaidIndex],
  4783. "スカート固定",
  4784. style4);
  4785. if (kotei[selectMaidIndex] != flag1)
  4786. {
  4787. kotei[selectMaidIndex] = flag1;
  4788. if (flag1)
  4789. {
  4790. SkirtListArray[selectMaidIndex] = new DynamicSkirtBone[100];
  4791. for (int index2 = 0; index2 < maid.body0.goSlot.Count; ++index2)
  4792. {
  4793. DynamicSkirtBone fieldValue =
  4794. GetFieldValue<BoneHair3, DynamicSkirtBone>(maid.body0.goSlot[index2].bonehair3, "m_SkirtBone");
  4795. SkirtListArray[selectMaidIndex][index2] = fieldValue;
  4796. SetFieldValue8<BoneHair3, DynamicSkirtBone>(maid.body0.goSlot[index2].bonehair3,
  4797. "m_SkirtBone",
  4798. null);
  4799. }
  4800. }
  4801. else
  4802. {
  4803. for (int index2 = 0; index2 < maid.body0.goSlot.Count; ++index2)
  4804. {
  4805. SetFieldValue8<BoneHair3, DynamicSkirtBone>(maid.body0.goSlot[index2].bonehair3,
  4806. "m_SkirtBone",
  4807. SkirtListArray[selectMaidIndex][index2]);
  4808. }
  4809. }
  4810. }
  4811. GUI.Label(new Rect(GetPix(29), GetPix(433), GetPix(100), GetPix(25)),
  4812. "右手",
  4813. style1);
  4814. GUI.Label(new Rect(GetPix(109), GetPix(433), GetPix(100), GetPix(25)),
  4815. "左手",
  4816. style1);
  4817. string text = "未選択";
  4818. if (copyIndex > 0)
  4819. {
  4820. text = copyIndex.ToString() + ":" + maidArray[copyIndex - 1].status.firstName;
  4821. }
  4822. if (maidCnt <= 1)
  4823. {
  4824. GUI.enabled = false;
  4825. }
  4826. GUI.Label(new Rect(GetPix(8), GetPix(505), GetPix(100), GetPix(25)),
  4827. "コピー",
  4828. style1);
  4829. GUI.Label(new Rect(GetPix(70), GetPix(505), GetPix(100), GetPix(25)),
  4830. text,
  4831. style1);
  4832. GUI.enabled = !poseCombo.isClickedComboButton && !poseGroupCombo.isClickedComboButton && !itemCombo.isClickedComboButton
  4833. && isIK[selectMaidIndex];
  4834. style1.fontSize = GetPix(13);
  4835. style1.alignment = TextAnchor.UpperCenter;
  4836. GUI.Label(new Rect(GetPix(-10), GetPix(449), GetPix(100), GetPix(25)),
  4837. pHandR[selectMaidIndex].ToString(),
  4838. style1);
  4839. GUI.Label(new Rect(GetPix(70), GetPix(449), GetPix(100), GetPix(25)),
  4840. pHandL[selectMaidIndex].ToString(),
  4841. style1);
  4842. style1.fontSize = GetPix(11);
  4843. style1.alignment = TextAnchor.UpperLeft;
  4844. if (GUI.Button(new Rect(GetPix(5), GetPix(448), GetPix(23), GetPix(23)),
  4845. "<",
  4846. style3))
  4847. {
  4848. --pHandR[selectMaidIndex];
  4849. if (pHandR[selectMaidIndex] < 1)
  4850. {
  4851. pHandR[selectMaidIndex] = fingerRArray.GetLength(0);
  4852. }
  4853. for (int index2 = 0; index2 < 20; ++index2)
  4854. {
  4855. string[] strArray2 = fingerRArray[pHandR[selectMaidIndex] - 1, index2].Split(',');
  4856. Finger[selectMaidIndex, index2 + 20].localEulerAngles =
  4857. new Vector3(float.Parse(strArray2[0]), float.Parse(strArray2[1]), float.Parse(strArray2[2]));
  4858. }
  4859. isStop[selectMaidIndex] = true;
  4860. isLock[selectMaidIndex] = true;
  4861. for (int index2 = 0; index2 < 10; ++index2)
  4862. {
  4863. if ((index2 == 0 || index2 == 5) && mFinger[selectMaidIndex, index2 * 3])
  4864. {
  4865. mFinger[selectMaidIndex, index2 * 3].reset = true;
  4866. }
  4867. }
  4868. }
  4869. if (GUI.Button(new Rect(GetPix(55),
  4870. GetPix(448),
  4871. GetPix(23),
  4872. GetPix(23)),
  4873. ">",
  4874. style3))
  4875. {
  4876. ++pHandR[selectMaidIndex];
  4877. if (pHandR[selectMaidIndex] > fingerRArray.GetLength(0))
  4878. {
  4879. pHandR[selectMaidIndex] = 1;
  4880. }
  4881. for (int index2 = 0; index2 < 20; ++index2)
  4882. {
  4883. string[] strArray2 = fingerRArray[pHandR[selectMaidIndex] - 1, index2].Split(',');
  4884. Finger[selectMaidIndex, index2 + 20].localEulerAngles =
  4885. new Vector3(float.Parse(strArray2[0]), float.Parse(strArray2[1]), float.Parse(strArray2[2]));
  4886. }
  4887. isStop[selectMaidIndex] = true;
  4888. isLock[selectMaidIndex] = true;
  4889. for (int index2 = 0; index2 < 10; ++index2)
  4890. {
  4891. if ((index2 == 0 || index2 == 5) && mFinger[selectMaidIndex, index2 * 3])
  4892. {
  4893. mFinger[selectMaidIndex, index2 * 3].reset = true;
  4894. }
  4895. }
  4896. }
  4897. if (GUI.Button(new Rect(GetPix(85),
  4898. GetPix(448),
  4899. GetPix(23),
  4900. GetPix(23)),
  4901. "<",
  4902. style3))
  4903. {
  4904. --pHandL[selectMaidIndex];
  4905. if (pHandL[selectMaidIndex] < 1)
  4906. {
  4907. pHandL[selectMaidIndex] = fingerLArray.GetLength(0);
  4908. }
  4909. for (int index2 = 0; index2 < 20; ++index2)
  4910. {
  4911. string[] strArray2 = fingerLArray[pHandL[selectMaidIndex] - 1, index2].Split(',');
  4912. Finger[selectMaidIndex, index2].localEulerAngles =
  4913. new Vector3(float.Parse(strArray2[0]), float.Parse(strArray2[1]), float.Parse(strArray2[2]));
  4914. }
  4915. isStop[selectMaidIndex] = true;
  4916. isLock[selectMaidIndex] = true;
  4917. }
  4918. if (GUI.Button(new Rect(GetPix(135),
  4919. GetPix(448),
  4920. GetPix(23),
  4921. GetPix(23)),
  4922. ">",
  4923. style3))
  4924. {
  4925. ++pHandL[selectMaidIndex];
  4926. if (pHandL[selectMaidIndex] > fingerRArray.GetLength(0))
  4927. {
  4928. pHandL[selectMaidIndex] = 1;
  4929. }
  4930. for (int index2 = 0; index2 < 20; ++index2)
  4931. {
  4932. string[] strArray2 = fingerLArray[pHandL[selectMaidIndex] - 1, index2].Split(',');
  4933. Finger[selectMaidIndex, index2].localEulerAngles =
  4934. new Vector3(float.Parse(strArray2[0]), float.Parse(strArray2[1]), float.Parse(strArray2[2]));
  4935. }
  4936. isStop[selectMaidIndex] = true;
  4937. isLock[selectMaidIndex] = true;
  4938. }
  4939. if (maidCnt <= 1)
  4940. {
  4941. GUI.enabled = false;
  4942. }
  4943. if (GUI.Button(new Rect(GetPix(45),
  4944. GetPix(504),
  4945. GetPix(22),
  4946. GetPix(20)),
  4947. ">",
  4948. style3))
  4949. {
  4950. ++copyIndex;
  4951. if (copyIndex - 1 == selectMaidIndex)
  4952. {
  4953. ++copyIndex;
  4954. }
  4955. if (copyIndex > maidCnt)
  4956. {
  4957. copyIndex = 0;
  4958. }
  4959. }
  4960. if (isCopy)
  4961. {
  4962. isCopy = false;
  4963. CopyIK2(maidArray[selectMaidIndex], selectMaidIndex, maidArray[copyIndex - 1], copyIndex - 1);
  4964. }
  4965. if (copyIndex == 0)
  4966. {
  4967. GUI.enabled = false;
  4968. }
  4969. if (GUI.Button(new Rect(GetPix(123),
  4970. GetPix(504),
  4971. GetPix(35),
  4972. GetPix(20)),
  4973. "決定",
  4974. style3))
  4975. {
  4976. CopyIK(maidArray[selectMaidIndex], selectMaidIndex, maidArray[copyIndex - 1], copyIndex - 1);
  4977. isCopy = true;
  4978. pHandL[selectMaidIndex] = pHandL[copyIndex - 1];
  4979. pHandR[selectMaidIndex] = pHandR[copyIndex - 1];
  4980. hanten[selectMaidIndex] = hanten[copyIndex - 1];
  4981. hantenn[selectMaidIndex] = hantenn[copyIndex - 1];
  4982. }
  4983. GUI.enabled = true;
  4984. if (poseCombo.isClickedComboButton || poseGroupCombo.isClickedComboButton)
  4985. {
  4986. GUI.enabled = false;
  4987. }
  4988. GUI.EndScrollView();
  4989. itemIndex2[selectMaidIndex] =
  4990. itemCombo.List(new Rect(GetPix(35),
  4991. GetPix(215),
  4992. GetPix(95),
  4993. GetPix(23)),
  4994. itemComboList[itemIndex[selectMaidIndex]].text,
  4995. itemComboList,
  4996. buttonStyle1,
  4997. "box",
  4998. listStyle3);
  4999. GUI.enabled = true;
  5000. if (poseGroupCombo.isClickedComboButton || isLock[selectMaidIndex])
  5001. {
  5002. GUI.enabled = false;
  5003. }
  5004. poseCombo.List(new Rect(GetPix(35),
  5005. GetPix(125),
  5006. GetPix(95),
  5007. GetPix(23)),
  5008. poseComboList[index6].text,
  5009. poseComboList,
  5010. buttonStyle1,
  5011. "box",
  5012. listStyle2);
  5013. if (!isLock[selectMaidIndex])
  5014. {
  5015. GUI.enabled = true;
  5016. }
  5017. int index7 = -1;
  5018. for (int index2 = 0; index2 < groupList.Count; ++index2)
  5019. {
  5020. if (poseIndex[selectMaidIndex] < (int)groupList[index2])
  5021. {
  5022. index7 = index2;
  5023. break;
  5024. }
  5025. }
  5026. if (index7 < 0)
  5027. {
  5028. index7 = groupList.Count;
  5029. }
  5030. if (GUI.Button(new Rect(GetPix(5), GetPix(95), GetPix(23), GetPix(23)),
  5031. "<",
  5032. style3))
  5033. {
  5034. isPoseInit = true;
  5035. if (!isLock[selectMaidIndex])
  5036. {
  5037. for (int index2 = 0; index2 < groupList.Count; ++index2)
  5038. {
  5039. if (index2 == 0 && poseIndex[selectMaidIndex] <= (int)groupList[index2])
  5040. {
  5041. poseIndex[selectMaidIndex] = poseIndex[selectMaidIndex] != 0 ? 0 : (int)groupList[groupList.Count - 1];
  5042. break;
  5043. }
  5044. if (index2 > 0 && poseIndex[selectMaidIndex] > (int)groupList[index2 - 1]
  5045. && poseIndex[selectMaidIndex] <= (int)groupList[index2])
  5046. {
  5047. poseIndex[selectMaidIndex] = (int)groupList[index2 - 1];
  5048. break;
  5049. }
  5050. }
  5051. if (poseIndex[selectMaidIndex] > (int)groupList[groupList.Count - 1])
  5052. {
  5053. poseIndex[selectMaidIndex] = (int)groupList[groupList.Count - 1];
  5054. }
  5055. if (maid && maid.Visible)
  5056. {
  5057. string[] strArray2 = poseArray[poseIndex[selectMaidIndex]].Split(',');
  5058. isStop[selectMaidIndex] = false;
  5059. poseCount[selectMaidIndex] = 20;
  5060. if (strArray2[0].Contains("_momi") || strArray2[0].Contains("paizuri_"))
  5061. {
  5062. maid.body0.MuneYureL(0.0f);
  5063. maid.body0.MuneYureR(0.0f);
  5064. }
  5065. else
  5066. {
  5067. maid.body0.MuneYureL(1f);
  5068. maid.body0.MuneYureR(1f);
  5069. }
  5070. if (strArray2[0].Contains("MultipleMaidsPose"))
  5071. {
  5072. string path = strArray2[0].Split('/')[1];
  5073. byte[] numArray = new byte[0];
  5074. try
  5075. {
  5076. using (FileStream fileStream = new FileStream(path, FileMode.Open, FileAccess.Read))
  5077. {
  5078. numArray = new byte[fileStream.Length];
  5079. fileStream.Read(numArray, 0, numArray.Length);
  5080. }
  5081. }
  5082. catch { }
  5083. if (0 < numArray.Length)
  5084. {
  5085. long hashCode = Path.GetFileName(path).GetHashCode();
  5086. maid.body0.CrossFade(hashCode.ToString(), numArray, false, false, false, 0.0f, 1f);
  5087. Maid.AutoTwist[] autoTwistArray = new Maid.AutoTwist[6]
  5088. {
  5089. Maid.AutoTwist.ShoulderL, Maid.AutoTwist.ShoulderR, Maid.AutoTwist.WristL,
  5090. Maid.AutoTwist.WristR, Maid.AutoTwist.ThighL, Maid.AutoTwist.ThighR
  5091. };
  5092. foreach (Maid.AutoTwist f_eType in autoTwistArray)
  5093. {
  5094. maid.SetAutoTwist(f_eType, true);
  5095. }
  5096. }
  5097. }
  5098. else if (strArray2[0].StartsWith("p") && int.TryParse(strArray2[0].Substring(1), out result))
  5099. {
  5100. loadPose[selectMaidIndex] = strArray2[0];
  5101. }
  5102. else if (!strArray2[0].StartsWith("dance_"))
  5103. {
  5104. maidArray[selectMaidIndex].CrossFade(strArray2[0] + ".anm", false, true, false, 0.0f, 1f);
  5105. }
  5106. else
  5107. {
  5108. if (!maid.body0.m_Bones.GetComponent<Animation>().GetClip(strArray2[0] + ".anm"))
  5109. {
  5110. maid.body0.LoadAnime(strArray2[0] + ".anm", GameUty.FileSystem, strArray2[0] + ".anm", false, false);
  5111. }
  5112. maid.body0.m_Bones.GetComponent<Animation>().Play(strArray2[0] + ".anm");
  5113. }
  5114. if (strArray2.Length > 1)
  5115. {
  5116. maid.body0.m_Bones.GetComponent<Animation>()[strArray2[0] + ".anm"].time = float.Parse(strArray2[1]);
  5117. isDanceStop = true;
  5118. if (strArray2.Length > 2)
  5119. {
  5120. transform = CMT.SearchObjName(maidArray[selectMaidIndex].body0.m_Bones.transform, "Bip01", true);
  5121. isPoseIti[selectMaidIndex] = true;
  5122. poseIti[selectMaidIndex] = maidArray[selectMaidIndex].transform.position;
  5123. maidArray[selectMaidIndex].transform.position = new Vector3(100f, 100f, 100f);
  5124. }
  5125. }
  5126. }
  5127. }
  5128. int index3 = -1;
  5129. for (int index2 = 0; index2 < groupList.Count; ++index2)
  5130. {
  5131. if (poseIndex[selectMaidIndex] < (int)groupList[index2])
  5132. {
  5133. index3 = index2;
  5134. break;
  5135. }
  5136. }
  5137. int length2 = (int)groupList[0];
  5138. int num2 = 0;
  5139. if (index3 > 0)
  5140. {
  5141. length2 = (int)groupList[index3] - (int)groupList[index3 - 1];
  5142. num2 = (int)groupList[index3 - 1];
  5143. }
  5144. if (index3 < 0)
  5145. {
  5146. index3 = groupList.Count;
  5147. length2 = poseArray.Length - (int)groupList[index3 - 1];
  5148. num2 = (int)groupList[index3 - 1];
  5149. }
  5150. poseComboList = new GUIContent[length2];
  5151. int index4 = 0;
  5152. for (int index2 = num2; index2 < num2 + length2; ++index2)
  5153. {
  5154. bool flag2 = false;
  5155. foreach (IniKey key in Preferences["pose"].Keys)
  5156. {
  5157. if (poseArray[index2] == key.Key)
  5158. {
  5159. IniKey iniKey = Preferences["pose"][key.Key];
  5160. if (iniKey.Value != null && iniKey.Value.ToString() != "" && iniKey.Value.ToString() != "del")
  5161. {
  5162. poseComboList[index4] =
  5163. new GUIContent((index4 + 1).ToString() + ":" + iniKey.Value.Split('_')[0]
  5164. + "                    " + key.Key);
  5165. flag2 = true;
  5166. }
  5167. }
  5168. }
  5169. if (!flag2)
  5170. {
  5171. poseComboList[index4] = new GUIContent((index4 + 1).ToString() + ":" + poseArray[index2]);
  5172. }
  5173. ++index4;
  5174. }
  5175. poseCombo.scrollPos = new Vector2(0.0f, 0.0f);
  5176. poseGroupCombo.selectedItemIndex = index3;
  5177. poseCombo.selectedItemIndex = 0;
  5178. }
  5179. if (GUI.Button(new Rect(GetPix(135),
  5180. GetPix(95),
  5181. GetPix(23),
  5182. GetPix(23)),
  5183. ">",
  5184. style3))
  5185. {
  5186. isPoseInit = true;
  5187. if (!isLock[selectMaidIndex])
  5188. {
  5189. int num2 = poseIndex[selectMaidIndex];
  5190. for (int index2 = 0; index2 < groupList.Count; ++index2)
  5191. {
  5192. if (poseIndex[selectMaidIndex] < (int)groupList[index2])
  5193. {
  5194. poseIndex[selectMaidIndex] = (int)groupList[index2];
  5195. break;
  5196. }
  5197. }
  5198. if (num2 == poseIndex[selectMaidIndex] && poseIndex[selectMaidIndex] >= (int)groupList[groupList.Count - 1])
  5199. {
  5200. poseIndex[selectMaidIndex] = 0;
  5201. }
  5202. if (maid && maid.Visible)
  5203. {
  5204. string[] strArray2 = poseArray[poseIndex[selectMaidIndex]].Split(',');
  5205. isStop[selectMaidIndex] = false;
  5206. poseCount[selectMaidIndex] = 20;
  5207. if (strArray2[0].Contains("_momi") || strArray2[0].Contains("paizuri_"))
  5208. {
  5209. maid.body0.MuneYureL(0.0f);
  5210. maid.body0.MuneYureR(0.0f);
  5211. }
  5212. else
  5213. {
  5214. maid.body0.MuneYureL(1f);
  5215. maid.body0.MuneYureR(1f);
  5216. }
  5217. if (strArray2[0].Contains("MultipleMaidsPose"))
  5218. {
  5219. string path = strArray2[0].Split('/')[1];
  5220. byte[] numArray = new byte[0];
  5221. try
  5222. {
  5223. using (FileStream fileStream = new FileStream(path, FileMode.Open, FileAccess.Read))
  5224. {
  5225. numArray = new byte[fileStream.Length];
  5226. fileStream.Read(numArray, 0, numArray.Length);
  5227. }
  5228. }
  5229. catch { }
  5230. if (0 < numArray.Length)
  5231. {
  5232. long hashCode = Path.GetFileName(path).GetHashCode();
  5233. maid.body0.CrossFade(hashCode.ToString(), numArray, false, false, false, 0.0f, 1f);
  5234. Maid.AutoTwist[] autoTwistArray = new Maid.AutoTwist[6]
  5235. {
  5236. Maid.AutoTwist.ShoulderL, Maid.AutoTwist.ShoulderR, Maid.AutoTwist.WristL,
  5237. Maid.AutoTwist.WristR, Maid.AutoTwist.ThighL, Maid.AutoTwist.ThighR
  5238. };
  5239. foreach (Maid.AutoTwist f_eType in autoTwistArray)
  5240. {
  5241. maid.SetAutoTwist(f_eType, true);
  5242. }
  5243. }
  5244. }
  5245. else if (strArray2[0].StartsWith("p") && int.TryParse(strArray2[0].Substring(1), out result))
  5246. {
  5247. loadPose[selectMaidIndex] = strArray2[0];
  5248. }
  5249. else if (!strArray2[0].StartsWith("dance_"))
  5250. {
  5251. maidArray[selectMaidIndex].CrossFade(strArray2[0] + ".anm", false, true, false, 0.0f, 1f);
  5252. }
  5253. else
  5254. {
  5255. if (!maid.body0.m_Bones.GetComponent<Animation>().GetClip(strArray2[0] + ".anm"))
  5256. {
  5257. maid.body0.LoadAnime(strArray2[0] + ".anm", GameUty.FileSystem, strArray2[0] + ".anm", false, false);
  5258. }
  5259. maid.body0.m_Bones.GetComponent<Animation>().Play(strArray2[0] + ".anm");
  5260. }
  5261. if (strArray2.Length > 1)
  5262. {
  5263. maid.body0.m_Bones.GetComponent<Animation>()[strArray2[0] + ".anm"].time = float.Parse(strArray2[1]);
  5264. isDanceStop = true;
  5265. if (strArray2.Length > 2)
  5266. {
  5267. transform = CMT.SearchObjName(maidArray[selectMaidIndex].body0.m_Bones.transform, "Bip01", true);
  5268. isPoseIti[selectMaidIndex] = true;
  5269. poseIti[selectMaidIndex] = maidArray[selectMaidIndex].transform.position;
  5270. maidArray[selectMaidIndex].transform.position = new Vector3(100f, 100f, 100f);
  5271. }
  5272. }
  5273. }
  5274. }
  5275. int index3 = -1;
  5276. for (int index2 = 0; index2 < groupList.Count; ++index2)
  5277. {
  5278. if (poseIndex[selectMaidIndex] < (int)groupList[index2])
  5279. {
  5280. index3 = index2;
  5281. break;
  5282. }
  5283. }
  5284. int length2 = (int)groupList[0];
  5285. int num3 = 0;
  5286. if (index3 > 0)
  5287. {
  5288. length2 = (int)groupList[index3] - (int)groupList[index3 - 1];
  5289. num3 = (int)groupList[index3 - 1];
  5290. }
  5291. if (index3 < 0)
  5292. {
  5293. index3 = groupList.Count;
  5294. length2 = poseArray.Length - (int)groupList[index3 - 1];
  5295. num3 = (int)groupList[index3 - 1];
  5296. }
  5297. poseComboList = new GUIContent[length2];
  5298. int index4 = 0;
  5299. for (int index2 = num3; index2 < num3 + length2; ++index2)
  5300. {
  5301. bool flag2 = false;
  5302. foreach (IniKey key in Preferences["pose"].Keys)
  5303. {
  5304. if (poseArray[index2] == key.Key)
  5305. {
  5306. IniKey iniKey = Preferences["pose"][key.Key];
  5307. if (iniKey.Value != null && iniKey.Value.ToString() != "" && iniKey.Value.ToString() != "del")
  5308. {
  5309. poseComboList[index4] =
  5310. new GUIContent((index4 + 1).ToString() + ":" + iniKey.Value.Split('_')[0]
  5311. + "                    " + key.Key);
  5312. flag2 = true;
  5313. }
  5314. }
  5315. }
  5316. if (!flag2)
  5317. {
  5318. poseComboList[index4] = new GUIContent((index4 + 1).ToString() + ":" + poseArray[index2]);
  5319. }
  5320. ++index4;
  5321. }
  5322. poseCombo.scrollPos = new Vector2(0.0f, 0.0f);
  5323. poseGroupCombo.selectedItemIndex = index3;
  5324. poseCombo.selectedItemIndex = 0;
  5325. }
  5326. poseGroupIndex =
  5327. poseGroupCombo.List(new Rect(GetPix(35),
  5328. GetPix(95),
  5329. GetPix(95),
  5330. GetPix(23)),
  5331. poseGroupComboList[index7].text,
  5332. poseGroupComboList,
  5333. buttonStyle2,
  5334. "box",
  5335. listStyle4);
  5336. if (poseGroupCombo.isClickedComboButton)
  5337. {
  5338. isCombo2 = true;
  5339. }
  5340. else if (isCombo2)
  5341. {
  5342. isCombo2 = false;
  5343. isPoseInit = true;
  5344. poseIndex[selectMaidIndex] = poseGroupIndex <= 0 ? 0 : (int)groupList[poseGroupIndex - 1];
  5345. if (!isLock[selectMaidIndex] && maid && maid.Visible)
  5346. {
  5347. string[] strArray2 = poseArray[poseIndex[selectMaidIndex]].Split(',');
  5348. isStop[selectMaidIndex] = false;
  5349. poseCount[selectMaidIndex] = 20;
  5350. if (strArray2[0].Contains("_momi") || strArray2[0].Contains("paizuri_"))
  5351. {
  5352. maid.body0.MuneYureL(0.0f);
  5353. maid.body0.MuneYureR(0.0f);
  5354. }
  5355. else
  5356. {
  5357. maid.body0.MuneYureL(1f);
  5358. maid.body0.MuneYureR(1f);
  5359. }
  5360. if (strArray2[0].Contains("MultipleMaidsPose"))
  5361. {
  5362. string path = strArray2[0].Split('/')[1];
  5363. byte[] numArray = new byte[0];
  5364. try
  5365. {
  5366. using (FileStream fileStream = new FileStream(path, FileMode.Open, FileAccess.Read))
  5367. {
  5368. numArray = new byte[fileStream.Length];
  5369. fileStream.Read(numArray, 0, numArray.Length);
  5370. }
  5371. }
  5372. catch { }
  5373. if (0 < numArray.Length)
  5374. {
  5375. long hashCode = Path.GetFileName(path).GetHashCode();
  5376. maid.body0.CrossFade(hashCode.ToString(), numArray, false, false, false, 0.0f, 1f);
  5377. Maid.AutoTwist[] autoTwistArray = new Maid.AutoTwist[6]
  5378. {
  5379. Maid.AutoTwist.ShoulderL, Maid.AutoTwist.ShoulderR, Maid.AutoTwist.WristL, Maid.AutoTwist.WristR,
  5380. Maid.AutoTwist.ThighL, Maid.AutoTwist.ThighR
  5381. };
  5382. foreach (Maid.AutoTwist f_eType in autoTwistArray)
  5383. {
  5384. maid.SetAutoTwist(f_eType, true);
  5385. }
  5386. }
  5387. }
  5388. else if (strArray2[0].StartsWith("p") && int.TryParse(strArray2[0].Substring(1), out result))
  5389. {
  5390. loadPose[selectMaidIndex] = strArray2[0];
  5391. }
  5392. else if (!strArray2[0].StartsWith("dance_"))
  5393. {
  5394. maidArray[selectMaidIndex].CrossFade(strArray2[0] + ".anm", false, true, false, 0.0f, 1f);
  5395. }
  5396. else
  5397. {
  5398. if (!maid.body0.m_Bones.GetComponent<Animation>().GetClip(strArray2[0] + ".anm"))
  5399. {
  5400. maid.body0.LoadAnime(strArray2[0] + ".anm", GameUty.FileSystem, strArray2[0] + ".anm", false, false);
  5401. }
  5402. maid.body0.m_Bones.GetComponent<Animation>().Play(strArray2[0] + ".anm");
  5403. }
  5404. if (strArray2.Length > 1)
  5405. {
  5406. maid.body0.m_Bones.GetComponent<Animation>()[strArray2[0] + ".anm"].time = float.Parse(strArray2[1]);
  5407. isDanceStop = true;
  5408. if (strArray2.Length > 2)
  5409. {
  5410. transform = CMT.SearchObjName(maidArray[selectMaidIndex].body0.m_Bones.transform, "Bip01", true);
  5411. isPoseIti[selectMaidIndex] = true;
  5412. poseIti[selectMaidIndex] = maidArray[selectMaidIndex].transform.position;
  5413. maidArray[selectMaidIndex].transform.position = new Vector3(100f, 100f, 100f);
  5414. }
  5415. }
  5416. }
  5417. int index2 = -1;
  5418. for (int index3 = 0; index3 < groupList.Count; ++index3)
  5419. {
  5420. if (poseIndex[selectMaidIndex] < (int)groupList[index3])
  5421. {
  5422. index2 = index3;
  5423. break;
  5424. }
  5425. }
  5426. int length2 = (int)groupList[0];
  5427. int num2 = 0;
  5428. if (index2 > 0)
  5429. {
  5430. length2 = (int)groupList[index2] - (int)groupList[index2 - 1];
  5431. num2 = (int)groupList[index2 - 1];
  5432. }
  5433. if (index2 < 0)
  5434. {
  5435. index2 = groupList.Count;
  5436. length2 = poseArray.Length - (int)groupList[index2 - 1];
  5437. num2 = (int)groupList[index2 - 1];
  5438. }
  5439. poseComboList = new GUIContent[length2];
  5440. int index4 = 0;
  5441. for (int index3 = num2; index3 < num2 + length2; ++index3)
  5442. {
  5443. bool flag2 = false;
  5444. foreach (IniKey key in Preferences["pose"].Keys)
  5445. {
  5446. if (poseArray[index3] == key.Key)
  5447. {
  5448. IniKey iniKey = Preferences["pose"][key.Key];
  5449. if (iniKey.Value != null && iniKey.Value.ToString() != "" && iniKey.Value.ToString() != "del")
  5450. {
  5451. poseComboList[index4] =
  5452. new GUIContent((index4 + 1).ToString() + ":" + iniKey.Value.Split('_')[0]
  5453. + "                    " + key.Key);
  5454. flag2 = true;
  5455. }
  5456. }
  5457. }
  5458. if (!flag2)
  5459. {
  5460. poseComboList[index4] = new GUIContent((index4 + 1).ToString() + ":" + poseArray[index3]);
  5461. }
  5462. ++index4;
  5463. }
  5464. poseCombo.scrollPos = new Vector2(0.0f, 0.0f);
  5465. poseGroupCombo.selectedItemIndex = index2;
  5466. poseCombo.selectedItemIndex = 0;
  5467. }
  5468. if (poseCombo.isClickedComboButton)
  5469. {
  5470. isCombo = true;
  5471. }
  5472. else if (isCombo)
  5473. {
  5474. isCombo = false;
  5475. isPoseInit = true;
  5476. poseIndex[selectMaidIndex] = poseGroupIndex <= 0
  5477. ? poseCombo.selectedItemIndex
  5478. : (int)groupList[poseGroupIndex - 1] + poseCombo.selectedItemIndex;
  5479. if (poseIndex[selectMaidIndex] == poseArray.Length)
  5480. {
  5481. poseIndex[selectMaidIndex] = 0;
  5482. }
  5483. if (!isLock[selectMaidIndex] && maid && maid.Visible)
  5484. {
  5485. string[] strArray2 = poseArray[poseIndex[selectMaidIndex]].Split(',');
  5486. isStop[selectMaidIndex] = false;
  5487. poseCount[selectMaidIndex] = 20;
  5488. if (strArray2[0].Contains("_momi") || strArray2[0].Contains("paizuri_"))
  5489. {
  5490. maid.body0.MuneYureL(0.0f);
  5491. maid.body0.MuneYureR(0.0f);
  5492. }
  5493. else
  5494. {
  5495. maid.body0.MuneYureL(1f);
  5496. maid.body0.MuneYureR(1f);
  5497. }
  5498. if (strArray2[0].Contains("MultipleMaidsPose"))
  5499. {
  5500. string path = strArray2[0].Split('/')[1];
  5501. byte[] numArray = new byte[0];
  5502. try
  5503. {
  5504. using (FileStream fileStream = new FileStream(path, FileMode.Open, FileAccess.Read))
  5505. {
  5506. numArray = new byte[fileStream.Length];
  5507. fileStream.Read(numArray, 0, numArray.Length);
  5508. }
  5509. }
  5510. catch { }
  5511. if (0 < numArray.Length)
  5512. {
  5513. long hashCode = Path.GetFileName(path).GetHashCode();
  5514. maid.body0.CrossFade(hashCode.ToString(), numArray, false, false, false, 0.0f, 1f);
  5515. Maid.AutoTwist[] autoTwistArray = new Maid.AutoTwist[6]
  5516. {
  5517. Maid.AutoTwist.ShoulderL, Maid.AutoTwist.ShoulderR, Maid.AutoTwist.WristL, Maid.AutoTwist.WristR,
  5518. Maid.AutoTwist.ThighL, Maid.AutoTwist.ThighR
  5519. };
  5520. foreach (Maid.AutoTwist f_eType in autoTwistArray)
  5521. {
  5522. maid.SetAutoTwist(f_eType, true);
  5523. }
  5524. }
  5525. }
  5526. else if (strArray2[0].StartsWith("p") && int.TryParse(strArray2[0].Substring(1), out result))
  5527. {
  5528. loadPose[selectMaidIndex] = strArray2[0];
  5529. }
  5530. else if (!strArray2[0].StartsWith("dance_"))
  5531. {
  5532. maidArray[selectMaidIndex].CrossFade(strArray2[0] + ".anm", false, true, false, 0.0f, 1f);
  5533. }
  5534. else
  5535. {
  5536. if (!maid.body0.m_Bones.GetComponent<Animation>().GetClip(strArray2[0] + ".anm"))
  5537. {
  5538. maid.body0.LoadAnime(strArray2[0] + ".anm", GameUty.FileSystem, strArray2[0] + ".anm", false, false);
  5539. }
  5540. maid.body0.m_Bones.GetComponent<Animation>().Play(strArray2[0] + ".anm");
  5541. }
  5542. if (strArray2.Length > 1)
  5543. {
  5544. maid.body0.m_Bones.GetComponent<Animation>()[strArray2[0] + ".anm"].time = float.Parse(strArray2[1]);
  5545. isDanceStop = true;
  5546. if (strArray2.Length > 2)
  5547. {
  5548. transform = CMT.SearchObjName(maidArray[selectMaidIndex].body0.m_Bones.transform, "Bip01", true);
  5549. isPoseIti[selectMaidIndex] = true;
  5550. poseIti[selectMaidIndex] = maidArray[selectMaidIndex].transform.position;
  5551. maidArray[selectMaidIndex].transform.position = new Vector3(100f, 100f, 100f);
  5552. }
  5553. }
  5554. }
  5555. }
  5556. if (itemCombo.isClickedComboButton)
  5557. {
  5558. isCombo3 = true;
  5559. }
  5560. else if (isCombo3)
  5561. {
  5562. isCombo3 = false;
  5563. strArray1 = new string[2];
  5564. string[] strArray2 = itemArray[itemIndex2[selectMaidIndex]].Split(',');
  5565. if (itemIndex2[selectMaidIndex] > 13)
  5566. {
  5567. strArray2 = itemArray[itemIndex2[selectMaidIndex] + 1].Split(',');
  5568. }
  5569. maid.DelProp(MPN.handitem, true);
  5570. bool flag2 = false;
  5571. if (itemIndex2[selectMaidIndex] == 0)
  5572. {
  5573. maid.DelProp(MPN.accvag, true);
  5574. maid.DelProp(MPN.accanl, true);
  5575. }
  5576. if (itemIndex2[selectMaidIndex] == 12 || itemIndex2[selectMaidIndex] == 13)
  5577. {
  5578. flag2 = true;
  5579. }
  5580. if (!flag2)
  5581. {
  5582. maid.DelProp(MPN.kousoku_upper, true);
  5583. maid.DelProp(MPN.kousoku_lower, true);
  5584. }
  5585. if (strArray2[0] != "")
  5586. {
  5587. maid.SetProp(strArray2[0], strArray2[1], 0, true, false);
  5588. }
  5589. if (itemIndex2[selectMaidIndex] == 12)
  5590. {
  5591. string[] strArray3 = itemArray[itemIndex2[selectMaidIndex] - 1].Split(',');
  5592. maid.SetProp(strArray3[0], strArray3[1], 0, true, false);
  5593. }
  5594. if (itemIndex2[selectMaidIndex] == 13)
  5595. {
  5596. string[] strArray3 = itemArray[itemIndex2[selectMaidIndex] + 1].Split(',');
  5597. maid.SetProp(strArray3[0], strArray3[1], 0, true, false);
  5598. }
  5599. if (itemIndex2[selectMaidIndex] == 23)
  5600. {
  5601. string[] strArray3 = itemArray[itemIndex2[selectMaidIndex]].Split(',');
  5602. maid.SetProp(strArray3[0], strArray3[1], 0, true, false);
  5603. cafeFlg[selectMaidIndex] = true;
  5604. }
  5605. maid.AllProcPropSeqStart();
  5606. itemCombo.selectedItemIndex = itemIndex2[selectMaidIndex];
  5607. itemIndex[selectMaidIndex] = itemIndex2[selectMaidIndex];
  5608. }
  5609. }
  5610. else
  5611. {
  5612. isWear = GUI.Toggle(new Rect(GetPix(5),
  5613. GetPix(98),
  5614. GetPix(70),
  5615. GetPix(20)),
  5616. isWear,
  5617. "トップス",
  5618. style4);
  5619. isSkirt = GUI.Toggle(new Rect(GetPix(90),
  5620. GetPix(98),
  5621. GetPix(70),
  5622. GetPix(20)),
  5623. isSkirt,
  5624. "ボトムス",
  5625. style4);
  5626. isBra = GUI.Toggle(new Rect(GetPix(5),
  5627. GetPix(123),
  5628. GetPix(80),
  5629. GetPix(20)),
  5630. isBra,
  5631. "ブラジャー",
  5632. style4);
  5633. isPanz = GUI.Toggle(new Rect(GetPix(90),
  5634. GetPix(123),
  5635. GetPix(60),
  5636. GetPix(20)),
  5637. isPanz,
  5638. "パンツ",
  5639. style4);
  5640. isHeadset = GUI.Toggle(new Rect(GetPix(5),
  5641. GetPix(148),
  5642. GetPix(70),
  5643. GetPix(20)),
  5644. isHeadset,
  5645. "ヘッド",
  5646. style4);
  5647. isMegane = GUI.Toggle(new Rect(GetPix(90),
  5648. GetPix(148),
  5649. GetPix(70),
  5650. GetPix(20)),
  5651. isMegane,
  5652. "メガネ",
  5653. style4);
  5654. isAccUde = GUI.Toggle(new Rect(GetPix(5),
  5655. GetPix(173),
  5656. GetPix(40),
  5657. GetPix(20)),
  5658. isAccUde,
  5659. "腕",
  5660. style4);
  5661. isGlove = GUI.Toggle(new Rect(GetPix(45),
  5662. GetPix(173),
  5663. GetPix(40),
  5664. GetPix(20)),
  5665. isGlove,
  5666. "手袋",
  5667. style4);
  5668. isAccSenaka = GUI.Toggle(new Rect(GetPix(97),
  5669. GetPix(173),
  5670. GetPix(40),
  5671. GetPix(20)),
  5672. isAccSenaka,
  5673. "背中",
  5674. style4);
  5675. isStkg = GUI.Toggle(new Rect(GetPix(5),
  5676. GetPix(198),
  5677. GetPix(70),
  5678. GetPix(20)),
  5679. isStkg,
  5680. "ソックス",
  5681. style4);
  5682. isShoes = GUI.Toggle(new Rect(GetPix(90),
  5683. GetPix(198),
  5684. GetPix(70),
  5685. GetPix(20)),
  5686. isShoes,
  5687. "シューズ",
  5688. style4);
  5689. mekure1[selectMaidIndex] =
  5690. GUI.Toggle(new Rect(GetPix(5),
  5691. GetPix(223),
  5692. GetPix(62),
  5693. GetPix(20)),
  5694. mekure1[selectMaidIndex],
  5695. "めくれ前",
  5696. style4);
  5697. mekure2[selectMaidIndex] =
  5698. GUI.Toggle(new Rect(GetPix(67),
  5699. GetPix(223),
  5700. GetPix(40),
  5701. GetPix(20)),
  5702. mekure2[selectMaidIndex],
  5703. "後ろ",
  5704. style4);
  5705. zurasi[selectMaidIndex] =
  5706. GUI.Toggle(new Rect(GetPix(105),
  5707. GetPix(223),
  5708. GetPix(50),
  5709. GetPix(20)),
  5710. zurasi[selectMaidIndex],
  5711. "ずらし",
  5712. style4);
  5713. }
  5714. bool state = GUI.enabled;
  5715. GUI.enabled = true;
  5716. GUI.DragWindow();
  5717. GUI.enabled = state;
  5718. }
  5719. private void FaceWindow(int winID)
  5720. {
  5721. GUIStyle style1 = "label";
  5722. style1.fontSize = GetPix(12);
  5723. style1.alignment = TextAnchor.UpperLeft;
  5724. GUIStyle style2 = "label";
  5725. style2.fontSize = GetPix(11);
  5726. style2.alignment = TextAnchor.UpperLeft;
  5727. GUIStyle style3 = "button";
  5728. style3.fontSize = GetPix(20);
  5729. GUIStyle buttonStyle = "button";
  5730. buttonStyle.fontSize = GetPix(12);
  5731. buttonStyle.alignment = TextAnchor.MiddleLeft;
  5732. GUIStyle style4 = new GUIStyle("toggle")
  5733. {
  5734. fontSize = GetPix(13)
  5735. };
  5736. CharacterMgr characterMgr = GameMain.Instance.CharacterMgr;
  5737. if (!faceInitFlg)
  5738. {
  5739. listStyle2.normal.textColor = Color.white;
  5740. listStyle2.normal.background = MakeTex(2, 2, new Color(0.0f, 0.0f, 0.0f, 0.5f));
  5741. listStyle2.onHover.background = listStyle2.hover.background = new Texture2D(2, 2);
  5742. listStyle2.padding.left = listStyle2.padding.right = listStyle2.padding.top = listStyle2.padding.bottom = GetPix(0);
  5743. listStyle2.fontSize = GetPix(12);
  5744. faceCombo.selectedItemIndex = 0;
  5745. List<string> stringList = new List<string>(300);
  5746. stringList.AddRange(faceArray);
  5747. for (int index = 1; index < 300; ++index)
  5748. {
  5749. IniKey iniKey = Preferences["face"]["f" + index];
  5750. if (iniKey.Value != null)
  5751. {
  5752. string[] strArray = iniKey.Value.Split(':');
  5753. if (strArray.Length > 1)
  5754. {
  5755. stringList.Add(strArray[0] + "               :" + index + ":" + strArray[1]);
  5756. }
  5757. }
  5758. else
  5759. {
  5760. break;
  5761. }
  5762. }
  5763. faceCombo.selectedItemIndex = 0;
  5764. faceComboList = new GUIContent[stringList.ToArray().Length];
  5765. for (int index = 0; index < stringList.ToArray().Length; ++index)
  5766. {
  5767. faceComboList[index] = new GUIContent(stringList.ToArray()[index]);
  5768. }
  5769. faceInitFlg = true;
  5770. }
  5771. if (faceCombo.isClickedComboButton)
  5772. {
  5773. GUI.enabled = false;
  5774. }
  5775. if (sceneLevel == 3 || sceneLevel == 5 || isF6)
  5776. {
  5777. if (!isF6)
  5778. {
  5779. bool flag = true;
  5780. if (faceFlg || poseFlg || sceneFlg || kankyoFlg || kankyo2Flg)
  5781. {
  5782. flag = false;
  5783. }
  5784. if (GUI.Toggle(new Rect(GetPix(2),
  5785. GetPix(2),
  5786. GetPix(39),
  5787. GetPix(20)),
  5788. flag,
  5789. "配置",
  5790. style4))
  5791. {
  5792. faceFlg = false;
  5793. poseFlg = false;
  5794. sceneFlg = false;
  5795. kankyoFlg = false;
  5796. kankyo2Flg = false;
  5797. bGui = true;
  5798. }
  5799. }
  5800. if (!yotogiFlg && GUI.Toggle(new Rect(GetPix(41),
  5801. GetPix(2),
  5802. GetPix(39),
  5803. GetPix(20)),
  5804. poseFlg,
  5805. "操作",
  5806. style4))
  5807. {
  5808. poseFlg = true;
  5809. faceFlg = false;
  5810. sceneFlg = false;
  5811. kankyoFlg = false;
  5812. kankyo2Flg = false;
  5813. }
  5814. if (GUI.Toggle(new Rect(GetPix(80), GetPix(2), GetPix(39), GetPix(20)),
  5815. faceFlg,
  5816. "表情",
  5817. style4))
  5818. {
  5819. faceFlg = true;
  5820. poseFlg = false;
  5821. sceneFlg = false;
  5822. kankyoFlg = false;
  5823. kankyo2Flg = false;
  5824. if (!faceFlg2)
  5825. {
  5826. isFaceInit = true;
  5827. faceFlg2 = true;
  5828. maidArray[selectMaidIndex].boMabataki = false;
  5829. faceCombo.selectedItemIndex = faceIndex[selectMaidIndex];
  5830. }
  5831. faceCombo.selectedItemIndex = faceIndex[selectMaidIndex];
  5832. }
  5833. if (GUI.Toggle(new Rect(GetPix(119), GetPix(2), GetPix(39), GetPix(20)),
  5834. kankyoFlg,
  5835. "環境",
  5836. style4))
  5837. {
  5838. poseFlg = false;
  5839. faceFlg = false;
  5840. sceneFlg = false;
  5841. kankyoFlg = true;
  5842. kankyo2Flg = false;
  5843. }
  5844. if (!line1)
  5845. {
  5846. line1 = MakeTex(2, 2, new Color(0.0f, 0.0f, 0.0f, 0.3f));
  5847. line2 = MakeTex(2, 2, new Color(0.7f, 0.7f, 0.7f, 0.6f));
  5848. }
  5849. GUI.DrawTexture(new Rect(GetPix(5), GetPix(20), GetPix(160), 2f), line1);
  5850. GUI.DrawTexture(new Rect(GetPix(5), GetPix(20), GetPix(160), 1f), line2);
  5851. style1.fontSize = GetPix(13);
  5852. style1.alignment = TextAnchor.MiddleCenter;
  5853. GUI.Label(new Rect(GetPix(125), GetPix(25), GetPix(40), GetPix(25)),
  5854. string.Concat(selectMaidIndex + 1),
  5855. style1);
  5856. style1.fontSize = GetPix(11);
  5857. style1.alignment = TextAnchor.UpperLeft;
  5858. }
  5859. if (sceneLevel > 0)
  5860. {
  5861. int selectMaidIndex = this.selectMaidIndex;
  5862. if (sceneLevel == 3 || sceneLevel == 5 && (isF7 || maidCnt > 1))
  5863. {
  5864. if (GUI.Button(new Rect(GetPix(5),
  5865. GetPix(53),
  5866. GetPix(23),
  5867. GetPix(32)),
  5868. "<",
  5869. style3))
  5870. {
  5871. --this.selectMaidIndex;
  5872. if (this.selectMaidIndex < 0)
  5873. {
  5874. this.selectMaidIndex = selectList.Count - 1;
  5875. }
  5876. isFaceInit = true;
  5877. faceFlg = true;
  5878. copyIndex = 0;
  5879. faceCombo.selectedItemIndex = faceIndex[this.selectMaidIndex];
  5880. }
  5881. if (GUI.Button(new Rect(GetPix(135),
  5882. GetPix(53),
  5883. GetPix(23),
  5884. GetPix(32)),
  5885. ">",
  5886. style3))
  5887. {
  5888. ++this.selectMaidIndex;
  5889. if (selectList.Count <= this.selectMaidIndex)
  5890. {
  5891. this.selectMaidIndex = 0;
  5892. }
  5893. isFaceInit = true;
  5894. faceFlg = true;
  5895. copyIndex = 0;
  5896. faceCombo.selectedItemIndex = faceIndex[this.selectMaidIndex];
  5897. }
  5898. }
  5899. if (maidArray[this.selectMaidIndex].GetThumIcon())
  5900. {
  5901. GUI.DrawTexture(new Rect(GetPix(30),
  5902. GetPix(25),
  5903. GetPix(60),
  5904. GetPix(60)),
  5905. maidArray[this.selectMaidIndex].GetThumIcon());
  5906. }
  5907. GUI.Label(new Rect(GetPix(90), GetPix(50), GetPix(140), GetPix(210)),
  5908. maidArray[this.selectMaidIndex].status.lastName + "\n" + maidArray[this.selectMaidIndex].status.firstName,
  5909. style1);
  5910. if (isFace[selectMaidIndex])
  5911. {
  5912. if (GUI.Button(new Rect(GetPix(5),
  5913. GetPix(25),
  5914. GetPix(23),
  5915. GetPix(23)),
  5916. "有",
  5917. style3))
  5918. {
  5919. TMorph morph = maidArray[selectMaidIndex].body0.Face.morph;
  5920. maidArray[selectMaidIndex].boMabataki = false;
  5921. isFace[selectMaidIndex] = false;
  5922. }
  5923. maidArray[selectMaidIndex].boMabataki = false;
  5924. }
  5925. else
  5926. {
  5927. if (GUI.Button(new Rect(GetPix(5),
  5928. GetPix(25),
  5929. GetPix(23),
  5930. GetPix(23)),
  5931. "無",
  5932. style3))
  5933. {
  5934. TMorph morph = maidArray[selectMaidIndex].body0.Face.morph;
  5935. maidArray[selectMaidIndex].boMabataki = false;
  5936. morph.EyeMabataki = 0.0f;
  5937. isFaceInit = true;
  5938. isFace[selectMaidIndex] = true;
  5939. faceCombo.selectedItemIndex = faceIndex[selectMaidIndex];
  5940. }
  5941. GUI.enabled = false;
  5942. maidArray[selectMaidIndex].boMabataki = true;
  5943. }
  5944. }
  5945. if (GUI.Button(new Rect(GetPix(5), GetPix(95), GetPix(23), GetPix(23)),
  5946. "<",
  5947. style3))
  5948. {
  5949. --faceIndex[selectMaidIndex];
  5950. if (faceIndex[selectMaidIndex] <= -1)
  5951. {
  5952. faceIndex[selectMaidIndex] = faceComboList.Length - 1;
  5953. }
  5954. TMorph morph = maidArray[selectMaidIndex].body0.Face.morph;
  5955. maidArray[selectMaidIndex].boMabataki = false;
  5956. morph.EyeMabataki = 0.0f;
  5957. if (faceIndex[selectMaidIndex] < faceArray.Length)
  5958. {
  5959. morph.MulBlendValues(faceArray[faceIndex[selectMaidIndex]], 1f);
  5960. }
  5961. else
  5962. {
  5963. float[] fieldValue1 = GetFieldValue<TMorph, float[]>(morph, "BlendValues");
  5964. float[] fieldValue2 = GetFieldValue<TMorph, float[]>(morph, "BlendValuesBackup");
  5965. if (!isVR)
  5966. {
  5967. maidArray[selectMaidIndex].boMabataki = false;
  5968. }
  5969. string[] strArray = faceComboList[faceIndex[selectMaidIndex]].text.Split(':')[2].Split(',');
  5970. fieldValue2[(int)morph.hash["eyeclose"]] = float.Parse(strArray[0]);
  5971. fieldValue2[(int)morph.hash["eyeclose2"]] = float.Parse(strArray[1]);
  5972. fieldValue2[(int)morph.hash["eyeclose3"]] = float.Parse(strArray[2]);
  5973. fieldValue2[(int)morph.hash["eyeclose6"]] = float.Parse(strArray[3]);
  5974. fieldValue1[(int)morph.hash["hitomih"]] = float.Parse(strArray[4]);
  5975. fieldValue1[(int)morph.hash["hitomis"]] = float.Parse(strArray[5]);
  5976. fieldValue1[(int)morph.hash["mayuha"]] = float.Parse(strArray[6]);
  5977. fieldValue1[(int)morph.hash["mayuup"]] = float.Parse(strArray[7]);
  5978. fieldValue1[(int)morph.hash["mayuv"]] = float.Parse(strArray[8]);
  5979. fieldValue1[(int)morph.hash["mayuvhalf"]] = float.Parse(strArray[9]);
  5980. fieldValue1[(int)morph.hash["moutha"]] = float.Parse(strArray[10]);
  5981. fieldValue1[(int)morph.hash["mouths"]] = float.Parse(strArray[11]);
  5982. fieldValue1[(int)morph.hash["mouthdw"]] = float.Parse(strArray[12]);
  5983. fieldValue1[(int)morph.hash["mouthup"]] = float.Parse(strArray[13]);
  5984. fieldValue1[(int)morph.hash["tangout"]] = float.Parse(strArray[14]);
  5985. fieldValue1[(int)morph.hash["tangup"]] = float.Parse(strArray[15]);
  5986. fieldValue1[(int)morph.hash["eyebig"]] = float.Parse(strArray[16]);
  5987. fieldValue2[(int)morph.hash["eyeclose5"]] = float.Parse(strArray[17]);
  5988. fieldValue1[(int)morph.hash["mayuw"]] = float.Parse(strArray[18]);
  5989. fieldValue1[(int)morph.hash["mouthhe"]] = float.Parse(strArray[19]);
  5990. fieldValue1[(int)morph.hash["mouthc"]] = float.Parse(strArray[20]);
  5991. fieldValue1[(int)morph.hash["mouthi"]] = float.Parse(strArray[21]);
  5992. fieldValue1[(int)morph.hash["mouthuphalf"]] = float.Parse(strArray[22]) + 0.01f;
  5993. try
  5994. {
  5995. fieldValue1[(int)morph.hash["tangopen"]] = float.Parse(strArray[23]);
  5996. }
  5997. catch { }
  5998. if (float.Parse(strArray[24]) == 1.0)
  5999. {
  6000. fieldValue1[(int)morph.hash["namida"]] = 1f;
  6001. }
  6002. else
  6003. {
  6004. fieldValue1[(int)morph.hash["namida"]] = 0.0f;
  6005. }
  6006. if (float.Parse(strArray[25]) == 1.0)
  6007. {
  6008. fieldValue1[(int)morph.hash["tear1"]] = 1f;
  6009. }
  6010. else
  6011. {
  6012. fieldValue1[(int)morph.hash["tear1"]] = 0.0f;
  6013. }
  6014. if (float.Parse(strArray[26]) == 1.0)
  6015. {
  6016. fieldValue1[(int)morph.hash["tear2"]] = 1f;
  6017. }
  6018. else
  6019. {
  6020. fieldValue1[(int)morph.hash["tear2"]] = 0.0f;
  6021. }
  6022. if (float.Parse(strArray[27]) == 1.0)
  6023. {
  6024. fieldValue1[(int)morph.hash["tear3"]] = 1f;
  6025. }
  6026. else
  6027. {
  6028. fieldValue1[(int)morph.hash["tear3"]] = 0.0f;
  6029. }
  6030. if (float.Parse(strArray[28]) == 1.0)
  6031. {
  6032. fieldValue1[(int)morph.hash["shock"]] = 1f;
  6033. }
  6034. else
  6035. {
  6036. fieldValue1[(int)morph.hash["shock"]] = 0.0f;
  6037. }
  6038. if (float.Parse(strArray[29]) == 1.0)
  6039. {
  6040. fieldValue1[(int)morph.hash["yodare"]] = 1f;
  6041. }
  6042. else
  6043. {
  6044. fieldValue1[(int)morph.hash["yodare"]] = 0.0f;
  6045. }
  6046. if (float.Parse(strArray[30]) == 1.0)
  6047. {
  6048. fieldValue1[(int)morph.hash["hoho"]] = 0.5f;
  6049. }
  6050. else
  6051. {
  6052. fieldValue1[(int)morph.hash["hoho"]] = 0.0f;
  6053. }
  6054. if (float.Parse(strArray[31]) == 1.0)
  6055. {
  6056. fieldValue1[(int)morph.hash["hoho2"]] = 0.5f;
  6057. }
  6058. else
  6059. {
  6060. fieldValue1[(int)morph.hash["hoho2"]] = 0.0f;
  6061. }
  6062. if (float.Parse(strArray[32]) == 1.0)
  6063. {
  6064. fieldValue1[(int)morph.hash["hohos"]] = 1f;
  6065. }
  6066. else
  6067. {
  6068. fieldValue1[(int)morph.hash["hohos"]] = 0.0f;
  6069. }
  6070. if (float.Parse(strArray[33]) == 1.0)
  6071. {
  6072. fieldValue1[(int)morph.hash["hohol"]] = 1f;
  6073. }
  6074. else
  6075. {
  6076. fieldValue1[(int)morph.hash["hohol"]] = 0.0f;
  6077. }
  6078. if (float.Parse(strArray[34]) == 1.0)
  6079. {
  6080. fieldValue1[(int)morph.hash["toothoff"]] = 1f;
  6081. }
  6082. else
  6083. {
  6084. fieldValue1[(int)morph.hash["toothoff"]] = 0.0f;
  6085. }
  6086. if (strArray.Length > 35)
  6087. {
  6088. morph.boNoseFook = float.Parse(strArray[35]) == 1.0;
  6089. }
  6090. }
  6091. maidArray[selectMaidIndex].body0.Face.morph.FixBlendValues_Face();
  6092. isFaceInit = true;
  6093. faceCombo.selectedItemIndex = faceIndex[selectMaidIndex];
  6094. }
  6095. if (GUI.Button(new Rect(GetPix(135), GetPix(95), GetPix(23), GetPix(23)),
  6096. ">",
  6097. style3))
  6098. {
  6099. ++faceIndex[selectMaidIndex];
  6100. if (faceIndex[selectMaidIndex] == faceComboList.Length)
  6101. {
  6102. faceIndex[selectMaidIndex] = 0;
  6103. }
  6104. TMorph morph = maidArray[selectMaidIndex].body0.Face.morph;
  6105. maidArray[selectMaidIndex].boMabataki = false;
  6106. morph.EyeMabataki = 0.0f;
  6107. if (faceIndex[selectMaidIndex] < faceArray.Length)
  6108. {
  6109. morph.MulBlendValues(faceArray[faceIndex[selectMaidIndex]], 1f);
  6110. }
  6111. else
  6112. {
  6113. float[] fieldValue1 = GetFieldValue<TMorph, float[]>(morph, "BlendValues");
  6114. float[] fieldValue2 = GetFieldValue<TMorph, float[]>(morph, "BlendValuesBackup");
  6115. if (!isVR)
  6116. {
  6117. maidArray[selectMaidIndex].boMabataki = false;
  6118. }
  6119. string[] strArray = faceComboList[faceIndex[selectMaidIndex]].text.Split(':')[2].Split(',');
  6120. fieldValue2[(int)morph.hash["eyeclose"]] = float.Parse(strArray[0]);
  6121. fieldValue2[(int)morph.hash["eyeclose2"]] = float.Parse(strArray[1]);
  6122. fieldValue2[(int)morph.hash["eyeclose3"]] = float.Parse(strArray[2]);
  6123. fieldValue2[(int)morph.hash["eyeclose6"]] = float.Parse(strArray[3]);
  6124. fieldValue1[(int)morph.hash["hitomih"]] = float.Parse(strArray[4]);
  6125. fieldValue1[(int)morph.hash["hitomis"]] = float.Parse(strArray[5]);
  6126. fieldValue1[(int)morph.hash["mayuha"]] = float.Parse(strArray[6]);
  6127. fieldValue1[(int)morph.hash["mayuup"]] = float.Parse(strArray[7]);
  6128. fieldValue1[(int)morph.hash["mayuv"]] = float.Parse(strArray[8]);
  6129. fieldValue1[(int)morph.hash["mayuvhalf"]] = float.Parse(strArray[9]);
  6130. fieldValue1[(int)morph.hash["moutha"]] = float.Parse(strArray[10]);
  6131. fieldValue1[(int)morph.hash["mouths"]] = float.Parse(strArray[11]);
  6132. fieldValue1[(int)morph.hash["mouthdw"]] = float.Parse(strArray[12]);
  6133. fieldValue1[(int)morph.hash["mouthup"]] = float.Parse(strArray[13]);
  6134. fieldValue1[(int)morph.hash["tangout"]] = float.Parse(strArray[14]);
  6135. fieldValue1[(int)morph.hash["tangup"]] = float.Parse(strArray[15]);
  6136. fieldValue1[(int)morph.hash["eyebig"]] = float.Parse(strArray[16]);
  6137. fieldValue2[(int)morph.hash["eyeclose5"]] = float.Parse(strArray[17]);
  6138. fieldValue1[(int)morph.hash["mayuw"]] = float.Parse(strArray[18]);
  6139. fieldValue1[(int)morph.hash["mouthhe"]] = float.Parse(strArray[19]);
  6140. fieldValue1[(int)morph.hash["mouthc"]] = float.Parse(strArray[20]);
  6141. fieldValue1[(int)morph.hash["mouthi"]] = float.Parse(strArray[21]);
  6142. fieldValue1[(int)morph.hash["mouthuphalf"]] = float.Parse(strArray[22]) + 0.01f;
  6143. try
  6144. {
  6145. fieldValue1[(int)morph.hash["tangopen"]] = float.Parse(strArray[23]);
  6146. }
  6147. catch { }
  6148. if (float.Parse(strArray[24]) == 1.0)
  6149. {
  6150. fieldValue1[(int)morph.hash["namida"]] = 1f;
  6151. }
  6152. else
  6153. {
  6154. fieldValue1[(int)morph.hash["namida"]] = 0.0f;
  6155. }
  6156. if (float.Parse(strArray[25]) == 1.0)
  6157. {
  6158. fieldValue1[(int)morph.hash["tear1"]] = 1f;
  6159. }
  6160. else
  6161. {
  6162. fieldValue1[(int)morph.hash["tear1"]] = 0.0f;
  6163. }
  6164. if (float.Parse(strArray[26]) == 1.0)
  6165. {
  6166. fieldValue1[(int)morph.hash["tear2"]] = 1f;
  6167. }
  6168. else
  6169. {
  6170. fieldValue1[(int)morph.hash["tear2"]] = 0.0f;
  6171. }
  6172. if (float.Parse(strArray[27]) == 1.0)
  6173. {
  6174. fieldValue1[(int)morph.hash["tear3"]] = 1f;
  6175. }
  6176. else
  6177. {
  6178. fieldValue1[(int)morph.hash["tear3"]] = 0.0f;
  6179. }
  6180. if (float.Parse(strArray[28]) == 1.0)
  6181. {
  6182. fieldValue1[(int)morph.hash["shock"]] = 1f;
  6183. }
  6184. else
  6185. {
  6186. fieldValue1[(int)morph.hash["shock"]] = 0.0f;
  6187. }
  6188. if (float.Parse(strArray[29]) == 1.0)
  6189. {
  6190. fieldValue1[(int)morph.hash["yodare"]] = 1f;
  6191. }
  6192. else
  6193. {
  6194. fieldValue1[(int)morph.hash["yodare"]] = 0.0f;
  6195. }
  6196. if (float.Parse(strArray[30]) == 1.0)
  6197. {
  6198. fieldValue1[(int)morph.hash["hoho"]] = 0.5f;
  6199. }
  6200. else
  6201. {
  6202. fieldValue1[(int)morph.hash["hoho"]] = 0.0f;
  6203. }
  6204. if (float.Parse(strArray[31]) == 1.0)
  6205. {
  6206. fieldValue1[(int)morph.hash["hoho2"]] = 0.5f;
  6207. }
  6208. else
  6209. {
  6210. fieldValue1[(int)morph.hash["hoho2"]] = 0.0f;
  6211. }
  6212. if (float.Parse(strArray[32]) == 1.0)
  6213. {
  6214. fieldValue1[(int)morph.hash["hohos"]] = 1f;
  6215. }
  6216. else
  6217. {
  6218. fieldValue1[(int)morph.hash["hohos"]] = 0.0f;
  6219. }
  6220. if (float.Parse(strArray[33]) == 1.0)
  6221. {
  6222. fieldValue1[(int)morph.hash["hohol"]] = 1f;
  6223. }
  6224. else
  6225. {
  6226. fieldValue1[(int)morph.hash["hohol"]] = 0.0f;
  6227. }
  6228. if (float.Parse(strArray[34]) == 1.0)
  6229. {
  6230. fieldValue1[(int)morph.hash["toothoff"]] = 1f;
  6231. }
  6232. else
  6233. {
  6234. fieldValue1[(int)morph.hash["toothoff"]] = 0.0f;
  6235. }
  6236. if (strArray.Length > 35)
  6237. {
  6238. morph.boNoseFook = float.Parse(strArray[35]) == 1.0;
  6239. }
  6240. }
  6241. maidArray[selectMaidIndex].body0.Face.morph.FixBlendValues_Face();
  6242. isFaceInit = true;
  6243. faceCombo.selectedItemIndex = faceIndex[selectMaidIndex];
  6244. }
  6245. int offsetTop = GetPix(120);
  6246. int UIHeight = GetPix(510);
  6247. Rect faceWindowScrollRect = new Rect(0, offsetTop, rectWin.width, rectWin.height - offsetTop);
  6248. Rect faceWindowScrollView = new Rect(0, 0, rectWin.width - 20, UIHeight);
  6249. faceScrollPos = GUI.BeginScrollView(faceWindowScrollRect, faceScrollPos, faceWindowScrollView);
  6250. #region face sliders
  6251. int sliderWidth = GetPix(70);
  6252. int sliderHeight = GetPix(20);
  6253. int labelWidth = GetPix(100);
  6254. int labelHeight = GetPix(25);
  6255. int sliderLeft = 8;
  6256. int sliderRight = 88;
  6257. int labelPosition = 0;
  6258. int sliderPosition = 15;
  6259. int sliderOffset = 28;
  6260. GUI.Label(new Rect(GetPix(sliderLeft), GetPix(labelPosition),
  6261. labelWidth, labelHeight),
  6262. "目の開閉",
  6263. style2);
  6264. eyeclose = GUI.HorizontalSlider(new Rect(GetPix(sliderLeft),
  6265. GetPix(sliderPosition),
  6266. sliderWidth, sliderHeight),
  6267. eyeclose,
  6268. 0.0f,
  6269. 1f);
  6270. GUI.Label(new Rect(GetPix(sliderRight), GetPix(labelPosition),
  6271. labelWidth, labelHeight),
  6272. "にっこり",
  6273. style2);
  6274. eyeclose2 = GUI.HorizontalSlider(new Rect(GetPix(sliderRight),
  6275. GetPix(sliderPosition),
  6276. sliderWidth, sliderHeight),
  6277. eyeclose2,
  6278. 0.0f,
  6279. 1f);
  6280. GUI.Label(new Rect(GetPix(sliderLeft), GetPix(labelPosition + sliderOffset),
  6281. labelWidth, labelHeight),
  6282. "ジト目",
  6283. style2);
  6284. eyeclose3 = GUI.HorizontalSlider(new Rect(GetPix(sliderLeft),
  6285. GetPix(sliderPosition + sliderOffset),
  6286. sliderWidth, sliderHeight),
  6287. eyeclose3,
  6288. 0.0f,
  6289. 1f);
  6290. GUI.Label(new Rect(GetPix(88), GetPix(labelPosition + sliderOffset),
  6291. labelWidth, labelHeight),
  6292. "見開く",
  6293. style2);
  6294. eyebig = GUI.HorizontalSlider(new Rect(GetPix(88),
  6295. GetPix(sliderPosition + sliderOffset),
  6296. sliderWidth, sliderHeight),
  6297. eyebig,
  6298. 0.0f,
  6299. 1f);
  6300. GUI.Label(new Rect(GetPix(sliderLeft), GetPix(labelPosition + sliderOffset * 2),
  6301. labelWidth, labelHeight),
  6302. "ウインク1",
  6303. style2);
  6304. eyeclose6 = GUI.HorizontalSlider(new Rect(GetPix(sliderLeft),
  6305. GetPix(sliderPosition + sliderOffset * 2),
  6306. sliderWidth, sliderHeight),
  6307. eyeclose6,
  6308. 0.0f,
  6309. 1f);
  6310. GUI.Label(new Rect(GetPix(88), GetPix(labelPosition + sliderOffset * 2),
  6311. labelWidth, labelHeight),
  6312. "ウインク2",
  6313. style2);
  6314. eyeclose5 = GUI.HorizontalSlider(new Rect(GetPix(88),
  6315. GetPix(sliderPosition + sliderOffset * 2),
  6316. sliderWidth, sliderHeight),
  6317. eyeclose5,
  6318. 0.0f,
  6319. 1f);
  6320. GUI.Label(new Rect(GetPix(sliderLeft), GetPix(labelPosition + sliderOffset * 3),
  6321. labelWidth, labelHeight),
  6322. "ハイライト",
  6323. style2);
  6324. hitomih = GUI.HorizontalSlider(new Rect(GetPix(sliderLeft),
  6325. GetPix(sliderPosition + sliderOffset * 3),
  6326. sliderWidth, sliderHeight),
  6327. hitomih,
  6328. 0.0f,
  6329. 2f);
  6330. GUI.Label(new Rect(GetPix(88), GetPix(labelPosition + sliderOffset * 3),
  6331. labelWidth, labelHeight),
  6332. "瞳サイズ",
  6333. style2);
  6334. hitomis = GUI.HorizontalSlider(new Rect(GetPix(88),
  6335. GetPix(sliderPosition + sliderOffset * 3),
  6336. sliderWidth, sliderHeight),
  6337. hitomis,
  6338. 0.0f,
  6339. 1f);
  6340. GUI.Label(new Rect(GetPix(sliderLeft), GetPix(labelPosition + sliderOffset * 4),
  6341. labelWidth, labelHeight),
  6342. "眉角度1",
  6343. style2);
  6344. mayuha = GUI.HorizontalSlider(new Rect(GetPix(sliderLeft),
  6345. GetPix(sliderPosition + sliderOffset * 4),
  6346. sliderWidth, sliderHeight),
  6347. mayuha,
  6348. 0.0f,
  6349. 1f);
  6350. GUI.Label(new Rect(GetPix(88), GetPix(labelPosition + sliderOffset * 4),
  6351. labelWidth, labelHeight),
  6352. "眉角度2",
  6353. style2);
  6354. mayuw = GUI.HorizontalSlider(new Rect(GetPix(88),
  6355. GetPix(sliderPosition + sliderOffset * 4),
  6356. sliderWidth, sliderHeight),
  6357. mayuw,
  6358. 0.0f,
  6359. 1f);
  6360. GUI.Label(new Rect(GetPix(sliderLeft), GetPix(labelPosition + sliderOffset * 5),
  6361. labelWidth, labelHeight),
  6362. "眉上げ",
  6363. style2);
  6364. mayuup = GUI.HorizontalSlider(new Rect(GetPix(sliderLeft),
  6365. GetPix(sliderPosition + sliderOffset * 5),
  6366. sliderWidth, sliderHeight),
  6367. mayuup,
  6368. 0.0f,
  6369. 0.8f);
  6370. GUI.Label(new Rect(GetPix(88), GetPix(labelPosition + sliderOffset * 5),
  6371. labelWidth, labelHeight),
  6372. "眉下げ1",
  6373. style2);
  6374. mayuv = GUI.HorizontalSlider(new Rect(GetPix(88),
  6375. GetPix(sliderPosition + sliderOffset * 5),
  6376. sliderWidth, sliderHeight),
  6377. mayuv,
  6378. 0.0f,
  6379. 0.8f);
  6380. GUI.Label(new Rect(GetPix(sliderLeft), GetPix(labelPosition + sliderOffset * 6),
  6381. labelWidth, labelHeight),
  6382. "眉下げ2",
  6383. style2);
  6384. mayuvhalf = GUI.HorizontalSlider(new Rect(GetPix(sliderLeft),
  6385. GetPix(sliderPosition + sliderOffset * 6),
  6386. sliderWidth, sliderHeight),
  6387. mayuvhalf,
  6388. 0.0f,
  6389. 0.9f);
  6390. GUI.Label(new Rect(GetPix(sliderLeft), GetPix(labelPosition + sliderOffset * 7),
  6391. labelWidth, labelHeight),
  6392. "口開け1",
  6393. style2);
  6394. moutha = GUI.HorizontalSlider(new Rect(GetPix(sliderLeft),
  6395. GetPix(sliderPosition + sliderOffset * 7),
  6396. sliderWidth, sliderHeight),
  6397. moutha,
  6398. 0.0f,
  6399. 1f);
  6400. GUI.Label(new Rect(GetPix(88), GetPix(labelPosition + sliderOffset * 7),
  6401. labelWidth, labelHeight),
  6402. "口開け2",
  6403. style2);
  6404. mouths = GUI.HorizontalSlider(new Rect(GetPix(88),
  6405. GetPix(sliderPosition + sliderOffset * 7),
  6406. sliderWidth, sliderHeight),
  6407. mouths,
  6408. 0.0f,
  6409. 0.9f);
  6410. GUI.Label(new Rect(GetPix(sliderLeft), GetPix(labelPosition + sliderOffset * 8),
  6411. labelWidth, labelHeight),
  6412. "口幅狭く",
  6413. style2);
  6414. mouthc = GUI.HorizontalSlider(new Rect(GetPix(sliderLeft),
  6415. GetPix(sliderPosition + sliderOffset * 8),
  6416. sliderWidth, sliderHeight),
  6417. mouthc,
  6418. 0.0f,
  6419. 1f);
  6420. GUI.Label(new Rect(GetPix(88), GetPix(labelPosition + sliderOffset * 8),
  6421. labelWidth, labelHeight),
  6422. "口幅広く",
  6423. style2);
  6424. mouthi = GUI.HorizontalSlider(new Rect(GetPix(88),
  6425. GetPix(sliderPosition + sliderOffset * 8),
  6426. sliderWidth, sliderHeight),
  6427. mouthi,
  6428. 0.0f,
  6429. 1f);
  6430. GUI.Label(new Rect(GetPix(sliderLeft), GetPix(labelPosition + sliderOffset * 9),
  6431. labelWidth, labelHeight),
  6432. "口角上げ",
  6433. style2);
  6434. mouthup = GUI.HorizontalSlider(new Rect(GetPix(sliderLeft),
  6435. GetPix(sliderPosition + sliderOffset * 9),
  6436. sliderWidth, sliderHeight),
  6437. mouthup,
  6438. 0.0f,
  6439. 1.4f);
  6440. GUI.Label(new Rect(GetPix(88), GetPix(labelPosition + sliderOffset * 9),
  6441. labelWidth, labelHeight),
  6442. "口角下げ",
  6443. style2);
  6444. mouthdw = GUI.HorizontalSlider(new Rect(GetPix(88),
  6445. GetPix(sliderPosition + sliderOffset * 9),
  6446. sliderWidth, sliderHeight),
  6447. mouthdw,
  6448. 0.0f,
  6449. 1f);
  6450. GUI.Label(new Rect(GetPix(sliderLeft), GetPix(labelPosition + sliderOffset * 10),
  6451. labelWidth, labelHeight),
  6452. "口中央上げ",
  6453. style2);
  6454. mouthhe = GUI.HorizontalSlider(new Rect(GetPix(sliderLeft),
  6455. GetPix(sliderPosition + sliderOffset * 10),
  6456. sliderWidth, sliderHeight),
  6457. mouthhe,
  6458. 0.0f,
  6459. 1f);
  6460. GUI.Label(new Rect(GetPix(88), GetPix(labelPosition + sliderOffset * 10),
  6461. labelWidth, labelHeight),
  6462. "左口角上げ",
  6463. style2);
  6464. mouthuphalf = GUI.HorizontalSlider(new Rect(GetPix(88),
  6465. GetPix(sliderPosition + sliderOffset * 10),
  6466. sliderWidth, sliderHeight),
  6467. mouthuphalf,
  6468. 0.0f,
  6469. 2f);
  6470. GUI.Label(new Rect(GetPix(sliderLeft), GetPix(labelPosition + sliderOffset * 11),
  6471. labelWidth, labelHeight),
  6472. "舌出し",
  6473. style2);
  6474. tangout = GUI.HorizontalSlider(new Rect(GetPix(sliderLeft),
  6475. GetPix(sliderPosition + sliderOffset * 11),
  6476. sliderWidth, sliderHeight),
  6477. tangout,
  6478. 0.0f,
  6479. 1f);
  6480. GUI.Label(new Rect(GetPix(88), GetPix(labelPosition + sliderOffset * 11),
  6481. labelWidth, labelHeight),
  6482. "舌上げ",
  6483. style2);
  6484. tangup = GUI.HorizontalSlider(new Rect(GetPix(88),
  6485. GetPix(sliderPosition + sliderOffset * 11),
  6486. sliderWidth, sliderHeight),
  6487. tangup,
  6488. 0.0f,
  6489. 0.7f);
  6490. GUI.Label(new Rect(GetPix(sliderLeft), GetPix(labelPosition + sliderOffset * 12),
  6491. labelWidth, labelHeight),
  6492. "舌根上げ",
  6493. style2);
  6494. tangopen = GUI.HorizontalSlider(new Rect(GetPix(sliderLeft),
  6495. GetPix(sliderPosition + sliderOffset * 12),
  6496. sliderWidth, sliderHeight),
  6497. tangopen,
  6498. 0.0f,
  6499. 1f);
  6500. #endregion
  6501. #region face toggles
  6502. int togglePositionX = 5;
  6503. int togglePositionY = 370;
  6504. int toggleOffsetX = 55;
  6505. int toggleOffsetY = 22;
  6506. int toggleWidth = GetPix(55);
  6507. int toggleHeight = GetPix(16);
  6508. isHoho2 = GUI.Toggle(new Rect(GetPix(togglePositionX),
  6509. GetPix(togglePositionY),
  6510. toggleWidth, toggleHeight),
  6511. isHoho2,
  6512. "赤面",
  6513. style4);
  6514. isShock = GUI.Toggle(new Rect(GetPix(togglePositionX + toggleOffsetX * 1),
  6515. GetPix(togglePositionY),
  6516. toggleWidth, toggleHeight),
  6517. isShock,
  6518. "ショック",
  6519. style4);
  6520. isNosefook = GUI.Toggle(new Rect(GetPix(togglePositionX + toggleOffsetX * 2),
  6521. GetPix(togglePositionY),
  6522. toggleWidth, toggleHeight),
  6523. isNosefook,
  6524. "鼻フック",
  6525. style4);
  6526. isNamida = GUI.Toggle(new Rect(GetPix(togglePositionX),
  6527. GetPix(togglePositionY + toggleOffsetY * 1),
  6528. toggleWidth, toggleHeight),
  6529. isNamida,
  6530. "涙",
  6531. style4);
  6532. isYodare = GUI.Toggle(new Rect(GetPix(togglePositionX + toggleOffsetX * 1),
  6533. GetPix(togglePositionY + toggleOffsetY * 1),
  6534. toggleWidth, toggleHeight),
  6535. isYodare,
  6536. "涎",
  6537. style4);
  6538. isToothoff = !GUI.Toggle(new Rect(GetPix(togglePositionX + toggleOffsetX * 2),
  6539. GetPix(togglePositionY + toggleOffsetY * 1),
  6540. toggleWidth, toggleHeight),
  6541. !isToothoff,
  6542. "歯",
  6543. style4);
  6544. isTear1 = GUI.Toggle(new Rect(GetPix(togglePositionX),
  6545. GetPix(togglePositionY + toggleOffsetY * 2),
  6546. toggleWidth, toggleHeight),
  6547. isTear1,
  6548. "涙1",
  6549. style4);
  6550. isTear2 = GUI.Toggle(new Rect(GetPix(togglePositionX + toggleOffsetX * 1),
  6551. GetPix(togglePositionY + toggleOffsetY * 2),
  6552. toggleWidth, toggleHeight),
  6553. isTear2,
  6554. "涙2",
  6555. style4);
  6556. isTear3 = GUI.Toggle(new Rect(GetPix(togglePositionX + toggleOffsetX * 2),
  6557. GetPix(togglePositionY + toggleOffsetY * 2),
  6558. toggleWidth, toggleHeight),
  6559. isTear3,
  6560. "涙3",
  6561. style4);
  6562. isHohos = GUI.Toggle(new Rect(GetPix(togglePositionX),
  6563. GetPix(togglePositionY + toggleOffsetY * 3),
  6564. toggleWidth, toggleHeight),
  6565. isHohos,
  6566. "頬1",
  6567. style4);
  6568. isHoho = GUI.Toggle(new Rect(GetPix(togglePositionX + toggleOffsetX * 1),
  6569. GetPix(togglePositionY + toggleOffsetY * 3),
  6570. toggleWidth, toggleHeight),
  6571. isHoho,
  6572. "頬2",
  6573. style4);
  6574. isHohol = GUI.Toggle(new Rect(GetPix(togglePositionX + toggleOffsetX * 2),
  6575. GetPix(togglePositionY + toggleOffsetY * 3),
  6576. toggleWidth, toggleHeight),
  6577. isHohol,
  6578. "頬3",
  6579. style4);
  6580. #endregion
  6581. int faceSaveToggleY = togglePositionY + toggleOffsetY * 4;
  6582. int faceSaveInputY = faceSaveToggleY + 20;
  6583. isFaceEdit = GUI.Toggle(new Rect(GetPix(5),
  6584. GetPix(faceSaveToggleY),
  6585. toggleWidth, toggleHeight),
  6586. isFaceEdit,
  6587. "登録",
  6588. style4);
  6589. if (isFaceEdit)
  6590. {
  6591. inName4 = GUI.TextField(new Rect(GetPix(5),
  6592. GetPix(faceSaveInputY),
  6593. GetPix(100),
  6594. GetPix(20)),
  6595. inName4);
  6596. if (GUI.Button(new Rect(GetPix(107),
  6597. GetPix(faceSaveInputY),
  6598. GetPix(35),
  6599. GetPix(20)),
  6600. "追加",
  6601. style3))
  6602. {
  6603. GameMain.Instance.SoundMgr.PlaySe("se002.ogg", false);
  6604. GUI.FocusControl("");
  6605. int num2 = 1;
  6606. for (int index = 1; index < 1000; ++index)
  6607. {
  6608. if (Preferences["face"]["f" + index].Value == null)
  6609. {
  6610. num2 = index;
  6611. break;
  6612. }
  6613. }
  6614. TMorph morph = maidArray[selectMaidIndex].body0.Face.morph;
  6615. float[] fieldValue1 = GetFieldValue<TMorph, float[]>(morph, "BlendValues");
  6616. float[] fieldValue2 = GetFieldValue<TMorph, float[]>(morph, "BlendValuesBackup");
  6617. string str1 = inName4 + ":" + fieldValue2[(int)morph.hash["eyeclose"]] + ","
  6618. + fieldValue2[(int)morph.hash["eyeclose2"]] + ","
  6619. + fieldValue2[(int)morph.hash["eyeclose3"]] + ","
  6620. + fieldValue2[(int)morph.hash["eyeclose6"]] + ","
  6621. + fieldValue1[(int)morph.hash["hitomih"]] + ","
  6622. + fieldValue1[(int)morph.hash["hitomis"]] + ","
  6623. + fieldValue1[(int)morph.hash["mayuha"]] + ","
  6624. + fieldValue1[(int)morph.hash["mayuup"]] + ","
  6625. + fieldValue1[(int)morph.hash["mayuv"]] + ","
  6626. + fieldValue1[(int)morph.hash["mayuvhalf"]] + ","
  6627. + fieldValue1[(int)morph.hash["moutha"]] + ","
  6628. + fieldValue1[(int)morph.hash["mouths"]] + ","
  6629. + fieldValue1[(int)morph.hash["mouthdw"]] + ","
  6630. + fieldValue1[(int)morph.hash["mouthup"]] + ","
  6631. + fieldValue1[(int)morph.hash["tangout"]] + ","
  6632. + fieldValue1[(int)morph.hash["tangup"]] + ","
  6633. + fieldValue1[(int)morph.hash["eyebig"]] + ","
  6634. + fieldValue2[(int)morph.hash["eyeclose5"]] + ","
  6635. + fieldValue1[(int)morph.hash["mayuw"]] + ","
  6636. + fieldValue1[(int)morph.hash["mouthhe"]] + ","
  6637. + fieldValue1[(int)morph.hash["mouthc"]] + ","
  6638. + fieldValue1[(int)morph.hash["mouthi"]] + ","
  6639. + fieldValue1[(int)morph.hash["mouthuphalf"]] + ",";
  6640. string str2;
  6641. try
  6642. {
  6643. str2 = str1 + fieldValue1[(int)morph.hash["tangopen"]] + ",";
  6644. }
  6645. catch
  6646. {
  6647. str2 = str1 + "0,";
  6648. }
  6649. string str3 = fieldValue1[(int)morph.hash["namida"]] <= 0.0
  6650. ? str2 + 0 + ","
  6651. : str2 + 1 + ",";
  6652. string str4 = fieldValue1[(int)morph.hash["tear1"]] <= 0.0
  6653. ? str3 + 0 + ","
  6654. : str3 + 1 + ",";
  6655. string str5 = fieldValue1[(int)morph.hash["tear2"]] <= 0.0
  6656. ? str4 + 0 + ","
  6657. : str4 + 1 + ",";
  6658. string str6 = fieldValue1[(int)morph.hash["tear3"]] <= 0.0
  6659. ? str5 + 0 + ","
  6660. : str5 + 1 + ",";
  6661. string str7 = fieldValue1[(int)morph.hash["shock"]] <= 0.0
  6662. ? str6 + 0 + ","
  6663. : str6 + 1 + ",";
  6664. string str8 = fieldValue1[(int)morph.hash["yodare"]] <= 0.0
  6665. ? str7 + 0 + ","
  6666. : str7 + 1 + ",";
  6667. string str9 = fieldValue1[(int)morph.hash["hoho"]] <= 0.0
  6668. ? str8 + 0 + ","
  6669. : str8 + 1 + ",";
  6670. string str10 = fieldValue1[(int)morph.hash["hoho2"]] <= 0.0
  6671. ? str9 + 0 + ","
  6672. : str9 + 1 + ",";
  6673. string str11 = fieldValue1[(int)morph.hash["hohos"]] <= 0.0
  6674. ? str10 + 0 + ","
  6675. : str10 + 1 + ",";
  6676. string str12 = fieldValue1[(int)morph.hash["hohol"]] <= 0.0
  6677. ? str11 + 0 + ","
  6678. : str11 + 1 + ",";
  6679. string str13 = fieldValue1[(int)morph.hash["toothoff"]] <= 0.0
  6680. ? str12 + 0 + ","
  6681. : str12 + 1 + ",";
  6682. string str14 = fieldValue1[(int)morph.hash["nosefook"]] <= 0.0
  6683. ? str13 + 0 + ":"
  6684. : str13 + 1 + ":";
  6685. Preferences["face"]["f" + num2].Value = str14;
  6686. SaveConfig();
  6687. List<string> stringList = new List<string>(300);
  6688. stringList.AddRange(faceArray);
  6689. for (int index = 1; index < 300; ++index)
  6690. {
  6691. IniKey iniKey = Preferences["face"]["f" + index];
  6692. if (iniKey.Value != null)
  6693. {
  6694. string[] strArray = iniKey.Value.Split(':');
  6695. if (strArray.Length > 1)
  6696. {
  6697. stringList.Add(strArray[0] + "               :" + index + ":" + strArray[1]);
  6698. }
  6699. }
  6700. else
  6701. {
  6702. break;
  6703. }
  6704. }
  6705. faceCombo.selectedItemIndex = 0;
  6706. faceComboList = new GUIContent[stringList.ToArray().Length];
  6707. for (int index = 0; index < stringList.ToArray().Length; ++index)
  6708. {
  6709. faceComboList[index] = new GUIContent(stringList.ToArray()[index]);
  6710. }
  6711. faceCombo.selectedItemIndex = stringList.ToArray().Length - 1;
  6712. inName4 = "";
  6713. }
  6714. if (faceIndex[selectMaidIndex] < faceArray.Length)
  6715. {
  6716. GUI.enabled = false;
  6717. }
  6718. if (GUI.Button(new Rect(GetPix(144),
  6719. GetPix(faceSaveInputY),
  6720. GetPix(24),
  6721. GetPix(20)),
  6722. "削",
  6723. style3))
  6724. {
  6725. GameMain.Instance.SoundMgr.PlaySe("se002.ogg", false);
  6726. Preferences["face"]["f" + faceComboList[faceIndex[selectMaidIndex]].text.Split(':')[1]].Value = "del";
  6727. SaveConfig();
  6728. List<string> stringList = new List<string>(300);
  6729. stringList.AddRange(faceArray);
  6730. for (int index = 1; index < 300; ++index)
  6731. {
  6732. IniKey iniKey = Preferences["face"]["f" + index];
  6733. if (iniKey.Value != null)
  6734. {
  6735. string[] strArray = iniKey.Value.Split(':');
  6736. if (strArray.Length > 1)
  6737. {
  6738. stringList.Add(strArray[0] + "               :" + index + ":" + strArray[1]);
  6739. }
  6740. }
  6741. else
  6742. {
  6743. break;
  6744. }
  6745. }
  6746. faceCombo.selectedItemIndex = 0;
  6747. faceComboList = new GUIContent[stringList.ToArray().Length];
  6748. for (int index = 0; index < stringList.ToArray().Length; ++index)
  6749. {
  6750. faceComboList[index] = new GUIContent(stringList.ToArray()[index]);
  6751. }
  6752. faceCombo.selectedItemIndex = 0;
  6753. for (int index = 0; index < maidCnt; ++index)
  6754. {
  6755. if (maidArray[index] && maidArray[index].Visible
  6756. && stringList.ToArray().Length <= faceIndex[index])
  6757. {
  6758. faceIndex[index] = 0;
  6759. }
  6760. }
  6761. }
  6762. GUI.enabled = true;
  6763. }
  6764. GUI.EndScrollView();
  6765. if (faceCombo.isClickedComboButton)
  6766. {
  6767. GUI.enabled = true;
  6768. }
  6769. if (isFace[selectMaidIndex])
  6770. {
  6771. faceIndex[selectMaidIndex] =
  6772. faceCombo.List(new Rect(GetPix(35),
  6773. GetPix(95),
  6774. GetPix(95),
  6775. GetPix(23)),
  6776. faceComboList[faceIndex[selectMaidIndex]].text,
  6777. faceComboList,
  6778. buttonStyle,
  6779. "box",
  6780. listStyle2);
  6781. }
  6782. else
  6783. {
  6784. faceCombo.List(new Rect(GetPix(35), GetPix(95), GetPix(95), GetPix(23)),
  6785. faceComboList[faceIndex[selectMaidIndex]].text,
  6786. faceComboList,
  6787. buttonStyle,
  6788. "box",
  6789. listStyle2);
  6790. }
  6791. if (faceCombo.isClickedComboButton)
  6792. {
  6793. isCombo = true;
  6794. }
  6795. else if (isCombo)
  6796. {
  6797. isCombo = false;
  6798. TMorph morph = maidArray[selectMaidIndex].body0.Face.morph;
  6799. float[] fieldValue1 = GetFieldValue<TMorph, float[]>(morph, "BlendValues");
  6800. morph.EyeMabataki = 0.0f;
  6801. if (faceIndex[selectMaidIndex] < faceArray.Length)
  6802. {
  6803. morph.MulBlendValues(faceArray[faceIndex[selectMaidIndex]], 1f);
  6804. }
  6805. else
  6806. {
  6807. float[] fieldValue2 = GetFieldValue<TMorph, float[]>(morph, "BlendValuesBackup");
  6808. if (!isVR)
  6809. {
  6810. maidArray[selectMaidIndex].boMabataki = false;
  6811. }
  6812. string[] strArray = faceComboList[faceIndex[selectMaidIndex]].text.Split(':')[2].Split(',');
  6813. fieldValue2[(int)morph.hash["eyeclose"]] = float.Parse(strArray[0]);
  6814. fieldValue2[(int)morph.hash["eyeclose2"]] = float.Parse(strArray[1]);
  6815. fieldValue2[(int)morph.hash["eyeclose3"]] = float.Parse(strArray[2]);
  6816. fieldValue2[(int)morph.hash["eyeclose6"]] = float.Parse(strArray[3]);
  6817. fieldValue1[(int)morph.hash["hitomih"]] = float.Parse(strArray[4]);
  6818. fieldValue1[(int)morph.hash["hitomis"]] = float.Parse(strArray[5]);
  6819. fieldValue1[(int)morph.hash["mayuha"]] = float.Parse(strArray[6]);
  6820. fieldValue1[(int)morph.hash["mayuup"]] = float.Parse(strArray[7]);
  6821. fieldValue1[(int)morph.hash["mayuv"]] = float.Parse(strArray[8]);
  6822. fieldValue1[(int)morph.hash["mayuvhalf"]] = float.Parse(strArray[9]);
  6823. fieldValue1[(int)morph.hash["moutha"]] = float.Parse(strArray[10]);
  6824. fieldValue1[(int)morph.hash["mouths"]] = float.Parse(strArray[11]);
  6825. fieldValue1[(int)morph.hash["mouthdw"]] = float.Parse(strArray[12]);
  6826. fieldValue1[(int)morph.hash["mouthup"]] = float.Parse(strArray[13]);
  6827. fieldValue1[(int)morph.hash["tangout"]] = float.Parse(strArray[14]);
  6828. fieldValue1[(int)morph.hash["tangup"]] = float.Parse(strArray[15]);
  6829. fieldValue1[(int)morph.hash["eyebig"]] = float.Parse(strArray[16]);
  6830. fieldValue2[(int)morph.hash["eyeclose5"]] = float.Parse(strArray[17]);
  6831. fieldValue1[(int)morph.hash["mayuw"]] = float.Parse(strArray[18]);
  6832. fieldValue1[(int)morph.hash["mouthhe"]] = float.Parse(strArray[19]);
  6833. fieldValue1[(int)morph.hash["mouthc"]] = float.Parse(strArray[20]);
  6834. fieldValue1[(int)morph.hash["mouthi"]] = float.Parse(strArray[21]);
  6835. fieldValue1[(int)morph.hash["mouthuphalf"]] = float.Parse(strArray[22]) + 0.01f;
  6836. try
  6837. {
  6838. fieldValue1[(int)morph.hash["tangopen"]] = float.Parse(strArray[23]);
  6839. }
  6840. catch { }
  6841. if (float.Parse(strArray[24]) == 1.0)
  6842. {
  6843. fieldValue1[(int)morph.hash["namida"]] = 1f;
  6844. }
  6845. else
  6846. {
  6847. fieldValue1[(int)morph.hash["namida"]] = 0.0f;
  6848. }
  6849. if (float.Parse(strArray[25]) == 1.0)
  6850. {
  6851. fieldValue1[(int)morph.hash["tear1"]] = 1f;
  6852. }
  6853. else
  6854. {
  6855. fieldValue1[(int)morph.hash["tear1"]] = 0.0f;
  6856. }
  6857. if (float.Parse(strArray[26]) == 1.0)
  6858. {
  6859. fieldValue1[(int)morph.hash["tear2"]] = 1f;
  6860. }
  6861. else
  6862. {
  6863. fieldValue1[(int)morph.hash["tear2"]] = 0.0f;
  6864. }
  6865. if (float.Parse(strArray[27]) == 1.0)
  6866. {
  6867. fieldValue1[(int)morph.hash["tear3"]] = 1f;
  6868. }
  6869. else
  6870. {
  6871. fieldValue1[(int)morph.hash["tear3"]] = 0.0f;
  6872. }
  6873. if (float.Parse(strArray[28]) == 1.0)
  6874. {
  6875. fieldValue1[(int)morph.hash["shock"]] = 1f;
  6876. }
  6877. else
  6878. {
  6879. fieldValue1[(int)morph.hash["shock"]] = 0.0f;
  6880. }
  6881. if (float.Parse(strArray[29]) == 1.0)
  6882. {
  6883. fieldValue1[(int)morph.hash["yodare"]] = 1f;
  6884. }
  6885. else
  6886. {
  6887. fieldValue1[(int)morph.hash["yodare"]] = 0.0f;
  6888. }
  6889. if (float.Parse(strArray[30]) == 1.0)
  6890. {
  6891. fieldValue1[(int)morph.hash["hoho"]] = 0.5f;
  6892. }
  6893. else
  6894. {
  6895. fieldValue1[(int)morph.hash["hoho"]] = 0.0f;
  6896. }
  6897. if (float.Parse(strArray[31]) == 1.0)
  6898. {
  6899. fieldValue1[(int)morph.hash["hoho2"]] = 0.5f;
  6900. }
  6901. else
  6902. {
  6903. fieldValue1[(int)morph.hash["hoho2"]] = 0.0f;
  6904. }
  6905. if (float.Parse(strArray[32]) == 1.0)
  6906. {
  6907. fieldValue1[(int)morph.hash["hohos"]] = 1f;
  6908. }
  6909. else
  6910. {
  6911. fieldValue1[(int)morph.hash["hohos"]] = 0.0f;
  6912. }
  6913. if (float.Parse(strArray[33]) == 1.0)
  6914. {
  6915. fieldValue1[(int)morph.hash["hohol"]] = 1f;
  6916. }
  6917. else
  6918. {
  6919. fieldValue1[(int)morph.hash["hohol"]] = 0.0f;
  6920. }
  6921. if (float.Parse(strArray[34]) == 1.0)
  6922. {
  6923. fieldValue1[(int)morph.hash["toothoff"]] = 1f;
  6924. }
  6925. else
  6926. {
  6927. fieldValue1[(int)morph.hash["toothoff"]] = 0.0f;
  6928. }
  6929. if (strArray.Length > 35)
  6930. {
  6931. morph.boNoseFook = float.Parse(strArray[35]) == 1.0;
  6932. }
  6933. }
  6934. maidArray[selectMaidIndex].body0.Face.morph.FixBlendValues_Face();
  6935. isFaceInit = true;
  6936. faceCombo.selectedItemIndex = faceIndex[selectMaidIndex];
  6937. }
  6938. GUI.enabled = !faceCombo.isClickedComboButton;
  6939. bool state = GUI.enabled;
  6940. GUI.enabled = true;
  6941. GUI.DragWindow();
  6942. GUI.enabled = state;
  6943. yotogiFlg = false;
  6944. if (sceneLevel != 14
  6945. || !GameObject
  6946. .Find("/UI Root/YotogiPlayPanel/CommandViewer/SkillViewer/MaskGroup/SkillGroup/CommandParent/CommandUnit"))
  6947. {
  6948. return;
  6949. }
  6950. yotogiFlg = true;
  6951. }
  6952. private void MaidCallWindow(int winID)
  6953. {
  6954. CharacterMgr characterMgr = GameMain.Instance.CharacterMgr;
  6955. GUIStyle style1 = "label";
  6956. style1.fontSize = GetPix(14);
  6957. style1.alignment = TextAnchor.UpperLeft;
  6958. GUIStyle style2 = "button";
  6959. style2.fontSize = GetPix(16);
  6960. style2.alignment = TextAnchor.MiddleCenter;
  6961. GUIStyle style3 = new GUIStyle("toggle")
  6962. {
  6963. fontSize = GetPix(13)
  6964. };
  6965. float pix = GetPix(70);
  6966. if (comboBoxList == null)
  6967. {
  6968. comboBoxControl.selectedItemIndex = 0;
  6969. comboBoxList = new GUIContent[11];
  6970. comboBoxList[0] = new GUIContent("通常");
  6971. comboBoxList[1] = new GUIContent("横一列");
  6972. comboBoxList[2] = new GUIContent("縦一列");
  6973. comboBoxList[3] = new GUIContent("斜め");
  6974. comboBoxList[4] = new GUIContent("円(外向き)");
  6975. comboBoxList[5] = new GUIContent("円(内向き)");
  6976. comboBoxList[6] = new GUIContent("扇");
  6977. comboBoxList[7] = new GUIContent("V");
  6978. comboBoxList[8] = new GUIContent("^");
  6979. comboBoxList[9] = new GUIContent("M");
  6980. comboBoxList[10] = new GUIContent("W");
  6981. }
  6982. bool flag1 = true;
  6983. if (faceFlg || poseFlg || sceneFlg || kankyoFlg || kankyo2Flg)
  6984. {
  6985. flag1 = false;
  6986. }
  6987. if (!isF6 && GUI.Toggle(new Rect(GetPix(2),
  6988. GetPix(2),
  6989. GetPix(39),
  6990. GetPix(20)),
  6991. flag1,
  6992. "配置",
  6993. style3))
  6994. {
  6995. faceFlg = false;
  6996. poseFlg = false;
  6997. sceneFlg = false;
  6998. kankyoFlg = false;
  6999. kankyo2Flg = false;
  7000. bGui = true;
  7001. }
  7002. if (!yotogiFlg && GUI.Toggle(new Rect(GetPix(41),
  7003. GetPix(2),
  7004. GetPix(39),
  7005. GetPix(20)),
  7006. poseFlg,
  7007. "操作",
  7008. style3))
  7009. {
  7010. poseFlg = true;
  7011. faceFlg = false;
  7012. sceneFlg = false;
  7013. kankyoFlg = false;
  7014. kankyo2Flg = false;
  7015. }
  7016. if (GUI.Toggle(new Rect(GetPix(80), GetPix(2), GetPix(39), GetPix(20)),
  7017. faceFlg,
  7018. "表情",
  7019. style3))
  7020. {
  7021. faceFlg = true;
  7022. poseFlg = false;
  7023. sceneFlg = false;
  7024. kankyoFlg = false;
  7025. kankyo2Flg = false;
  7026. if (!faceFlg2)
  7027. {
  7028. isFaceInit = true;
  7029. faceFlg2 = true;
  7030. maidArray[selectMaidIndex].boMabataki = false;
  7031. faceCombo.selectedItemIndex = faceIndex[selectMaidIndex];
  7032. }
  7033. }
  7034. if (GUI.Toggle(new Rect(GetPix(119), GetPix(2), GetPix(39), GetPix(20)),
  7035. kankyoFlg,
  7036. "環境",
  7037. style3))
  7038. {
  7039. poseFlg = false;
  7040. faceFlg = false;
  7041. sceneFlg = false;
  7042. kankyoFlg = true;
  7043. kankyo2Flg = false;
  7044. }
  7045. if (!line1)
  7046. {
  7047. line1 = MakeTex(2, 2, new Color(0.0f, 0.0f, 0.0f, 0.3f));
  7048. line2 = MakeTex(2, 2, new Color(0.7f, 0.7f, 0.7f, 0.6f));
  7049. }
  7050. GUI.DrawTexture(new Rect(GetPix(5), GetPix(20), GetPix(160), 2f), line1);
  7051. GUI.DrawTexture(new Rect(GetPix(5), GetPix(20), GetPix(160), 1f), line2);
  7052. int stockMaidCount1 = characterMgr.GetStockMaidCount();
  7053. Rect position;
  7054. Rect viewRect;
  7055. if (sceneLevel != 5)
  7056. {
  7057. position = new Rect(GetPix(7),
  7058. GetPix(110),
  7059. rectWin.width - GetPix(14),
  7060. rectWin.height * 0.83f);
  7061. viewRect = new Rect(0.0f,
  7062. 0.0f,
  7063. position.width * 0.85f,
  7064. (pix + GetPix(5)) * stockMaidCount1 + GetPix(15));
  7065. }
  7066. else
  7067. {
  7068. position = new Rect(GetPix(7),
  7069. GetPix(110),
  7070. rectWin.width - GetPix(14),
  7071. (float)(rectWin.height * 0.829999983310699 * 0.980000019073486));
  7072. viewRect = new Rect(0.0f,
  7073. 0.0f,
  7074. position.width * 0.85f,
  7075. (float)((pix + (double)GetPix(5)) * stockMaidCount1
  7076. + GetPix(15) * 0.920000016689301));
  7077. }
  7078. float y = 0.0f;
  7079. if (comboBoxControl.isClickedComboButton)
  7080. {
  7081. GUI.enabled = false;
  7082. }
  7083. if (GUI.Button(new Rect(GetPix(10), GetPix(78), rectWin.width * 0.85f, GetPix(28)),
  7084. "呼び出す",
  7085. style2))
  7086. {
  7087. isYobidashi = true;
  7088. selectMaidIndex = 0;
  7089. copyIndex = 0;
  7090. for (int index = 0; index < maxMaidCnt; ++index)
  7091. {
  7092. if (!isLock[index] && maidArray[index] && maidArray[index].Visible)
  7093. {
  7094. maidArray[index].CrossFade(poseArray[0] + ".anm", false, true, false, 0.0f, 1f);
  7095. maidArray[index].SetAutoTwistAll(true);
  7096. }
  7097. maidArray[index] = null;
  7098. }
  7099. for (int index = 0; index < maxMaidCnt; ++index)
  7100. {
  7101. isStop[index] = false;
  7102. }
  7103. bGui = false;
  7104. isFadeOut = true;
  7105. GameMain.Instance.MainCamera.FadeOut(0.0f, false, null, true, new Color());
  7106. for (int index = 0; index < characterMgr.GetStockMaidCount(); ++index)
  7107. {
  7108. characterMgr.GetStockMaidList()[index].Visible = false;
  7109. }
  7110. }
  7111. GUIStyle style4 = "button";
  7112. style4.fontSize = GetPix(13);
  7113. GUIStyleState guiStyleState = new GUIStyleState();
  7114. if (GUI.Button(new Rect(GetPix(10), GetPix(52), rectWin.width * 0.4f, GetPix(23)),
  7115. "7人選択",
  7116. style4))
  7117. {
  7118. if (sceneLevel != 5)
  7119. {
  7120. selectList = new ArrayList
  7121. {
  7122. 0,
  7123. 1,
  7124. 2,
  7125. 3,
  7126. 4,
  7127. 5,
  7128. 6
  7129. };
  7130. }
  7131. else
  7132. {
  7133. int stockMaidCount2 = characterMgr.GetStockMaidCount();
  7134. selectList = new ArrayList
  7135. {
  7136. editMaid
  7137. };
  7138. if (stockMaidCount2 > 1)
  7139. {
  7140. if (editMaid >= 1)
  7141. {
  7142. selectList.Add(0);
  7143. }
  7144. else if (stockMaidCount2 > 2)
  7145. {
  7146. selectList.Add(1);
  7147. }
  7148. }
  7149. if (stockMaidCount2 > 2)
  7150. {
  7151. if (editMaid >= 2)
  7152. {
  7153. selectList.Add(1);
  7154. }
  7155. else if (stockMaidCount2 > 3)
  7156. {
  7157. selectList.Add(2);
  7158. }
  7159. }
  7160. if (stockMaidCount2 > 3)
  7161. {
  7162. if (editMaid >= 3)
  7163. {
  7164. selectList.Add(2);
  7165. }
  7166. else if (stockMaidCount2 > 4)
  7167. {
  7168. selectList.Add(3);
  7169. }
  7170. }
  7171. if (stockMaidCount2 > 4)
  7172. {
  7173. if (editMaid >= 4)
  7174. {
  7175. selectList.Add(3);
  7176. }
  7177. else if (stockMaidCount2 > 5)
  7178. {
  7179. selectList.Add(4);
  7180. }
  7181. }
  7182. if (stockMaidCount2 > 5)
  7183. {
  7184. if (editMaid >= 5)
  7185. {
  7186. selectList.Add(4);
  7187. }
  7188. else if (stockMaidCount2 > 6)
  7189. {
  7190. selectList.Add(5);
  7191. }
  7192. }
  7193. if (stockMaidCount2 > 6)
  7194. {
  7195. if (editMaid >= 6)
  7196. {
  7197. selectList.Add(5);
  7198. }
  7199. else if (stockMaidCount2 > 7)
  7200. {
  7201. selectList.Add(6);
  7202. }
  7203. }
  7204. }
  7205. }
  7206. if (GUI.Button(new Rect(rectWin.width * 0.5f, GetPix(52), rectWin.width * 0.4f, GetPix(23)),
  7207. "選択解除",
  7208. style4))
  7209. {
  7210. selectList = new ArrayList();
  7211. if (sceneLevel == 5)
  7212. {
  7213. selectList.Add(editMaid);
  7214. }
  7215. }
  7216. GUI.enabled = true;
  7217. maidCallScrollPos = GUI.BeginScrollView(position, maidCallScrollPos, viewRect);
  7218. for (int nStockNo = 0; nStockNo < characterMgr.GetStockMaidCount(); ++nStockNo)
  7219. {
  7220. GUI.enabled = true;
  7221. GUI.DrawTexture(new Rect(2f, y + 2f, (float)(rectWin.width * 0.829999983310699 - 4.0), pix - 4f),
  7222. Texture2D.whiteTexture);
  7223. bool flag2 = false;
  7224. for (int index = 0; index < selectList.Count; ++index)
  7225. {
  7226. if ((int)selectList[index] == nStockNo)
  7227. {
  7228. flag2 = true;
  7229. break;
  7230. }
  7231. }
  7232. if (comboBoxControl.isClickedComboButton)
  7233. {
  7234. GUI.enabled = false;
  7235. GUI.Button(new Rect(0.0f, y, rectWin.width * 0.83f, pix), "", style2);
  7236. GUI.Button(new Rect(0.0f, y, rectWin.width * 0.83f, pix), "", style2);
  7237. }
  7238. if (GUI.Button(new Rect(0.0f, y, rectWin.width * 0.83f, pix), "", style2))
  7239. {
  7240. if (flag2)
  7241. {
  7242. for (int index = 0; index < selectList.Count; ++index)
  7243. {
  7244. if ((int)selectList[index] == nStockNo && (sceneLevel != 5 || (int)selectList[index] != editMaid))
  7245. {
  7246. selectList.Remove(nStockNo);
  7247. break;
  7248. }
  7249. }
  7250. }
  7251. else
  7252. {
  7253. if (selectList.Count > maxMaidCnt - 1)
  7254. {
  7255. selectList.Remove(selectList[maxMaidCnt - 1]);
  7256. }
  7257. selectList.Add(nStockNo);
  7258. }
  7259. }
  7260. GUI.enabled = true;
  7261. if (flag2)
  7262. {
  7263. GUI.DrawTexture(new Rect(5f, y + 5f, (float)(rectWin.width * 0.829999983310699 - 10.0), pix - 10f),
  7264. Texture2D.whiteTexture);
  7265. }
  7266. if (characterMgr.GetStockMaid(nStockNo).GetThumIcon())
  7267. {
  7268. GUI.DrawTexture(new Rect(0.0f, y - 5f, pix, pix), characterMgr.GetStockMaid(nStockNo).GetThumIcon());
  7269. }
  7270. string text = characterMgr.GetStockMaid(nStockNo).status.lastName + "\n"
  7271. + characterMgr.GetStockMaid(nStockNo).status.firstName;
  7272. guiStyleState.textColor = Color.black;
  7273. style1.normal = guiStyleState;
  7274. GUI.Label(new Rect(GetPix(65), y + pix / 4f, pix * 2f, pix * 3f), text, style1);
  7275. if (flag2)
  7276. {
  7277. for (int index = 0; index < selectList.Count; ++index)
  7278. {
  7279. if ((int)selectList[index] == nStockNo)
  7280. {
  7281. GUI.Label(new Rect(rectWin.width * 0.7f, y + 6f, pix, pix), (index + 1).ToString(), style1);
  7282. break;
  7283. }
  7284. }
  7285. }
  7286. y += pix + GetPix(5);
  7287. }
  7288. GUI.EndScrollView();
  7289. guiStyleState.textColor = Color.white;
  7290. style1.normal = guiStyleState;
  7291. comboBoxControl.List(new Rect(GetPix(10), GetPix(25), rectWin.width * 0.56f, GetPix(24)),
  7292. comboBoxList[comboBoxControl.GetSelectedItemIndex()].text,
  7293. comboBoxList,
  7294. listStyle);
  7295. bool OKButton = GUI.Button(new Rect(rectWin.width * 0.66f, GetPix(25), rectWin.width * 0.24f, GetPix(24)),
  7296. "決定",
  7297. style4);
  7298. GUI.DragWindow();
  7299. if (!OKButton)
  7300. {
  7301. return;
  7302. }
  7303. for (int index = 0; index < maxMaidCnt; ++index)
  7304. {
  7305. isStop[index] = false;
  7306. }
  7307. switch (comboBoxControl.GetSelectedItemIndex())
  7308. {
  7309. case 0:
  7310. for (int index = 0; index < maidCnt; ++index)
  7311. {
  7312. Vector3 zero1 = Vector3.zero;
  7313. Vector3 zero2 = Vector3.zero;
  7314. if (selectList.Count <= 7)
  7315. {
  7316. if (selectList.Count % 2 == 1)
  7317. {
  7318. switch (index)
  7319. {
  7320. case 0:
  7321. maidArray[index].SetPos(new Vector3(0.0f, 0.0f, 0.0f));
  7322. break;
  7323. case 1:
  7324. maidArray[index].SetPos(new Vector3(-0.6f, 0.0f, 0.26f));
  7325. break;
  7326. case 2:
  7327. maidArray[index].SetPos(new Vector3(0.6f, 0.0f, 0.26f));
  7328. break;
  7329. case 3:
  7330. maidArray[index].SetPos(new Vector3(-1.1f, 0.0f, 0.69f));
  7331. break;
  7332. case 4:
  7333. maidArray[index].SetPos(new Vector3(1.1f, 0.0f, 0.69f));
  7334. break;
  7335. case 5:
  7336. maidArray[index].SetPos(new Vector3(-1.47f, 0.0f, 1.1f));
  7337. break;
  7338. case 6:
  7339. maidArray[index].SetPos(new Vector3(1.47f, 0.0f, 1.1f));
  7340. break;
  7341. }
  7342. }
  7343. else
  7344. {
  7345. switch (index)
  7346. {
  7347. case 0:
  7348. maidArray[index].SetPos(new Vector3(0.3f, 0.0f, 0.0f));
  7349. break;
  7350. case 1:
  7351. maidArray[index].SetPos(new Vector3(-0.3f, 0.0f, 0.0f));
  7352. break;
  7353. case 2:
  7354. maidArray[index].SetPos(new Vector3(0.7f, 0.0f, 0.4f));
  7355. break;
  7356. case 3:
  7357. maidArray[index].SetPos(new Vector3(-0.7f, 0.0f, 0.4f));
  7358. break;
  7359. case 4:
  7360. maidArray[index].SetPos(new Vector3(1f, 0.0f, 0.9f));
  7361. break;
  7362. case 5:
  7363. maidArray[index].SetPos(new Vector3(-1f, 0.0f, 0.9f));
  7364. break;
  7365. }
  7366. }
  7367. }
  7368. else
  7369. {
  7370. float num1 = 0.0f;
  7371. if (selectList.Count >= 11)
  7372. {
  7373. float num2 = -0.4f;
  7374. if (selectList.Count % 2 == 1)
  7375. {
  7376. switch (index)
  7377. {
  7378. case 0:
  7379. maidArray[index].SetPos(new Vector3(0.0f, 0.0f, 0.0f + num2));
  7380. break;
  7381. case 1:
  7382. maidArray[index].SetPos(new Vector3(-0.5f, 0.0f, 0.2f + num2));
  7383. break;
  7384. case 2:
  7385. maidArray[index].SetPos(new Vector3(0.5f, 0.0f, 0.2f + num2));
  7386. break;
  7387. case 3:
  7388. maidArray[index].SetPos(new Vector3(-0.9f, 0.0f, 0.55f + num2));
  7389. break;
  7390. case 4:
  7391. maidArray[index].SetPos(new Vector3(0.9f, 0.0f, 0.55f + num2));
  7392. break;
  7393. case 5:
  7394. maidArray[index].SetPos(new Vector3(-1.25f, 0.0f, 0.9f + num2));
  7395. break;
  7396. case 6:
  7397. maidArray[index].SetPos(new Vector3(1.25f, 0.0f, 0.9f + num2));
  7398. break;
  7399. case 7:
  7400. maidArray[index].SetPos(new Vector3(-1.57f, 0.0f, 1.3f + num2));
  7401. break;
  7402. case 8:
  7403. maidArray[index].SetPos(new Vector3(1.57f, 0.0f, 1.3f + num2));
  7404. break;
  7405. case 9:
  7406. maidArray[index].SetPos(new Vector3(-1.77f, 0.0f, 1.72f + num2));
  7407. break;
  7408. case 10:
  7409. maidArray[index].SetPos(new Vector3(1.77f, 0.0f, 1.72f + num2));
  7410. break;
  7411. case 11:
  7412. maidArray[index].SetPos(new Vector3(-1.85f, 0.0f, 2.17f + num2));
  7413. break;
  7414. case 12:
  7415. maidArray[index].SetPos(new Vector3(1.85f, 0.0f, 2.17f + num2));
  7416. break;
  7417. default:
  7418. maidArray[index].SetPos(new Vector3(0.0f, 0.0f, 0.7f + num2));
  7419. break;
  7420. }
  7421. }
  7422. else
  7423. {
  7424. switch (index)
  7425. {
  7426. case 0:
  7427. maidArray[index].SetPos(new Vector3(0.25f, 0.0f, 0.0f + num2));
  7428. break;
  7429. case 1:
  7430. maidArray[index].SetPos(new Vector3(-0.25f, 0.0f, 0.0f + num2));
  7431. break;
  7432. case 2:
  7433. maidArray[index].SetPos(new Vector3(0.7f, 0.0f, 0.25f + num2));
  7434. break;
  7435. case 3:
  7436. maidArray[index].SetPos(new Vector3(-0.7f, 0.0f, 0.25f + num2));
  7437. break;
  7438. case 4:
  7439. maidArray[index].SetPos(new Vector3(1.05f, 0.0f, 0.6f + num2));
  7440. break;
  7441. case 5:
  7442. maidArray[index].SetPos(new Vector3(-1.05f, 0.0f, 0.6f + num2));
  7443. break;
  7444. case 6:
  7445. maidArray[index].SetPos(new Vector3(1.35f, 0.0f, 0.9f + num2));
  7446. break;
  7447. case 7:
  7448. maidArray[index].SetPos(new Vector3(-1.35f, 0.0f, 0.9f + num2));
  7449. break;
  7450. case 8:
  7451. maidArray[index].SetPos(new Vector3(1.6f, 0.0f, 1.3f + num2));
  7452. break;
  7453. case 9:
  7454. maidArray[index].SetPos(new Vector3(-1.6f, 0.0f, 1.3f + num2));
  7455. break;
  7456. case 10:
  7457. maidArray[index].SetPos(new Vector3(1.8f, 0.0f, 1.72f + num2));
  7458. break;
  7459. case 11:
  7460. maidArray[index].SetPos(new Vector3(-1.8f, 0.0f, 1.72f + num2));
  7461. break;
  7462. case 12:
  7463. maidArray[index].SetPos(new Vector3(1.9f, 0.0f, 2.17f + num2));
  7464. break;
  7465. case 13:
  7466. maidArray[index].SetPos(new Vector3(-1.9f, 0.0f, 2.17f + num2));
  7467. break;
  7468. default:
  7469. maidArray[index].SetPos(new Vector3(0.0f, 0.0f, 0.7f + num2));
  7470. break;
  7471. }
  7472. }
  7473. }
  7474. else if (selectList.Count >= 8)
  7475. {
  7476. if (selectList.Count >= 9)
  7477. {
  7478. num1 = -0.2f;
  7479. }
  7480. if (selectList.Count % 2 == 1)
  7481. {
  7482. switch (index)
  7483. {
  7484. case 0:
  7485. maidArray[index].SetPos(new Vector3(0.0f, 0.0f, 0.0f + num1));
  7486. break;
  7487. case 1:
  7488. maidArray[index].SetPos(new Vector3(-0.55f, 0.0f, 0.2f + num1));
  7489. break;
  7490. case 2:
  7491. maidArray[index].SetPos(new Vector3(0.55f, 0.0f, 0.2f + num1));
  7492. break;
  7493. case 3:
  7494. maidArray[index].SetPos(new Vector3(-1f, 0.0f, 0.6f + num1));
  7495. break;
  7496. case 4:
  7497. maidArray[index].SetPos(new Vector3(1f, 0.0f, 0.6f + num1));
  7498. break;
  7499. case 5:
  7500. maidArray[index].SetPos(new Vector3(-1.35f, 0.0f, 1f + num1));
  7501. break;
  7502. case 6:
  7503. maidArray[index].SetPos(new Vector3(1.35f, 0.0f, 1f + num1));
  7504. break;
  7505. case 7:
  7506. maidArray[index].SetPos(new Vector3(-1.6f, 0.0f, 1.4f + num1));
  7507. break;
  7508. case 8:
  7509. maidArray[index].SetPos(new Vector3(1.6f, 0.0f, 1.4f + num1));
  7510. break;
  7511. }
  7512. }
  7513. else
  7514. {
  7515. switch (index)
  7516. {
  7517. case 0:
  7518. maidArray[index].SetPos(new Vector3(0.28f, 0.0f, 0.0f + num1));
  7519. break;
  7520. case 1:
  7521. maidArray[index].SetPos(new Vector3(-0.28f, 0.0f, 0.0f + num1));
  7522. break;
  7523. case 2:
  7524. maidArray[index].SetPos(new Vector3(0.78f, 0.0f, 0.3f + num1));
  7525. break;
  7526. case 3:
  7527. maidArray[index].SetPos(new Vector3(-0.78f, 0.0f, 0.3f + num1));
  7528. break;
  7529. case 4:
  7530. maidArray[index].SetPos(new Vector3(1.22f, 0.0f, 0.7f + num1));
  7531. break;
  7532. case 5:
  7533. maidArray[index].SetPos(new Vector3(-1.22f, 0.0f, 0.7f + num1));
  7534. break;
  7535. case 6:
  7536. maidArray[index].SetPos(new Vector3(1.55f, 0.0f, 1.1f + num1));
  7537. break;
  7538. case 7:
  7539. maidArray[index].SetPos(new Vector3(-1.55f, 0.0f, 1.1f + num1));
  7540. break;
  7541. case 8:
  7542. maidArray[index].SetPos(new Vector3(1.77f, 0.0f, 1.58f + num1));
  7543. break;
  7544. case 9:
  7545. maidArray[index].SetPos(new Vector3(-1.77f, 0.0f, 1.58f + num1));
  7546. break;
  7547. }
  7548. }
  7549. }
  7550. }
  7551. zero2.y = (float)(Math.Atan2(maidArray[index].transform.position.x,
  7552. maidArray[index].transform.position.z - 1.5) * 180.0 / Math.PI) + 180f;
  7553. maidArray[index].SetRot(zero2);
  7554. }
  7555. break;
  7556. case 1:
  7557. for (int index = 0; index < maidCnt; ++index)
  7558. {
  7559. Vector3 zero1 = Vector3.zero;
  7560. Vector3 zero2 = Vector3.zero;
  7561. if (maidCnt < 9)
  7562. {
  7563. switch (index)
  7564. {
  7565. case 1:
  7566. zero1.x = -0.6f;
  7567. break;
  7568. case 2:
  7569. zero1.x = 0.6f;
  7570. break;
  7571. case 3:
  7572. zero1.x = -1.2f;
  7573. break;
  7574. case 4:
  7575. zero1.x = 1.2f;
  7576. break;
  7577. case 5:
  7578. zero1.x = -1.8f;
  7579. break;
  7580. case 6:
  7581. zero1.x = 1.8f;
  7582. break;
  7583. case 7:
  7584. zero1.x = -2.4f;
  7585. break;
  7586. case 8:
  7587. zero1.x = 2.4f;
  7588. break;
  7589. case 9:
  7590. zero1.x = -3f;
  7591. break;
  7592. case 10:
  7593. zero1.x = 3f;
  7594. break;
  7595. }
  7596. }
  7597. else
  7598. {
  7599. switch (index)
  7600. {
  7601. case 1:
  7602. zero1.x = -0.5f;
  7603. break;
  7604. case 2:
  7605. zero1.x = 0.5f;
  7606. break;
  7607. case 3:
  7608. zero1.x = -1f;
  7609. break;
  7610. case 4:
  7611. zero1.x = 1f;
  7612. break;
  7613. case 5:
  7614. zero1.x = -1.5f;
  7615. break;
  7616. case 6:
  7617. zero1.x = 1.5f;
  7618. break;
  7619. case 7:
  7620. zero1.x = -2f;
  7621. break;
  7622. case 8:
  7623. zero1.x = 2f;
  7624. break;
  7625. case 9:
  7626. zero1.x = -2.5f;
  7627. break;
  7628. case 10:
  7629. zero1.x = 2.5f;
  7630. break;
  7631. case 11:
  7632. zero1.x = -3f;
  7633. break;
  7634. case 12:
  7635. zero1.x = 3f;
  7636. break;
  7637. case 13:
  7638. zero1.x = -3.5f;
  7639. break;
  7640. }
  7641. }
  7642. maidArray[index].SetPos(zero1);
  7643. maidArray[index].SetRot(zero2);
  7644. if (index >= 14)
  7645. {
  7646. maidArray[index].SetPos(new Vector3(0.0f, 0.0f, 0.7f));
  7647. }
  7648. }
  7649. break;
  7650. case 2:
  7651. for (int index = 0; index < maidCnt; ++index)
  7652. {
  7653. Vector3 zero1 = Vector3.zero;
  7654. Vector3 zero2 = Vector3.zero;
  7655. if (maidCnt < 9)
  7656. {
  7657. switch (index)
  7658. {
  7659. case 1:
  7660. zero1.z = 0.6f;
  7661. break;
  7662. case 2:
  7663. zero1.z = -0.6f;
  7664. break;
  7665. case 3:
  7666. zero1.z = 1.2f;
  7667. break;
  7668. case 4:
  7669. zero1.z = -1.2f;
  7670. break;
  7671. case 5:
  7672. zero1.z = 1.8f;
  7673. break;
  7674. case 6:
  7675. zero1.z = -1.8f;
  7676. break;
  7677. case 7:
  7678. zero1.z = 2.4f;
  7679. break;
  7680. case 8:
  7681. zero1.z = -2.4f;
  7682. break;
  7683. case 9:
  7684. zero1.z = 3f;
  7685. break;
  7686. case 10:
  7687. zero1.z = -3f;
  7688. break;
  7689. }
  7690. }
  7691. else
  7692. {
  7693. switch (index)
  7694. {
  7695. case 1:
  7696. zero1.z = 0.5f;
  7697. break;
  7698. case 2:
  7699. zero1.z = -0.5f;
  7700. break;
  7701. case 3:
  7702. zero1.z = 1f;
  7703. break;
  7704. case 4:
  7705. zero1.z = -1f;
  7706. break;
  7707. case 5:
  7708. zero1.z = 1.5f;
  7709. break;
  7710. case 6:
  7711. zero1.z = -1.5f;
  7712. break;
  7713. case 7:
  7714. zero1.z = 2f;
  7715. break;
  7716. case 8:
  7717. zero1.z = -2f;
  7718. break;
  7719. case 9:
  7720. zero1.z = 2.5f;
  7721. break;
  7722. case 10:
  7723. zero1.z = -2.5f;
  7724. break;
  7725. case 11:
  7726. zero1.z = 3f;
  7727. break;
  7728. case 12:
  7729. zero1.z = -3f;
  7730. break;
  7731. case 13:
  7732. zero1.z = 3.5f;
  7733. break;
  7734. }
  7735. }
  7736. maidArray[index].SetPos(zero1);
  7737. maidArray[index].SetRot(zero2);
  7738. if (index >= 14)
  7739. {
  7740. maidArray[index].SetPos(new Vector3(0.0f, 0.0f, 0.7f));
  7741. }
  7742. }
  7743. break;
  7744. case 3:
  7745. for (int index = 0; index < maidCnt; ++index)
  7746. {
  7747. Vector3 zero1 = Vector3.zero;
  7748. Vector3 zero2 = Vector3.zero;
  7749. float num = 0.5f;
  7750. if (maidCnt > 11)
  7751. {
  7752. num = 0.25f;
  7753. }
  7754. else if (maidCnt > 9)
  7755. {
  7756. num = 0.32f;
  7757. }
  7758. else if (maidCnt > 7)
  7759. {
  7760. num = 0.4f;
  7761. }
  7762. switch (index)
  7763. {
  7764. case 1:
  7765. zero1.x = -num;
  7766. zero1.z = num;
  7767. break;
  7768. case 2:
  7769. zero1.x = num;
  7770. zero1.z = -num;
  7771. break;
  7772. case 3:
  7773. zero1.x = (float)(-num * 2.0);
  7774. zero1.z = num * 2f;
  7775. break;
  7776. case 4:
  7777. zero1.x = num * 2f;
  7778. zero1.z = (float)(-num * 2.0);
  7779. break;
  7780. case 5:
  7781. zero1.x = (float)(-num * 3.0);
  7782. zero1.z = num * 3f;
  7783. break;
  7784. case 6:
  7785. zero1.x = num * 3f;
  7786. zero1.z = (float)(-num * 3.0);
  7787. break;
  7788. case 7:
  7789. zero1.x = (float)(-num * 4.0);
  7790. zero1.z = num * 4f;
  7791. break;
  7792. case 8:
  7793. zero1.x = num * 4f;
  7794. zero1.z = (float)(-num * 4.0);
  7795. break;
  7796. case 9:
  7797. zero1.x = (float)(-num * 5.0);
  7798. zero1.z = num * 5f;
  7799. break;
  7800. case 10:
  7801. zero1.x = num * 5f;
  7802. zero1.z = (float)(-num * 5.0);
  7803. break;
  7804. case 11:
  7805. zero1.x = (float)(-num * 6.0);
  7806. zero1.z = num * 6f;
  7807. break;
  7808. case 12:
  7809. zero1.x = num * 6f;
  7810. zero1.z = (float)(-num * 6.0);
  7811. break;
  7812. case 13:
  7813. zero1.x = (float)(-num * 7.0);
  7814. zero1.z = num * 7f;
  7815. break;
  7816. }
  7817. maidArray[index].SetPos(zero1);
  7818. maidArray[index].SetRot(zero2);
  7819. if (index >= 14)
  7820. {
  7821. maidArray[index].SetPos(new Vector3(0.0f, 0.0f, 0.7f));
  7822. }
  7823. }
  7824. break;
  7825. case 4:
  7826. for (int index = 0; index < maidCnt; ++index)
  7827. {
  7828. Vector3 zero1 = Vector3.zero;
  7829. Vector3 zero2 = Vector3.zero;
  7830. float num = (float)(0.400000005960464 + 0.0799999982118607 * maidCnt);
  7831. zero1.x = num * (float)Math.Cos(Math.PI / 180.0 * (90 + 360 * index / maidCnt));
  7832. zero1.z = num * (float)Math.Sin(Math.PI / 180.0 * (90 + 360 * index / maidCnt));
  7833. maidArray[index].SetPos(zero1);
  7834. zero2.y = (float)(Math.Atan2(zero1.x, zero1.z) * 180.0 / Math.PI);
  7835. maidArray[index].SetRot(zero2);
  7836. }
  7837. break;
  7838. case 5:
  7839. for (int index = 0; index < maidCnt; ++index)
  7840. {
  7841. Vector3 zero1 = Vector3.zero;
  7842. Vector3 zero2 = Vector3.zero;
  7843. float num = (float)(0.400000005960464 + 0.0799999982118607 * maidCnt);
  7844. zero1.x = num * (float)Math.Cos(Math.PI / 180.0 * (90 + 360 * index / maidCnt));
  7845. zero1.z = num * (float)Math.Sin(Math.PI / 180.0 * (90 + 360 * index / maidCnt));
  7846. maidArray[index].SetPos(zero1);
  7847. zero2.y = (float)(Math.Atan2(zero1.x, zero1.z) * 180.0 / Math.PI) + 180f;
  7848. maidArray[index].SetRot(zero2);
  7849. }
  7850. break;
  7851. case 6:
  7852. for (int index = 0; index < maidCnt; ++index)
  7853. {
  7854. Vector3 zero1 = Vector3.zero;
  7855. Vector3 zero2 = Vector3.zero;
  7856. float num = 0.0f;
  7857. if (maidCnt > 9)
  7858. {
  7859. num = -0.4f;
  7860. }
  7861. else if (maidCnt > 7)
  7862. {
  7863. num = -0.2f;
  7864. }
  7865. switch (index)
  7866. {
  7867. case 0:
  7868. zero1.z = 0.3f;
  7869. break;
  7870. case 1:
  7871. zero1.x = -0.9f;
  7872. zero1.z = -0.4f;
  7873. zero2.y = 40f;
  7874. break;
  7875. case 2:
  7876. zero1.x = 0.9f;
  7877. zero1.z = -0.4f;
  7878. zero2.y = -40f;
  7879. break;
  7880. case 3:
  7881. zero1.x = -0.4f;
  7882. zero1.z = -0.8f;
  7883. zero2.y = 20f;
  7884. break;
  7885. case 4:
  7886. zero1.x = 0.4f;
  7887. zero1.z = -0.8f;
  7888. zero2.y = -20f;
  7889. break;
  7890. case 5:
  7891. zero1.x = -1.2f;
  7892. zero1.z = 0.1f;
  7893. zero2.y = 60f;
  7894. break;
  7895. case 6:
  7896. zero1.x = 1.2f;
  7897. zero1.z = 0.1f;
  7898. zero2.y = -60f;
  7899. break;
  7900. case 7:
  7901. zero1.x = -1.5f;
  7902. zero1.z = 0.6f;
  7903. zero2.y = 80f;
  7904. break;
  7905. case 8:
  7906. zero1.x = 1.5f;
  7907. zero1.z = 0.6f;
  7908. zero2.y = -80f;
  7909. break;
  7910. case 9:
  7911. zero1.x = -1.6f;
  7912. zero1.z = 1.15f;
  7913. zero2.y = 100f;
  7914. break;
  7915. case 10:
  7916. zero1.x = 1.6f;
  7917. zero1.z = 1.15f;
  7918. zero2.y = -100f;
  7919. break;
  7920. case 11:
  7921. zero1.x = -1.6f;
  7922. zero1.z = 1.65f;
  7923. zero2.y = 110f;
  7924. break;
  7925. case 12:
  7926. zero1.x = 1.65f;
  7927. zero1.z = 1.65f;
  7928. zero2.y = -110f;
  7929. break;
  7930. case 13:
  7931. zero1.x = -1.65f;
  7932. zero1.z = 2.15f;
  7933. zero2.y = 120f;
  7934. break;
  7935. }
  7936. if (index > 0)
  7937. {
  7938. zero1.z += num;
  7939. }
  7940. else
  7941. {
  7942. zero1.z -= num;
  7943. }
  7944. maidArray[index].SetPos(zero1);
  7945. maidArray[index].SetRot(zero2);
  7946. if (index >= 14)
  7947. {
  7948. maidArray[index].SetPos(new Vector3(0.0f, 0.0f, 0.7f));
  7949. }
  7950. }
  7951. break;
  7952. case 7:
  7953. for (int index = 0; index < maidCnt; ++index)
  7954. {
  7955. Vector3 zero1 = Vector3.zero;
  7956. Vector3 zero2 = Vector3.zero;
  7957. float num = 0.0f;
  7958. if (maidCnt > 11)
  7959. {
  7960. num = 0.6f;
  7961. }
  7962. else if (maidCnt > 9)
  7963. {
  7964. num = 0.4f;
  7965. }
  7966. else if (maidCnt > 7)
  7967. {
  7968. num = 0.2f;
  7969. }
  7970. switch (index)
  7971. {
  7972. case 0:
  7973. zero1.z = 0.8f;
  7974. break;
  7975. case 1:
  7976. zero1.x = -0.45f;
  7977. zero1.z = 0.3f;
  7978. zero2.y = -10f;
  7979. break;
  7980. case 2:
  7981. zero1.x = 0.45f;
  7982. zero1.z = 0.3f;
  7983. zero2.y = 10f;
  7984. break;
  7985. case 3:
  7986. zero1.x = -0.8f;
  7987. zero1.z = -0.2f;
  7988. zero2.y = -20f;
  7989. break;
  7990. case 4:
  7991. zero1.x = 0.8f;
  7992. zero1.z = -0.2f;
  7993. zero2.y = 20f;
  7994. break;
  7995. case 5:
  7996. zero1.x = -1.2f;
  7997. zero1.z = -0.75f;
  7998. zero2.y = -30f;
  7999. break;
  8000. case 6:
  8001. zero1.x = 1.2f;
  8002. zero1.z = -0.75f;
  8003. zero2.y = 30f;
  8004. break;
  8005. case 7:
  8006. zero1.x = -1.6f;
  8007. zero1.z = -1.25f;
  8008. zero2.y = -40f;
  8009. break;
  8010. case 8:
  8011. zero1.x = 1.6f;
  8012. zero1.z = -1.25f;
  8013. zero2.y = 40f;
  8014. break;
  8015. case 9:
  8016. zero1.x = -2f;
  8017. zero1.z = -1.75f;
  8018. zero2.y = -50f;
  8019. break;
  8020. case 10:
  8021. zero1.x = 2f;
  8022. zero1.z = -1.75f;
  8023. zero2.y = 50f;
  8024. break;
  8025. case 11:
  8026. zero1.x = -2.4f;
  8027. zero1.z = -2.25f;
  8028. zero2.y = -60f;
  8029. break;
  8030. case 12:
  8031. zero1.x = 2.4f;
  8032. zero1.z = -2.25f;
  8033. zero2.y = 60f;
  8034. break;
  8035. case 13:
  8036. zero1.x = -2.8f;
  8037. zero1.z = -2.75f;
  8038. zero2.y = -70f;
  8039. break;
  8040. }
  8041. zero1.z += num;
  8042. maidArray[index].SetPos(zero1);
  8043. maidArray[index].SetRot(zero2);
  8044. if (index >= 14)
  8045. {
  8046. maidArray[index].SetPos(new Vector3(0.0f, 0.0f, 0.7f));
  8047. }
  8048. }
  8049. break;
  8050. case 8:
  8051. for (int index = 0; index < maidCnt; ++index)
  8052. {
  8053. Vector3 zero1 = Vector3.zero;
  8054. Vector3 zero2 = Vector3.zero;
  8055. float num = 0.0f;
  8056. if (maidCnt > 11)
  8057. {
  8058. num = -0.6f;
  8059. }
  8060. else if (maidCnt > 9)
  8061. {
  8062. num = -0.4f;
  8063. }
  8064. else if (maidCnt > 7)
  8065. {
  8066. num = -0.2f;
  8067. }
  8068. switch (index)
  8069. {
  8070. case 0:
  8071. zero1.z = -0.75f;
  8072. break;
  8073. case 1:
  8074. zero1.x = -0.45f;
  8075. zero1.z = -0.2f;
  8076. zero2.y = 20f;
  8077. break;
  8078. case 2:
  8079. zero1.x = 0.45f;
  8080. zero1.z = -0.2f;
  8081. zero2.y = -20f;
  8082. break;
  8083. case 3:
  8084. zero1.x = -0.8f;
  8085. zero1.z = 0.3f;
  8086. zero2.y = 35f;
  8087. break;
  8088. case 4:
  8089. zero1.x = 0.8f;
  8090. zero1.z = 0.3f;
  8091. zero2.y = -35f;
  8092. break;
  8093. case 5:
  8094. zero1.x = -1.2f;
  8095. zero1.z = 0.8f;
  8096. zero2.y = 50f;
  8097. break;
  8098. case 6:
  8099. zero1.x = 1.2f;
  8100. zero1.z = 0.8f;
  8101. zero2.y = -50f;
  8102. break;
  8103. case 7:
  8104. zero1.x = -1.6f;
  8105. zero1.z = 1.3f;
  8106. zero2.y = 65f;
  8107. break;
  8108. case 8:
  8109. zero1.x = 1.6f;
  8110. zero1.z = 1.3f;
  8111. zero2.y = -65f;
  8112. break;
  8113. case 9:
  8114. zero1.x = -2f;
  8115. zero1.z = 1.8f;
  8116. zero2.y = 80f;
  8117. break;
  8118. case 10:
  8119. zero1.x = 2f;
  8120. zero1.z = 1.8f;
  8121. zero2.y = -80f;
  8122. break;
  8123. case 11:
  8124. zero1.x = -2.4f;
  8125. zero1.z = 2.3f;
  8126. zero2.y = 90f;
  8127. break;
  8128. case 12:
  8129. zero1.x = 2.4f;
  8130. zero1.z = 2.3f;
  8131. zero2.y = -90f;
  8132. break;
  8133. case 13:
  8134. zero1.x = -2.8f;
  8135. zero1.z = 2.8f;
  8136. zero2.y = 100f;
  8137. break;
  8138. }
  8139. zero1.z += num;
  8140. maidArray[index].SetPos(zero1);
  8141. maidArray[index].SetRot(zero2);
  8142. if (index >= 14)
  8143. {
  8144. maidArray[index].SetPos(new Vector3(0.0f, 0.0f, 0.7f));
  8145. }
  8146. }
  8147. break;
  8148. case 9:
  8149. for (int index = 0; index < maidCnt; ++index)
  8150. {
  8151. Vector3 zero1 = Vector3.zero;
  8152. Vector3 zero2 = Vector3.zero;
  8153. float num = 1f;
  8154. if (maidCnt > 9)
  8155. {
  8156. num = 0.84f;
  8157. }
  8158. else if (maidCnt > 7)
  8159. {
  8160. num = 0.92f;
  8161. }
  8162. switch (index)
  8163. {
  8164. case 0:
  8165. zero1.z = 0.0f;
  8166. break;
  8167. case 1:
  8168. zero1.x = -0.5f;
  8169. zero1.z = -0.5f;
  8170. break;
  8171. case 2:
  8172. zero1.x = 0.5f;
  8173. zero1.z = -0.5f;
  8174. break;
  8175. case 3:
  8176. zero1.x = -1f;
  8177. zero1.z = 0.2f;
  8178. break;
  8179. case 4:
  8180. zero1.x = 1f;
  8181. zero1.z = 0.2f;
  8182. break;
  8183. case 5:
  8184. zero1.x = -1.5f;
  8185. zero1.z = -0.5f;
  8186. break;
  8187. case 6:
  8188. zero1.x = 1.5f;
  8189. zero1.z = -0.5f;
  8190. break;
  8191. case 7:
  8192. zero1.x = -2f;
  8193. zero1.z = 0.2f;
  8194. break;
  8195. case 8:
  8196. zero1.x = 2f;
  8197. zero1.z = 0.2f;
  8198. break;
  8199. case 9:
  8200. zero1.x = -2.5f;
  8201. zero1.z = -0.5f;
  8202. break;
  8203. case 10:
  8204. zero1.x = 2.5f;
  8205. zero1.z = -0.5f;
  8206. break;
  8207. case 11:
  8208. zero1.x = -3f;
  8209. zero1.z = 0.2f;
  8210. break;
  8211. case 12:
  8212. zero1.x = 3f;
  8213. zero1.z = 0.2f;
  8214. break;
  8215. case 13:
  8216. zero1.x = -3.5f;
  8217. zero1.z = -0.5f;
  8218. break;
  8219. }
  8220. zero1.x *= num;
  8221. maidArray[index].SetPos(zero1);
  8222. maidArray[index].SetRot(zero2);
  8223. if (index >= 14)
  8224. {
  8225. maidArray[index].SetPos(new Vector3(0.0f, 0.0f, 0.7f));
  8226. }
  8227. }
  8228. break;
  8229. case 10:
  8230. for (int index = 0; index < maidCnt; ++index)
  8231. {
  8232. Vector3 zero1 = Vector3.zero;
  8233. Vector3 zero2 = Vector3.zero;
  8234. float num = 1f;
  8235. if (maidCnt > 9)
  8236. {
  8237. num = 0.84f;
  8238. }
  8239. else if (maidCnt > 7)
  8240. {
  8241. num = 0.92f;
  8242. }
  8243. switch (index)
  8244. {
  8245. case 0:
  8246. zero1.z = -0.4f;
  8247. break;
  8248. case 1:
  8249. zero1.x = -0.5f;
  8250. zero1.z = 0.2f;
  8251. break;
  8252. case 2:
  8253. zero1.x = 0.5f;
  8254. zero1.z = 0.2f;
  8255. break;
  8256. case 3:
  8257. zero1.x = -1f;
  8258. zero1.z = -0.5f;
  8259. break;
  8260. case 4:
  8261. zero1.x = 1f;
  8262. zero1.z = -0.5f;
  8263. break;
  8264. case 5:
  8265. zero1.x = -1.5f;
  8266. zero1.z = 0.2f;
  8267. break;
  8268. case 6:
  8269. zero1.x = 1.5f;
  8270. zero1.z = 0.2f;
  8271. break;
  8272. case 7:
  8273. zero1.x = -2f;
  8274. zero1.z = -0.5f;
  8275. break;
  8276. case 8:
  8277. zero1.x = 2f;
  8278. zero1.z = -0.5f;
  8279. break;
  8280. case 9:
  8281. zero1.x = -2.5f;
  8282. zero1.z = 0.2f;
  8283. break;
  8284. case 10:
  8285. zero1.x = 2.5f;
  8286. zero1.z = 0.2f;
  8287. break;
  8288. case 11:
  8289. zero1.x = -3f;
  8290. zero1.z = -0.5f;
  8291. break;
  8292. case 12:
  8293. zero1.x = 3f;
  8294. zero1.z = -0.5f;
  8295. break;
  8296. case 13:
  8297. zero1.x = -3.5f;
  8298. zero1.z = 0.2f;
  8299. break;
  8300. }
  8301. zero1.x *= num;
  8302. maidArray[index].SetPos(zero1);
  8303. maidArray[index].SetRot(zero2);
  8304. if (index >= 14)
  8305. {
  8306. maidArray[index].SetPos(new Vector3(0.0f, 0.0f, 0.7f));
  8307. }
  8308. }
  8309. break;
  8310. }
  8311. for (int index = 0; index < maxMaidCnt; ++index)
  8312. {
  8313. if (!isLock[index] && maidArray[index] != null && maidArray[index].Visible)
  8314. {
  8315. maidArray[index].CrossFade(poseArray[0] + ".anm", false, true, false, 0.0f, 1f);
  8316. maidArray[index].SetAutoTwistAll(true);
  8317. }
  8318. }
  8319. }
  8320. private void MessageWindow(int winID)
  8321. {
  8322. GUIStyle style1 = "label";
  8323. style1.fontSize = GetPix(12);
  8324. style1.alignment = TextAnchor.UpperLeft;
  8325. GUIStyle style2 = "button";
  8326. style2.fontSize = GetPix(16);
  8327. GUI.Label(new Rect(GetPix(8), GetPix(4), GetPix(80), GetPix(25)),
  8328. "名前",
  8329. style1);
  8330. inName = GUI.TextField(new Rect(GetPix(35),
  8331. GetPix(4),
  8332. GetPix(120),
  8333. GetPix(20)),
  8334. inName);
  8335. GUI.Label(new Rect(GetPix(180), GetPix(4), GetPix(100), GetPix(25)),
  8336. "サイズ",
  8337. style1);
  8338. fontSize = (int)GUI.HorizontalSlider(new Rect(GetPix(220),
  8339. GetPix(9),
  8340. GetPix(100),
  8341. GetPix(20)),
  8342. fontSize,
  8343. 25f,
  8344. 60f);
  8345. if (fontSize != mFontSize)
  8346. {
  8347. mFontSize = fontSize;
  8348. GameObject gameObject = GameObject.Find("__GameMain__/SystemUI Root").transform.Find("MessageWindowPanel").gameObject;
  8349. //MessageClass messageClass = new MessageClass(gameObject, GameMain.Instance.ScriptMgr.adv_kag.MessageWindowMgr);
  8350. SetFieldValue2<UILabel, int>(UTY.GetChildObject(gameObject, "MessageViewer/MsgParent/Message", false)
  8351. .GetComponent<UILabel>(),
  8352. "mFontSize",
  8353. fontSize);
  8354. }
  8355. GUI.Label(new Rect(GetPix(325), GetPix(4), GetPix(100), GetPix(25)),
  8356. fontSize.ToString() + "pt",
  8357. style1);
  8358. inText = GUI.TextArea(new Rect(GetPix(8),
  8359. GetPix(26),
  8360. rectWin2.width - GetPix(15),
  8361. GetPix(52)),
  8362. inText,
  8363. 300);
  8364. if (GUI.Button(new Rect(GetPix(8), GetPix(82), GetPix(60), GetPix(20)),
  8365. "決定",
  8366. style2))
  8367. {
  8368. isMessage = true;
  8369. bGuiMessage = false;
  8370. GameObject gameObject1 = GameObject.Find("__GameMain__/SystemUI Root").transform.Find("MessageWindowPanel").gameObject;
  8371. MessageWindowMgr messageWindowMgr = GameMain.Instance.ScriptMgr.adv_kag.MessageWindowMgr;
  8372. messageWindowMgr.OpenMessageWindowPanel();
  8373. UILabel component = UTY.GetChildObject(gameObject1, "MessageViewer/MsgParent/Message", false).GetComponent<UILabel>();
  8374. UILabel nameComponent = UTY.GetChildObject(gameObject1, "MessageViewer/MsgParent/SpeakerName/Name", false).GetComponent<UILabel>();
  8375. MessageClass inst = new MessageClass(gameObject1, messageWindowMgr);
  8376. // Fix for ENG version: reconfigure MessageClass to behave as in JP game
  8377. inst.subtitles_manager_.visible = false;
  8378. inst.subtitles_manager_ = null;
  8379. component.gameObject.SetActive(true);
  8380. nameComponent.gameObject.SetActive(true);
  8381. UTY.GetChildObject(gameObject1, "MessageViewer/MsgParent/MessageBox", false).SetActive(true);
  8382. SetFieldValue5<MessageClass, UILabel>(inst, "message_label_", component);
  8383. SetFieldValue5<MessageClass, UILabel>(inst, "name_label_", nameComponent);
  8384. component.ProcessText();
  8385. SetFieldValue2<UILabel, int>(component, "mFontSize", fontSize);
  8386. inst.SetText(inName, inText, "", 0, AudioSourceMgr.Type.System);
  8387. inst.FinishChAnime();
  8388. }
  8389. GUI.DragWindow();
  8390. }
  8391. }
  8392. }