MultipleMaids.Gui.cs 403 KB

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