MultipleMaids.Gui.cs 402 KB

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