MultipleMaids.Gui.cs 408 KB

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