MultipleMaids.Gui.cs 410 KB

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