123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329330331332333334335336337338339340341342343344345346347348349350351352353354355356357358359360361362363364365366367368369370371372373374375376377378379380381382383384385386387388389390391392393394395396397398399400401402403404405406407408409410411412413414415416417418419420421422423424425426427428429430431432433434435436437438439440441442443444445446447448449450451452453454455456457458459460461462463464465466467468469470471472473474475476477478479480481482483484485486487488489490491492493494495496497498499500501502503504505506507508509510511512513514515516517518519520521522523524525526527528529530531532533534535536537538539540541542543544545546547548549550551552553554555556557558559560561562563564565566567568569570571572573574575576577578579580581582583584585586587588589590591592593594595596597598599600601602603604605606607608609610611612613614615616617618619620621622623624625626627628629630631632633634635636637638639640641642643644645646647648649650651652653654655656657658659660661662663664665666667668669670671672673674675676677678679680681682683684685686687688689690691692693694695696697698699700701702703704705706707708709710711712713714715716717718719720721722723724725726727728729730731732733734735736737738739740741742743744745746747748749750751752753754755756757758759760761762763764765766767768769770771772773774775776777778779780781782783784785786787788789790791792793794795796797798799800801802803804805806807808809810811812813814815816817818819820821822823824825826827828829830831832833834835836837838839840841842843844845846847848849850851852853854855856857858859860861862863864865866867868869870871872873874875876877878879880881882883884885886887888889890891892893894895896897898899900901902903904905906907908909910911912913914915916917918919920921922923924925926927928929930931932933934935936937938939940941942943944945946947948949950951952953954955956957958959960961962963964965966967968969970971972973974975976977978979980981982983984985986987988989990991992993994995996997998999100010011002100310041005100610071008100910101011101210131014101510161017101810191020102110221023102410251026102710281029103010311032103310341035103610371038103910401041104210431044104510461047104810491050105110521053105410551056105710581059106010611062106310641065106610671068106910701071107210731074107510761077107810791080108110821083108410851086108710881089109010911092109310941095109610971098109911001101110211031104110511061107110811091110111111121113111411151116111711181119112011211122112311241125112611271128112911301131113211331134113511361137113811391140114111421143114411451146114711481149115011511152115311541155115611571158115911601161116211631164116511661167116811691170117111721173117411751176117711781179118011811182118311841185118611871188118911901191119211931194119511961197119811991200120112021203120412051206120712081209121012111212121312141215121612171218121912201221122212231224122512261227122812291230123112321233123412351236123712381239124012411242124312441245124612471248124912501251125212531254125512561257125812591260126112621263126412651266126712681269127012711272127312741275127612771278127912801281128212831284128512861287128812891290129112921293129412951296129712981299130013011302130313041305130613071308130913101311131213131314131513161317131813191320132113221323132413251326132713281329133013311332133313341335133613371338133913401341134213431344134513461347134813491350135113521353135413551356135713581359136013611362136313641365136613671368136913701371137213731374137513761377137813791380138113821383138413851386138713881389139013911392139313941395139613971398139914001401140214031404140514061407140814091410141114121413141414151416141714181419142014211422142314241425142614271428142914301431143214331434143514361437143814391440144114421443144414451446144714481449145014511452145314541455145614571458145914601461146214631464146514661467146814691470147114721473147414751476147714781479148014811482148314841485148614871488148914901491149214931494149514961497149814991500150115021503150415051506150715081509151015111512151315141515151615171518151915201521152215231524152515261527152815291530153115321533153415351536153715381539154015411542154315441545154615471548154915501551155215531554155515561557155815591560156115621563156415651566156715681569157015711572157315741575157615771578157915801581158215831584158515861587158815891590159115921593159415951596159715981599160016011602160316041605160616071608160916101611161216131614161516161617161816191620162116221623162416251626162716281629163016311632163316341635163616371638163916401641164216431644164516461647164816491650165116521653165416551656165716581659166016611662166316641665166616671668166916701671167216731674167516761677167816791680168116821683168416851686168716881689169016911692169316941695169616971698169917001701170217031704170517061707170817091710171117121713171417151716171717181719172017211722172317241725172617271728172917301731173217331734173517361737173817391740174117421743174417451746174717481749175017511752175317541755175617571758175917601761176217631764176517661767176817691770177117721773177417751776177717781779178017811782178317841785178617871788178917901791179217931794179517961797179817991800180118021803180418051806180718081809181018111812181318141815181618171818181918201821182218231824182518261827182818291830183118321833183418351836183718381839184018411842184318441845184618471848184918501851185218531854185518561857185818591860186118621863186418651866186718681869187018711872187318741875187618771878187918801881188218831884188518861887188818891890189118921893189418951896189718981899190019011902190319041905190619071908190919101911191219131914191519161917191819191920192119221923192419251926192719281929193019311932193319341935193619371938193919401941194219431944194519461947194819491950195119521953195419551956195719581959196019611962196319641965196619671968196919701971197219731974197519761977197819791980198119821983198419851986198719881989199019911992199319941995199619971998199920002001200220032004200520062007200820092010201120122013201420152016201720182019202020212022202320242025202620272028202920302031203220332034203520362037203820392040204120422043204420452046204720482049205020512052205320542055205620572058205920602061206220632064206520662067206820692070207120722073207420752076207720782079208020812082208320842085208620872088208920902091209220932094209520962097209820992100210121022103210421052106210721082109211021112112211321142115211621172118211921202121212221232124212521262127212821292130213121322133213421352136213721382139214021412142214321442145214621472148214921502151215221532154215521562157215821592160216121622163216421652166216721682169217021712172217321742175217621772178217921802181218221832184218521862187218821892190219121922193219421952196219721982199220022012202220322042205220622072208220922102211221222132214221522162217221822192220222122222223222422252226222722282229223022312232223322342235223622372238223922402241224222432244224522462247224822492250225122522253225422552256225722582259226022612262226322642265226622672268226922702271227222732274227522762277227822792280228122822283228422852286228722882289229022912292229322942295229622972298229923002301230223032304230523062307230823092310231123122313231423152316231723182319232023212322232323242325232623272328232923302331233223332334233523362337233823392340234123422343234423452346234723482349235023512352235323542355235623572358235923602361236223632364236523662367236823692370237123722373237423752376237723782379238023812382238323842385238623872388238923902391239223932394239523962397239823992400240124022403240424052406240724082409241024112412241324142415241624172418241924202421242224232424242524262427242824292430243124322433243424352436243724382439244024412442244324442445244624472448244924502451245224532454245524562457245824592460246124622463246424652466246724682469247024712472247324742475247624772478247924802481248224832484248524862487248824892490249124922493249424952496249724982499250025012502250325042505250625072508250925102511251225132514251525162517251825192520252125222523252425252526252725282529253025312532253325342535253625372538253925402541254225432544254525462547254825492550255125522553255425552556255725582559256025612562256325642565256625672568256925702571257225732574257525762577257825792580258125822583258425852586258725882589259025912592259325942595259625972598259926002601260226032604260526062607260826092610261126122613261426152616261726182619262026212622262326242625262626272628262926302631263226332634263526362637263826392640264126422643264426452646264726482649265026512652265326542655265626572658265926602661266226632664266526662667266826692670267126722673267426752676267726782679268026812682268326842685268626872688268926902691269226932694269526962697269826992700270127022703270427052706270727082709271027112712271327142715271627172718271927202721272227232724272527262727272827292730273127322733273427352736273727382739274027412742274327442745274627472748274927502751275227532754275527562757275827592760276127622763276427652766276727682769277027712772277327742775277627772778277927802781278227832784278527862787278827892790279127922793279427952796279727982799280028012802280328042805280628072808280928102811281228132814281528162817281828192820282128222823282428252826282728282829283028312832283328342835283628372838283928402841284228432844284528462847284828492850285128522853285428552856285728582859286028612862286328642865286628672868286928702871287228732874287528762877287828792880288128822883288428852886288728882889289028912892289328942895289628972898289929002901290229032904290529062907290829092910291129122913291429152916291729182919292029212922292329242925292629272928292929302931293229332934293529362937293829392940294129422943294429452946294729482949295029512952295329542955295629572958295929602961296229632964296529662967296829692970297129722973297429752976297729782979298029812982298329842985298629872988298929902991299229932994299529962997299829993000300130023003300430053006300730083009301030113012301330143015301630173018301930203021302230233024302530263027302830293030303130323033303430353036303730383039304030413042304330443045304630473048304930503051305230533054305530563057305830593060306130623063306430653066306730683069307030713072307330743075307630773078307930803081308230833084308530863087308830893090309130923093309430953096309730983099310031013102310331043105310631073108310931103111311231133114311531163117311831193120312131223123312431253126312731283129313031313132313331343135313631373138313931403141314231433144314531463147314831493150315131523153315431553156315731583159316031613162316331643165316631673168316931703171317231733174317531763177317831793180318131823183318431853186318731883189319031913192319331943195319631973198319932003201320232033204320532063207320832093210321132123213321432153216321732183219322032213222322332243225322632273228322932303231323232333234323532363237323832393240324132423243324432453246324732483249325032513252325332543255325632573258325932603261326232633264326532663267326832693270327132723273327432753276327732783279328032813282328332843285328632873288328932903291329232933294329532963297329832993300330133023303330433053306330733083309331033113312331333143315331633173318331933203321332233233324332533263327332833293330333133323333333433353336333733383339334033413342334333443345334633473348334933503351335233533354335533563357335833593360336133623363336433653366336733683369337033713372337333743375337633773378337933803381338233833384338533863387338833893390339133923393339433953396339733983399340034013402340334043405340634073408340934103411341234133414341534163417341834193420342134223423342434253426342734283429343034313432343334343435343634373438343934403441344234433444344534463447344834493450345134523453345434553456345734583459346034613462346334643465346634673468346934703471347234733474347534763477347834793480348134823483348434853486348734883489349034913492349334943495349634973498349935003501350235033504350535063507350835093510351135123513351435153516351735183519352035213522352335243525352635273528352935303531353235333534353535363537353835393540354135423543354435453546354735483549355035513552355335543555355635573558355935603561356235633564356535663567356835693570357135723573357435753576357735783579358035813582358335843585358635873588358935903591359235933594359535963597359835993600360136023603360436053606360736083609361036113612361336143615361636173618361936203621362236233624362536263627362836293630363136323633363436353636363736383639364036413642364336443645364636473648364936503651365236533654365536563657365836593660366136623663366436653666366736683669367036713672367336743675367636773678367936803681368236833684368536863687368836893690369136923693369436953696369736983699370037013702370337043705370637073708370937103711371237133714371537163717371837193720372137223723372437253726372737283729373037313732373337343735373637373738373937403741374237433744374537463747374837493750375137523753375437553756375737583759376037613762376337643765376637673768376937703771377237733774377537763777377837793780378137823783378437853786378737883789379037913792379337943795379637973798379938003801380238033804380538063807380838093810381138123813381438153816381738183819382038213822382338243825382638273828382938303831383238333834383538363837383838393840384138423843384438453846384738483849385038513852385338543855385638573858385938603861386238633864386538663867386838693870387138723873387438753876387738783879388038813882388338843885388638873888388938903891389238933894389538963897389838993900390139023903390439053906390739083909391039113912391339143915391639173918391939203921392239233924392539263927392839293930393139323933393439353936393739383939394039413942394339443945394639473948394939503951395239533954395539563957395839593960396139623963396439653966396739683969397039713972397339743975397639773978397939803981398239833984398539863987398839893990399139923993399439953996399739983999400040014002400340044005400640074008400940104011401240134014401540164017401840194020402140224023402440254026402740284029403040314032403340344035403640374038403940404041404240434044404540464047404840494050405140524053405440554056405740584059406040614062406340644065406640674068406940704071407240734074407540764077407840794080408140824083408440854086408740884089409040914092409340944095409640974098409941004101410241034104410541064107410841094110411141124113411441154116411741184119412041214122412341244125412641274128412941304131413241334134413541364137413841394140414141424143414441454146414741484149415041514152415341544155415641574158415941604161416241634164416541664167416841694170417141724173417441754176417741784179418041814182418341844185418641874188418941904191419241934194419541964197419841994200420142024203420442054206420742084209421042114212421342144215421642174218421942204221422242234224422542264227422842294230423142324233423442354236423742384239424042414242424342444245424642474248424942504251425242534254425542564257425842594260426142624263426442654266426742684269427042714272427342744275427642774278427942804281428242834284428542864287428842894290429142924293429442954296429742984299430043014302430343044305430643074308430943104311431243134314431543164317431843194320432143224323432443254326432743284329433043314332433343344335433643374338433943404341434243434344434543464347434843494350435143524353435443554356435743584359436043614362436343644365436643674368436943704371437243734374437543764377437843794380438143824383438443854386438743884389439043914392439343944395439643974398439944004401440244034404440544064407440844094410441144124413441444154416441744184419442044214422442344244425442644274428442944304431443244334434443544364437443844394440444144424443444444454446444744484449445044514452445344544455445644574458445944604461446244634464446544664467446844694470447144724473447444754476447744784479448044814482448344844485448644874488448944904491449244934494449544964497449844994500450145024503450445054506450745084509451045114512451345144515451645174518451945204521452245234524452545264527452845294530453145324533453445354536453745384539454045414542454345444545454645474548454945504551455245534554455545564557455845594560456145624563456445654566456745684569457045714572457345744575457645774578457945804581458245834584458545864587458845894590459145924593459445954596459745984599460046014602460346044605460646074608460946104611461246134614461546164617461846194620462146224623462446254626462746284629463046314632463346344635463646374638463946404641464246434644464546464647464846494650465146524653465446554656465746584659466046614662466346644665466646674668466946704671467246734674467546764677467846794680468146824683468446854686468746884689469046914692469346944695469646974698469947004701470247034704470547064707470847094710471147124713471447154716471747184719472047214722472347244725472647274728472947304731473247334734473547364737473847394740474147424743474447454746474747484749475047514752475347544755475647574758475947604761476247634764476547664767476847694770477147724773477447754776477747784779478047814782478347844785478647874788478947904791479247934794479547964797479847994800480148024803480448054806480748084809481048114812481348144815481648174818481948204821482248234824482548264827482848294830483148324833483448354836483748384839484048414842484348444845484648474848484948504851485248534854485548564857485848594860486148624863486448654866486748684869487048714872487348744875487648774878487948804881488248834884488548864887488848894890489148924893489448954896489748984899490049014902490349044905490649074908490949104911491249134914491549164917491849194920492149224923492449254926492749284929493049314932493349344935493649374938493949404941494249434944494549464947494849494950495149524953495449554956495749584959496049614962496349644965496649674968496949704971497249734974497549764977497849794980498149824983498449854986498749884989499049914992499349944995499649974998499950005001500250035004500550065007500850095010501150125013501450155016501750185019502050215022502350245025502650275028502950305031503250335034503550365037503850395040504150425043504450455046504750485049505050515052505350545055505650575058505950605061506250635064506550665067506850695070507150725073507450755076507750785079508050815082508350845085508650875088508950905091509250935094509550965097509850995100510151025103510451055106510751085109511051115112511351145115511651175118511951205121512251235124512551265127512851295130513151325133513451355136513751385139514051415142514351445145514651475148514951505151515251535154515551565157515851595160516151625163516451655166516751685169517051715172517351745175517651775178517951805181518251835184518551865187518851895190519151925193519451955196519751985199520052015202520352045205520652075208520952105211521252135214521552165217521852195220522152225223522452255226522752285229523052315232523352345235523652375238523952405241524252435244524552465247524852495250525152525253525452555256525752585259526052615262526352645265526652675268526952705271527252735274527552765277527852795280528152825283528452855286528752885289529052915292529352945295529652975298529953005301530253035304530553065307530853095310531153125313531453155316531753185319532053215322532353245325532653275328532953305331533253335334533553365337533853395340534153425343534453455346534753485349535053515352535353545355535653575358535953605361536253635364536553665367536853695370537153725373537453755376537753785379538053815382538353845385538653875388538953905391539253935394539553965397539853995400540154025403540454055406540754085409541054115412541354145415541654175418541954205421542254235424542554265427542854295430543154325433543454355436543754385439544054415442544354445445544654475448544954505451545254535454545554565457545854595460546154625463546454655466546754685469547054715472547354745475547654775478547954805481548254835484548554865487548854895490549154925493549454955496549754985499550055015502550355045505550655075508550955105511551255135514551555165517551855195520552155225523552455255526552755285529553055315532553355345535553655375538553955405541554255435544554555465547554855495550555155525553555455555556555755585559556055615562556355645565556655675568556955705571557255735574557555765577557855795580558155825583558455855586558755885589559055915592559355945595559655975598559956005601560256035604560556065607560856095610561156125613561456155616561756185619562056215622562356245625562656275628562956305631563256335634563556365637563856395640564156425643564456455646564756485649565056515652565356545655565656575658565956605661566256635664566556665667566856695670567156725673567456755676567756785679568056815682568356845685568656875688568956905691569256935694569556965697569856995700570157025703570457055706570757085709571057115712571357145715571657175718571957205721572257235724572557265727572857295730573157325733573457355736573757385739574057415742574357445745574657475748574957505751575257535754575557565757575857595760576157625763576457655766576757685769577057715772577357745775577657775778577957805781578257835784578557865787578857895790579157925793579457955796579757985799580058015802580358045805580658075808580958105811581258135814581558165817581858195820582158225823582458255826582758285829583058315832583358345835583658375838583958405841584258435844584558465847584858495850585158525853585458555856585758585859586058615862586358645865586658675868586958705871587258735874587558765877587858795880588158825883588458855886588758885889589058915892589358945895589658975898589959005901590259035904590559065907590859095910591159125913591459155916591759185919592059215922592359245925592659275928592959305931593259335934593559365937593859395940594159425943594459455946594759485949595059515952595359545955595659575958595959605961596259635964596559665967596859695970597159725973597459755976597759785979598059815982598359845985598659875988598959905991599259935994599559965997599859996000600160026003600460056006600760086009601060116012601360146015601660176018601960206021602260236024602560266027602860296030603160326033603460356036603760386039604060416042604360446045604660476048604960506051605260536054605560566057605860596060606160626063606460656066606760686069607060716072607360746075607660776078607960806081608260836084608560866087608860896090609160926093609460956096609760986099610061016102610361046105610661076108610961106111611261136114611561166117611861196120612161226123612461256126612761286129613061316132613361346135613661376138613961406141614261436144614561466147614861496150615161526153615461556156615761586159616061616162616361646165616661676168616961706171617261736174617561766177617861796180618161826183618461856186618761886189619061916192619361946195619661976198619962006201620262036204620562066207620862096210621162126213621462156216621762186219622062216222622362246225622662276228622962306231623262336234623562366237623862396240624162426243624462456246624762486249625062516252625362546255625662576258625962606261626262636264626562666267626862696270627162726273627462756276627762786279628062816282628362846285628662876288628962906291629262936294629562966297629862996300630163026303630463056306630763086309631063116312631363146315631663176318631963206321632263236324632563266327632863296330633163326333633463356336633763386339634063416342634363446345634663476348634963506351635263536354635563566357635863596360636163626363636463656366636763686369637063716372637363746375637663776378637963806381638263836384638563866387638863896390639163926393639463956396639763986399640064016402640364046405640664076408640964106411641264136414641564166417641864196420642164226423642464256426642764286429643064316432643364346435643664376438643964406441644264436444644564466447644864496450645164526453645464556456645764586459646064616462646364646465646664676468646964706471647264736474647564766477647864796480648164826483648464856486648764886489649064916492649364946495649664976498649965006501650265036504650565066507650865096510651165126513651465156516651765186519652065216522652365246525652665276528652965306531653265336534653565366537653865396540654165426543654465456546654765486549655065516552655365546555655665576558655965606561656265636564656565666567656865696570657165726573657465756576657765786579658065816582658365846585658665876588658965906591659265936594659565966597659865996600660166026603660466056606660766086609661066116612661366146615661666176618661966206621662266236624662566266627662866296630663166326633663466356636663766386639664066416642664366446645664666476648664966506651665266536654665566566657665866596660666166626663666466656666666766686669667066716672667366746675667666776678667966806681668266836684668566866687668866896690669166926693669466956696669766986699670067016702670367046705670667076708670967106711671267136714671567166717671867196720672167226723672467256726672767286729673067316732673367346735673667376738673967406741674267436744674567466747674867496750675167526753675467556756675767586759676067616762676367646765676667676768676967706771677267736774677567766777677867796780678167826783678467856786678767886789679067916792679367946795679667976798679968006801680268036804680568066807680868096810681168126813681468156816681768186819682068216822682368246825682668276828682968306831683268336834683568366837683868396840684168426843684468456846684768486849685068516852685368546855685668576858685968606861686268636864686568666867686868696870687168726873687468756876687768786879688068816882688368846885688668876888688968906891689268936894689568966897689868996900690169026903690469056906690769086909691069116912691369146915691669176918691969206921692269236924692569266927692869296930693169326933693469356936693769386939694069416942694369446945694669476948694969506951695269536954695569566957695869596960696169626963696469656966696769686969697069716972697369746975697669776978697969806981698269836984698569866987698869896990699169926993699469956996699769986999700070017002700370047005700670077008700970107011701270137014701570167017701870197020702170227023702470257026702770287029703070317032703370347035703670377038703970407041704270437044704570467047704870497050705170527053705470557056705770587059706070617062706370647065706670677068706970707071707270737074707570767077707870797080708170827083708470857086708770887089709070917092709370947095709670977098709971007101710271037104710571067107710871097110711171127113711471157116711771187119712071217122712371247125712671277128712971307131713271337134713571367137713871397140714171427143714471457146714771487149715071517152715371547155715671577158715971607161716271637164716571667167716871697170717171727173717471757176717771787179718071817182718371847185718671877188718971907191719271937194719571967197719871997200720172027203720472057206720772087209721072117212721372147215721672177218721972207221722272237224722572267227722872297230723172327233723472357236723772387239724072417242724372447245724672477248724972507251725272537254725572567257725872597260726172627263726472657266726772687269727072717272727372747275727672777278727972807281728272837284728572867287728872897290729172927293729472957296729772987299730073017302730373047305730673077308730973107311731273137314731573167317731873197320732173227323732473257326732773287329733073317332733373347335733673377338733973407341734273437344734573467347734873497350735173527353735473557356735773587359736073617362736373647365736673677368736973707371737273737374737573767377737873797380738173827383738473857386738773887389739073917392739373947395739673977398739974007401740274037404740574067407740874097410741174127413741474157416741774187419742074217422742374247425742674277428742974307431743274337434743574367437743874397440744174427443744474457446744774487449745074517452745374547455745674577458745974607461746274637464746574667467746874697470747174727473747474757476747774787479748074817482748374847485748674877488748974907491749274937494749574967497749874997500750175027503750475057506750775087509751075117512751375147515751675177518751975207521752275237524752575267527752875297530753175327533753475357536753775387539754075417542754375447545754675477548754975507551755275537554755575567557755875597560756175627563756475657566756775687569757075717572757375747575757675777578757975807581758275837584758575867587758875897590759175927593759475957596759775987599760076017602760376047605760676077608760976107611761276137614761576167617761876197620762176227623762476257626762776287629763076317632763376347635763676377638763976407641764276437644764576467647764876497650765176527653765476557656765776587659766076617662766376647665766676677668766976707671767276737674767576767677767876797680768176827683768476857686768776887689769076917692769376947695769676977698769977007701770277037704770577067707770877097710771177127713771477157716771777187719772077217722772377247725772677277728772977307731773277337734773577367737773877397740774177427743774477457746774777487749775077517752775377547755775677577758775977607761776277637764776577667767776877697770777177727773777477757776777777787779778077817782778377847785778677877788778977907791779277937794779577967797779877997800780178027803780478057806780778087809781078117812781378147815781678177818781978207821782278237824782578267827782878297830783178327833783478357836783778387839784078417842784378447845784678477848784978507851785278537854785578567857785878597860786178627863786478657866786778687869787078717872787378747875787678777878787978807881788278837884788578867887788878897890789178927893789478957896789778987899790079017902790379047905790679077908790979107911791279137914791579167917791879197920792179227923792479257926792779287929793079317932793379347935793679377938793979407941794279437944794579467947794879497950795179527953795479557956795779587959796079617962796379647965796679677968796979707971797279737974797579767977797879797980798179827983798479857986798779887989799079917992799379947995799679977998799980008001800280038004800580068007800880098010801180128013801480158016801780188019802080218022802380248025802680278028802980308031803280338034803580368037803880398040804180428043804480458046804780488049805080518052805380548055805680578058805980608061806280638064806580668067806880698070807180728073807480758076807780788079808080818082808380848085808680878088808980908091809280938094809580968097809880998100810181028103810481058106810781088109811081118112811381148115811681178118811981208121812281238124812581268127812881298130813181328133813481358136813781388139814081418142814381448145814681478148814981508151815281538154815581568157815881598160816181628163816481658166816781688169817081718172817381748175817681778178817981808181818281838184818581868187818881898190819181928193819481958196819781988199820082018202820382048205820682078208820982108211821282138214821582168217821882198220822182228223822482258226822782288229823082318232823382348235823682378238823982408241824282438244824582468247824882498250825182528253825482558256825782588259826082618262826382648265826682678268826982708271827282738274827582768277827882798280828182828283828482858286828782888289829082918292829382948295829682978298829983008301830283038304830583068307830883098310831183128313831483158316831783188319832083218322832383248325832683278328832983308331833283338334833583368337833883398340834183428343834483458346834783488349835083518352835383548355835683578358835983608361836283638364836583668367836883698370837183728373837483758376837783788379838083818382838383848385838683878388838983908391839283938394839583968397839883998400840184028403840484058406840784088409841084118412841384148415841684178418841984208421842284238424842584268427842884298430843184328433843484358436843784388439844084418442844384448445844684478448844984508451845284538454845584568457845884598460846184628463846484658466846784688469847084718472847384748475847684778478847984808481848284838484848584868487848884898490849184928493849484958496849784988499850085018502850385048505850685078508850985108511851285138514851585168517851885198520852185228523852485258526852785288529853085318532853385348535853685378538853985408541854285438544854585468547854885498550855185528553855485558556855785588559856085618562856385648565856685678568856985708571857285738574857585768577857885798580858185828583858485858586858785888589859085918592859385948595859685978598859986008601860286038604860586068607860886098610861186128613861486158616861786188619862086218622862386248625862686278628862986308631863286338634863586368637863886398640864186428643864486458646864786488649865086518652865386548655865686578658865986608661866286638664866586668667866886698670867186728673867486758676867786788679868086818682868386848685868686878688868986908691869286938694869586968697869886998700870187028703870487058706870787088709871087118712871387148715871687178718871987208721872287238724872587268727872887298730873187328733873487358736873787388739874087418742874387448745874687478748874987508751875287538754875587568757875887598760876187628763876487658766876787688769877087718772877387748775877687778778877987808781878287838784878587868787878887898790879187928793879487958796879787988799880088018802880388048805880688078808880988108811881288138814881588168817881888198820882188228823882488258826882788288829883088318832883388348835883688378838883988408841884288438844884588468847884888498850885188528853885488558856885788588859886088618862886388648865886688678868886988708871887288738874887588768877887888798880888188828883888488858886888788888889889088918892889388948895889688978898889989008901890289038904890589068907890889098910891189128913891489158916891789188919892089218922892389248925892689278928892989308931893289338934893589368937893889398940894189428943894489458946894789488949895089518952895389548955895689578958895989608961896289638964896589668967896889698970897189728973897489758976897789788979898089818982898389848985898689878988898989908991899289938994899589968997899889999000900190029003900490059006900790089009901090119012901390149015901690179018901990209021902290239024902590269027902890299030903190329033903490359036903790389039904090419042904390449045904690479048904990509051905290539054905590569057905890599060906190629063906490659066906790689069907090719072907390749075907690779078907990809081908290839084908590869087908890899090909190929093909490959096909790989099910091019102910391049105910691079108910991109111911291139114911591169117911891199120912191229123912491259126912791289129913091319132913391349135913691379138913991409141914291439144914591469147914891499150915191529153915491559156915791589159916091619162916391649165916691679168916991709171917291739174917591769177917891799180918191829183918491859186918791889189919091919192919391949195919691979198919992009201920292039204920592069207920892099210921192129213921492159216921792189219922092219222922392249225922692279228922992309231923292339234923592369237923892399240924192429243924492459246924792489249925092519252925392549255925692579258925992609261926292639264926592669267926892699270927192729273927492759276927792789279928092819282928392849285928692879288928992909291929292939294929592969297929892999300930193029303930493059306930793089309931093119312931393149315931693179318931993209321932293239324932593269327932893299330933193329333933493359336933793389339934093419342934393449345934693479348934993509351935293539354935593569357935893599360936193629363936493659366936793689369937093719372937393749375937693779378937993809381938293839384938593869387938893899390939193929393939493959396939793989399940094019402940394049405 |
- using ExIni;
- using System;
- using System.Collections;
- using System.Collections.Generic;
- using System.IO;
- using System.Linq;
- using System.Text;
- using UnityEngine;
- using UnityEngine.Rendering;
- using Object = UnityEngine.Object;
- namespace CM3D2.MultipleMaids.Plugin
- {
- public partial class MultipleMaids
- {
- const int DRAG_BAR_HEIGHT = 5;
- public void OnGUI()
- {
- for (int index1 = 0; index1 < maidCnt; ++index1)
- {
- if (isPoseIti[index1])
- {
- Maid maid = maidArray[index1];
- isPoseIti[index1] = false;
- maid.transform.position = poseIti[index1];
- Vector3 eulerAngles = maid.transform.eulerAngles;
- for (int index2 = 0; index2 < 10; ++index2)
- {
- Transform transform1 = maid.transform;
- Vector3 position1 = maid.transform.position;
- Vector3 right = Vector3.right;
- Quaternion rotation = maid.transform.rotation;
- double num1 = -rotation.eulerAngles.x;
- transform1.RotateAround(position1, right, (float)num1);
- Transform transform2 = maid.transform;
- Vector3 position2 = maid.transform.position;
- Vector3 forward = Vector3.forward;
- rotation = maid.transform.rotation;
- double num2 = -rotation.eulerAngles.z;
- transform2.RotateAround(position2, forward, (float)num2);
- }
- Transform transform = CMT.SearchObjName(maid.body0.m_Bones.transform, "Bip01", true);
- transform.position = new Vector3(poseIti[index1].x, transform.position.y, poseIti[index1].z);
- maid.transform.eulerAngles = eulerAngles;
- }
- }
- GUIStyle style = new GUIStyle(GUI.skin.box);
- style.fontSize = GetPix(11);
- style.alignment = TextAnchor.UpperRight;
- if (isGuiInit || screenSize != new Vector2(Screen.width, Screen.height))
- {
- screenSize = new Vector2(Screen.width, Screen.height);
- isGuiInit = false;
- rectWin2.width = Screen.width * 0.4f;
- rectWin2.height = Screen.height * 0.15f;
- rectWin2.x = (float)(Screen.width / 2.0 - rectWin2.width / 2.0);
- rectWin2.y = sceneLevel != 5
- ? Screen.height - rectWin2.height
- : Screen.height * 0.94f - rectWin2.height;
- rectWin.width = GetPix(kankyoFlg || kankyo2Flg ? 210 : 170);
- rectWin.height = Screen.height * 0.9f;
- rectWin.x = Screen.width - rectWin.width;
- rectWin.y = GetPix(65);
- saveManagerRect.width = Screen.width * 0.9f;
- saveManagerRect.height = Screen.height * 0.75f;
- saveManagerRect.x = (float)(Screen.width * 0.5f - saveManagerRect.width * 0.5f);
- saveManagerRect.y = (float)(Screen.height * 0.5f - saveManagerRect.height * 0.5f);
- }
- if (bGuiMessage)
- {
- rectWin2.width = Screen.width * 0.4f;
- rectWin2.height = Screen.height * 0.15f;
- rectWin2.x = Mathf.Clamp(rectWin2.x, -rectWin2.width + GetPix(20), Screen.width - GetPix(20));
- rectWin2.y = Mathf.Clamp(rectWin2.y, -rectWin2.height + GetPix(20), Screen.height - GetPix(20));
- rectWin2 = GUI.Window(130, rectWin2, MessageWindow, "", style);
- }
- if (bGui)
- {
- rectWin.x = Mathf.Clamp(rectWin.x, 0, Screen.width - rectWin.width);
- rectWin.y = Mathf.Clamp(rectWin.y, -rectWin.height + GetPix(20), Screen.height - GetPix(20));
- rectWin.height = Screen.height * 0.9f;
- rectWin.width = GetPix(kankyoFlg || kankyo2Flg ? 210 : 170);
- if (sceneLevel == 5 || sceneLevel == 14)
- rectWin.height *= 0.85f;
- comboBoxControl.height = rectWin.height;
- faceCombo.height = rectWin.height;
- poseCombo.height = rectWin.height;
- poseGroupCombo.height = rectWin.height;
- itemCombo.height = rectWin.height;
- bgmCombo.height = rectWin.height;
- itemCombo2.height = rectWin.height;
- bgCombo2.height = rectWin.height;
- kankyoCombo.height = rectWin.height;
- bgCombo.height = rectWin.height;
- slotCombo.height = rectWin.height;
- doguCombo.height = rectWin.height;
- parCombo.height = rectWin.height;
- lightCombo.height = rectWin.height;
- GameMain.Instance.MainCamera.SetControl(true);
- if (!sceneFlg && !faceFlg && !poseFlg && !kankyoFlg && !kankyo2Flg && !isF6 && okFlg)
- {
- if (Input.GetAxis("Mouse ScrollWheel") != 0.0)
- {
- GameMain.Instance.MainCamera.SetControl(!rectWin.Contains(new Vector2(Input.mousePosition.x,
- Screen.height
- - Input.mousePosition.y)));
- }
- rectWin = GUI.Window(129, rectWin, MaidCallWindow, "", style);
- }
- else if (sceneFlg)
- {
- rectWin = GUI.Window(129, rectWin, SaveSceneWindow, "", style);
- saveManagerRect = GUI.Window(131, saveManagerRect, SaveManagerWindow, "", style);
- if (!saveManagerInitialize) InitializeSaveManager();
- Rect rect = default;
- dispNo = 0;
- for (int index = 0; index < 10; ++index)
- {
- rect = new Rect(0.0f, 0.0f, GetPix(170), GetPix(36));
- rect.x = rectWin.x;
- rect.y = rectWin.y + GetPix(64 + 50 * index);
- if (rect.Contains(new Vector2(Input.mousePosition.x, Screen.height - Input.mousePosition.y)))
- {
- dispNo = index + 1;
- break;
- }
- }
- if (saveScene2 > 0)
- {
- dispNo = 0;
- }
- if (dispNo == 0)
- {
- texture2D = null;
- dispNoOld = 0;
- }
- else if (dispNo != dispNoOld)
- {
- dispNoOld = dispNo;
- texture2D = null;
- try
- {
- IniKey iniKey = Preferences["scene"]["ss" + (page * 10 + dispNo)];
- if (iniKey.Value != null && iniKey.Value != "")
- {
- byte[] data = Convert.FromBase64String(iniKey.Value);
- texture2D = new Texture2D(1, 1, TextureFormat.ARGB32, false);
- texture2D.LoadImage(data);
- }
- }
- catch { }
- }
- if (texture2D != null)
- {
- if (waku == null)
- {
- waku = MakeTex(2, 2, new Color(1f, 1f, 1f, 1f));
- waku2 = MakeTex(2, 2, new Color(0.0f, 0.0f, 0.0f, 0.4f));
- }
- Rect position1 = new Rect(rect.x - texture2D.width - GetPix(18),
- rect.y - texture2D.height / 2 + GetPix(12),
- texture2D.width + GetPix(12),
- texture2D.height + GetPix(12));
- Rect position2 = new Rect(rect.x - texture2D.width - GetPix(12),
- rect.y - texture2D.height / 2 + GetPix(18),
- texture2D.width,
- texture2D.height);
- Rect position3 = new Rect(rect.x - texture2D.width - GetPix(16),
- rect.y - texture2D.height / 2 + GetPix(14),
- texture2D.width + GetPix(12),
- texture2D.height + GetPix(12));
- if (position1.y + (double)position1.height > Screen.height)
- {
- float num = position3.y + position3.height - Screen.height;
- position1.y -= num;
- position2.y -= num;
- position3.y -= num;
- }
- if (position1.y < 0)
- {
- position3.y -= position1.y;
- position2.y -= position1.y;
- position1.y -= position1.y;
- }
- if (rect.x + rect.width / 2 <= Screen.width / 2)
- {
- float offset = texture2D.width + rect.width + GetPix(24);
- position1.x += offset;
- position2.x += offset;
- position3.x += offset;
- }
- GUI.DrawTexture(position3, waku2);
- GUI.DrawTexture(position1, waku);
- GUI.DrawTexture(position2, texture2D);
- }
- }
- else if (kankyoFlg)
- {
- if (bgmCombo.isClickedComboButton || bgCombo.isClickedComboButton || doguCombo.isClickedComboButton
- || parCombo.isClickedComboButton)
- {
- if (Input.GetAxis("Mouse ScrollWheel") != 0.0)
- {
- GameMain.Instance.MainCamera.SetControl(!rectWin.Contains(new Vector2(Input.mousePosition.x,
- Screen.height
- - Input.mousePosition.y)));
- }
- }
- else if (!yotogiFlg && sceneLevel != 3 && sceneLevel != 5
- && rectWin.Contains(new Vector2(Input.mousePosition.x, Screen.height - Input.mousePosition.y))
- && Input.GetMouseButtonDown(0))
- {
- Input.ResetInputAxes();
- }
- rectWin = GUI.Window(129, rectWin, BGSelectWindow, "", style);
- }
- else if (kankyo2Flg)
- {
- if (Input.GetAxis("Mouse ScrollWheel") != 0.0)
- {
- GameMain.Instance.MainCamera.SetControl(!rectWin.Contains(new Vector2(Input.mousePosition.x,
- Screen.height
- - Input.mousePosition.y)));
- }
- if (!yotogiFlg && sceneLevel != 3 && sceneLevel != 5
- && rectWin.Contains(new Vector2(Input.mousePosition.x, Screen.height - Input.mousePosition.y))
- && Input.GetMouseButtonDown(0))
- {
- Input.ResetInputAxes();
- }
- rectWin = GUI.Window(129, rectWin, BGSelectWindow2, "", style);
- }
- else if (poseFlg)
- {
- if (poseGroupCombo.isClickedComboButton || poseCombo.isClickedComboButton || itemCombo.isClickedComboButton)
- {
- if (Input.GetAxis("Mouse ScrollWheel") != 0.0)
- {
- GameMain.Instance.MainCamera.SetControl(!rectWin.Contains(new Vector2(Input.mousePosition.x,
- Screen.height
- - Input.mousePosition.y)));
- }
- }
- else if (!yotogiFlg && sceneLevel != 3 && sceneLevel != 5
- && rectWin.Contains(new Vector2(Input.mousePosition.x, Screen.height - Input.mousePosition.y))
- && Input.GetMouseButtonDown(0))
- {
- Input.ResetInputAxes();
- }
- rectWin = GUI.Window(129, rectWin, PoseWindow, "", style);
- }
- else
- {
- if (faceCombo.isClickedComboButton)
- {
- if (Input.GetAxis("Mouse ScrollWheel") != 0.0)
- {
- GameMain.Instance.MainCamera.SetControl(!rectWin.Contains(new Vector2(Input.mousePosition.x,
- Screen.height
- - Input.mousePosition.y)));
- }
- }
- else if (!yotogiFlg && sceneLevel != 3 && sceneLevel != 5
- && rectWin.Contains(new Vector2(Input.mousePosition.x, Screen.height - Input.mousePosition.y))
- && Input.GetMouseButtonDown(0))
- {
- Input.ResetInputAxes();
- }
- rectWin = GUI.Window(129, rectWin, FaceWindow, "", style);
- }
- }
- }
- private void SaveSceneWindow(int winID)
- {
- GUIStyle style1 = new GUIStyle("label");
- style1.fontSize = GetPix(12);
- style1.alignment = TextAnchor.UpperLeft;
- GUIStyle style2 = new GUIStyle("button");
- style2.fontSize = GetPix(12);
- style2.alignment = TextAnchor.MiddleCenter;
- GUI.Label(new Rect(GetPix(50), GetPix(6), GetPix(100), GetPix(25)),
- "シーン管理",
- style1);
- if (GUI.Button(new Rect(GetPix(135), GetPix(3), GetPix(23), GetPix(23)),
- "→",
- style2))
- {
- faceFlg = false;
- poseFlg = false;
- sceneFlg = false;
- kankyoFlg = true;
- kankyo2Flg = false;
- bGui = true;
- copyIndex = 0;
- }
- int num1 = 50;
- if (GUI.Button(new Rect(GetPix(25), GetPix(31), GetPix(23), GetPix(23)),
- "<",
- style2))
- {
- --page;
- if (page < 0)
- {
- page = maxPage - 1;
- }
- for (int index = 0; index < 10; ++index)
- {
- date[index] = "未保存";
- ninzu[index] = "";
- IniKey iniKey = Preferences["scene"]["s" + (page * 10 + index + 1)];
- if (iniKey.Value != null && iniKey.Value.ToString() != "")
- {
- string[] strArray1 = iniKey.Value.Split('_');
- if (strArray1.Length >= 2)
- {
- string[] strArray2 = strArray1[0].Split(',');
- date[index] = strArray2[0];
- ninzu[index] = strArray2[1] + "人";
- }
- }
- }
- }
- if (GUI.Button(new Rect(GetPix(115), GetPix(31), GetPix(23), GetPix(23)),
- ">",
- style2))
- {
- ++page;
- if (page >= maxPage)
- {
- page = 0;
- }
- for (int index = 0; index < 10; ++index)
- {
- date[index] = "未保存";
- ninzu[index] = "";
- IniKey iniKey = Preferences["scene"]["s" + (page * 10 + index + 1)];
- if (iniKey.Value != null && iniKey.Value.ToString() != "")
- {
- string[] strArray1 = iniKey.Value.Split('_');
- if (strArray1.Length >= 2)
- {
- string[] strArray2 = strArray1[0].Split(',');
- date[index] = strArray2[0];
- ninzu[index] = strArray2[1] + "人";
- }
- }
- }
- }
- GUI.Label(new Rect(GetPix(60), GetPix(32), GetPix(100), GetPix(25)),
- (page * 10 + 1).ToString() + " ~ " + (page * 10 + 10),
- style1);
- if (saveScene2 > 0 && string.IsNullOrEmpty(thum_byte_to_base64_) && File.Exists(thum_file_path_))
- {
- try
- {
- Texture2D tex = new Texture2D(1, 1, TextureFormat.ARGB32, false);
- tex.LoadImage(File.ReadAllBytes(thum_file_path_));
- float num2 = tex.width / (float)tex.height;
- Vector2 vector2 = new Vector2(480f, 270f);
- int newWidth = tex.width;
- int newHeight = tex.height;
- if (vector2.x < (double)tex.width && vector2.y < (double)tex.height)
- {
- newWidth = (int)vector2.x;
- newHeight = Mathf.RoundToInt(newWidth / num2);
- if (vector2.y < (double)newHeight)
- {
- newHeight = (int)vector2.y;
- newWidth = Mathf.RoundToInt(newHeight * num2);
- }
- }
- else if (vector2.x < (double)tex.width)
- {
- newWidth = (int)vector2.x;
- newHeight = Mathf.RoundToInt(newWidth / num2);
- }
- else if (vector2.y < (double)tex.height)
- {
- newHeight = (int)vector2.y;
- newWidth = Mathf.RoundToInt(newHeight * num2);
- }
- TextureScale.Bilinear(tex, newWidth, newHeight);
- thum_byte_to_base64_ = Convert.ToBase64String(tex.EncodeToPNG());
- DestroyImmediate(tex);
- Preferences["scene"]["ss" + saveScene2].Value = thum_byte_to_base64_;
- SaveConfig();
- thum_file_path_ = "";
- saveScene2 = 0;
- }
- catch { }
- }
- for (int index = 0; index < 10; ++index)
- {
- GUI.Label(new Rect(GetPix(5),
- GetPix(60 + num1 * index),
- GetPix(25),
- GetPix(25)),
- string.Concat(page * 10 + index + 1),
- style1);
- if (GUI.Button(new Rect(GetPix(20),
- GetPix(78 + num1 * index),
- GetPix(50),
- GetPix(20)),
- "保存",
- style2))
- {
- saveScene = page * 10 + index + 1;
- saveScene2 = saveScene;
- TakeScreenshot();
- }
- GUI.Label(new Rect(GetPix(25),
- GetPix(60 + num1 * index),
- GetPix(100),
- GetPix(25)),
- date[index],
- style1);
- GUI.Label(new Rect(GetPix(130),
- GetPix(60 + num1 * index),
- GetPix(100),
- GetPix(25)),
- ninzu[index],
- style1);
- if (date[index] != "未保存" && GUI.Button(new Rect(GetPix(100),
- GetPix(78 + num1 * index),
- GetPix(50),
- GetPix(20)),
- "読込",
- style2))
- {
- loadScene = page * 10 + index + 1;
- GameMain.Instance.SoundMgr.PlaySe("se002.ogg", false);
- }
- }
- GUI.DragWindow();
- }
- private void BGSelectWindow2(int winID)
- {
- GUIStyle guiStyle1 = "label";
- guiStyle1.fontSize = GetPix(12);
- guiStyle1.alignment = TextAnchor.UpperLeft;
- GUIStyle style1 = "label";
- style1.fontSize = GetPix(11);
- style1.alignment = TextAnchor.UpperLeft;
- GUIStyle style2 = "button";
- style2.fontSize = GetPix(20);
- GUIStyle buttonStyle = "button";
- buttonStyle.fontSize = GetPix(14);
- buttonStyle.alignment = TextAnchor.MiddleLeft;
- GUIStyle guiStyle2 = "button";
- guiStyle2.fontSize = GetPix(12);
- guiStyle2.alignment = TextAnchor.MiddleLeft;
- GUIStyle style3 = new GUIStyle("toggle")
- {
- fontSize = GetPix(13)
- };
- CharacterMgr characterMgr = GameMain.Instance.CharacterMgr;
- Maid maid = maidArray[selectMaidIndex];
- if (!kankyo2InitFlg)
- {
- listStyle2.normal.textColor = Color.white;
- listStyle2.normal.background = MakeTex(2, 2, new Color(0.0f, 0.0f, 0.0f, 0.5f));
- listStyle2.onHover.background = listStyle2.hover.background = new Texture2D(2, 2);
- listStyle2.padding.left = listStyle2.padding.right = listStyle2.padding.top = listStyle2.padding.bottom = GetPix(0);
- listStyle2.fontSize = GetPix(11);
- listStyle3.normal.textColor = Color.white;
- listStyle3.normal.background = MakeTex(2, 2, new Color(0.0f, 0.0f, 0.0f, 0.5f));
- listStyle3.onHover.background = listStyle3.hover.background = new Texture2D(2, 2);
- listStyle3.padding.left = listStyle3.padding.right = listStyle3.padding.top = GetPix(0);
- listStyle3.padding.bottom = GetPix(0);
- listStyle3.fontSize = GetPix(14);
- bgCombo2.selectedItemIndex = bgIndexB;
- bgCombo2List = new GUIContent[bgArray.Length];
- for (int index = 0; index < bgArray.Length; ++index)
- {
- bgCombo2List[index] = bgUiNames.TryGetValue(bgArray[index], out string name)
- ? new GUIContent(name)
- : new GUIContent(bgArray[index]);
- }
- slotCombo.selectedItemIndex = 0;
- slotComboList = slotArray.Select(s => slotUiNames.TryGetValue(s, out string name) ? name : s).Select(s => new GUIContent(s)).ToArray();
- itemCombo2.selectedItemIndex = 0;
- itemCombo2List = itemBArray.Select(s => itemComboUiName.TryGetValue(s, out string name) ? name : s)
- .Select(s => new GUIContent(s)).ToArray();
- kankyoCombo.selectedItemIndex = 0;
- kankyoComboList = new GUIContent[kankyoMax];
- for (int index = 0; index < kankyoMax; ++index)
- {
- IniKey iniKey = Preferences["kankyo"]["kankyo" + (index + 1)];
- kankyoComboList[index] = new GUIContent(iniKey.Value);
- }
- kankyo2InitFlg = true;
- }
- listStyle3.padding.top = GetPix(1);
- listStyle3.padding.bottom = GetPix(0);
- listStyle3.fontSize = GetPix(13);
- if (poseCombo.isClickedComboButton)
- {
- GUI.enabled = false;
- }
- if (poseGroupCombo.isClickedComboButton)
- {
- GUI.enabled = false;
- }
- if (sceneLevel == 3 || sceneLevel == 5 || isF6)
- {
- if (!isF6)
- {
- bool flag = true;
- if (faceFlg || poseFlg || sceneFlg || kankyoFlg || kankyo2Flg)
- {
- flag = false;
- }
- if (GUI.Toggle(new Rect(GetPix(2),
- GetPix(2),
- GetPix(39),
- GetPix(20)),
- flag,
- "配置",
- style3))
- {
- faceFlg = false;
- poseFlg = false;
- sceneFlg = false;
- kankyoFlg = false;
- kankyo2Flg = false;
- bGui = true;
- }
- }
- if (!yotogiFlg && GUI.Toggle(new Rect(GetPix(42),
- GetPix(2),
- GetPix(39),
- GetPix(20)),
- poseFlg,
- "操作",
- style3))
- {
- poseFlg = true;
- faceFlg = false;
- sceneFlg = false;
- kankyoFlg = false;
- kankyo2Flg = false;
- }
- if (GUI.Toggle(new Rect(GetPix(82), GetPix(2), GetPix(39), GetPix(20)),
- faceFlg,
- "表情",
- style3))
- {
- faceFlg = true;
- poseFlg = false;
- sceneFlg = false;
- kankyoFlg = false;
- kankyo2Flg = false;
- if (!faceFlg2)
- {
- isFaceInit = true;
- faceFlg2 = true;
- maidArray[selectMaidIndex].boMabataki = false;
- faceCombo.selectedItemIndex = faceIndex[selectMaidIndex];
- }
- isFaceInit = true;
- }
- if (GUI.Toggle(new Rect(GetPix(122), GetPix(2), GetPix(39), GetPix(20)),
- kankyoFlg,
- "環境",
- style3))
- {
- poseFlg = false;
- faceFlg = false;
- sceneFlg = false;
- kankyoFlg = true;
- kankyo2Flg = false;
- }
- if (GUI.Toggle(new Rect(GetPix(162), GetPix(2), GetPix(39), GetPix(20)),
- kankyo2Flg,
- "環2",
- style3))
- {
- poseFlg = false;
- faceFlg = false;
- sceneFlg = false;
- kankyoFlg = false;
- kankyo2Flg = true;
- }
- if (!line1)
- {
- line1 = MakeTex(2, 2, new Color(0.0f, 0.0f, 0.0f, 0.3f));
- line2 = MakeTex(2, 2, new Color(0.7f, 0.7f, 0.7f, 0.6f));
- }
- GUI.DrawTexture(new Rect(GetPix(5), GetPix(20), GetPix(200), 2f), line1);
- GUI.DrawTexture(new Rect(GetPix(5), GetPix(20), GetPix(200), 1f), line2);
- }
- if (isDanceStop)
- {
- isStop[selectMaidIndex] = true;
- isDanceStop = false;
- }
- if (kankyoCombo.isClickedComboButton || slotCombo.isClickedComboButton
- || itemCombo2.isClickedComboButton || bgCombo2.isClickedComboButton)
- {
- GUI.enabled = false;
- }
- characterMgr.GetStockMaidCount();
- float pix = GetPix(45);
- Rect position1;
- Rect viewRect;
- if (sceneLevel != 5)
- {
- position1 = new Rect(GetPix(7),
- GetPix(138),
- GetPix(44) * 4 + GetPix(20),
- rectWin.height * 0.785f);
- viewRect = new Rect(0.0f,
- 0.0f,
- position1.width * 0.845f,
- pix * (float)Math.Ceiling(sortList.Count / 4.0) + GetPix(5));
- }
- else
- {
- position1 = new Rect(GetPix(7),
- GetPix(138),
- GetPix(44) * 4 + GetPix(20),
- (float)(rectWin.height * 0.785000026226044 * 0.959999978542328));
- viewRect = new Rect(0.0f,
- 0.0f,
- position1.width * 0.845f,
- (float)(pix * Math.Ceiling(sortList.Count / 4.0)
- + GetPix(5) * 0.920000016689301));
- }
- scrollPos = GUI.BeginScrollView(position1, scrollPos, viewRect);
- for (int index = 0; index < sortList.Count; ++index)
- {
- Rect position2 = new Rect(GetPix(index % 4 * 45),
- GetPix(index / 4 * 45),
- GetPix(44),
- GetPix(44));
- if (GUI.Button(position2, sortList[index].tex))
- {
- string menu = sortList[index].menu;
- byte[] f_byBuf = null;
- using (AFileBase afileBase = GameUty.FileOpen(menu, null))
- {
- NDebug.Assert(afileBase.IsValid(), "メニューファイルが存在しません。 :" + menu);
- if (f_byBuf == null || f_byBuf.Length < afileBase.GetSize())
- {
- f_byBuf = new byte[afileBase.GetSize()];
- }
- afileBase.Read(ref f_byBuf, afileBase.GetSize());
- }
- string[] filename2 = ProcScriptBin(maidArray[0], f_byBuf, menu, false);
- GameObject gameObject = ImportCM2.LoadSkinMesh_R(filename2[0], filename2, "", maidArray[0].body0.goSlot[8], 1);
- doguBObject.Add(gameObject);
- gameObject.name = menu;
- Vector3 zero1 = Vector3.zero;
- Vector3 zero2 = Vector3.zero;
- zero1.z = 0.4f;
- gameObject.transform.localPosition = zero1;
- gameObject.transform.localRotation = Quaternion.Euler(zero2);
- doguCnt = doguBObject.Count - 1;
- gDogu[doguCnt] = GameObject.CreatePrimitive(PrimitiveType.Cube);
- gDogu[doguCnt].GetComponent<Renderer>().material = m_material;
- gDogu[doguCnt].layer = 8;
- gDogu[doguCnt].GetComponent<Renderer>().enabled = false;
- gDogu[doguCnt].SetActive(false);
- gDogu[doguCnt].transform.position = gameObject.transform.position;
- mDogu[doguCnt] = gDogu[doguCnt].AddComponent<MouseDrag6>();
- mDogu[doguCnt].isScale = false;
- mDogu[doguCnt].obj = gDogu[doguCnt];
- mDogu[doguCnt].maid = gameObject;
- mDogu[doguCnt].angles = gameObject.transform.eulerAngles;
- gDogu[doguCnt].transform.localScale = new Vector3(cubeSize, cubeSize, cubeSize);
- mDogu[doguCnt].ido = 1;
- }
- GUI.DrawTexture(position2, sortList[index].tex);
- }
- GUI.EndScrollView();
- GUI.enabled = true;
- GUI.Label(new Rect(GetPix(3), GetPix(108), GetPix(100), GetPix(25)),
- "服装",
- style1);
- style1.fontSize = GetPix(9);
- GUI.Label(new Rect(GetPix(3), GetPix(119), GetPix(100), GetPix(25)),
- "アクセサリ",
- style1);
- style1.fontSize = GetPix(11);
- GUI.Label(new Rect(GetPix(3), GetPix(58), GetPix(100), GetPix(25)),
- "アイテム",
- style1);
- GUI.Label(new Rect(GetPix(3), GetPix(86), GetPix(100), GetPix(24)),
- "背景(小)",
- style1);
- if (kankyoCombo.isClickedComboButton || itemCombo2.isClickedComboButton || bgCombo2.isClickedComboButton)
- {
- GUI.enabled = false;
- }
- int num1 =
- slotCombo.List(new Rect(GetPix(51),
- GetPix(111),
- GetPix(100),
- GetPix(23)),
- slotComboList[slotIndex].text,
- slotComboList,
- buttonStyle,
- "box",
- listStyle3);
- GUI.enabled = true;
- if (kankyoCombo.isClickedComboButton || itemCombo2.isClickedComboButton)
- {
- GUI.enabled = false;
- }
- bgIndexB =
- bgCombo2.List(new Rect(GetPix(51),
- GetPix(83),
- GetPix(100),
- GetPix(23)),
- bgCombo2List[bgIndexB].text,
- bgCombo2List,
- buttonStyle,
- "box",
- listStyle3);
- if (GUI.Button(new Rect(GetPix(156), GetPix(83), GetPix(38), GetPix(23)),
- "追加",
- style2))
- {
- Object original = GameMain.Instance.BgMgr.CreateAssetBundle(bgArray[bgIndexB]);
- if (original == null)
- {
- original = Resources.Load("BG/" + bgArray[bgIndexB]);
- }
- GameObject gameObject = Instantiate(original) as GameObject;
- doguBObject.Add(gameObject);
- gameObject.name = "BG_" + bgArray[bgIndexB];
- Vector3 zero1 = Vector3.zero;
- Vector3 zero2 = Vector3.zero;
- zero1.z = 0.4f;
- gameObject.transform.localScale = new Vector3(0.1f, 0.1f, 0.1f);
- gameObject.transform.localPosition = zero1;
- gameObject.transform.localRotation = Quaternion.Euler(zero2);
- doguCnt = doguBObject.Count - 1;
- gDogu[doguCnt] = GameObject.CreatePrimitive(PrimitiveType.Cube);
- gDogu[doguCnt].GetComponent<Renderer>().material = m_material;
- gDogu[doguCnt].layer = 8;
- gDogu[doguCnt].GetComponent<Renderer>().enabled = false;
- gDogu[doguCnt].SetActive(false);
- gDogu[doguCnt].transform.position = gameObject.transform.position;
- mDogu[doguCnt] = gDogu[doguCnt].AddComponent<MouseDrag6>();
- mDogu[doguCnt].isScale = false;
- mDogu[doguCnt].obj = gDogu[doguCnt];
- mDogu[doguCnt].maid = gameObject;
- mDogu[doguCnt].angles = gameObject.transform.eulerAngles;
- gDogu[doguCnt].transform.localScale = new Vector3(cubeSize, cubeSize, cubeSize);
- mDogu[doguCnt].ido = 1;
- }
- GUI.enabled = true;
- if (kankyoCombo.isClickedComboButton)
- {
- GUI.enabled = false;
- }
- itemIndexB =
- itemCombo2.List(new Rect(GetPix(51),
- GetPix(55),
- GetPix(100),
- GetPix(23)),
- itemCombo2List[itemIndexB].text,
- itemCombo2List,
- buttonStyle,
- "box",
- listStyle3);
- if (GUI.Button(new Rect(GetPix(156), GetPix(55), GetPix(38), GetPix(23)),
- "追加",
- style2))
- {
- string str = itemBArray[itemIndexB].Split(',')[1];
- byte[] f_byBuf = null;
- using (AFileBase afileBase = GameUty.FileOpen(str, null))
- {
- NDebug.Assert(afileBase.IsValid(), "メニューファイルが存在しません。 :" + str);
- if (f_byBuf == null || f_byBuf.Length < afileBase.GetSize())
- {
- f_byBuf = new byte[afileBase.GetSize()];
- }
- afileBase.Read(ref f_byBuf, afileBase.GetSize());
- }
- string[] filename2 = ProcScriptBin(maidArray[0], f_byBuf, str, false);
- GameObject gameObject = ImportCM2.LoadSkinMesh_R(filename2[0], filename2, "", maidArray[0].body0.goSlot[8], 1);
- doguBObject.Add(gameObject);
- gameObject.name = str;
- Vector3 zero1 = Vector3.zero;
- Vector3 zero2 = Vector3.zero;
- zero1.z = 0.4f;
- switch (itemIndexB)
- {
- case 0:
- zero2.z = 90f;
- zero1.y = 0.04f;
- goto case 19;
- case 1:
- zero2.z = 90f;
- goto case 19;
- case 4:
- zero2.x = 90f;
- goto case 19;
- case 19:
- case 20:
- case 21:
- case 22:
- case 23:
- switch (gameObject.name)
- {
- case "HandItemL_Etoile_Saucer_I_.menu":
- case "HandItemL_Karte_I_.menu":
- case "HandItemL_Katuramuki_Daikon_I_.menu":
- case "HandItemR_BeerBottle(cap_off)_I_.menu":
- case "HandItemR_BeerBottle(cap_on)_I_.menu":
- case "HandItemR_BeerGlass_I_.menu":
- case "HandItemR_Etoile_Teacup_I_.menu":
- case "HandItemR_Jyouro_I_.menu":
- case "HandItemR_Ketchup_I_.menu":
- case "HandItemR_Kobin_I_.menu":
- case "HandItemR_MelonSoda_I_.menu":
- case "HandItemR_MilkBottle(cap_off)_I_.menu":
- case "HandItemR_MilkBottle(cap_on)_I_.menu":
- case "HandItemR_Mugcup_I_.menu":
- case "HandItemR_Natumikan_I_.menu":
- case "HandItemR_Nei_Heartful_I_.menu":
- case "HandItemR_Ochoko_I_.menu":
- case "HandItemR_Shaker_I_.menu":
- case "HandItemR_SmartPhone_I_.menu":
- case "HandItemR_Suika_I_.menu":
- case "HandItemR_Tomato_I_.menu":
- case "HandItemR_TropicalGlass_I_.menu":
- case "HandItemR_cocktail_blue_I_.menu":
- case "HandItemR_cocktail_red_I_.menu":
- case "HandItemR_cocktail_yellow_I_.menu":
- case "HandItemR_smoothie_green_I_.menu":
- case "HandItemR_smoothie_red_I_.menu":
- zero2.x = 0.0f;
- zero2.z = 90f;
- break;
- case "HandItemL_Karaoke_Mike_I_.menu":
- case "HandItemR_Crops_Suika_I_.menu":
- case "HandItemR_Curry_I_.menu":
- case "HandItemR_DVD1_I_.menu":
- case "HandItemR_DVD2_I_.menu":
- case "HandItemR_DVD3_I_.menu":
- case "HandItemR_DVD4_I_.menu":
- case "HandItemR_DVD5_I_.menu":
- case "HandItemR_Folk_I_.menu":
- case "HandItemR_Hanabi_I_.menu":
- case "HandItemR_Kushiyaki_I_.menu":
- case "HandItemR_Ninjin_I_.menu":
- case "HandItemR_Omurice1_I_.menu":
- case "HandItemR_Omurice2_I_.menu":
- case "HandItemR_Omurice3_I_.menu":
- case "HandItemR_Pasta_I_.menu":
- case "HandItemR_Satumaimo_I_.menu":
- case "HandItemR_Scoop_I_.menu":
- case "HandItemR_Senkouhanabi_I_.menu":
- case "HandItemR_Shell_I_.menu":
- case "HandItemR_Spoon_Curry_I_.menu":
- case "HandItemR_Spoon_Omurice_I_.menu":
- case "HandItemR_Tomorokoshi_I_.menu":
- case "HandItemR_Tomorokoshi_yaki_I_.menu":
- case "HandItemR_Uchiwa_I_.menu":
- zero2.z = 90f;
- break;
- }
- gameObject.transform.localPosition = zero1;
- gameObject.transform.localRotation = Quaternion.Euler(zero2);
- doguCnt = doguBObject.Count - 1;
- gDogu[doguCnt] = GameObject.CreatePrimitive(PrimitiveType.Cube);
- gDogu[doguCnt].GetComponent<Renderer>().material = m_material;
- gDogu[doguCnt].layer = 8;
- gDogu[doguCnt].GetComponent<Renderer>().enabled = false;
- gDogu[doguCnt].SetActive(false);
- gDogu[doguCnt].transform.position = gameObject.transform.position;
- mDogu[doguCnt] = gDogu[doguCnt].AddComponent<MouseDrag6>();
- mDogu[doguCnt].isScale = false;
- mDogu[doguCnt].obj = gDogu[doguCnt];
- mDogu[doguCnt].maid = gameObject;
- mDogu[doguCnt].angles = gameObject.transform.eulerAngles;
- gDogu[doguCnt].transform.localScale = new Vector3(cubeSize, cubeSize, cubeSize);
- mDogu[doguCnt].ido = 1;
- break;
- case 25:
- zero2.z = 90f;
- goto case 19;
- case 26:
- zero2.z = 90f;
- goto case 19;
- case 27:
- zero2.z = 90f;
- goto case 19;
- default:
- zero2.x = -90f;
- goto case 19;
- }
- }
- GUI.enabled = true;
- if (nameFlg)
- {
- inName2 = GUI.TextField(new Rect(GetPix(5),
- GetPix(27),
- GetPix(100),
- GetPix(20)),
- inName2);
- if (GUI.Button(new Rect(GetPix(110),
- GetPix(27),
- GetPix(35),
- GetPix(20)),
- "更新",
- style2))
- {
- nameFlg = false;
- GameMain.Instance.SoundMgr.PlaySe("se002.ogg", false);
- Preferences["kankyo"]["kankyo" + (kankyoCombo.selectedItemIndex + 1)].Value = inName2;
- SaveConfig();
- kankyoComboList = new GUIContent[kankyoMax];
- for (int index = 0; index < kankyoMax; ++index)
- {
- IniKey iniKey = Preferences["kankyo"]["kankyo" + (index + 1)];
- kankyoComboList[index] = new GUIContent(iniKey.Value);
- }
- }
- }
- else
- {
- if (GUI.Button(new Rect(GetPix(180),
- GetPix(27),
- GetPix(24),
- GetPix(20)),
- "名",
- style2))
- {
- nameFlg = true;
- inName2 = kankyoComboList[kankyoIndex].text;
- }
- kankyoIndex =
- kankyoCombo.List(new Rect(GetPix(4),
- GetPix(27),
- GetPix(91),
- GetPix(23)),
- kankyoComboList[kankyoIndex].text,
- kankyoComboList,
- buttonStyle,
- "box",
- listStyle3);
- if (GUI.Button(new Rect(GetPix(100),
- GetPix(27),
- GetPix(35),
- GetPix(20)),
- "保存",
- style2))
- {
- saveScene = 10000 + kankyoIndex;
- saveScene2 = saveScene;
- GameMain.Instance.SoundMgr.PlaySe("se002.ogg", false);
- try
- {
- thum_byte_to_base64_ = string.Empty;
- thum_file_path_ = Path.Combine(Path.GetTempPath(), "cm3d2_" + Guid.NewGuid().ToString() + ".png");
- GameMain.Instance.MainCamera.ScreenShot(thum_file_path_, 1, false);
- }
- catch { }
- }
- GUI.enabled = false;
- IniKey iniKey = Preferences["scene"]["s" + (10000 + kankyoIndex)];
- if (iniKey.Value != null && iniKey.Value.ToString() != "")
- {
- GUI.enabled = true;
- }
- if (GUI.Button(new Rect(GetPix(140),
- GetPix(27),
- GetPix(35),
- GetPix(20)),
- "読込",
- style2))
- {
- loadScene = 10000 + kankyoIndex;
- kankyoLoadFlg = true;
- GameMain.Instance.SoundMgr.PlaySe("se002.ogg", false);
- }
- }
- GUI.enabled = true;
- GUI.DragWindow();
- if (num1 == slotIndex)
- {
- return;
- }
- slotIndex = num1;
- sortList.Clear();
- scrollPos = new Vector2(0.0f, 0.0f);
- if (itemDataList.Count == 0)
- {
- foreach (string menuFile in GameUty.MenuFiles)
- {
- string fileName = Path.GetFileName(menuFile);
- byte[] f_byBuf = null;
- using (AFileBase afileBase = GameUty.FileOpen(fileName, null))
- {
- NDebug.Assert(afileBase.IsValid(), "メニューファイルが存在しません。 :" + fileName);
- if (f_byBuf == null || f_byBuf.Length < afileBase.GetSize())
- {
- f_byBuf = new byte[afileBase.GetSize()];
- }
- afileBase.Read(ref f_byBuf, afileBase.GetSize());
- }
- BinaryReader binaryReader = new BinaryReader(new MemoryStream(f_byBuf), Encoding.UTF8);
- if (binaryReader.ReadString() != "CM3D2_MENU")
- {
- binaryReader.Close();
- }
- else
- {
- try
- {
- binaryReader.ReadInt32();
- binaryReader.ReadString();
- binaryReader.ReadString();
- string str1 = binaryReader.ReadString();
- string s = "";
- binaryReader.ReadString();
- binaryReader.ReadInt32();
- string str2 = "";
- do
- {
- int num2;
- do
- {
- num2 = binaryReader.ReadByte();
- } while (num2 == 0);
- for (int index = 0; index < num2; ++index)
- {
- string str3 = binaryReader.ReadString();
- if (str3 == "icons" || str3 == "icon")
- {
- str2 = binaryReader.ReadString();
- break;
- }
- if (str3 == "priority")
- {
- s = binaryReader.ReadString();
- break;
- }
- }
- } while (str2 == "");
- int.TryParse(s, out int result);
- itemDataList.Add(new ItemData() { info = str1, name = str2, menu = fileName, order = result, cd = f_byBuf });
- }
- catch { }
- binaryReader.Close();
- }
- }
- }
- foreach (ItemData itemData in itemDataList)
- {
- if (slotIndex != 0 && itemData.info == slotArray[slotIndex] && itemData.order > 0)
- {
- sortList.Add(new SortItem() { order = itemData.order, name = itemData.name, menu = itemData.menu, tex = itemData.tex });
- }
- }
- IOrderedEnumerable<SortItem> orderedEnumerable = sortList
- .OrderBy(p => p.order)
- .ThenBy(p => p.name);
- List<SortItem> sortItemList = new List<SortItem>();
- string str4 = "";
- foreach (SortItem sortItem in orderedEnumerable)
- {
- try
- {
- if (!(sortItem.menu == str4))
- {
- if (sortItem.tex == null)
- {
- byte[] data = ImportCM.LoadTexture(GameUty.FileSystem, sortItem.name, false).data;
- Texture2D texture2D = new Texture2D(50, 50, TextureFormat.RGB565, false);
- texture2D.LoadImage(data);
- sortItem.tex = texture2D;
- }
- str4 = sortItem.menu;
- sortItemList.Add(sortItem);
- }
- }
- catch { }
- }
- sortList = sortItemList;
- }
- private void BGSelectWindow(int winID)
- {
- GUIStyle guistyle = "label";
- guistyle.fontSize = GetPix(12);
- guistyle.alignment = TextAnchor.UpperLeft;
- GUIStyle guistyle2 = "label";
- guistyle2.fontSize = GetPix(11);
- guistyle2.alignment = TextAnchor.UpperLeft;
- GUIStyle guistyle3 = "button";
- guistyle3.fontSize = GetPix(20);
- GUIStyle guistyle4 = "button";
- guistyle4.fontSize = GetPix(14);
- guistyle4.alignment = TextAnchor.MiddleLeft;
- GUIStyle guistyle5 = "button";
- guistyle5.fontSize = GetPix(12);
- guistyle5.alignment = TextAnchor.MiddleLeft;
- GUIStyle guistyle6 = new GUIStyle("toggle")
- {
- fontSize = GetPix(13)
- };
- CharacterMgr characterMgr = GameMain.Instance.CharacterMgr;
- Maid maid = maidArray[selectMaidIndex];
- if (!kankyoInitFlg)
- {
- listStyle2.normal.textColor = Color.white;
- listStyle2.normal.background = MakeTex(2, 2, new Color(0f, 0f, 0f, 0.5f));
- listStyle2.onHover.background = listStyle2.hover.background = new Texture2D(2, 2);
- RectOffset padding = listStyle2.padding;
- RectOffset padding2 = listStyle2.padding;
- RectOffset padding3 = listStyle2.padding;
- int num = listStyle2.padding.bottom = GetPix(0);
- num = padding3.top = num;
- num = padding2.right = num;
- padding.left = num;
- listStyle2.fontSize = GetPix(11);
- listStyle3.normal.textColor = Color.white;
- listStyle3.normal.background = MakeTex(2, 2, new Color(0f, 0f, 0f, 0.5f));
- listStyle3.onHover.background = listStyle3.hover.background = new Texture2D(2, 2);
- RectOffset padding4 = listStyle3.padding;
- RectOffset padding5 = listStyle3.padding;
- num = listStyle3.padding.top = GetPix(0);
- num = padding5.right = num;
- padding4.left = num;
- listStyle3.padding.bottom = GetPix(0);
- listStyle3.fontSize = GetPix(12);
- bgmCombo.selectedItemIndex = bgmIndex;
- if (sceneLevel == 5)
- {
- bgmCombo.selectedItemIndex = 2;
- }
- bgmComboList = bgmArray.Select(s => dancesDict.TryGetValue(s, out string name) ? name : s).Select(s => new GUIContent(s)).ToArray();
- bgCombo.selectedItemIndex = bgIndex;
- bgComboList = new GUIContent[bgArray.Length];
- for (int j = 0; j < bgArray.Length; j++)
- {
- // Dicts merged during init
- if (bgDict.TryGetValue(bgArray[j], out string name))
- {
- bgComboList[j] = new GUIContent(name);
- }
- else
- {
- bgComboList[j] = new GUIContent(bgArray[j]);
- }
- }
- doguCombo.selectedItemIndex = 0;
- doguComboList = new GUIContent[doguBArray.Length];
- for (int j = 0; j < doguComboList.Length; j++)
- {
- // Dicts merged during init
- if (doguUiNames.TryGetValue(doguBArray[j], out string name))
- {
- doguComboList[j] = new GUIContent(name);
- }
- else
- {
- doguComboList[j] = new GUIContent(doguBArray[j]);
- }
- }
- parCombo.selectedItemIndex = 0;
- parComboList = parArray.Select(s => parUiDict.TryGetValue(s, out string name) ? name : s).Select(s => new GUIContent(s)).ToArray();
- lightCombo.selectedItemIndex = 0;
- lightList = new List<GameObject>
- {
- GameMain.Instance.MainLight.gameObject
- };
- lightComboList = new GUIContent[lightList.Count];
- for (int i = 0; i < lightList.Count; i++)
- {
- if (i == 0)
- {
- lightComboList[i] = new GUIContent("メイン");
- }
- else
- {
- lightComboList[i] = new GUIContent("追加" + i);
- }
- }
- kankyoInitFlg = true;
- }
- listStyle3.padding.top = GetPix(1);
- listStyle3.padding.bottom = GetPix(0);
- listStyle3.fontSize = GetPix(12);
- if (poseCombo.isClickedComboButton)
- {
- GUI.enabled = false;
- }
- if (poseGroupCombo.isClickedComboButton)
- {
- GUI.enabled = false;
- }
- if (sceneLevel == 3 || sceneLevel == 5 || isF6)
- {
- if (!isF6)
- {
- bool value = true;
- if (faceFlg || poseFlg || sceneFlg || kankyoFlg || kankyo2Flg)
- {
- value = false;
- }
- if (GUI.Toggle(new Rect(GetPix(2),
- GetPix(2),
- GetPix(39),
- GetPix(20)),
- value,
- "配置",
- guistyle6))
- {
- faceFlg = false;
- poseFlg = false;
- sceneFlg = false;
- kankyoFlg = false;
- kankyo2Flg = false;
- bGui = true;
- }
- }
- if (!yotogiFlg)
- {
- if (GUI.Toggle(new Rect(GetPix(42),
- GetPix(2),
- GetPix(39),
- GetPix(20)),
- poseFlg,
- "操作",
- guistyle6))
- {
- poseFlg = true;
- faceFlg = false;
- sceneFlg = false;
- kankyoFlg = false;
- kankyo2Flg = false;
- }
- }
- if (GUI.Toggle(new Rect(GetPix(82), GetPix(2), GetPix(39), GetPix(20)),
- faceFlg,
- "表情",
- guistyle6))
- {
- faceFlg = true;
- poseFlg = false;
- sceneFlg = false;
- kankyoFlg = false;
- kankyo2Flg = false;
- if (!faceFlg2)
- {
- isFaceInit = true;
- faceFlg2 = true;
- maidArray[selectMaidIndex].boMabataki = false;
- faceCombo.selectedItemIndex = faceIndex[selectMaidIndex];
- }
- isFaceInit = true;
- }
- if (GUI.Toggle(new Rect(GetPix(122), GetPix(2), GetPix(39), GetPix(20)),
- kankyoFlg,
- "環境",
- guistyle6))
- {
- poseFlg = false;
- faceFlg = false;
- sceneFlg = false;
- kankyoFlg = true;
- kankyo2Flg = false;
- }
- if (GUI.Toggle(new Rect(GetPix(162), GetPix(2), GetPix(39), GetPix(20)),
- kankyo2Flg,
- "環2",
- guistyle6))
- {
- poseFlg = false;
- faceFlg = false;
- sceneFlg = false;
- kankyoFlg = false;
- kankyo2Flg = true;
- }
- if (!line1)
- {
- line1 = MakeTex(2, 2, new Color(0f, 0f, 0f, 0.3f));
- line2 = MakeTex(2, 2, new Color(0.7f, 0.7f, 0.7f, 0.6f));
- }
- GUI.DrawTexture(new Rect(GetPix(5), GetPix(20), GetPix(200), 2f), line1);
- GUI.DrawTexture(new Rect(GetPix(5), GetPix(20), GetPix(200), 1f), line2);
- }
- if (isDanceStop)
- {
- isStop[selectMaidIndex] = true;
- isDanceStop = false;
- }
- yotogiFlg = false;
- if (sceneLevel == 14)
- {
- if (GameObject.Find("/UI Root/YotogiPlayPanel/CommandViewer/SkillViewer/MaskGroup/SkillGroup/CommandParent/CommandUnit"))
- {
- yotogiFlg = true;
- }
- }
- if (!isF6)
- {
- if (GUI.Button(new Rect(GetPix(157),
- GetPix(32),
- GetPix(46),
- GetPix(35)),
- "シーン\n 管 理",
- guistyle3))
- {
- sceneFlg = true;
- faceFlg = false;
- poseFlg = false;
- kankyoFlg = false;
- kankyo2Flg = false;
- bGui = true;
- for (int i = 0; i < 10; i++)
- {
- date[i] = "未保存";
- ninzu[i] = "";
- IniKey iniKey = Preferences["scene"]["s" + (page * 10 + i + 1)];
- if (iniKey.Value != null && iniKey.Value.ToString() != "")
- {
- string[] array = iniKey.Value.Split(new char[] { '_' });
- if (array.Length >= 2)
- {
- string[] array2 = array[0].Split(new char[] { ',' });
- date[i] = array2[0];
- ninzu[i] = array2[1] + "人";
- }
- }
- }
- }
- }
- if (doguCombo.isClickedComboButton || parCombo.isClickedComboButton || bgCombo.isClickedComboButton
- || bgmCombo.isClickedComboButton || lightCombo.isClickedComboButton)
- {
- GUI.enabled = false;
- }
- int num2 = -1;
- if (lightIndex[selectLightIndex] == 0)
- {
- isIdx1 = true;
- }
- if (lightIndex[selectLightIndex] == 1)
- {
- isIdx2 = true;
- }
- if (lightIndex[selectLightIndex] == 2)
- {
- isIdx3 = true;
- }
- if (lightIndex[selectLightIndex] == 3)
- {
- isIdx4 = true;
- }
- if (GUI.Toggle(new Rect(GetPix(5), GetPix(215), GetPix(45), GetPix(20)),
- isIdx1,
- "通常",
- guistyle6))
- {
- if (lightIndex[selectLightIndex] != 0)
- {
- isIdx1 = true;
- isIdx2 = false;
- isIdx3 = false;
- isIdx4 = false;
- num2 = 0;
- }
- }
- if (GUI.Toggle(new Rect(GetPix(50), GetPix(215), GetPix(45), GetPix(20)),
- isIdx2,
- "Spot",
- guistyle6))
- {
- if (lightIndex[selectLightIndex] != 1)
- {
- isIdx1 = false;
- isIdx2 = true;
- isIdx3 = false;
- isIdx4 = false;
- num2 = 1;
- }
- }
- if (GUI.Toggle(new Rect(GetPix(99), GetPix(215), GetPix(45), GetPix(20)),
- isIdx3,
- "Point",
- guistyle6))
- {
- if (lightIndex[selectLightIndex] != 2)
- {
- isIdx1 = false;
- isIdx2 = false;
- isIdx3 = true;
- isIdx4 = false;
- num2 = 2;
- }
- }
- if (selectLightIndex == 0)
- {
- if (GUI.Toggle(new Rect(GetPix(150),
- GetPix(215),
- GetPix(45),
- GetPix(20)),
- isIdx4,
- "単色",
- guistyle6))
- {
- if (lightIndex[selectLightIndex] != 3)
- {
- isIdx1 = false;
- isIdx2 = false;
- isIdx3 = false;
- isIdx4 = true;
- num2 = 3;
- }
- }
- }
- else if (GUI.Toggle(new Rect(GetPix(150),
- GetPix(215),
- GetPix(45),
- GetPix(20)),
- isIdx4,
- "無効",
- guistyle6))
- {
- if (lightIndex[selectLightIndex] != 3)
- {
- isIdx1 = false;
- isIdx2 = false;
- isIdx3 = false;
- isIdx4 = true;
- num2 = 3;
- }
- }
- if (num2 >= 0)
- {
- lightIndex[selectLightIndex] = num2;
- if (selectLightIndex == 0)
- {
- GameMain.Instance.MainLight.Reset();
- GameMain.Instance.MainLight.SetIntensity(0.95f);
- GameMain.Instance.MainLight.GetComponent<Light>().spotAngle = 50f;
- GameMain.Instance.MainLight.GetComponent<Light>().range = 10f;
- GameMain.Instance.MainLight.gameObject.transform.position = new Vector3(0f, 2f, 0f);
- if (lightIndex[selectLightIndex] == 0)
- {
- GameMain.Instance.MainLight.GetComponent<Light>().type = LightType.Directional;
- bgObject.SetActive(true);
- mainCamera.GetComponent<Camera>().backgroundColor = new Color(0f, 0f, 0f);
- }
- else if (lightIndex[selectLightIndex] == 1)
- {
- GameMain.Instance.MainLight.transform.eulerAngles += Vector3.right * 40f;
- GameMain.Instance.MainLight.GetComponent<Light>().type = LightType.Spot;
- bgObject.SetActive(true);
- mainCamera.GetComponent<Camera>().backgroundColor = new Color(0f, 0f, 0f);
- }
- else if (lightIndex[selectLightIndex] == 2)
- {
- GameMain.Instance.MainLight.GetComponent<Light>().type = LightType.Point;
- bgObject.SetActive(true);
- mainCamera.GetComponent<Camera>().backgroundColor = new Color(0f, 0f, 0f);
- }
- else if (lightIndex[selectLightIndex] == 3)
- {
- GameMain.Instance.MainLight.GetComponent<Light>().type = LightType.Directional;
- mainCamera.GetComponent<Camera>().backgroundColor = new Color(lightColorR[0], lightColorG[0], lightColorB[0]);
- bgObject.SetActive(false);
- }
- }
- else
- {
- lightList[selectLightIndex].SetActive(true);
- if (lightIndex[selectLightIndex] == 0)
- {
- lightList[selectLightIndex].GetComponent<Light>().type = LightType.Directional;
- }
- else if (lightIndex[selectLightIndex] == 1)
- {
- lightList[selectLightIndex].transform.eulerAngles += Vector3.right * 40f;
- lightList[selectLightIndex].GetComponent<Light>().type = LightType.Spot;
- }
- else if (lightIndex[selectLightIndex] == 2)
- {
- lightList[selectLightIndex].GetComponent<Light>().type = LightType.Point;
- }
- else if (lightIndex[selectLightIndex] == 3)
- {
- lightList[selectLightIndex].GetComponent<Light>().type = LightType.Directional;
- lightList[selectLightIndex].SetActive(false);
- }
- }
- lightColorR[selectLightIndex] = 1f;
- lightColorG[selectLightIndex] = 1f;
- lightColorB[selectLightIndex] = 1f;
- lightX[selectLightIndex] = 40f;
- lightY[selectLightIndex] = 180f;
- lightAkarusa[selectLightIndex] = 0.95f;
- lightKage[selectLightIndex] = 0.098f;
- lightRange[selectLightIndex] = 50f;
- if (lightIndex[selectLightIndex] == 1)
- {
- lightX[selectLightIndex] = 90f;
- }
- }
- GUI.Label(new Rect(GetPix(10), GetPix(138), GetPix(100), GetPix(25)),
- "キューブ表示",
- guistyle2);
- guistyle6.fontSize = GetPix(12);
- isCube2 = GUI.Toggle(new Rect(GetPix(5),
- GetPix(153),
- GetPix(55),
- GetPix(20)),
- isCube2,
- "大道具(",
- guistyle6);
- if (!isF6)
- {
- isCube = GUI.Toggle(new Rect(GetPix(102),
- GetPix(153),
- GetPix(54),
- GetPix(20)),
- isCube,
- "メイド",
- guistyle6);
- }
- bool flag = GUI.Toggle(new Rect(GetPix(160),
- GetPix(153),
- GetPix(44),
- GetPix(20)),
- isCube3,
- "背景",
- guistyle6);
- guistyle6.fontSize = GetPix(13);
- bool flag2 = GUI.Toggle(new Rect(GetPix(61),
- GetPix(153),
- GetPix(38),
- GetPix(20)),
- isCubeS,
- "小)",
- guistyle6);
- if (isCubeS != flag2)
- {
- isCubeS = flag2;
- if (isCubeS)
- {
- cubeSize = 0.05f;
- }
- else
- {
- cubeSize = 0.12f;
- }
- for (int i = 0; i < doguBObject.Count; i++)
- {
- gDogu[i].transform.localScale = new Vector3(cubeSize, cubeSize, cubeSize);
- }
- }
- if (isCube3 != flag)
- {
- isCube3 = flag;
- if (gBg == null)
- {
- gBg = GameObject.CreatePrimitive(PrimitiveType.Cube);
- gBg.GetComponent<Renderer>().material = m_material;
- gBg.layer = 8;
- gBg.GetComponent<Renderer>().enabled = false;
- gBg.SetActive(false);
- gBg.transform.position = bgObject.transform.position;
- mBg = gBg.AddComponent<MouseDrag6>();
- mBg.obj = gBg;
- mBg.maid = bgObject;
- mBg.angles = bg.eulerAngles;
- gBg.transform.localScale = new Vector3(0.12f, 0.12f, 0.12f);
- mBg.ido = 1;
- mBg.isScale = false;
- }
- if (isCube3)
- {
- gBg.SetActive(true);
- }
- else
- {
- gBg.SetActive(false);
- }
- }
- int num3 = 0;
- if (lightIndex[selectLightIndex] == 0 || lightIndex[selectLightIndex] == 1
- || (selectLightIndex == 0 && lightIndex[selectLightIndex] == 3))
- {
- GUI.Label(new Rect(GetPix(10), GetPix(237), GetPix(100), GetPix(25)),
- "向きX",
- guistyle2);
- lightX[selectLightIndex] =
- GUI.HorizontalSlider(new Rect(GetPix(8),
- GetPix(251),
- GetPix(192),
- GetPix(20)),
- lightX[selectLightIndex],
- 220f,
- -140f);
- GUI.Label(new Rect(GetPix(10), GetPix(261), GetPix(100), GetPix(25)),
- "向きY",
- guistyle2);
- lightY[selectLightIndex] =
- GUI.HorizontalSlider(new Rect(GetPix(8),
- GetPix(275),
- GetPix(192),
- GetPix(20)),
- lightY[selectLightIndex],
- 0f,
- 360f);
- }
- else
- {
- num3 = 50;
- }
- if (lightIndex[selectLightIndex] != 3 || selectLightIndex <= 0)
- {
- GUI.Label(new Rect(GetPix(10),
- GetPix(285 - num3),
- GetPix(100),
- GetPix(25)),
- "明るさ",
- guistyle2);
- lightAkarusa[selectLightIndex] =
- GUI.HorizontalSlider(new Rect(GetPix(8),
- GetPix(299 - num3),
- GetPix(192),
- GetPix(20)),
- lightAkarusa[selectLightIndex],
- 0f,
- 1.9f);
- if (lightIndex[selectLightIndex] == 0 || lightIndex[selectLightIndex] == 3)
- {
- if (selectLightIndex == 0)
- {
- GUI.Label(new Rect(GetPix(10),
- GetPix(309 - num3),
- GetPix(100),
- GetPix(25)),
- "影",
- guistyle2);
- lightKage[selectLightIndex] =
- GUI.HorizontalSlider(new Rect(GetPix(8),
- GetPix(323 - num3),
- GetPix(192),
- GetPix(20)),
- lightKage[selectLightIndex],
- 0f,
- 1f);
- }
- else
- {
- num3 = 25;
- }
- }
- else if (lightIndex[selectLightIndex] == 1 || lightIndex[selectLightIndex] == 2)
- {
- GUI.Label(new Rect(GetPix(10),
- GetPix(311 - num3),
- GetPix(100),
- GetPix(25)),
- "範囲",
- guistyle2);
- lightRange[selectLightIndex] =
- GUI.HorizontalSlider(new Rect(GetPix(8),
- GetPix(325 - num3),
- GetPix(192),
- GetPix(20)),
- lightRange[selectLightIndex],
- 0f,
- 150f);
- }
- else
- {
- num3 = 75;
- }
- GUI.Label(new Rect(GetPix(10),
- GetPix(333 - num3),
- GetPix(100),
- GetPix(25)),
- "赤",
- guistyle2);
- lightColorR[selectLightIndex] =
- GUI.HorizontalSlider(new Rect(GetPix(8),
- GetPix(347 - num3),
- GetPix(92),
- GetPix(20)),
- lightColorR[selectLightIndex],
- 0f,
- 1f);
- GUI.Label(new Rect(GetPix(108),
- GetPix(333 - num3),
- GetPix(100),
- GetPix(25)),
- "緑",
- guistyle2);
- lightColorG[selectLightIndex] =
- GUI.HorizontalSlider(new Rect(GetPix(108),
- GetPix(347 - num3),
- GetPix(92),
- GetPix(20)),
- lightColorG[selectLightIndex],
- 0f,
- 1f);
- GUI.Label(new Rect(GetPix(10),
- GetPix(357 - num3),
- GetPix(100),
- GetPix(25)),
- "青",
- guistyle2);
- lightColorB[selectLightIndex] =
- GUI.HorizontalSlider(new Rect(GetPix(8),
- GetPix(371 - num3),
- GetPix(92),
- GetPix(20)),
- lightColorB[selectLightIndex],
- 0f,
- 1f);
- }
- if (GUI.Toggle(new Rect(GetPix(5), GetPix(391), GetPix(67), GetPix(20)),
- isBloomS,
- "ブルーム",
- guistyle6))
- {
- isBloomS = true;
- isDepthS = false;
- isBlurS = false;
- isFogS = false;
- }
- if (isBloomS)
- {
- isBloom = GUI.Toggle(new Rect(GetPix(8),
- GetPix(412),
- GetPix(40),
- GetPix(20)),
- isBloom,
- "有効",
- guistyle6);
- if (!isBloom)
- {
- GUI.enabled = false;
- }
- GUI.Label(new Rect(GetPix(10), GetPix(430), GetPix(100), GetPix(25)),
- "強さ",
- guistyle2);
- bloom1 = GUI.HorizontalSlider(new Rect(GetPix(8),
- GetPix(445),
- GetPix(92),
- GetPix(20)),
- bloom1,
- 0f,
- 5.7f);
- GUI.Label(new Rect(GetPix(110), GetPix(430), GetPix(100), GetPix(25)),
- "広さ",
- guistyle2);
- bloom2 = GUI.HorizontalSlider(new Rect(GetPix(108),
- GetPix(445),
- GetPix(92),
- GetPix(20)),
- bloom2,
- 0f,
- 15f);
- GUI.Label(new Rect(GetPix(10), GetPix(455), GetPix(100), GetPix(25)),
- "赤",
- guistyle2);
- bloom3 = GUI.HorizontalSlider(new Rect(GetPix(8),
- GetPix(470),
- GetPix(92),
- GetPix(20)),
- bloom3,
- 0f,
- 0.5f);
- GUI.Label(new Rect(GetPix(110), GetPix(455), GetPix(100), GetPix(25)),
- "緑",
- guistyle2);
- bloom4 = GUI.HorizontalSlider(new Rect(GetPix(108),
- GetPix(470),
- GetPix(92),
- GetPix(20)),
- bloom4,
- 0f,
- 0.5f);
- GUI.Label(new Rect(GetPix(10), GetPix(480), GetPix(100), GetPix(25)),
- "青",
- guistyle2);
- bloom5 = GUI.HorizontalSlider(new Rect(GetPix(8),
- GetPix(495),
- GetPix(92),
- GetPix(20)),
- bloom5,
- 0f,
- 0.5f);
- isBloomA = GUI.Toggle(new Rect(GetPix(110),
- GetPix(491),
- GetPix(50),
- GetPix(20)),
- isBloomA,
- "HDR",
- guistyle6);
- if (!doguCombo.isClickedComboButton && !parCombo.isClickedComboButton && !bgCombo.isClickedComboButton
- && !bgmCombo.isClickedComboButton)
- {
- GUI.enabled = true;
- }
- }
- if (GUI.Toggle(new Rect(GetPix(73), GetPix(391), GetPix(40), GetPix(20)),
- isDepthS,
- "深度",
- guistyle6))
- {
- isBloomS = false;
- isDepthS = true;
- isBlurS = false;
- isFogS = false;
- }
- if (isDepthS)
- {
- isDepth = GUI.Toggle(new Rect(GetPix(8),
- GetPix(412),
- GetPix(40),
- GetPix(20)),
- isDepth,
- "有効",
- guistyle6);
- if (!isDepth)
- {
- GUI.enabled = false;
- }
- GUI.Label(new Rect(GetPix(10), GetPix(430), GetPix(100), GetPix(25)),
- "焦点距離",
- guistyle2);
- depth1 = GUI.HorizontalSlider(new Rect(GetPix(8),
- GetPix(445),
- GetPix(192),
- GetPix(20)),
- depth1,
- 0f,
- 10f);
- GUI.Label(new Rect(GetPix(10), GetPix(455), GetPix(100), GetPix(25)),
- "焦点領域サイズ",
- guistyle2);
- depth2 = GUI.HorizontalSlider(new Rect(GetPix(8),
- GetPix(470),
- GetPix(92),
- GetPix(20)),
- depth2,
- 0f,
- 2f);
- GUI.Label(new Rect(GetPix(110), GetPix(455), GetPix(100), GetPix(25)),
- "カメラ絞り",
- guistyle2);
- depth3 = GUI.HorizontalSlider(new Rect(GetPix(108),
- GetPix(470),
- GetPix(92),
- GetPix(20)),
- depth3,
- 0f,
- 60f);
- GUI.Label(new Rect(GetPix(10), GetPix(480), GetPix(100), GetPix(25)),
- "ブレ",
- guistyle2);
- depth4 = GUI.HorizontalSlider(new Rect(GetPix(8),
- GetPix(495),
- GetPix(92),
- GetPix(20)),
- depth4,
- 0f,
- 10f);
- isDepthA = GUI.Toggle(new Rect(GetPix(110),
- GetPix(491),
- GetPix(100),
- GetPix(20)),
- isDepthA,
- "深度表示",
- guistyle6);
- if (!doguCombo.isClickedComboButton && !parCombo.isClickedComboButton && !bgCombo.isClickedComboButton
- && !bgmCombo.isClickedComboButton)
- {
- GUI.enabled = true;
- }
- }
- if (GUI.Toggle(new Rect(GetPix(114), GetPix(391), GetPix(40), GetPix(20)),
- isBlurS,
- "光学",
- guistyle6))
- {
- isBloomS = false;
- isDepthS = false;
- isBlurS = true;
- isFogS = false;
- }
- if (isBlurS)
- {
- isBlur = GUI.Toggle(new Rect(GetPix(8),
- GetPix(412),
- GetPix(40),
- GetPix(20)),
- isBlur,
- "有効",
- guistyle6);
- if (!isBlur)
- {
- GUI.enabled = false;
- }
- GUI.Label(new Rect(GetPix(10), GetPix(430), GetPix(100), GetPix(25)),
- "強さ",
- guistyle2);
- blur1 = GUI.HorizontalSlider(new Rect(GetPix(8),
- GetPix(445),
- GetPix(92),
- GetPix(20)),
- blur1,
- -40f,
- 70f);
- GUI.Label(new Rect(GetPix(108), GetPix(430), GetPix(100), GetPix(25)),
- "ブラー",
- guistyle2);
- blur2 = GUI.HorizontalSlider(new Rect(GetPix(108),
- GetPix(445),
- GetPix(92),
- GetPix(20)),
- blur2,
- 0f,
- 5f);
- GUI.Label(new Rect(GetPix(10), GetPix(455), GetPix(100), GetPix(25)),
- "ブレ",
- guistyle2);
- blur3 = GUI.HorizontalSlider(new Rect(GetPix(8),
- GetPix(470),
- GetPix(92),
- GetPix(20)),
- blur3,
- 0f,
- 40f);
- GUI.Label(new Rect(GetPix(108), GetPix(455), GetPix(100), GetPix(25)),
- "色収差",
- guistyle2);
- blur4 = GUI.HorizontalSlider(new Rect(GetPix(108),
- GetPix(470),
- GetPix(92),
- GetPix(20)),
- blur4,
- -30f,
- 30f);
- if (!doguCombo.isClickedComboButton && !parCombo.isClickedComboButton && !bgCombo.isClickedComboButton
- && !bgmCombo.isClickedComboButton)
- {
- GUI.enabled = true;
- }
- }
- if (GUI.Toggle(new Rect(GetPix(155), GetPix(391), GetPix(60), GetPix(20)),
- isFogS,
- "フォグ",
- guistyle6))
- {
- isBloomS = false;
- isDepthS = false;
- isBlurS = false;
- isFogS = true;
- }
- if (isFogS)
- {
- isFog = GUI.Toggle(new Rect(GetPix(8),
- GetPix(412),
- GetPix(40),
- GetPix(20)),
- isFog,
- "有効",
- guistyle6);
- if (!isFog)
- {
- GUI.enabled = false;
- }
- GUI.Label(new Rect(GetPix(110), GetPix(406), GetPix(100), GetPix(24)),
- "発生距離",
- guistyle2);
- fog1 = GUI.HorizontalSlider(new Rect(GetPix(108),
- GetPix(420),
- GetPix(92),
- GetPix(20)),
- fog1,
- 0f,
- 30f);
- GUI.Label(new Rect(GetPix(10), GetPix(430), GetPix(100), GetPix(25)),
- "密度",
- guistyle2);
- fog2 = GUI.HorizontalSlider(new Rect(GetPix(8),
- GetPix(445),
- GetPix(92),
- GetPix(20)),
- fog2,
- 0f,
- 10f);
- GUI.Label(new Rect(GetPix(110), GetPix(430), GetPix(100), GetPix(25)),
- "強度",
- guistyle2);
- fog3 = GUI.HorizontalSlider(new Rect(GetPix(108),
- GetPix(445),
- GetPix(92),
- GetPix(20)),
- fog3,
- -5f,
- 20f);
- GUI.Label(new Rect(GetPix(10), GetPix(455), GetPix(100), GetPix(25)),
- "高さ",
- guistyle2);
- fog4 = GUI.HorizontalSlider(new Rect(GetPix(8),
- GetPix(470),
- GetPix(92),
- GetPix(20)),
- fog4,
- -10f,
- 10f);
- GUI.Label(new Rect(GetPix(110), GetPix(455), GetPix(100), GetPix(25)),
- "赤",
- guistyle2);
- fog5 = GUI.HorizontalSlider(new Rect(GetPix(108),
- GetPix(470),
- GetPix(92),
- GetPix(20)),
- fog5,
- 0f,
- 1f);
- GUI.Label(new Rect(GetPix(10), GetPix(480), GetPix(100), GetPix(25)),
- "緑",
- guistyle2);
- fog6 = GUI.HorizontalSlider(new Rect(GetPix(8),
- GetPix(495),
- GetPix(92),
- GetPix(20)),
- fog6,
- 0f,
- 1f);
- GUI.Label(new Rect(GetPix(110), GetPix(480), GetPix(100), GetPix(25)),
- "青",
- guistyle2);
- fog7 = GUI.HorizontalSlider(new Rect(GetPix(108),
- GetPix(495),
- GetPix(92),
- GetPix(20)),
- fog7,
- 0f,
- 1f);
- if (!doguCombo.isClickedComboButton && !parCombo.isClickedComboButton && !bgCombo.isClickedComboButton
- && !bgmCombo.isClickedComboButton)
- {
- GUI.enabled = true;
- }
- }
- isSepian = GUI.Toggle(new Rect(GetPix(5),
- GetPix(515),
- GetPix(80),
- GetPix(20)),
- isSepian,
- "セピア",
- guistyle6);
- GUI.Label(new Rect(GetPix(108), GetPix(512), GetPix(100), GetPix(25)),
- "ぼかし",
- guistyle2);
- bokashi = GUI.HorizontalSlider(new Rect(GetPix(108),
- GetPix(527),
- GetPix(92),
- GetPix(20)),
- bokashi,
- 0f,
- 18f);
- if (GUI.Toggle(new Rect(GetPix(5), GetPix(545), GetPix(80), GetPix(20)),
- isHairSetting,
- "髪の設定",
- guistyle6))
- {
- isHairSetting = true;
- isSkirtSetting = false;
- }
- if (isHairSetting)
- {
- bool flag3 = GUI.Toggle(new Rect(GetPix(5),
- GetPix(566),
- GetPix(40),
- GetPix(20)),
- isKamiyure,
- "有効",
- guistyle6);
- if (isKamiyure != flag3)
- {
- isKamiyure = flag3;
- if (isKamiyure)
- {
- Preferences["config"]["hair_setting"].Value = "true";
- Preferences["config"]["hair_radius"].Value = kamiyure4.ToString();
- Preferences["config"]["hair_elasticity"].Value = kamiyure3.ToString();
- Preferences["config"]["hair_damping"].Value = kamiyure2.ToString();
- SaveConfig();
- }
- else
- {
- Preferences["config"]["hair_setting"].Value = "false";
- SaveConfig();
- for (int j = 0; j < maidCnt; j++)
- {
- for (int k = 0; k < maidArray[j].body0.goSlot.Count; k++)
- {
- if (k >= 3 && k <= 6)
- {
- if (maidArray[j].body0.goSlot[k].obj != null)
- {
- DynamicBone component = maidArray[j].body0.goSlot[k].obj.GetComponent<DynamicBone>();
- if (component != null)
- {
- component.m_Damping = 0.6f;
- component.m_Elasticity = 1f;
- if (k == 5)
- {
- component.m_Elasticity = 0.05f;
- }
- component.m_Radius = 0.02f;
- component.UpdateParameters();
- }
- }
- }
- }
- }
- }
- }
- if (!isKamiyure)
- {
- GUI.enabled = false;
- }
- GUI.Label(new Rect(GetPix(108), GetPix(565), GetPix(100), GetPix(25)),
- "当たり判定半径",
- guistyle2);
- float num4 = GUI.HorizontalSlider(new Rect(GetPix(108),
- GetPix(579),
- GetPix(92),
- GetPix(20)),
- kamiyure4,
- 0f,
- 0.04f);
- if (kamiyure4 != num4)
- {
- kamiyure4 = num4;
- Preferences["config"]["hair_radius"].Value = kamiyure4.ToString();
- SaveConfig();
- }
- GUI.Label(new Rect(GetPix(108), GetPix(590), GetPix(100), GetPix(25)),
- "減衰率",
- guistyle2);
- float num5 = GUI.HorizontalSlider(new Rect(GetPix(108),
- GetPix(604),
- GetPix(92),
- GetPix(20)),
- kamiyure2,
- 0.2f,
- 1f);
- if (kamiyure2 != num5)
- {
- kamiyure2 = num5;
- Preferences["config"]["hair_damping"].Value = kamiyure2.ToString();
- SaveConfig();
- }
- GUI.Label(new Rect(GetPix(10), GetPix(590), GetPix(100), GetPix(25)),
- "復元率",
- guistyle2);
- float num6 = GUI.HorizontalSlider(new Rect(GetPix(8),
- GetPix(604),
- GetPix(92),
- GetPix(20)),
- kamiyure3,
- 0f,
- 2f);
- if (kamiyure3 != num6)
- {
- kamiyure3 = num6;
- Preferences["config"]["hair_elasticity"].Value = kamiyure3.ToString();
- SaveConfig();
- }
- GUI.enabled = true;
- }
- if (GUI.Toggle(new Rect(GetPix(105), GetPix(545), GetPix(100), GetPix(20)),
- isSkirtSetting,
- "スカート設定",
- guistyle6))
- {
- isHairSetting = false;
- isSkirtSetting = true;
- }
- if (isSkirtSetting)
- {
- bool flag4 = GUI.Toggle(new Rect(GetPix(5),
- GetPix(566),
- GetPix(40),
- GetPix(20)),
- isSkirtyure,
- "有効",
- guistyle6);
- if (isSkirtyure != flag4)
- {
- isSkirtyure = flag4;
- if (isSkirtyure)
- {
- Preferences["config"]["skirt_setting"].Value = "true";
- Preferences["config"]["skirt_radius"].Value = skirtyure4.ToString();
- Preferences["config"]["skirt_elasticity"].Value = skirtyure3.ToString();
- Preferences["config"]["skirt_damping"].Value = skirtyure2.ToString();
- SaveConfig();
- }
- else
- {
- Preferences["config"]["skirt_setting"].Value = "false";
- SaveConfig();
- for (int j = 0; j < maidCnt; j++)
- {
- for (int k = 0; k < maidArray[j].body0.goSlot.Count; k++)
- {
- if (maidArray[j].body0.goSlot[k].obj != null)
- {
- DynamicSkirtBone fieldValue =
- GetFieldValue<BoneHair3, DynamicSkirtBone>(maidArray[j].body0.goSlot[k].bonehair3,
- "m_SkirtBone");
- if (fieldValue != null)
- {
- fieldValue.m_fPanierForce = 0.05f;
- fieldValue.m_fPanierForceDistanceThreshold = 0.1f;
- fieldValue.m_fRegDefaultRadius = 0.1f;
- }
- }
- }
- }
- }
- }
- if (!isSkirtyure)
- {
- GUI.enabled = false;
- }
- GUI.Label(new Rect(GetPix(108), GetPix(565), GetPix(100), GetPix(25)),
- "足側カプセル半径",
- guistyle2);
- float num4 = GUI.HorizontalSlider(new Rect(GetPix(108),
- GetPix(579),
- GetPix(92),
- GetPix(20)),
- skirtyure4,
- 0f,
- 0.2f);
- if (skirtyure4 != num4)
- {
- skirtyure4 = num4;
- Preferences["config"]["skirt_radius"].Value = skirtyure4.ToString();
- SaveConfig();
- }
- GUI.Label(new Rect(GetPix(108), GetPix(590), GetPix(100), GetPix(25)),
- "足との距離パニエ力",
- guistyle2);
- float num5 = GUI.HorizontalSlider(new Rect(GetPix(108),
- GetPix(604),
- GetPix(92),
- GetPix(20)),
- skirtyure2,
- 0f,
- 0.2f);
- if (skirtyure2 != num5)
- {
- skirtyure2 = num5;
- Preferences["config"]["skirt_damping"].Value = skirtyure2.ToString();
- SaveConfig();
- }
- GUI.Label(new Rect(GetPix(10), GetPix(590), GetPix(100), GetPix(25)),
- "パニエ力",
- guistyle2);
- float num6 = GUI.HorizontalSlider(new Rect(GetPix(8),
- GetPix(604),
- GetPix(92),
- GetPix(20)),
- skirtyure3,
- 0f,
- 0.1f);
- if (skirtyure3 != num6)
- {
- skirtyure3 = num6;
- Preferences["config"]["skirt_elasticity"].Value = skirtyure3.ToString();
- SaveConfig();
- }
- GUI.enabled = true;
- }
- GUI.enabled = true;
- GUI.DrawTexture(new Rect(GetPix(5), GetPix(389), GetPix(195), 2f), line1);
- GUI.DrawTexture(new Rect(GetPix(5), GetPix(389), GetPix(195), 1f), line2);
- if (doguCombo.isClickedComboButton || parCombo.isClickedComboButton || bgCombo.isClickedComboButton
- || bgmCombo.isClickedComboButton)
- {
- GUI.enabled = false;
- }
- GUI.DrawTexture(new Rect(GetPix(5), GetPix(176), GetPix(195), 2f), line1);
- GUI.DrawTexture(new Rect(GetPix(5), GetPix(176), GetPix(195), 1f), line2);
- GUI.Label(new Rect(GetPix(8), GetPix(187), GetPix(100), GetPix(25)),
- "照明",
- guistyle2);
- listStyle3.padding.top = GetPix(3);
- listStyle3.padding.bottom = GetPix(2);
- listStyle3.fontSize = GetPix(13);
- int num7 = lightCombo.List(new Rect(GetPix(34),
- GetPix(185),
- GetPix(78),
- GetPix(23)),
- lightComboList[selectLightIndex].text,
- lightComboList,
- guistyle4,
- "box",
- listStyle3);
- if (num7 != selectLightIndex)
- {
- selectLightIndex = num7;
- isIdx1 = false;
- isIdx2 = false;
- isIdx3 = false;
- isIdx4 = false;
- }
- if (GUI.Button(new Rect(GetPix(115), GetPix(185), GetPix(35), GetPix(23)),
- "追加",
- guistyle3))
- {
- GameObject gameObject = new GameObject("Light");
- gameObject.AddComponent<Light>();
- lightList.Add(gameObject);
- lightColorR.Add(1f);
- lightColorG.Add(1f);
- lightColorB.Add(1f);
- lightIndex.Add(0);
- lightX.Add(40f);
- lightY.Add(180f);
- lightAkarusa.Add(0.95f);
- lightKage.Add(0.098f);
- lightRange.Add(50f);
- gameObject.transform.position = GameMain.Instance.MainLight.transform.position;
- selectLightIndex = lightList.Count - 1;
- lightComboList = new GUIContent[lightList.Count];
- for (int i = 0; i < lightList.Count; i++)
- {
- if (i == 0)
- {
- lightComboList[i] = new GUIContent("メイン");
- }
- else
- {
- lightComboList[i] = new GUIContent("追加" + i);
- }
- }
- lightCombo.selectedItemIndex = selectLightIndex;
- gameObject.GetComponent<Light>().intensity = 0.95f;
- gameObject.GetComponent<Light>().spotAngle = 50f;
- gameObject.GetComponent<Light>().range = 10f;
- gameObject.GetComponent<Light>().type = LightType.Directional;
- gameObject.GetComponent<Light>().color = new Color(0.5f, 1f, 0f);
- if (gLight[selectLightIndex] == null)
- {
- gLight[selectLightIndex] = GameObject.CreatePrimitive(PrimitiveType.Cube);
- Material material = new Material(Shader.Find("Transparent/Diffuse"))
- {
- color = new Color(0.5f, 0.5f, 1f, 0.8f)
- };
- gLight[selectLightIndex].GetComponent<Renderer>().material = material;
- gLight[selectLightIndex].layer = 8;
- gLight[selectLightIndex].GetComponent<Renderer>().enabled = false;
- gLight[selectLightIndex].SetActive(false);
- gLight[selectLightIndex].transform.position = gameObject.transform.position;
- mLight[selectLightIndex] = gLight[selectLightIndex].AddComponent<MouseDrag6>();
- mLight[selectLightIndex].obj = gLight[selectLightIndex];
- mLight[selectLightIndex].maid = gameObject.gameObject;
- mLight[selectLightIndex].angles = gameObject.gameObject.transform.eulerAngles;
- gLight[selectLightIndex].transform.localScale = new Vector3(0.12f, 0.12f, 0.12f);
- mLight[selectLightIndex].ido = 1;
- mLight[selectLightIndex].isScale = false;
- }
- }
- if (GUI.Button(new Rect(GetPix(153), GetPix(185), GetPix(23), GetPix(23)),
- "R",
- guistyle3))
- {
- for (int i = 1; i < lightList.Count; i++)
- {
- Destroy(lightList[i]);
- }
- lightIndex = new List<int>
- {
- 0
- };
- lightColorR = new List<float>
- {
- 1f
- };
- lightColorG = new List<float>
- {
- 1f
- };
- lightColorB = new List<float>
- {
- 1f
- };
- lightX = new List<float>
- {
- 40f
- };
- lightY = new List<float>
- {
- 180f
- };
- lightAkarusa = new List<float>
- {
- 0.95f
- };
- lightKage = new List<float>
- {
- 0.098f
- };
- lightRange = new List<float>
- {
- 50f
- };
- lightCombo.selectedItemIndex = 0;
- lightList = new List<GameObject>
- {
- GameMain.Instance.MainLight.gameObject
- };
- lightComboList = new GUIContent[lightList.Count];
- for (int i = 0; i < lightList.Count; i++)
- {
- if (i == 0)
- {
- lightComboList[i] = new GUIContent("メイン");
- }
- else
- {
- lightComboList[i] = new GUIContent("追加" + i);
- }
- }
- selectLightIndex = 0;
- GameMain.Instance.MainLight.Reset();
- GameMain.Instance.MainLight.SetIntensity(0.95f);
- GameMain.Instance.MainLight.GetComponent<Light>().spotAngle = 50f;
- GameMain.Instance.MainLight.GetComponent<Light>().range = 10f;
- GameMain.Instance.MainLight.gameObject.transform.position = new Vector3(0f, 2f, 0f);
- GameMain.Instance.MainLight.GetComponent<Light>().type = LightType.Directional;
- bgObject.SetActive(true);
- mainCamera.GetComponent<Camera>().backgroundColor = new Color(0f, 0f, 0f);
- isIdx1 = false;
- isIdx2 = false;
- isIdx3 = false;
- isIdx4 = false;
- }
- GUI.enabled = true;
- if (doguCombo.isClickedComboButton || bgCombo.isClickedComboButton || bgmCombo.isClickedComboButton)
- {
- GUI.enabled = false;
- }
- listStyle3.padding.top = GetPix(0);
- listStyle3.padding.bottom = GetPix(0);
- listStyle3.fontSize = GetPix(12);
- GUI.Label(new Rect(GetPix(8), GetPix(116), GetPix(150), GetPix(25)),
- "大道具2",
- guistyle2);
- parIndex = parCombo.List(new Rect(GetPix(51),
- GetPix(113),
- GetPix(100),
- GetPix(23)),
- parComboList[parIndex].text,
- parComboList,
- guistyle4,
- "box",
- listStyle3);
- if (GUI.Button(new Rect(GetPix(156), GetPix(113), GetPix(38), GetPix(23)),
- "追加",
- guistyle3))
- {
- GameObject gameObject2 = null;
- bool flag5 = false;
- bool flag6 = false;
- if (parArray[parIndex].Contains("#"))
- {
- string[] array3 = parArray[parIndex].Split(new char[] { '#' });
- gameObject2 = GameMain.Instance.BgMgr.CreateAssetBundle(array3[1]);
- if (gameObject2 != null)
- {
- gameObject2 = Instantiate(gameObject2);
- MeshRenderer[] componentsInChildren = gameObject2.GetComponentsInChildren<MeshRenderer>();
- for (int k = 0; k < componentsInChildren.Length; k++)
- {
- if (componentsInChildren[k] != null)
- {
- componentsInChildren[k].shadowCastingMode = ShadowCastingMode.Off;
- }
- }
- }
- flag5 = true;
- if (!parArray[parIndex].Contains("Odogu_"))
- {
- flag6 = true;
- }
- doguBObject.Add(gameObject2);
- }
- else if (!parArray[parIndex].StartsWith("mirror") && parArray[parIndex].IndexOf(":") < 0)
- {
- Object @object = Resources.Load("Prefab/" + parArray[parIndex]);
- gameObject2 = Instantiate(@object) as GameObject;
- doguBObject.Add(gameObject2);
- }
- else if (parArray[parIndex].StartsWith("mirror"))
- {
- Material material2 = new Material(Shader.Find("Mirror"));
- GameObject gameObject3 = GameObject.CreatePrimitive(PrimitiveType.Plane);
- gameObject3.GetComponent<Renderer>().material = material2;
- gameObject3.AddComponent<MirrorReflection2>();
- MirrorReflection2 component2 = gameObject3.GetComponent<MirrorReflection2>();
- component2.m_TextureSize = 2048;
- component2.m_ClipPlaneOffset = 0.07f;
- gameObject3.GetComponent<Renderer>().enabled = true;
- gameObject2 = gameObject3;
- doguBObject.Add(gameObject2);
- }
- else
- {
- string[] array3 = parArray[parIndex].Split(new char[] { ':' });
- Object @object = GameMain.Instance.BgMgr.CreateAssetBundle(array3[0]);
- if (@object == null)
- {
- @object = Resources.Load("BG/" + array3[0]);
- }
- GameObject gameObject4 = Instantiate(@object) as GameObject;
- int num8 = 0;
- int.TryParse(array3[1], out int num9);
- foreach (object obj in gameObject4.transform)
- {
- Transform transform = (Transform)obj;
- if (num9 == num8)
- {
- gameObject2 = transform.gameObject;
- break;
- }
- num8++;
- }
- doguBObject.Add(gameObject2);
- gameObject2.transform.parent = null;
- Destroy(gameObject4);
- gameObject4.SetActive(false);
- }
- gameObject2.name = parArray[parIndex];
- Vector3 zero = Vector3.zero;
- Vector3 zero2 = Vector3.zero;
- switch (parIndex)
- {
- case 0:
- zero.z = -0.6f;
- zero.y = 0.96f;
- zero2.z = 180f;
- zero2.x = -90f;
- gameObject2.transform.localScale = new Vector3(0.2f, 0.4f, 0.2f);
- break;
- case 1:
- zero.z = -0.6f;
- zero.y = 0.96f;
- zero2.z = 180f;
- zero2.x = -90f;
- gameObject2.transform.localScale = new Vector3(0.1f, 0.4f, 0.2f);
- break;
- case 2:
- zero.z = -0.6f;
- zero.y = 0.85f;
- zero2.z = 180f;
- zero2.x = -90f;
- gameObject2.transform.localScale = new Vector3(0.03f, 0.18f, 0.124f);
- break;
- case 3:
- case 4:
- case 5:
- case 6:
- case 7:
- case 8:
- case 9:
- case 10:
- case 11:
- case 12:
- case 13:
- case 14:
- case 15:
- case 16:
- case 17:
- zero.z = 0.5f;
- zero2.x = -90f;
- break;
- }
- if (flag5)
- {
- zero.z = 0.4f;
- if (flag6)
- {
- zero2.x = -90f;
- }
- }
- if (gameObject2.name == "Salon_Entrance:3" || gameObject2.name == "Salon_Entrance:4"
- || gameObject2.name == "Salon_Entrance:1"
- || gameObject2.name == "Salon_Entrance:2"
- || gameObject2.name == "Salon_Entrance:0" || gameObject2.name == "Shitsumu:23"
- || gameObject2.name == "Shitsumu_Night:23")
- {
- zero.z = 0.5f;
- zero2.x = -90f;
- }
- if (gameObject2.name == "Pool:26")
- {
- zero.z = 0.5f;
- zero2.x = -90f;
- zero2.z = 90f;
- zero.y = 0.15f;
- }
- if (gameObject2.name == "Particle/pstarY_act2")
- {
- zero2.y = 90f;
- }
- gameObject2.transform.localPosition = zero;
- gameObject2.transform.localRotation = Quaternion.Euler(zero2);
- doguCnt = doguBObject.Count - 1;
- gDogu[doguCnt] = GameObject.CreatePrimitive(PrimitiveType.Cube);
- gDogu[doguCnt].GetComponent<Renderer>().material = m_material;
- gDogu[doguCnt].layer = 8;
- gDogu[doguCnt].GetComponent<Renderer>().enabled = false;
- gDogu[doguCnt].SetActive(false);
- gDogu[doguCnt].transform.position = gameObject2.transform.position;
- mDogu[doguCnt] = gDogu[doguCnt].AddComponent<MouseDrag6>();
- mDogu[doguCnt].obj = gDogu[doguCnt];
- mDogu[doguCnt].maid = gameObject2;
- mDogu[doguCnt].angles = gameObject2.transform.eulerAngles;
- gDogu[doguCnt].transform.localScale = new Vector3(cubeSize, cubeSize, cubeSize);
- mDogu[doguCnt].ido = 1;
- mDogu[doguCnt].isScale = false;
- if (gameObject2.name == "Particle/pLineY")
- {
- mDogu[doguCnt].count = 180;
- gameObject2.transform.localScale = new Vector3(3f, 3f, 3f);
- }
- if (gameObject2.name == "Particle/pLineP02")
- {
- mDogu[doguCnt].count = 115;
- gameObject2.transform.localScale = new Vector3(3f, 3f, 3f);
- }
- if (gameObject2.name == "Particle/pLine_act2")
- {
- mDogu[doguCnt].count = 90;
- gameObject2.transform.localScale = new Vector3(3f, 3f, 3f);
- }
- if (gameObject2.name == "Particle/pHeart01")
- {
- mDogu[doguCnt].count = 77;
- }
- if (parIndex < 3)
- {
- mDogu[doguCnt].isScale = true;
- mDogu[doguCnt].isScale2 = true;
- mDogu[doguCnt].scale2 = gameObject2.transform.localScale;
- if (parIndex == 0)
- {
- mDogu[doguCnt].scale = new Vector3(gameObject2.transform.localScale.x * 5f,
- gameObject2.transform.localScale.y * 5f,
- gameObject2.transform.localScale.z * 5f);
- }
- if (parIndex == 1)
- {
- mDogu[doguCnt].scale = new Vector3(gameObject2.transform.localScale.x * 10f,
- gameObject2.transform.localScale.y * 10f,
- gameObject2.transform.localScale.z * 10f);
- }
- if (parIndex == 2)
- {
- mDogu[doguCnt].scale = new Vector3(gameObject2.transform.localScale.x * 33f,
- gameObject2.transform.localScale.y * 33f,
- gameObject2.transform.localScale.z * 33f);
- }
- }
- if (gameObject2.GetComponent<Collider>() != null)
- {
- gameObject2.GetComponent<Collider>().enabled = false;
- }
- }
- GUI.enabled = true;
- if (bgCombo.isClickedComboButton || bgmCombo.isClickedComboButton)
- {
- GUI.enabled = false;
- }
- GUI.Label(new Rect(GetPix(8), GetPix(88), GetPix(100), GetPix(25)),
- "大道具1",
- guistyle2);
- doguBIndex =
- doguCombo.List(new Rect(GetPix(51),
- GetPix(85),
- GetPix(100),
- GetPix(23)),
- doguComboList[doguBIndex].text,
- doguComboList,
- guistyle4,
- "box",
- listStyle3);
- if (GUI.Button(new Rect(GetPix(156), GetPix(85), GetPix(38), GetPix(23)),
- "追加",
- guistyle3))
- {
- GameObject gameObject2 = null;
- if (doguDict.TryGetValue(doguBArray[doguBIndex], out PhotoBGObjectData objResult))
- {
- if (!string.IsNullOrEmpty(objResult.create_prefab_name))
- {
- Object tmpObj = Resources.Load("Prefab/" + objResult.create_prefab_name);
- if (tmpObj == null)
- {
- gameObject2 = null;
- }
- else
- {
- gameObject2 = Instantiate(tmpObj) as GameObject;
- }
- }
- else if (!string.IsNullOrEmpty(objResult.create_asset_bundle_name))
- {
- GameObject gameObject3 = GameMain.Instance.BgMgr.CreateAssetBundle(objResult.create_asset_bundle_name);
- if (gameObject3 == null)
- {
- gameObject2 = null;
- }
- else
- {
- gameObject2 = Instantiate(gameObject3);
- }
- }
- else if (!string.IsNullOrEmpty(objResult.direct_file))
- {
- BasePhotoCustomObject basePhotoCustomObject =
- BasePhotoCustomObject.InstantiateFromFile(transform.gameObject, objResult.direct_file);
- gameObject2 = basePhotoCustomObject.gameObject;
- }
- if (gameObject2 != null)
- {
- doguBObject.Add(gameObject2);
- }
- }
- else if (!doguBArray[doguBIndex].StartsWith("mirror"))
- {
- Object @object;
- if (doguBArray[doguBIndex].StartsWith("BG"))
- {
- string text2 = doguBArray[doguBIndex].Replace("BG", "");
- @object = GameMain.Instance.BgMgr.CreateAssetBundle(text2);
- if (@object == null)
- {
- @object = Resources.Load("BG/" + text2);
- }
- }
- else
- {
- @object = Resources.Load("Prefab/" + doguBArray[doguBIndex]);
- }
- gameObject2 = Instantiate(@object) as GameObject;
- doguBObject.Add(gameObject2);
- }
- else
- {
- Material material2 = new Material(Shader.Find("Mirror"));
- GameObject gameObject3 = GameObject.CreatePrimitive(PrimitiveType.Plane);
- gameObject3.transform.localScale = new Vector3(0.3f, 1f, 0.3f);
- gameObject3.GetComponent<Renderer>().material = material2;
- gameObject3.AddComponent<MirrorReflection2>();
- MirrorReflection2 component2 = gameObject3.GetComponent<MirrorReflection2>();
- component2.m_TextureSize = 2048;
- component2.m_ClipPlaneOffset = 0f;
- gameObject3.GetComponent<Renderer>().enabled = true;
- gameObject2 = gameObject3;
- doguBObject.Add(gameObject2);
- }
- gameObject2.name = doguBArray[doguBIndex];
- Vector3 zero = Vector3.zero;
- Vector3 zero2 = Vector3.zero;
- string text = gameObject2.name;
- switch (text)
- {
- case "Odogu_XmasTreeMini_photo_ver":
- zero.z = 0.6f;
- gameObject2.transform.localScale = new Vector3(4.5f, 4.5f, 4.5f);
- foreach (object obj2 in gameObject2.transform)
- {
- Transform transform2 = (Transform)obj2;
- if (transform2.GetComponent<Collider>() != null)
- {
- transform2.GetComponent<Collider>().enabled = false;
- }
- }
- goto IL_A0BF;
- case "Odogu_KadomatsuMini_photo_ver":
- zero.z = 0.6f;
- gameObject2.transform.localScale = new Vector3(3.5f, 3.5f, 3.5f);
- foreach (object obj3 in gameObject2.transform)
- {
- Transform transform2 = (Transform)obj3;
- if (transform2.GetComponent<Collider>() != null)
- {
- transform2.GetComponent<Collider>().enabled = false;
- }
- }
- goto IL_A0BF;
- case "Odogu_ClassRoomDesk":
- zero.z = 0.5f;
- zero2.x = -90f;
- goto IL_A0BF;
- case "Odogu_SimpleTable":
- zero.z = 0.5f;
- zero2.x = -90f;
- goto IL_A0BF;
- case "Odogu_DildoBox":
- zero.z = 0.5f;
- zero2.x = -90f;
- goto IL_A0BF;
- case "PlayAreaOut":
- zero.z = 0.5f;
- zero.y = 0.2f;
- goto IL_A0BF;
- case "Odogu_Dresser_photo_ver":
- GameObject.Find("Prim.00000000").GetComponent<Collider>().enabled = false;
- GameObject.Find("Prim.00000001").GetComponent<Collider>().enabled = false;
- GameObject.Find("Prim.00000002").GetComponent<Collider>().enabled = false;
- GameObject.Find("Prim.00000004").GetComponent<Collider>().enabled = false;
- goto IL_A0BF;
- case "BGodogu_bbqgrill":
- case "BGodogu_bucket":
- case "BGodogu_coolerbox":
- case "BGodogu_game_darts":
- case "BGodogu_game_dartsboard":
- case "BGodogu_nabe_huta":
- case "BGodogu_nabe_water":
- case "BGodogu_natumikan":
- case "BGodogu_rb_chair":
- case "BGodogu_rb_duck":
- case "BGodogu_rb_obon":
- case "BGodogu_rb_tokkuri":
- case "BGodogu_saracorn":
- case "BGodogu_saraimo":
- case "BGodogu_saratomato":
- case "BGodogu_sunanoshiro":
- case "BGodogu_sunanoyama":
- case "BGodogu_tsutsuhanabi":
- case "BGodogu_ukiwa":
- case "BGodogu_vf_crops_corn":
- case "BGodogu_vf_crops_gekkabijin":
- case "BGodogu_vf_crops_gekkabijinflower":
- case "BGodogu_vf_crops_himawari":
- case "BGodogu_vf_crops_natsumikan":
- case "BGodogu_vf_crops_suika":
- case "BGodogu_vf_crops_zakuro":
- case "BGodogu_villa_table":
- case "BGodogu_villa_tvrimocon":
- case "BGodogu_villabr_sideboard":
- case "BGOdogu_Game_Nei_USB":
- case "BGOdogu_Game_Wanage":
- case "BGOdogu_Game_Wa":
- case "BGodogu_pafe":
- case "BGodogu_furaidopoteto":
- case "BGodogu_karaoketable":
- case "BGodogu_omuriceh":
- case "BGodogu_omuricekao1":
- case "BGodogu_omuricekao2":
- case "BGodogu_omuriceoppai":
- case "BGodogu_kakigori":
- case "BGodogu_pretzel_sara":
- case "BGodogu_karaoke_box":
- case "Odogu_StandMike":
- case "Odogu_StandMikeBase":
- case "Odogu_HeroineChair_muku":
- case "Odogu_HeroineChair_mazime":
- case "Odogu_HeroineChair_rindere":
- case "Odogu_HeroineChair_tsumdere":
- case "Odogu_HeroineChair_cooldere":
- case "Odogu_HeroineChair_junshin":
- case "Odogu_TabletPC":
- case "Odogu_Styluspen_black":
- case "Odogu_Styluspen_white":
- case "Odogu_Styluspen_red":
- case "Odogu_Styluspen_blue":
- case "Odogu_Styluspen_yellow":
- case "Odogu_Styluspen_green":
- case "Odogu_Omurice1":
- case "Odogu_Omurice3":
- case "Odogu_OmuriceH":
- case "Odogu_OmuriceKao1":
- case "Odogu_OmuriceKao2":
- case "Odogu_OmuriceOppai":
- case "Odogu_AcquaPazza":
- case "Odogu_Sandwich":
- case "Odogu_vichyssoise":
- case "Odogu_BirthdayCake":
- case "Odogu_Shortcake":
- case "Odogu_MontBlanc":
- case "Odogu_Pafe":
- case "Odogu_Smoothie_Red":
- case "Odogu_Smoothie_Green":
- case "Odogu_Cocktail_Red":
- case "Odogu_Cocktail_Blue":
- case "Odogu_Cocktail_Yellow":
- case "Odogu_Coffiecup":
- case "Odogu_WineBottle(cap_off)":
- case "Odogu_WineBottle(cap_on)":
- case "Odogu_Jyouro":
- case "Odogu_Planter_Red":
- case "Odogu_Planter_Lightblue":
- case "Odogu_MariGold":
- case "Odogu_CasinoChip_10":
- case "Odogu_CasinoChip_100":
- case "Odogu_CasinoChip_1000":
- case "Odogu_CardShooter":
- case "Odogu_CardsDeck":
- case "Odogu_Card_s1":
- case "Odogu_Card_s2":
- case "Odogu_Card_s3":
- case "Odogu_Card_s4":
- case "Odogu_Card_s5":
- case "Odogu_Card_s6":
- case "Odogu_Card_s7":
- case "Odogu_Card_s8":
- case "Odogu_Card_s9":
- case "Odogu_Card_s10":
- case "Odogu_Card_s11":
- case "Odogu_Card_s12":
- case "Odogu_Card_s13":
- case "Odogu_Card_h1":
- case "Odogu_Card_h2":
- case "Odogu_Card_h3":
- case "Odogu_Card_h4":
- case "Odogu_Card_h5":
- case "Odogu_Card_h6":
- case "Odogu_Card_h7":
- case "Odogu_Card_h8":
- case "Odogu_Card_h9":
- case "Odogu_Card_h10":
- case "Odogu_Card_h11":
- case "Odogu_Card_h12":
- case "Odogu_Card_h13":
- case "Odogu_Card_d1":
- case "Odogu_Card_d2":
- case "Odogu_Card_d3":
- case "Odogu_Card_d4":
- case "Odogu_Card_d5":
- case "Odogu_Card_d6":
- case "Odogu_Card_d7":
- case "Odogu_Card_d8":
- case "Odogu_Card_d9":
- case "Odogu_Card_d10":
- case "Odogu_Card_d11":
- case "Odogu_Card_d12":
- case "Odogu_Card_d13":
- case "Odogu_Card_c1":
- case "Odogu_Card_c2":
- case "Odogu_Card_c3":
- case "Odogu_Card_c4":
- case "Odogu_Card_c5":
- case "Odogu_Card_c6":
- case "Odogu_Card_c7":
- case "Odogu_Card_c8":
- case "Odogu_Card_c9":
- case "Odogu_Card_c10":
- case "Odogu_Card_c11":
- case "Odogu_Card_c12":
- case "Odogu_Card_c13":
- case "Odogu_Card_joker":
- zero.z = 0.5f;
- zero2.x = -90f;
- goto IL_A0BF;
- }
- zero.z = 0.5f;
- if (gameObject2.name.StartsWith("Odogu_"))
- {
- foreach (object obj4 in gameObject2.transform)
- {
- Transform transform2 = (Transform)obj4;
- if (transform2.GetComponent<Collider>() != null)
- {
- transform2.GetComponent<Collider>().enabled = false;
- }
- }
- }
- else if (gameObject2.GetComponent<Collider>() != null)
- {
- gameObject2.GetComponent<Collider>().enabled = false;
- }
- IL_A0BF:
- gameObject2.transform.localPosition = zero;
- gameObject2.transform.localRotation = Quaternion.Euler(zero2);
- doguCnt = doguBObject.Count - 1;
- gDogu[doguCnt] = GameObject.CreatePrimitive(PrimitiveType.Cube);
- gDogu[doguCnt].GetComponent<Renderer>().material = m_material;
- gDogu[doguCnt].layer = 8;
- gDogu[doguCnt].GetComponent<Renderer>().enabled = false;
- gDogu[doguCnt].SetActive(false);
- gDogu[doguCnt].transform.position = gameObject2.transform.position;
- mDogu[doguCnt] = gDogu[doguCnt].AddComponent<MouseDrag6>();
- mDogu[doguCnt].isScale = false;
- mDogu[doguCnt].obj = gDogu[doguCnt];
- mDogu[doguCnt].maid = gameObject2;
- mDogu[doguCnt].angles = gameObject2.transform.eulerAngles;
- gDogu[doguCnt].transform.localScale = new Vector3(cubeSize, cubeSize, cubeSize);
- mDogu[doguCnt].ido = 1;
- if (doguBIndex == 6 || doguBIndex == 7)
- {
- mDogu[doguCnt].isScale2 = true;
- mDogu[doguCnt].scale2 = gameObject2.transform.localScale;
- }
- }
- GUI.enabled = true;
- if (bgmCombo.isClickedComboButton)
- {
- GUI.enabled = false;
- }
- listStyle3.padding.top = GetPix(1);
- listStyle3.padding.bottom = GetPix(0);
- listStyle3.fontSize = GetPix(12);
- int num10 = bgCombo.List(new Rect(GetPix(31),
- GetPix(53),
- GetPix(95),
- GetPix(23)),
- bgComboList[bgIndex].text,
- bgComboList,
- guistyle4,
- "box",
- listStyle3);
- if (GUI.Button(new Rect(GetPix(5), GetPix(53), GetPix(23), GetPix(23)),
- "<",
- guistyle3))
- {
- num10--;
- if (num10 <= -1)
- {
- num10 = bgArray.Length - 1;
- }
- }
- if (GUI.Button(new Rect(GetPix(129), GetPix(53), GetPix(23), GetPix(23)),
- ">",
- guistyle3))
- {
- num10++;
- if (num10 == bgArray.Length)
- {
- num10 = 0;
- }
- }
- if (bgIndex != num10)
- {
- bgIndex = num10;
- bg.localScale = new Vector3(1f, 1f, 1f);
- if (bgArray[bgIndex].Length == 36)
- {
- GameMain.Instance.BgMgr.ChangeBgMyRoom(bgArray[bgIndex]);
- }
- else
- {
- GameMain.Instance.BgMgr.ChangeBg(bgArray[bgIndex]);
- }
- bgCombo.selectedItemIndex = bgIndex;
- if (bgArray[bgIndex] == "karaokeroom")
- {
- bg.transform.position = bgObject.transform.position;
- Vector3 zero = Vector3.zero;
- Vector3 zero2 = Vector3.zero;
- zero2.y = 90f;
- zero.z = 4f;
- zero.x = 1f;
- bg.transform.localPosition = zero;
- bg.transform.localRotation = Quaternion.Euler(zero2);
- }
- }
- GUI.enabled = true;
- int num11 = bgmCombo.List(new Rect(GetPix(31),
- GetPix(25),
- GetPix(95),
- GetPix(23)),
- bgmComboList[bgmIndex].text,
- bgmComboList,
- guistyle4,
- "box",
- listStyle3);
- if (GUI.Button(new Rect(GetPix(5), GetPix(25), GetPix(23), GetPix(23)),
- "<",
- guistyle3))
- {
- num11--;
- if (num11 <= -1)
- {
- num11 = bgmArray.Length - 1;
- }
- }
- if (GUI.Button(new Rect(GetPix(129), GetPix(25), GetPix(23), GetPix(23)),
- ">",
- guistyle3))
- {
- num11++;
- if (num11 == bgmArray.Length)
- {
- num11 = 0;
- }
- }
- if (bgmIndex != num11)
- {
- bgmIndex = num11;
- GameMain.Instance.SoundMgr.PlayBGM(bgmArray[bgmIndex] + ".ogg", 0f, true);
- bgmCombo.selectedItemIndex = bgmIndex;
- }
- GUI.DragWindow();
- if (bgmCombo.isClickedComboButton)
- {
- GUI.enabled = false;
- }
- }
- private void PoseWindow(int winID)
- {
- GUIStyle style1 = "label";
- style1.fontSize = GetPix(12);
- style1.alignment = TextAnchor.UpperLeft;
- GUIStyle style2 = "label";
- style2.fontSize = GetPix(11);
- style2.alignment = TextAnchor.UpperLeft;
- GUIStyle style3 = "button";
- style3.fontSize = GetPix(20);
- GUIStyle buttonStyle1 = "button";
- buttonStyle1.fontSize = GetPix(14);
- buttonStyle1.alignment = TextAnchor.MiddleLeft;
- GUIStyle buttonStyle2 = "button";
- buttonStyle2.fontSize = GetPix(12);
- buttonStyle2.alignment = TextAnchor.MiddleLeft;
- GUIStyle style4 = new GUIStyle("toggle")
- {
- fontSize = GetPix(13)
- };
- CharacterMgr characterMgr = GameMain.Instance.CharacterMgr;
- Maid maid = maidArray[selectMaidIndex];
- if (!poseInitFlg)
- {
- listStyle2.normal.textColor = Color.white;
- listStyle2.normal.background = MakeTex(2, 2, new Color(0.0f, 0.0f, 0.0f, 0.5f));
- listStyle2.onHover.background = listStyle2.hover.background = new Texture2D(2, 2);
- listStyle2.padding.left = listStyle2.padding.right = listStyle2.padding.top = listStyle2.padding.bottom = GetPix(0);
- listStyle2.fontSize = GetPix(12);
- listStyle3.normal.textColor = Color.white;
- listStyle3.normal.background = MakeTex(2, 2, new Color(0.0f, 0.0f, 0.0f, 0.5f));
- listStyle3.onHover.background = listStyle3.hover.background = new Texture2D(2, 2);
- listStyle3.padding.left = listStyle3.padding.right = listStyle3.padding.top = GetPix(1);
- listStyle3.padding.bottom = GetPix(0);
- listStyle3.fontSize = GetPix(12);
- listStyle4.normal.textColor = Color.white;
- listStyle4.normal.background = MakeTex(2, 2, new Color(0.0f, 0.0f, 0.0f, 0.5f));
- listStyle4.onHover.background = listStyle4.hover.background = new Texture2D(2, 2);
- listStyle4.padding.left = listStyle4.padding.right = listStyle4.padding.top = 3;
- listStyle4.padding.bottom = 3;
- listStyle4.fontSize = GetPix(13);
- poseCombo.selectedItemIndex = 0;
- int group = (int)groupList[0];
- poseComboList = new GUIContent[group];
- for (int index = 0; index < group; ++index)
- {
- poseComboList[index] = new GUIContent((index + 1).ToString() + ":" + poseArray[index]);
- }
- poseGroupCombo.selectedItemIndex = 0;
- poseGroupComboList = new GUIContent[poseGroupArray.Length + 1];
- poseGroupComboList[0] = new GUIContent("1:通常");
- for (int index = 0; index < poseGroupArray.Length; ++index)
- {
- if (poseGroupArray[index] == "maid_dressroom01")
- {
- poseGroupComboList[index + 1] = new GUIContent((index + 2).ToString() + ":立ち");
- }
- if (poseGroupArray[index] == "tennis_kamae_f")
- {
- poseGroupComboList[index + 1] = new GUIContent((index + 2).ToString() + ":中腰");
- }
- if (poseGroupArray[index] == "senakanagasi_f")
- {
- poseGroupComboList[index + 1] = new GUIContent((index + 2).ToString() + ":膝をつく");
- }
- if (poseGroupArray[index] == "work_hansei")
- {
- poseGroupComboList[index + 1] = new GUIContent((index + 2).ToString() + ":座り");
- }
- if (poseGroupArray[index] == "inu_taiki_f")
- {
- poseGroupComboList[index + 1] = new GUIContent((index + 2).ToString() + ":四つん這い");
- }
- if (poseGroupArray[index] == "syagami_pose_f")
- {
- poseGroupComboList[index + 1] = new GUIContent((index + 2).ToString() + ":床座り");
- }
- if (poseGroupArray[index] == "densyasuwari_taiki_f")
- {
- poseGroupComboList[index + 1] = new GUIContent((index + 2).ToString() + ":椅子座り");
- }
- if (poseGroupArray[index] == "work_kaiwa")
- {
- poseGroupComboList[index + 1] = new GUIContent((index + 2).ToString() + ":ソファー座り");
- }
- if (poseGroupArray[index] == "dance_cm3d2_001_f1,14.14")
- {
- poseGroupComboList[index + 1] = new GUIContent((index + 2).ToString() + ":ドキドキ☆Fallin' Love");
- }
- if (poseGroupArray[index] == "dance_cm3d_001_f1,39.25")
- {
- poseGroupComboList[index + 1] = new GUIContent((index + 2).ToString() + ":entrance to you");
- }
- if (poseGroupArray[index] == "dance_cm3d_002_end_f1,50.71")
- {
- poseGroupComboList[index + 1] = new GUIContent((index + 2).ToString() + ":scarlet leap");
- }
- if (poseGroupArray[index] == "dance_cm3d2_002_smt_f,7.76,")
- {
- poseGroupComboList[index + 1] = new GUIContent((index + 2).ToString() + ":stellar my tears");
- }
- if (poseGroupArray[index] == "dance_cm3d_003_sp2_f1,90.15")
- {
- poseGroupComboList[index + 1] = new GUIContent((index + 2).ToString() + ":rhythmix to you");
- }
- if (poseGroupArray[index] == "dance_cm3d2_003_hs_f1,0.01,")
- {
- poseGroupComboList[index + 1] = new GUIContent((index + 2).ToString() + ":happy!happy!スキャンダル!!");
- }
- if (poseGroupArray[index] == "dance_cm3d_004_kano_f1,124.93")
- {
- poseGroupComboList[index + 1] = new GUIContent((index + 2).ToString() + ":Can Know Two Close");
- }
- if (poseGroupArray[index] == "dance_cm3d2_004_sse_f1,0.01")
- {
- poseGroupComboList[index + 1] = new GUIContent((index + 2).ToString() + ":sweet sweet everyday");
- }
- if (poseGroupArray[index] == "turusi_sex_in_taiki_f")
- {
- poseGroupComboList[index + 1] = new GUIContent((index + 2).ToString() + ":拘束");
- }
- if (poseGroupArray[index] == "rosyutu_pose01_f")
- {
- poseGroupComboList[index + 1] = new GUIContent((index + 2).ToString() + ":エロ");
- }
- if (poseGroupArray[index] == "rosyutu_aruki_f_once_,1.37")
- {
- poseGroupComboList[index + 1] = new GUIContent((index + 2).ToString() + ":歩き");
- }
- if (poseGroupArray[index] == "stand_desk1")
- {
- poseGroupComboList[index + 1] = new GUIContent((index + 2).ToString() + ":その他");
- }
- if (poseGroupArray[index] == poseArray5[0])
- {
- poseGroupComboList[index + 1] = new GUIContent((index + 2).ToString() + ":ダンスMC");
- }
- if (poseGroupArray[index] == poseArray6[0])
- {
- poseGroupComboList[index + 1] = new GUIContent((index + 2).ToString() + ":ダンス");
- }
- if (existPose && strS != "")
- {
- if (index == poseGroupArray.Length - 4)
- {
- poseGroupComboList[index + 1] = new GUIContent((index + 2).ToString() + ":通常2");
- }
- if (index == poseGroupArray.Length - 3)
- {
- poseGroupComboList[index + 1] = new GUIContent((index + 2).ToString() + ":エロ2");
- }
- if (index == poseGroupArray.Length - 2)
- {
- poseGroupComboList[index + 1] = new GUIContent("98:撮影モード");
- }
- if (index == poseGroupArray.Length - 1)
- {
- poseGroupComboList[index + 1] = new GUIContent("99:登録ポーズ");
- }
- }
- else if (existPose && strS == "")
- {
- if (index == poseGroupArray.Length - 3)
- {
- poseGroupComboList[index + 1] = new GUIContent((index + 2).ToString() + ":通常2");
- }
- if (index == poseGroupArray.Length - 2)
- {
- poseGroupComboList[index + 1] = new GUIContent((index + 2).ToString() + ":エロ2");
- }
- if (index == poseGroupArray.Length - 1)
- {
- poseGroupComboList[index + 1] = new GUIContent("99:登録ポーズ");
- }
- }
- else if (!existPose && strS != "")
- {
- if (index == poseGroupArray.Length - 3)
- {
- poseGroupComboList[index + 1] = new GUIContent((index + 2).ToString() + ":通常2");
- }
- if (index == poseGroupArray.Length - 2)
- {
- poseGroupComboList[index + 1] = new GUIContent((index + 2).ToString() + ":エロ2");
- }
- if (index == poseGroupArray.Length - 1)
- {
- poseGroupComboList[index + 1] = new GUIContent("98:撮影モード");
- }
- }
- else
- {
- if (index == poseGroupArray.Length - 2)
- {
- poseGroupComboList[index + 1] = new GUIContent((index + 2).ToString() + ":通常2");
- }
- if (index == poseGroupArray.Length - 1)
- {
- poseGroupComboList[index + 1] = new GUIContent((index + 2).ToString() + ":エロ2");
- }
- }
- }
- poseInitFlg = true;
- itemCombo.selectedItemIndex = 0;
- int length = itemArray.Length;
- itemComboList = new GUIContent[length - 1];
- for (int index = 0; index < length; ++index)
- {
- if (index == 0)
- {
- itemComboList[index] = new GUIContent("アイテム無し");
- }
- else
- {
- switch (itemArray[index])
- {
- case "handitem,HandItemR_WineGlass_I_.menu":
- itemComboList[index] = new GUIContent(index.ToString() + ":ワイングラス");
- break;
- case "handitem,HandItemR_WineBottle_I_.menu":
- itemComboList[index] = new GUIContent(index.ToString() + ":ワインボトル");
- break;
- case "handitem,handitemr_racket_I_.menu":
- itemComboList[index] = new GUIContent(index.ToString() + ":ラケット");
- break;
- case "handitem,HandItemR_Hataki_I_.menu":
- itemComboList[index] = new GUIContent(index.ToString() + ":ハタキ");
- break;
- case "handitem,HandItemR_Mop_I_.menu":
- itemComboList[index] = new GUIContent(index.ToString() + ":モップ");
- break;
- case "handitem,HandItemR_Houki_I_.menu":
- itemComboList[index] = new GUIContent(index.ToString() + ":ほうき");
- break;
- case "handitem,HandItemR_Zoukin2_I_.menu":
- itemComboList[index] = new GUIContent(index.ToString() + ":雑巾");
- break;
- case "handitem,HandItemR_Chu-B_Lip_I_.menu":
- itemComboList[index] = new GUIContent(index.ToString() + ":Chu-B Lip");
- break;
- case "handitem,HandItemR_Mimikaki_I_.menu":
- itemComboList[index] = new GUIContent(index.ToString() + ":耳かき");
- break;
- case "handitem,HandItemR_Pen_I_.menu":
- itemComboList[index] = new GUIContent(index.ToString() + ":ペン");
- break;
- case "handitem,HandItemR_Otama_I_.menu":
- itemComboList[index] = new GUIContent(index.ToString() + ":おたま");
- break;
- case "handitem,HandItemR_Houchou_I_.menu":
- itemComboList[index] = new GUIContent(index.ToString() + ":包丁");
- break;
- case "handitem,HandItemR_Book_I_.menu":
- itemComboList[index] = new GUIContent(index.ToString() + ":本");
- break;
- case "handitem,HandItemR_Puff_I_.menu":
- itemComboList[index] = new GUIContent(index.ToString() + ":パフ");
- break;
- case "handitem,HandItemR_Rip_I_.menu":
- itemComboList[index] = new GUIContent(index.ToString() + ":リップ");
- break;
- case "handitem,HandItemD_Shisyuu_Hari_I_.menu":
- itemComboList[index] = new GUIContent(index.ToString() + ":刺繍");
- break;
- case "handitem,HandItemD_Sara_Sponge_I_.menu":
- itemComboList[index] = new GUIContent(index.ToString() + ":皿・スポンジ");
- break;
- case "kousoku_upper,KousokuU_TekaseOne_I_.menu":
- itemComboList[index] = new GUIContent(index.ToString() + ":手枷1");
- break;
- case "kousoku_upper,KousokuU_TekaseTwo_I_.menu":
- itemComboList[index] = new GUIContent(index.ToString() + ":手枷2");
- break;
- case "kousoku_lower,KousokuL_AshikaseUp_I_.menu":
- itemComboList[index] = new GUIContent(index.ToString() + ":足枷");
- break;
- case "handitem,HandItemR_Usuba_Houchou_I_.menu":
- itemComboList[index] = new GUIContent(index.ToString() + "薄刃包丁");
- break;
- case "handitem,HandItemR_Chusyaki_I_.menu":
- itemComboList[index] = new GUIContent(index.ToString() + "注射器");
- break;
- case "handitem,HandItemR_Nei_Heartful_I_.menu":
- itemComboList[index] = new GUIContent(index.ToString() + "ハートフルねい人形");
- break;
- case "handitem,HandItemR_Shaker_I_.menu":
- itemComboList[index] = new GUIContent(index.ToString() + "シェイカー");
- break;
- case "handitem,HandItemR_SmartPhone_I_.menu":
- itemComboList[index] = new GUIContent(index.ToString() + "スマートフォン");
- break;
- case "kousoku_upper,KousokuU_Ushirode_I_.menu":
- itemComboList[index - 1] = new GUIContent((index - 1).ToString() + ":後ろ手拘束具");
- break;
- case "kousoku_upper,KousokuU_SMRoom_Haritsuke_I_.menu":
- itemComboList[index - 1] = new GUIContent((index - 1).ToString() + ":磔台・手枷足枷");
- break;
- case "kousoku_upper,KousokuU_SMRoom2_Haritsuke_I_.menu":
- itemComboList[index - 1] = new GUIContent((index - 1).ToString() + ":磔台・手枷足枷2");
- break;
- case "handitem,HandItemL_Dance_Hataki_I_.menu":
- itemComboList[index - 1] = new GUIContent((index - 1).ToString() + ":ダンスハタキ");
- break;
- case "handitem,HandItemL_Dance_Mop_I_.menu":
- itemComboList[index - 1] = new GUIContent((index - 1).ToString() + ":ダンスモップ");
- break;
- case "handitem,HandItemL_Dance_Zoukin_I_.menu":
- itemComboList[index - 1] = new GUIContent((index - 1).ToString() + ":ダンス雑巾");
- break;
- case "handitem,HandItemL_Kozara_I_.menu":
- itemComboList[index - 1] = new GUIContent((index - 1).ToString() + ":小皿");
- break;
- case "handitem,HandItemR_Teacup_I_.menu":
- itemComboList[index - 1] = new GUIContent((index - 1).ToString() + ":ティーカップ");
- break;
- case "handitem,HandItemL_Teasaucer_I_.menu":
- itemComboList[index - 1] = new GUIContent((index - 1).ToString() + ":ティーソーサー");
- break;
- case "handitem,HandItemR_Wholecake_I_.menu":
- itemComboList[index - 1] = new GUIContent("ホールケーキ");
- break;
- case "handitem,HandItemR_Menu_I_.menu":
- itemComboList[index - 1] = new GUIContent("メニュー表");
- break;
- case "handitem,HandItemR_Vibe_I_.menu":
- itemComboList[index - 1] = new GUIContent((index - 1).ToString() + ":バイブ");
- break;
- case "handitem,HandItemR_VibePink_I_.menu":
- itemComboList[index - 1] = new GUIContent((index - 1).ToString() + ":ピンクバイブ");
- break;
- case "handitem,HandItemR_VibeBig_I_.menu":
- itemComboList[index - 1] = new GUIContent((index - 1).ToString() + ":太バイブ");
- break;
- case "handitem,HandItemR_AnalVibe_I_.menu":
- itemComboList[index - 1] = new GUIContent((index - 1).ToString() + ":アナルバイブ");
- break;
- case "handitem,HandItemH_SoutouVibe_I_.menu":
- itemComboList[index - 1] = new GUIContent((index - 1).ToString() + ":前:双頭バイブ");
- break;
- case "accvag,accVag_Vibe_I_.menu":
- itemComboList[index - 1] = new GUIContent((index - 1).ToString() + ":前:バイブ");
- break;
- case "accvag,accVag_VibeBig_I_.menu":
- itemComboList[index - 1] = new GUIContent((index - 1).ToString() + ":前:太バイブ");
- break;
- case "accvag,accVag_VibePink_I_.menu":
- itemComboList[index - 1] = new GUIContent((index - 1).ToString() + ":前:ピンクバイブ");
- break;
- case "accanl,accAnl_AnalVibe_I_.menu":
- itemComboList[index - 1] = new GUIContent((index - 1).ToString() + ":後:アナルバイブ");
- break;
- case "accanl,accAnl_Photo_NomalVibe_I_.menu":
- itemComboList[index - 1] = new GUIContent((index - 1).ToString() + ":後:バイブ");
- break;
- case "accanl,accAnl_Photo_VibeBig_I_.menu":
- itemComboList[index - 1] = new GUIContent((index - 1).ToString() + ":後:太バイブ");
- break;
- case "accanl,accAnl_Photo_VibePink_I_.menu":
- itemComboList[index - 1] = new GUIContent((index - 1).ToString() + ":後:ピンクバイブ");
- break;
- case "handitem,HandItemL_Etoile_Saucer_I_.menu":
- itemComboList[index - 1] = new GUIContent((index - 1).ToString() + "ティーソーサー");
- break;
- case "handitem,HandItemR_Etoile_Teacup_I_.menu":
- itemComboList[index - 1] = new GUIContent((index - 1).ToString() + "ティーカップ");
- break;
- case "handitem,HandItemL_Katuramuki_Daikon_I_.menu":
- itemComboList[index - 1] = new GUIContent((index - 1).ToString() + "桂むき大根");
- break;
- case "handitem,HandItemL_Karte_I_.menu":
- itemComboList[index - 1] = new GUIContent((index - 1).ToString() + "カルテ");
- break;
- case "handitem,HandItemL_Cracker_I_.menu":
- itemComboList[index - 1] = new GUIContent((index - 1).ToString() + "クラッカー");
- break;
- }
- if (index == 12)
- {
- itemComboList[index] = new GUIContent(index.ToString() + ":手枷・足枷");
- }
- if (index == 13)
- {
- itemComboList[index] = new GUIContent(index.ToString() + ":手枷・足枷(下)");
- }
- if (index == 24)
- {
- itemComboList[index - 1] = new GUIContent((index - 1).ToString() + ":カップ&ソーサー");
- }
- }
- }
- }
- if (poseCombo.isClickedComboButton)
- {
- GUI.enabled = false;
- }
- if (poseGroupCombo.isClickedComboButton)
- {
- GUI.enabled = false;
- }
- if (sceneLevel == 3 || sceneLevel == 5 || isF6)
- {
- if (!isF6)
- {
- bool flag = true;
- if (faceFlg || poseFlg || sceneFlg || kankyoFlg || kankyo2Flg)
- {
- flag = false;
- }
- if (GUI.Toggle(new Rect(GetPix(2),
- GetPix(2),
- GetPix(39),
- GetPix(20)),
- flag,
- "配置",
- style4))
- {
- faceFlg = false;
- poseFlg = false;
- sceneFlg = false;
- kankyoFlg = false;
- kankyo2Flg = false;
- bGui = true;
- }
- }
- if (!yotogiFlg && GUI.Toggle(new Rect(GetPix(41),
- GetPix(2),
- GetPix(39),
- GetPix(20)),
- poseFlg,
- "操作",
- style4))
- {
- poseFlg = true;
- faceFlg = false;
- sceneFlg = false;
- kankyoFlg = false;
- kankyo2Flg = false;
- }
- if (GUI.Toggle(new Rect(GetPix(80), GetPix(2), GetPix(39), GetPix(20)),
- faceFlg,
- "表情",
- style4))
- {
- faceFlg = true;
- poseFlg = false;
- sceneFlg = false;
- kankyoFlg = false;
- kankyo2Flg = false;
- if (!faceFlg2)
- {
- isFaceInit = true;
- faceFlg2 = true;
- maidArray[selectMaidIndex].boMabataki = false;
- faceCombo.selectedItemIndex = faceIndex[selectMaidIndex];
- }
- isFaceInit = true;
- }
- if (GUI.Toggle(new Rect(GetPix(119), GetPix(2), GetPix(39), GetPix(20)),
- kankyoFlg,
- "環境",
- style4))
- {
- poseFlg = false;
- faceFlg = false;
- sceneFlg = false;
- kankyoFlg = true;
- kankyo2Flg = false;
- }
- if (!line1)
- {
- line1 = MakeTex(2, 2, new Color(0.0f, 0.0f, 0.0f, 0.3f));
- line2 = MakeTex(2, 2, new Color(0.7f, 0.7f, 0.7f, 0.6f));
- }
- GUI.DrawTexture(new Rect(GetPix(5), GetPix(20), GetPix(160), 2f), line1);
- GUI.DrawTexture(new Rect(GetPix(5), GetPix(20), GetPix(160), 1f), line2);
- style1.fontSize = GetPix(13);
- style1.alignment = TextAnchor.MiddleCenter;
- GUI.Label(new Rect(GetPix(125), GetPix(25), GetPix(40), GetPix(25)),
- string.Concat(selectMaidIndex + 1),
- style1);
- style1.fontSize = GetPix(11);
- style1.alignment = TextAnchor.UpperLeft;
- }
- if (sceneLevel > 0)
- {
- int selectMaidIndex = this.selectMaidIndex;
- if (sceneLevel == 3 || sceneLevel == 5 && (isF7 || maidCnt > 1))
- {
- if (GUI.Button(new Rect(GetPix(5),
- GetPix(53),
- GetPix(23),
- GetPix(32)),
- "<",
- style3))
- {
- --this.selectMaidIndex;
- if (this.selectMaidIndex < 0)
- {
- this.selectMaidIndex = selectList.Count - 1;
- }
- isPoseInit = true;
- poseFlg = true;
- copyIndex = 0;
- poseCombo.selectedItemIndex = poseIndex[this.selectMaidIndex];
- faceCombo.selectedItemIndex = faceIndex[this.selectMaidIndex];
- }
- if (GUI.Button(new Rect(GetPix(135),
- GetPix(53),
- GetPix(23),
- GetPix(32)),
- ">",
- style3))
- {
- ++this.selectMaidIndex;
- if (selectList.Count <= this.selectMaidIndex)
- {
- this.selectMaidIndex = 0;
- }
- isPoseInit = true;
- poseFlg = true;
- copyIndex = 0;
- poseCombo.selectedItemIndex = poseIndex[this.selectMaidIndex];
- faceCombo.selectedItemIndex = faceIndex[this.selectMaidIndex];
- }
- }
- if (maidArray[this.selectMaidIndex].GetThumIcon())
- {
- GUI.DrawTexture(new Rect(GetPix(30),
- GetPix(25),
- GetPix(60),
- GetPix(60)),
- maidArray[this.selectMaidIndex].GetThumIcon());
- }
- GUI.Label(new Rect(GetPix(90), GetPix(50), GetPix(140), GetPix(210)),
- maidArray[this.selectMaidIndex].status.lastName + "\n" + maidArray[this.selectMaidIndex].status.firstName,
- style1);
- }
- if (!isF6)
- {
- if (isDanceStop)
- {
- isStop[selectMaidIndex] = true;
- isDanceStop = false;
- }
- if (sceneLevel == 5 && maidCnt > 1)
- {
- bool flag = false;
- if (selectMaidIndex == isEditNo)
- {
- flag = true;
- }
- isEdit[selectMaidIndex] =
- GUI.Toggle(new Rect(GetPix(5),
- GetPix(25),
- GetPix(50),
- GetPix(16)),
- flag,
- "Edit",
- style4);
- if (isEdit[selectMaidIndex] && selectMaidIndex != isEditNo)
- {
- isEditNo = selectMaidIndex;
- for (int index = 0; index < maidCnt; ++index)
- {
- if (index != isEditNo)
- {
- isEdit[index] = false;
- }
- }
- SceneEdit component = GameObject.Find("__SceneEdit__").GetComponent<SceneEdit>();
- SetFieldValue<SceneEdit, Maid>(component, "m_maid", maidArray[selectMaidIndex]);
- component.PartsTypeCamera(MPN.stkg);
- editSelectMaid = maidArray[selectMaidIndex];
- if (selectList[selectMaidIndex] != null && goSlot[(int)selectList[selectMaidIndex]] != null)
- {
- maidArray[selectMaidIndex].body0.goSlot =
- new List<TBodySkin>(goSlot[(int)selectList[selectMaidIndex]]);
- for (int index = 0; index < bodyHit[(int)selectList[selectMaidIndex]].Count; ++index)
- {
- maidArray[selectMaidIndex].body0.goSlot[index].bonehair.bodyhit =
- bodyHit[(int)selectList[selectMaidIndex]][index];
- }
- }
- }
- }
- GUI.enabled = !poseGroupCombo.isClickedComboButton;
- if (isLock[selectMaidIndex])
- {
- GUI.enabled = false;
- }
- int result;
- Transform transform;
- if (GUI.Button(new Rect(GetPix(5), GetPix(125), GetPix(23), GetPix(23)),
- "<",
- style3))
- {
- --poseIndex[selectMaidIndex];
- if (poseGroupIndex > 0)
- {
- if ((int)groupList[poseGroupIndex - 1] > poseIndex[selectMaidIndex])
- {
- poseIndex[selectMaidIndex] = poseGroupIndex < groupList.Count
- ? (int)groupList[poseGroupIndex] - 1
- : poseArray.Length - 1;
- }
- }
- else if (poseIndex[selectMaidIndex] < 0)
- {
- poseIndex[selectMaidIndex] = (int)groupList[poseGroupIndex] - 1;
- }
- isPoseInit = true;
- poseCombo.selectedItemIndex = poseGroupIndex <= 0
- ? poseIndex[selectMaidIndex]
- : poseIndex[selectMaidIndex] - (int)groupList[poseGroupIndex - 1];
- if (!isLock[selectMaidIndex] && maid && maid.Visible)
- {
- string[] strArray = poseArray[poseIndex[selectMaidIndex]].Split(',');
- isStop[selectMaidIndex] = false;
- poseCount[selectMaidIndex] = 20;
- if (strArray[0].Contains("_momi") || strArray[0].Contains("paizuri_"))
- {
- maid.body0.MuneYureL(0.0f);
- maid.body0.MuneYureR(0.0f);
- }
- else
- {
- maid.body0.MuneYureL(1f);
- maid.body0.MuneYureR(1f);
- }
- if (strArray[0].Contains("MultipleMaidsPose"))
- {
- string path = strArray[0].Split('/')[1];
- byte[] numArray = new byte[0];
- try
- {
- using (FileStream fileStream = new FileStream(path, FileMode.Open, FileAccess.Read))
- {
- numArray = new byte[fileStream.Length];
- fileStream.Read(numArray, 0, numArray.Length);
- }
- }
- catch { }
- if (0 < numArray.Length)
- {
- long hashCode = Path.GetFileName(path).GetHashCode();
- maid.body0.CrossFade(hashCode.ToString(), numArray, false, false, false, 0.0f, 1f);
- Maid.AutoTwist[] autoTwistArray = new Maid.AutoTwist[6]
- {
- Maid.AutoTwist.ShoulderL, Maid.AutoTwist.ShoulderR, Maid.AutoTwist.WristL, Maid.AutoTwist.WristR,
- Maid.AutoTwist.ThighL, Maid.AutoTwist.ThighR
- };
- foreach (Maid.AutoTwist f_eType in autoTwistArray)
- {
- maid.SetAutoTwist(f_eType, true);
- }
- }
- }
- else if (strArray[0].StartsWith("p") && int.TryParse(strArray[0].Substring(1), out result))
- {
- loadPose[selectMaidIndex] = strArray[0];
- }
- else if (!strArray[0].StartsWith("dance_"))
- {
- maidArray[selectMaidIndex].CrossFade(strArray[0] + ".anm", false, true, false, 0.0f, 1f);
- }
- else
- {
- if (!maid.body0.m_Bones.GetComponent<Animation>().GetClip(strArray[0] + ".anm"))
- {
- maid.body0.LoadAnime(strArray[0] + ".anm", GameUty.FileSystem, strArray[0] + ".anm", false, false);
- }
- maid.body0.m_Bones.GetComponent<Animation>().Play(strArray[0] + ".anm");
- }
- if (strArray.Length > 1)
- {
- maid.body0.m_Bones.GetComponent<Animation>()[strArray[0] + ".anm"].time = float.Parse(strArray[1]);
- isDanceStop = true;
- if (strArray.Length > 2)
- {
- transform = CMT.SearchObjName(maidArray[selectMaidIndex].body0.m_Bones.transform, "Bip01", true);
- isPoseIti[selectMaidIndex] = true;
- poseIti[selectMaidIndex] = maidArray[selectMaidIndex].transform.position;
- maidArray[selectMaidIndex].transform.position = new Vector3(100f, 100f, 100f);
- }
- }
- }
- }
- if (GUI.Button(new Rect(GetPix(135),
- GetPix(125),
- GetPix(23),
- GetPix(23)),
- ">",
- style3))
- {
- ++poseIndex[selectMaidIndex];
- if (poseIndex[selectMaidIndex] > (int)groupList[groupList.Count - 1])
- {
- if (poseIndex[selectMaidIndex] >= poseArray.Length)
- {
- poseIndex[selectMaidIndex] = (int)groupList[poseGroupIndex - 1];
- }
- }
- else if (poseIndex[selectMaidIndex] >= (int)groupList[poseGroupIndex])
- {
- poseIndex[selectMaidIndex] = poseGroupIndex <= 0 ? 0 : (int)groupList[poseGroupIndex - 1];
- }
- isPoseInit = true;
- poseCombo.selectedItemIndex = poseGroupIndex <= 0
- ? poseIndex[selectMaidIndex]
- : poseIndex[selectMaidIndex] - (int)groupList[poseGroupIndex - 1];
- if (!isLock[selectMaidIndex] && maid && maid.Visible)
- {
- string[] strArray = poseArray[poseIndex[selectMaidIndex]].Split(',');
- isStop[selectMaidIndex] = false;
- poseCount[selectMaidIndex] = 20;
- if (strArray[0].Contains("_momi") || strArray[0].Contains("paizuri_"))
- {
- maid.body0.MuneYureL(0.0f);
- maid.body0.MuneYureR(0.0f);
- }
- else
- {
- maid.body0.MuneYureL(1f);
- maid.body0.MuneYureR(1f);
- }
- if (strArray[0].Contains("MultipleMaidsPose"))
- {
- string path = strArray[0].Split('/')[1];
- byte[] numArray = new byte[0];
- try
- {
- using (FileStream fileStream = new FileStream(path, FileMode.Open, FileAccess.Read))
- {
- numArray = new byte[fileStream.Length];
- fileStream.Read(numArray, 0, numArray.Length);
- }
- }
- catch { }
- if (0 < numArray.Length)
- {
- long hashCode = Path.GetFileName(path).GetHashCode();
- maid.body0.CrossFade(hashCode.ToString(), numArray, false, false, false, 0.0f, 1f);
- Maid.AutoTwist[] autoTwistArray = new Maid.AutoTwist[6]
- {
- Maid.AutoTwist.ShoulderL, Maid.AutoTwist.ShoulderR, Maid.AutoTwist.WristL, Maid.AutoTwist.WristR,
- Maid.AutoTwist.ThighL, Maid.AutoTwist.ThighR
- };
- foreach (Maid.AutoTwist f_eType in autoTwistArray)
- {
- maid.SetAutoTwist(f_eType, true);
- }
- }
- }
- else if (strArray[0].StartsWith("p") && int.TryParse(strArray[0].Substring(1), out result))
- {
- loadPose[selectMaidIndex] = strArray[0];
- }
- else if (!strArray[0].StartsWith("dance_"))
- {
- maidArray[selectMaidIndex].CrossFade(strArray[0] + ".anm", false, true, false, 0.0f, 1f);
- }
- else
- {
- if (!maid.body0.m_Bones.GetComponent<Animation>().GetClip(strArray[0] + ".anm"))
- {
- maid.body0.LoadAnime(strArray[0] + ".anm", GameUty.FileSystem, strArray[0] + ".anm", false, false);
- }
- maid.body0.m_Bones.GetComponent<Animation>().Play(strArray[0] + ".anm");
- }
- if (strArray.Length > 1)
- {
- maid.body0.m_Bones.GetComponent<Animation>()[strArray[0] + ".anm"].time = float.Parse(strArray[1]);
- isDanceStop = true;
- if (strArray.Length > 2)
- {
- transform = CMT.SearchObjName(maidArray[selectMaidIndex].body0.m_Bones.transform, "Bip01", true);
- isPoseIti[selectMaidIndex] = true;
- poseIti[selectMaidIndex] = maidArray[selectMaidIndex].transform.position;
- maidArray[selectMaidIndex].transform.position = new Vector3(100f, 100f, 100f);
- }
- }
- }
- }
- GUI.enabled = true;
- int index1 = -1;
- for (int index2 = 0; index2 < groupList.Count; ++index2)
- {
- if (poseIndex[selectMaidIndex] < (int)groupList[index2])
- {
- index1 = index2;
- break;
- }
- }
- int length1 = (int)groupList[0];
- int num1 = 0;
- if (index1 > 0)
- {
- length1 = (int)groupList[index1] - (int)groupList[index1 - 1];
- num1 = (int)groupList[index1 - 1];
- }
- if (index1 < 0)
- {
- index1 = groupList.Count;
- length1 = poseArray.Length - (int)groupList[index1 - 1];
- num1 = (int)groupList[index1 - 1];
- }
- if (poseGroupCombo.selectedItemIndex != index1)
- {
- poseComboList = new GUIContent[length1];
- int index2 = 0;
- for (int index3 = num1; index3 < num1 + length1; ++index3)
- {
- bool flag = false;
- foreach (IniKey key in Preferences["pose"].Keys)
- {
- if (poseArray[index3] == key.Key)
- {
- IniKey iniKey = Preferences["pose"][key.Key];
- if (iniKey.Value != null && iniKey.Value.ToString() != "" && iniKey.Value.ToString() != "del")
- {
- poseComboList[index2] =
- new GUIContent((index2 + 1).ToString() + ":" + iniKey.Value.Split('_')[0]
- + " " + key.Key);
- flag = true;
- }
- }
- }
- if (!flag)
- {
- poseComboList[index2] = new GUIContent((index2 + 1).ToString() + ":" + poseArray[index3]);
- }
- ++index2;
- }
- poseGroupCombo.selectedItemIndex = index1;
- poseGroupIndex = index1;
- poseCombo.selectedItemIndex = 0;
- }
- GUI.enabled = !poseCombo.isClickedComboButton && !poseGroupCombo.isClickedComboButton;
- isLook[selectMaidIndex] =
- GUI.Toggle(new Rect(GetPix(8),
- GetPix(155),
- GetPix(65),
- GetPix(16)),
- isLook[selectMaidIndex],
- "顔の向き",
- style4);
- isPoseEdit = GUI.Toggle(new Rect(GetPix(86),
- GetPix(155),
- GetPix(90),
- GetPix(16)),
- isPoseEdit,
- "ポーズ登録",
- style4);
- if (isPoseEdit)
- {
- inName3 = GUI.TextField(new Rect(GetPix(5),
- GetPix(180),
- GetPix(100),
- GetPix(20)),
- inName3);
- if (GUI.Button(new Rect(GetPix(107),
- GetPix(180),
- GetPix(35),
- GetPix(20)),
- "追加",
- style3))
- {
- isSavePose = true;
- GameMain.Instance.SoundMgr.PlaySe("se002.ogg", false);
- existPose = true;
- GUI.FocusControl("");
- }
- if (poseGroupComboList[poseGroupCombo.selectedItemIndex].text != "99:登録ポーズ")
- {
- GUI.enabled = false;
- }
- if (GUI.Button(new Rect(GetPix(144),
- GetPix(180),
- GetPix(24),
- GetPix(20)),
- "削",
- style3))
- {
- GameMain.Instance.SoundMgr.PlaySe("se002.ogg", false);
- List<string> stringList1 = new List<string>();
- stringList1.AddRange(poseArray);
- if (poseComboList[poseCombo.selectedItemIndex].text.Contains("MultipleMaidsPose"))
- {
- string pose = poseArray[poseIndex[selectMaidIndex]];
- stringList1.Remove(pose);
- string path = poseArray[poseIndex[selectMaidIndex]].Split('/')[1].Replace(" ", "");
- if (File.Exists(path))
- {
- File.Delete(path);
- }
- }
- else
- {
- string[] strArray = poseComboList[poseCombo.selectedItemIndex].text.Split('p');
- string str = strArray[strArray.Length - 1];
- IniKey iniKey = Preferences["pose"]["p" + str];
- if (iniKey.Value != "" || iniKey.Value != "del")
- {
- Preferences["pose"]["p" + str].Value = "del";
- SaveConfig();
- }
- stringList1.Remove("p" + str);
- }
- GUI.FocusControl("");
- poseArray = stringList1.ToArray();
- int index2 = -1;
- for (int index3 = 0; index3 < groupList.Count; ++index3)
- {
- if (poseIndex[selectMaidIndex] < (int)groupList[index3])
- {
- index2 = index3;
- break;
- }
- }
- int length2 = (int)groupList[0];
- int num2 = 0;
- if (index2 > 0)
- {
- length2 = (int)groupList[index2] - (int)groupList[index2 - 1];
- num2 = (int)groupList[index2 - 1];
- }
- if (index2 < 0)
- {
- index2 = groupList.Count;
- length2 = poseArray.Length - (int)groupList[index2 - 1];
- num2 = (int)groupList[index2 - 1];
- }
- poseComboList = new GUIContent[length2];
- int index4 = 0;
- bool existEdit = false;
- for (int index3 = num2; index3 < num2 + length2; ++index3)
- {
- bool flag = false;
- foreach (IniKey key in Preferences["pose"].Keys)
- {
- if (poseArray[index3] == key.Key)
- {
- IniKey iniKey = Preferences["pose"][key.Key];
- if (iniKey.Value != null && iniKey.Value.ToString() != "" && iniKey.Value.ToString() != "del")
- {
- poseComboList[index4] =
- new GUIContent((index4 + 1).ToString() + ":" + iniKey.Value.Split('_')[0]
- + " " + key.Key);
- flag = true;
- existEdit = true;
- }
- }
- }
- if (!flag)
- {
- poseComboList[index4] = new GUIContent((index4 + 1).ToString() + ":" + poseArray[index3]);
- }
- ++index4;
- }
- ((Action<string, List<string>>)((path, result_list) =>
- {
- string[] files = Directory.GetFiles(path);
- countS = 0;
- for (int index = 0; index < files.Length; ++index)
- {
- if (Path.GetExtension(files[index]) == ".anm")
- {
- existEdit = true;
- break;
- }
- }
- }))(Path.GetFullPath(".\\") + "Mod\\MultipleMaidsPose", new List<string>());
- if (!existEdit)
- {
- poseIniStr = "";
- List<string> stringList2 = new List<string>(50 + poseGroupArray2.Length);
- stringList2.AddRange(poseGroupArray2);
- stringList2.AddRange(poseGroupArrayVP);
- stringList2.AddRange(poseGroupArrayFB);
- stringList2.AddRange(poseGroupArray3);
- stringList2.Add(poseArray5[0]);
- stringList2.Add(poseArray6[0]);
- stringList2.Add(strList2[0]);
- stringList2.Add(strListE2[0]);
- existPose = false;
- poseGroupArray = stringList2.ToArray();
- groupList = new ArrayList();
- for (int index3 = 0; index3 < poseArray.Length; ++index3)
- {
- for (int index5 = 0; index5 < poseGroupArray.Length; ++index5)
- {
- if (poseGroupArray[index5] == poseArray[index3])
- {
- groupList.Add(index3);
- if (poseGroupArray[index5] == strList2[0])
- {
- sPoseCount = index3;
- }
- }
- }
- }
- poseIndex[selectMaidIndex] = 0;
- poseGroupComboList = new GUIContent[poseGroupArray.Length + 1];
- poseGroupComboList[0] = new GUIContent("1:通常");
- for (int index3 = 0; index3 < poseGroupArray.Length; ++index3)
- {
- if (poseGroupArray[index3] == "maid_dressroom01")
- {
- poseGroupComboList[index3 + 1] = new GUIContent((index3 + 2).ToString() + ":立ち");
- }
- if (poseGroupArray[index3] == "tennis_kamae_f")
- {
- poseGroupComboList[index3 + 1] = new GUIContent((index3 + 2).ToString() + ":中腰");
- }
- if (poseGroupArray[index3] == "senakanagasi_f")
- {
- poseGroupComboList[index3 + 1] = new GUIContent((index3 + 2).ToString() + ":膝をつく");
- }
- if (poseGroupArray[index3] == "work_hansei")
- {
- poseGroupComboList[index3 + 1] = new GUIContent((index3 + 2).ToString() + ":座り");
- }
- if (poseGroupArray[index3] == "inu_taiki_f")
- {
- poseGroupComboList[index3 + 1] = new GUIContent((index3 + 2).ToString() + ":四つん這い");
- }
- if (poseGroupArray[index3] == "syagami_pose_f")
- {
- poseGroupComboList[index3 + 1] = new GUIContent((index3 + 2).ToString() + ":床座り");
- }
- if (poseGroupArray[index3] == "densyasuwari_taiki_f")
- {
- poseGroupComboList[index3 + 1] = new GUIContent((index3 + 2).ToString() + ":椅子座り");
- }
- if (poseGroupArray[index3] == "work_kaiwa")
- {
- poseGroupComboList[index3 + 1] = new GUIContent((index3 + 2).ToString() + ":ソファー座り");
- }
- if (poseGroupArray[index3] == "dance_cm3d2_001_f1,14.14")
- {
- poseGroupComboList[index3 + 1] = new GUIContent((index3 + 2).ToString() + ":ドキドキ☆Fallin' Love");
- }
- if (poseGroupArray[index3] == "dance_cm3d_001_f1,39.25")
- {
- poseGroupComboList[index3 + 1] = new GUIContent((index3 + 2).ToString() + ":entrance to you");
- }
- if (poseGroupArray[index3] == "dance_cm3d_002_end_f1,50.71")
- {
- poseGroupComboList[index3 + 1] = new GUIContent((index3 + 2).ToString() + ":scarlet leap");
- }
- if (poseGroupArray[index3] == "dance_cm3d2_002_smt_f,7.76,")
- {
- poseGroupComboList[index3 + 1] = new GUIContent((index3 + 2).ToString() + ":stellar my tears");
- }
- if (poseGroupArray[index3] == "dance_cm3d_003_sp2_f1,90.15")
- {
- poseGroupComboList[index3 + 1] = new GUIContent((index3 + 2).ToString() + ":rhythmix to you");
- }
- if (poseGroupArray[index3] == "dance_cm3d2_003_hs_f1,0.01,")
- {
- poseGroupComboList[index3 + 1] = new GUIContent((index3 + 2).ToString() + ":happy!happy!スキャンダル!!");
- }
- if (poseGroupArray[index3] == "dance_cm3d_004_kano_f1,124.93")
- {
- poseGroupComboList[index3 + 1] = new GUIContent((index3 + 2).ToString() + ":Can Know Two Close");
- }
- if (poseGroupArray[index3] == "dance_cm3d2_004_sse_f1,0.01")
- {
- poseGroupComboList[index3 + 1] = new GUIContent((index3 + 2).ToString() + ":sweet sweet everyday");
- }
- if (poseGroupArray[index3] == "turusi_sex_in_taiki_f")
- {
- poseGroupComboList[index3 + 1] = new GUIContent((index3 + 2).ToString() + ":拘束");
- }
- if (poseGroupArray[index3] == "rosyutu_pose01_f")
- {
- poseGroupComboList[index3 + 1] = new GUIContent((index3 + 2).ToString() + ":エロ");
- }
- if (poseGroupArray[index3] == "rosyutu_aruki_f_once_,1.37")
- {
- poseGroupComboList[index3 + 1] = new GUIContent((index3 + 2).ToString() + ":歩き");
- }
- if (poseGroupArray[index3] == "stand_desk1")
- {
- poseGroupComboList[index3 + 1] = new GUIContent((index3 + 2).ToString() + ":その他");
- }
- if (poseGroupArray[index3] == poseArray5[0])
- {
- poseGroupComboList[index3 + 1] = new GUIContent((index3 + 2).ToString() + ":ダンスMC");
- }
- if (poseGroupArray[index3] == poseArray6[0])
- {
- poseGroupComboList[index3 + 1] = new GUIContent((index3 + 2).ToString() + ":ダンス");
- }
- if (index3 == poseGroupArray.Length - 2)
- {
- poseGroupComboList[index3 + 1] = new GUIContent((index3 + 2).ToString() + ":通常2");
- }
- if (index3 == poseGroupArray.Length - 1)
- {
- poseGroupComboList[index3 + 1] = new GUIContent((index3 + 2).ToString() + ":エロ2");
- }
- }
- }
- else
- {
- poseGroupCombo.selectedItemIndex = index2;
- poseGroupIndex = index2;
- poseCombo.selectedItemIndex = 0;
- poseIndex[selectMaidIndex] = (int)groupList[groupList.Count - 1];
- if (poseArray.Length <= poseIndex[selectMaidIndex])
- {
- --poseIndex[selectMaidIndex];
- }
- }
- }
- GUI.enabled = !poseCombo.isClickedComboButton && !poseGroupCombo.isClickedComboButton;
- }
- else
- {
- if (!isLook[selectMaidIndex])
- {
- GUI.enabled = false;
- }
- GUI.Label(new Rect(GetPix(8), GetPix(175), GetPix(100), GetPix(25)),
- "顔の向きX",
- style2);
- lookX[selectMaidIndex] =
- GUI.HorizontalSlider(new Rect(GetPix(8),
- GetPix(191),
- GetPix(70),
- GetPix(20)),
- lookX[selectMaidIndex],
- -0.6f,
- 0.6f);
- GUI.Label(new Rect(GetPix(88),
- GetPix(175),
- GetPix(100),
- GetPix(25)),
- "顔の向きY",
- style2);
- lookY[selectMaidIndex] =
- GUI.HorizontalSlider(new Rect(GetPix(88),
- GetPix(191),
- GetPix(70),
- GetPix(20)),
- lookY[selectMaidIndex],
- 0.5f,
- -0.55f);
- GUI.enabled = !poseCombo.isClickedComboButton && !poseGroupCombo.isClickedComboButton;
- }
- int index6 = poseGroupIndex <= 0
- ? poseIndex[selectMaidIndex]
- : poseIndex[selectMaidIndex] - (int)groupList[poseGroupIndex - 1];
- string[] strArray1;
- if (GUI.Button(new Rect(GetPix(5), GetPix(215), GetPix(23), GetPix(23)),
- "<",
- style3))
- {
- --itemIndex[selectMaidIndex];
- if (itemIndex[selectMaidIndex] <= -1)
- {
- itemIndex[selectMaidIndex] = itemArray.Length - 2;
- }
- strArray1 = new string[2];
- string[] strArray2 = itemArray[itemIndex[selectMaidIndex]].Split(',');
- if (itemIndex[selectMaidIndex] > 13)
- {
- strArray2 = itemArray[itemIndex[selectMaidIndex] + 1].Split(',');
- }
- maid.DelProp(MPN.handitem, true);
- maid.DelProp(MPN.accvag, true);
- maid.DelProp(MPN.accanl, true);
- bool flag = false;
- if (itemIndex[selectMaidIndex] == 12 || itemIndex[selectMaidIndex] == 13 || itemIndex[selectMaidIndex] == 23)
- {
- flag = true;
- }
- if (!flag)
- {
- maid.DelProp(MPN.kousoku_upper, true);
- maid.DelProp(MPN.kousoku_lower, true);
- }
- if (strArray2[0] != "")
- {
- maid.SetProp(strArray2[0], strArray2[1], 0, true, false);
- }
- if (itemIndex[selectMaidIndex] == 12)
- {
- string[] strArray3 = itemArray[itemIndex[selectMaidIndex] - 1].Split(',');
- maid.SetProp(strArray3[0], strArray3[1], 0, true, false);
- }
- if (itemIndex[selectMaidIndex] == 13)
- {
- string[] strArray3 = itemArray[itemIndex[selectMaidIndex] + 1].Split(',');
- maid.SetProp(strArray3[0], strArray3[1], 0, true, false);
- }
- if (itemIndex[selectMaidIndex] == 23)
- {
- string[] strArray3 = itemArray[itemIndex[selectMaidIndex]].Split(',');
- maid.SetProp(strArray3[0], strArray3[1], 0, true, false);
- cafeFlg[selectMaidIndex] = true;
- }
- maid.AllProcPropSeqStart();
- itemCombo.selectedItemIndex = itemIndex[selectMaidIndex];
- }
- if (GUI.Button(new Rect(GetPix(135),
- GetPix(215),
- GetPix(23),
- GetPix(23)),
- ">",
- style3))
- {
- ++itemIndex[selectMaidIndex];
- if (itemIndex[selectMaidIndex] >= itemArray.Length - 1)
- {
- itemIndex[selectMaidIndex] = 0;
- }
- strArray1 = new string[2];
- string[] strArray2 = itemArray[itemIndex[selectMaidIndex]].Split(',');
- if (itemIndex[selectMaidIndex] > 13)
- {
- strArray2 = itemArray[itemIndex[selectMaidIndex] + 1].Split(',');
- }
- maid.DelProp(MPN.handitem, true);
- maid.DelProp(MPN.accvag, true);
- maid.DelProp(MPN.accanl, true);
- bool flag = false;
- if (itemIndex[selectMaidIndex] == 12 || itemIndex[selectMaidIndex] == 13)
- {
- flag = true;
- }
- if (!flag)
- {
- maid.DelProp(MPN.kousoku_upper, true);
- maid.DelProp(MPN.kousoku_lower, true);
- }
- if (strArray2[0] != "")
- {
- maid.SetProp(strArray2[0], strArray2[1], 0, true, false);
- }
- if (itemIndex[selectMaidIndex] == 12)
- {
- string[] strArray3 = itemArray[itemIndex[selectMaidIndex] - 1].Split(',');
- maid.SetProp(strArray3[0], strArray3[1], 0, true, false);
- }
- if (itemIndex[selectMaidIndex] == 13)
- {
- string[] strArray3 = itemArray[itemIndex[selectMaidIndex] + 1].Split(',');
- maid.SetProp(strArray3[0], strArray3[1], 0, true, false);
- }
- if (itemIndex[selectMaidIndex] == 23)
- {
- string[] strArray3 = itemArray[itemIndex[selectMaidIndex]].Split(',');
- maid.SetProp(strArray3[0], strArray3[1], 0, true, false);
- cafeFlg[selectMaidIndex] = true;
- }
- maid.AllProcPropSeqStart();
- itemCombo.selectedItemIndex = itemIndex[selectMaidIndex];
- }
- if (itemCombo.isClickedComboButton)
- {
- GUI.enabled = false;
- }
- isWear = GUI.Toggle(new Rect(GetPix(5),
- GetPix(248),
- GetPix(70),
- GetPix(20)),
- isWear,
- "トップス",
- style4);
- isSkirt = GUI.Toggle(new Rect(GetPix(90),
- GetPix(248),
- GetPix(70),
- GetPix(20)),
- isSkirt,
- "ボトムス",
- style4);
- isBra = GUI.Toggle(new Rect(GetPix(5),
- GetPix(273),
- GetPix(80),
- GetPix(20)),
- isBra,
- "ブラジャー",
- style4);
- isPanz = GUI.Toggle(new Rect(GetPix(90),
- GetPix(273),
- GetPix(60),
- GetPix(20)),
- isPanz,
- "パンツ",
- style4);
- isHeadset = GUI.Toggle(new Rect(GetPix(5),
- GetPix(298),
- GetPix(70),
- GetPix(20)),
- isHeadset,
- "ヘッド",
- style4);
- isMegane = GUI.Toggle(new Rect(GetPix(95),
- GetPix(298),
- GetPix(70),
- GetPix(20)),
- isMegane,
- "メガネ",
- style4);
- isAccUde = GUI.Toggle(new Rect(GetPix(5),
- GetPix(323),
- GetPix(40),
- GetPix(20)),
- isAccUde,
- "腕",
- style4);
- isGlove = GUI.Toggle(new Rect(GetPix(50),
- GetPix(323),
- GetPix(40),
- GetPix(20)),
- isGlove,
- "手袋",
- style4);
- isAccSenaka = GUI.Toggle(new Rect(GetPix(95),
- GetPix(323),
- GetPix(40),
- GetPix(20)),
- isAccSenaka,
- "背中",
- style4);
- isStkg = GUI.Toggle(new Rect(GetPix(5),
- GetPix(348),
- GetPix(40),
- GetPix(20)),
- isStkg,
- "靴下",
- style4);
- isShoes = GUI.Toggle(new Rect(GetPix(50),
- GetPix(348),
- GetPix(40),
- GetPix(20)),
- isShoes,
- "靴",
- style4);
- isMaid = GUI.Toggle(new Rect(GetPix(95),
- GetPix(348),
- GetPix(70),
- GetPix(20)),
- isMaid,
- "メイド",
- style4);
- mekure1[selectMaidIndex] =
- GUI.Toggle(new Rect(GetPix(5),
- GetPix(373),
- GetPix(62),
- GetPix(20)),
- mekure1[selectMaidIndex],
- "めくれ前",
- style4);
- mekure2[selectMaidIndex] =
- GUI.Toggle(new Rect(GetPix(67),
- GetPix(373),
- GetPix(40),
- GetPix(20)),
- mekure2[selectMaidIndex],
- "後ろ",
- style4);
- zurasi[selectMaidIndex] =
- GUI.Toggle(new Rect(GetPix(105),
- GetPix(373),
- GetPix(50),
- GetPix(20)),
- zurasi[selectMaidIndex],
- "ずらし",
- style4);
- voice1[selectMaidIndex] =
- GUI.Toggle(new Rect(GetPix(5),
- GetPix(530),
- GetPix(70),
- GetPix(20)),
- zFlg[selectMaidIndex],
- "ボイス",
- style4);
- voice2[selectMaidIndex] =
- GUI.Toggle(new Rect(GetPix(70),
- GetPix(530),
- GetPix(70),
- GetPix(20)),
- xFlg[selectMaidIndex],
- "Hボイス",
- style4);
- GUI.enabled = !poseCombo.isClickedComboButton && !poseGroupCombo.isClickedComboButton && !itemCombo.isClickedComboButton;
- GUI.DrawTexture(new Rect(GetPix(5), GetPix(402), GetPix(160), 2f), line1);
- GUI.DrawTexture(new Rect(GetPix(5), GetPix(402), GetPix(160), 1f), line2);
- isIK[selectMaidIndex] =
- GUI.Toggle(new Rect(GetPix(5),
- GetPix(411),
- GetPix(30),
- GetPix(20)),
- isIK[selectMaidIndex],
- "IK",
- style4);
- if (!isLock[selectMaidIndex])
- {
- GUI.enabled = false;
- }
- isLock[selectMaidIndex] =
- GUI.Toggle(new Rect(GetPix(45),
- GetPix(411),
- GetPix(40),
- GetPix(20)),
- isLock[selectMaidIndex],
- "解除",
- style4);
- GUI.enabled = !poseCombo.isClickedComboButton && !poseGroupCombo.isClickedComboButton && !itemCombo.isClickedComboButton;
- if (!isIK[selectMaidIndex])
- {
- GUI.enabled = false;
- }
- isBone[selectMaidIndex] =
- GUI.Toggle(new Rect(GetPix(100),
- GetPix(411),
- GetPix(60),
- GetPix(20)),
- isBone[selectMaidIndex],
- "ボーン",
- style4);
- GUI.enabled = !poseCombo.isClickedComboButton && !poseGroupCombo.isClickedComboButton;
- if (isBone[selectMaidIndex] != isBoneN[selectMaidIndex])
- {
- isBoneN[selectMaidIndex] = isBone[selectMaidIndex];
- isChange[selectMaidIndex] = true;
- }
- if (!isLock[selectMaidIndex] && unLockFlg != isLock[selectMaidIndex])
- {
- string[] strArray2 = poseArray[poseIndex[selectMaidIndex]].Split(',');
- isStop[selectMaidIndex] = false;
- poseCount[selectMaidIndex] = 20;
- if (strArray2[0].Contains("_momi") || strArray2[0].Contains("paizuri_"))
- {
- maid.body0.MuneYureL(0.0f);
- maid.body0.MuneYureR(0.0f);
- }
- else
- {
- maid.body0.MuneYureL(1f);
- maid.body0.MuneYureR(1f);
- }
- if (strArray2[0].Contains("MultipleMaidsPose"))
- {
- string path = strArray2[0].Split('/')[1];
- byte[] numArray = new byte[0];
- try
- {
- using (FileStream fileStream = new FileStream(path, FileMode.Open, FileAccess.Read))
- {
- numArray = new byte[fileStream.Length];
- fileStream.Read(numArray, 0, numArray.Length);
- }
- }
- catch { }
- if (0 < numArray.Length)
- {
- long hashCode = Path.GetFileName(path).GetHashCode();
- maid.body0.CrossFade(hashCode.ToString(), numArray, false, false, false, 0.0f, 1f);
- Maid.AutoTwist[] autoTwistArray = new Maid.AutoTwist[6]
- {
- Maid.AutoTwist.ShoulderL, Maid.AutoTwist.ShoulderR, Maid.AutoTwist.WristL, Maid.AutoTwist.WristR,
- Maid.AutoTwist.ThighL, Maid.AutoTwist.ThighR
- };
- foreach (Maid.AutoTwist f_eType in autoTwistArray)
- {
- maid.SetAutoTwist(f_eType, true);
- }
- }
- }
- else if (strArray2[0].StartsWith("p") && int.TryParse(strArray2[0].Substring(1), out result))
- {
- loadPose[selectMaidIndex] = strArray2[0];
- }
- else if (!strArray2[0].StartsWith("dance_"))
- {
- maidArray[selectMaidIndex].CrossFade(strArray2[0] + ".anm", false, true, false, 0.0f, 1f);
- }
- else
- {
- if (!maid.body0.m_Bones.GetComponent<Animation>().GetClip(strArray2[0] + ".anm"))
- {
- maid.body0.LoadAnime(strArray2[0] + ".anm", GameUty.FileSystem, strArray2[0] + ".anm", false, false);
- }
- maid.body0.m_Bones.GetComponent<Animation>().Play(strArray2[0] + ".anm");
- }
- if (strArray2.Length > 1)
- {
- maid.body0.m_Bones.GetComponent<Animation>()[strArray2[0] + ".anm"].time = float.Parse(strArray2[1]);
- isDanceStop = true;
- if (strArray2.Length > 2)
- {
- transform = CMT.SearchObjName(maidArray[selectMaidIndex].body0.m_Bones.transform, "Bip01", true);
- isPoseIti[selectMaidIndex] = true;
- poseIti[selectMaidIndex] = maidArray[selectMaidIndex].transform.position;
- maidArray[selectMaidIndex].transform.position = new Vector3(100f, 100f, 100f);
- }
- }
- mHandL[selectMaidIndex].initFlg = false;
- mHandR[selectMaidIndex].initFlg = false;
- mFootL[selectMaidIndex].initFlg = false;
- mFootR[selectMaidIndex].initFlg = false;
- pHandL[selectMaidIndex] = 0;
- pHandR[selectMaidIndex] = 0;
- hanten[selectMaidIndex] = false;
- hantenn[selectMaidIndex] = false;
- muneIKL[selectMaidIndex] = false;
- muneIKR[selectMaidIndex] = false;
- maid.body0.jbMuneL.enabled = true;
- maid.body0.jbMuneR.enabled = true;
- if (!GameMain.Instance.VRMode)
- {
- maidArray[selectMaidIndex].body0.quaDefEyeL.eulerAngles = eyeL[(int)selectList[selectMaidIndex]];
- maidArray[selectMaidIndex].body0.quaDefEyeR.eulerAngles = eyeR[(int)selectList[selectMaidIndex]];
- }
- }
- unLockFlg = isLock[selectMaidIndex];
- GUI.enabled = !poseCombo.isClickedComboButton && !poseGroupCombo.isClickedComboButton && !itemCombo.isClickedComboButton;
- if (!isIK[selectMaidIndex])
- {
- GUI.enabled = false;
- }
- hanten[selectMaidIndex] =
- GUI.Toggle(new Rect(GetPix(5),
- GetPix(479),
- GetPix(70),
- GetPix(20)),
- hanten[selectMaidIndex],
- "左右反転",
- style4);
- bool flag1 = GUI.Toggle(new Rect(GetPix(80),
- GetPix(479),
- GetPix(100),
- GetPix(20)),
- kotei[selectMaidIndex],
- "スカート固定",
- style4);
- if (kotei[selectMaidIndex] != flag1)
- {
- kotei[selectMaidIndex] = flag1;
- if (flag1)
- {
- SkirtListArray[selectMaidIndex] = new DynamicSkirtBone[100];
- for (int index2 = 0; index2 < maid.body0.goSlot.Count; ++index2)
- {
- DynamicSkirtBone fieldValue =
- GetFieldValue<BoneHair3, DynamicSkirtBone>(maid.body0.goSlot[index2].bonehair3, "m_SkirtBone");
- SkirtListArray[selectMaidIndex][index2] = fieldValue;
- SetFieldValue8<BoneHair3, DynamicSkirtBone>(maid.body0.goSlot[index2].bonehair3,
- "m_SkirtBone",
- null);
- }
- }
- else
- {
- for (int index2 = 0; index2 < maid.body0.goSlot.Count; ++index2)
- {
- SetFieldValue8<BoneHair3, DynamicSkirtBone>(maid.body0.goSlot[index2].bonehair3,
- "m_SkirtBone",
- SkirtListArray[selectMaidIndex][index2]);
- }
- }
- }
- GUI.Label(new Rect(GetPix(29), GetPix(433), GetPix(100), GetPix(25)),
- "右手",
- style1);
- GUI.Label(new Rect(GetPix(109), GetPix(433), GetPix(100), GetPix(25)),
- "左手",
- style1);
- string text = "未選択";
- if (copyIndex > 0)
- {
- text = copyIndex.ToString() + ":" + maidArray[copyIndex - 1].status.firstName;
- }
- if (maidCnt <= 1)
- {
- GUI.enabled = false;
- }
- GUI.Label(new Rect(GetPix(8), GetPix(505), GetPix(100), GetPix(25)),
- "コピー",
- style1);
- GUI.Label(new Rect(GetPix(70), GetPix(505), GetPix(100), GetPix(25)),
- text,
- style1);
- GUI.enabled = !poseCombo.isClickedComboButton && !poseGroupCombo.isClickedComboButton && !itemCombo.isClickedComboButton
- && isIK[selectMaidIndex];
- style1.fontSize = GetPix(13);
- style1.alignment = TextAnchor.UpperCenter;
- GUI.Label(new Rect(GetPix(-10), GetPix(449), GetPix(100), GetPix(25)),
- pHandR[selectMaidIndex].ToString(),
- style1);
- GUI.Label(new Rect(GetPix(70), GetPix(449), GetPix(100), GetPix(25)),
- pHandL[selectMaidIndex].ToString(),
- style1);
- style1.fontSize = GetPix(11);
- style1.alignment = TextAnchor.UpperLeft;
- if (GUI.Button(new Rect(GetPix(5), GetPix(448), GetPix(23), GetPix(23)),
- "<",
- style3))
- {
- --pHandR[selectMaidIndex];
- if (pHandR[selectMaidIndex] < 1)
- {
- pHandR[selectMaidIndex] = fingerRArray.GetLength(0);
- }
- for (int index2 = 0; index2 < 20; ++index2)
- {
- string[] strArray2 = fingerRArray[pHandR[selectMaidIndex] - 1, index2].Split(',');
- Finger[selectMaidIndex, index2 + 20].localEulerAngles =
- new Vector3(float.Parse(strArray2[0]), float.Parse(strArray2[1]), float.Parse(strArray2[2]));
- }
- isStop[selectMaidIndex] = true;
- isLock[selectMaidIndex] = true;
- for (int index2 = 0; index2 < 10; ++index2)
- {
- if ((index2 == 0 || index2 == 5) && mFinger[selectMaidIndex, index2 * 3])
- {
- mFinger[selectMaidIndex, index2 * 3].reset = true;
- }
- }
- }
- if (GUI.Button(new Rect(GetPix(55),
- GetPix(448),
- GetPix(23),
- GetPix(23)),
- ">",
- style3))
- {
- ++pHandR[selectMaidIndex];
- if (pHandR[selectMaidIndex] > fingerRArray.GetLength(0))
- {
- pHandR[selectMaidIndex] = 1;
- }
- for (int index2 = 0; index2 < 20; ++index2)
- {
- string[] strArray2 = fingerRArray[pHandR[selectMaidIndex] - 1, index2].Split(',');
- Finger[selectMaidIndex, index2 + 20].localEulerAngles =
- new Vector3(float.Parse(strArray2[0]), float.Parse(strArray2[1]), float.Parse(strArray2[2]));
- }
- isStop[selectMaidIndex] = true;
- isLock[selectMaidIndex] = true;
- for (int index2 = 0; index2 < 10; ++index2)
- {
- if ((index2 == 0 || index2 == 5) && mFinger[selectMaidIndex, index2 * 3])
- {
- mFinger[selectMaidIndex, index2 * 3].reset = true;
- }
- }
- }
- if (GUI.Button(new Rect(GetPix(85),
- GetPix(448),
- GetPix(23),
- GetPix(23)),
- "<",
- style3))
- {
- --pHandL[selectMaidIndex];
- if (pHandL[selectMaidIndex] < 1)
- {
- pHandL[selectMaidIndex] = fingerLArray.GetLength(0);
- }
- for (int index2 = 0; index2 < 20; ++index2)
- {
- string[] strArray2 = fingerLArray[pHandL[selectMaidIndex] - 1, index2].Split(',');
- Finger[selectMaidIndex, index2].localEulerAngles =
- new Vector3(float.Parse(strArray2[0]), float.Parse(strArray2[1]), float.Parse(strArray2[2]));
- }
- isStop[selectMaidIndex] = true;
- isLock[selectMaidIndex] = true;
- }
- if (GUI.Button(new Rect(GetPix(135),
- GetPix(448),
- GetPix(23),
- GetPix(23)),
- ">",
- style3))
- {
- ++pHandL[selectMaidIndex];
- if (pHandL[selectMaidIndex] > fingerRArray.GetLength(0))
- {
- pHandL[selectMaidIndex] = 1;
- }
- for (int index2 = 0; index2 < 20; ++index2)
- {
- string[] strArray2 = fingerLArray[pHandL[selectMaidIndex] - 1, index2].Split(',');
- Finger[selectMaidIndex, index2].localEulerAngles =
- new Vector3(float.Parse(strArray2[0]), float.Parse(strArray2[1]), float.Parse(strArray2[2]));
- }
- isStop[selectMaidIndex] = true;
- isLock[selectMaidIndex] = true;
- }
- if (maidCnt <= 1)
- {
- GUI.enabled = false;
- }
- if (GUI.Button(new Rect(GetPix(45),
- GetPix(504),
- GetPix(22),
- GetPix(20)),
- ">",
- style3))
- {
- ++copyIndex;
- if (copyIndex - 1 == selectMaidIndex)
- {
- ++copyIndex;
- }
- if (copyIndex > maidCnt)
- {
- copyIndex = 0;
- }
- }
- if (isCopy)
- {
- isCopy = false;
- CopyIK2(maidArray[selectMaidIndex], selectMaidIndex, maidArray[copyIndex - 1], copyIndex - 1);
- }
- if (copyIndex == 0)
- {
- GUI.enabled = false;
- }
- if (GUI.Button(new Rect(GetPix(123),
- GetPix(504),
- GetPix(35),
- GetPix(20)),
- "決定",
- style3))
- {
- CopyIK(maidArray[selectMaidIndex], selectMaidIndex, maidArray[copyIndex - 1], copyIndex - 1);
- isCopy = true;
- pHandL[selectMaidIndex] = pHandL[copyIndex - 1];
- pHandR[selectMaidIndex] = pHandR[copyIndex - 1];
- hanten[selectMaidIndex] = hanten[copyIndex - 1];
- hantenn[selectMaidIndex] = hantenn[copyIndex - 1];
- }
- GUI.enabled = true;
- if (poseCombo.isClickedComboButton || poseGroupCombo.isClickedComboButton)
- {
- GUI.enabled = false;
- }
- itemIndex2[selectMaidIndex] =
- itemCombo.List(new Rect(GetPix(35),
- GetPix(215),
- GetPix(95),
- GetPix(23)),
- itemComboList[itemIndex[selectMaidIndex]].text,
- itemComboList,
- buttonStyle1,
- "box",
- listStyle3);
- GUI.enabled = true;
- if (poseGroupCombo.isClickedComboButton || isLock[selectMaidIndex])
- {
- GUI.enabled = false;
- }
- poseCombo.List(new Rect(GetPix(35),
- GetPix(125),
- GetPix(95),
- GetPix(23)),
- poseComboList[index6].text,
- poseComboList,
- buttonStyle1,
- "box",
- listStyle2);
- if (!isLock[selectMaidIndex])
- {
- GUI.enabled = true;
- }
- int index7 = -1;
- for (int index2 = 0; index2 < groupList.Count; ++index2)
- {
- if (poseIndex[selectMaidIndex] < (int)groupList[index2])
- {
- index7 = index2;
- break;
- }
- }
- if (index7 < 0)
- {
- index7 = groupList.Count;
- }
- if (GUI.Button(new Rect(GetPix(5), GetPix(95), GetPix(23), GetPix(23)),
- "<",
- style3))
- {
- isPoseInit = true;
- if (!isLock[selectMaidIndex])
- {
- for (int index2 = 0; index2 < groupList.Count; ++index2)
- {
- if (index2 == 0 && poseIndex[selectMaidIndex] <= (int)groupList[index2])
- {
- poseIndex[selectMaidIndex] = poseIndex[selectMaidIndex] != 0 ? 0 : (int)groupList[groupList.Count - 1];
- break;
- }
- if (index2 > 0 && poseIndex[selectMaidIndex] > (int)groupList[index2 - 1]
- && poseIndex[selectMaidIndex] <= (int)groupList[index2])
- {
- poseIndex[selectMaidIndex] = (int)groupList[index2 - 1];
- break;
- }
- }
- if (poseIndex[selectMaidIndex] > (int)groupList[groupList.Count - 1])
- {
- poseIndex[selectMaidIndex] = (int)groupList[groupList.Count - 1];
- }
- if (maid && maid.Visible)
- {
- string[] strArray2 = poseArray[poseIndex[selectMaidIndex]].Split(',');
- isStop[selectMaidIndex] = false;
- poseCount[selectMaidIndex] = 20;
- if (strArray2[0].Contains("_momi") || strArray2[0].Contains("paizuri_"))
- {
- maid.body0.MuneYureL(0.0f);
- maid.body0.MuneYureR(0.0f);
- }
- else
- {
- maid.body0.MuneYureL(1f);
- maid.body0.MuneYureR(1f);
- }
- if (strArray2[0].Contains("MultipleMaidsPose"))
- {
- string path = strArray2[0].Split('/')[1];
- byte[] numArray = new byte[0];
- try
- {
- using (FileStream fileStream = new FileStream(path, FileMode.Open, FileAccess.Read))
- {
- numArray = new byte[fileStream.Length];
- fileStream.Read(numArray, 0, numArray.Length);
- }
- }
- catch { }
- if (0 < numArray.Length)
- {
- long hashCode = Path.GetFileName(path).GetHashCode();
- maid.body0.CrossFade(hashCode.ToString(), numArray, false, false, false, 0.0f, 1f);
- Maid.AutoTwist[] autoTwistArray = new Maid.AutoTwist[6]
- {
- Maid.AutoTwist.ShoulderL, Maid.AutoTwist.ShoulderR, Maid.AutoTwist.WristL,
- Maid.AutoTwist.WristR, Maid.AutoTwist.ThighL, Maid.AutoTwist.ThighR
- };
- foreach (Maid.AutoTwist f_eType in autoTwistArray)
- {
- maid.SetAutoTwist(f_eType, true);
- }
- }
- }
- else if (strArray2[0].StartsWith("p") && int.TryParse(strArray2[0].Substring(1), out result))
- {
- loadPose[selectMaidIndex] = strArray2[0];
- }
- else if (!strArray2[0].StartsWith("dance_"))
- {
- maidArray[selectMaidIndex].CrossFade(strArray2[0] + ".anm", false, true, false, 0.0f, 1f);
- }
- else
- {
- if (!maid.body0.m_Bones.GetComponent<Animation>().GetClip(strArray2[0] + ".anm"))
- {
- maid.body0.LoadAnime(strArray2[0] + ".anm", GameUty.FileSystem, strArray2[0] + ".anm", false, false);
- }
- maid.body0.m_Bones.GetComponent<Animation>().Play(strArray2[0] + ".anm");
- }
- if (strArray2.Length > 1)
- {
- maid.body0.m_Bones.GetComponent<Animation>()[strArray2[0] + ".anm"].time = float.Parse(strArray2[1]);
- isDanceStop = true;
- if (strArray2.Length > 2)
- {
- transform = CMT.SearchObjName(maidArray[selectMaidIndex].body0.m_Bones.transform, "Bip01", true);
- isPoseIti[selectMaidIndex] = true;
- poseIti[selectMaidIndex] = maidArray[selectMaidIndex].transform.position;
- maidArray[selectMaidIndex].transform.position = new Vector3(100f, 100f, 100f);
- }
- }
- }
- }
- int index3 = -1;
- for (int index2 = 0; index2 < groupList.Count; ++index2)
- {
- if (poseIndex[selectMaidIndex] < (int)groupList[index2])
- {
- index3 = index2;
- break;
- }
- }
- int length2 = (int)groupList[0];
- int num2 = 0;
- if (index3 > 0)
- {
- length2 = (int)groupList[index3] - (int)groupList[index3 - 1];
- num2 = (int)groupList[index3 - 1];
- }
- if (index3 < 0)
- {
- index3 = groupList.Count;
- length2 = poseArray.Length - (int)groupList[index3 - 1];
- num2 = (int)groupList[index3 - 1];
- }
- poseComboList = new GUIContent[length2];
- int index4 = 0;
- for (int index2 = num2; index2 < num2 + length2; ++index2)
- {
- bool flag2 = false;
- foreach (IniKey key in Preferences["pose"].Keys)
- {
- if (poseArray[index2] == key.Key)
- {
- IniKey iniKey = Preferences["pose"][key.Key];
- if (iniKey.Value != null && iniKey.Value.ToString() != "" && iniKey.Value.ToString() != "del")
- {
- poseComboList[index4] =
- new GUIContent((index4 + 1).ToString() + ":" + iniKey.Value.Split('_')[0]
- + " " + key.Key);
- flag2 = true;
- }
- }
- }
- if (!flag2)
- {
- poseComboList[index4] = new GUIContent((index4 + 1).ToString() + ":" + poseArray[index2]);
- }
- ++index4;
- }
- poseCombo.scrollPos = new Vector2(0.0f, 0.0f);
- poseGroupCombo.selectedItemIndex = index3;
- poseCombo.selectedItemIndex = 0;
- }
- if (GUI.Button(new Rect(GetPix(135),
- GetPix(95),
- GetPix(23),
- GetPix(23)),
- ">",
- style3))
- {
- isPoseInit = true;
- if (!isLock[selectMaidIndex])
- {
- int num2 = poseIndex[selectMaidIndex];
- for (int index2 = 0; index2 < groupList.Count; ++index2)
- {
- if (poseIndex[selectMaidIndex] < (int)groupList[index2])
- {
- poseIndex[selectMaidIndex] = (int)groupList[index2];
- break;
- }
- }
- if (num2 == poseIndex[selectMaidIndex] && poseIndex[selectMaidIndex] >= (int)groupList[groupList.Count - 1])
- {
- poseIndex[selectMaidIndex] = 0;
- }
- if (maid && maid.Visible)
- {
- string[] strArray2 = poseArray[poseIndex[selectMaidIndex]].Split(',');
- isStop[selectMaidIndex] = false;
- poseCount[selectMaidIndex] = 20;
- if (strArray2[0].Contains("_momi") || strArray2[0].Contains("paizuri_"))
- {
- maid.body0.MuneYureL(0.0f);
- maid.body0.MuneYureR(0.0f);
- }
- else
- {
- maid.body0.MuneYureL(1f);
- maid.body0.MuneYureR(1f);
- }
- if (strArray2[0].Contains("MultipleMaidsPose"))
- {
- string path = strArray2[0].Split('/')[1];
- byte[] numArray = new byte[0];
- try
- {
- using (FileStream fileStream = new FileStream(path, FileMode.Open, FileAccess.Read))
- {
- numArray = new byte[fileStream.Length];
- fileStream.Read(numArray, 0, numArray.Length);
- }
- }
- catch { }
- if (0 < numArray.Length)
- {
- long hashCode = Path.GetFileName(path).GetHashCode();
- maid.body0.CrossFade(hashCode.ToString(), numArray, false, false, false, 0.0f, 1f);
- Maid.AutoTwist[] autoTwistArray = new Maid.AutoTwist[6]
- {
- Maid.AutoTwist.ShoulderL, Maid.AutoTwist.ShoulderR, Maid.AutoTwist.WristL,
- Maid.AutoTwist.WristR, Maid.AutoTwist.ThighL, Maid.AutoTwist.ThighR
- };
- foreach (Maid.AutoTwist f_eType in autoTwistArray)
- {
- maid.SetAutoTwist(f_eType, true);
- }
- }
- }
- else if (strArray2[0].StartsWith("p") && int.TryParse(strArray2[0].Substring(1), out result))
- {
- loadPose[selectMaidIndex] = strArray2[0];
- }
- else if (!strArray2[0].StartsWith("dance_"))
- {
- maidArray[selectMaidIndex].CrossFade(strArray2[0] + ".anm", false, true, false, 0.0f, 1f);
- }
- else
- {
- if (!maid.body0.m_Bones.GetComponent<Animation>().GetClip(strArray2[0] + ".anm"))
- {
- maid.body0.LoadAnime(strArray2[0] + ".anm", GameUty.FileSystem, strArray2[0] + ".anm", false, false);
- }
- maid.body0.m_Bones.GetComponent<Animation>().Play(strArray2[0] + ".anm");
- }
- if (strArray2.Length > 1)
- {
- maid.body0.m_Bones.GetComponent<Animation>()[strArray2[0] + ".anm"].time = float.Parse(strArray2[1]);
- isDanceStop = true;
- if (strArray2.Length > 2)
- {
- transform = CMT.SearchObjName(maidArray[selectMaidIndex].body0.m_Bones.transform, "Bip01", true);
- isPoseIti[selectMaidIndex] = true;
- poseIti[selectMaidIndex] = maidArray[selectMaidIndex].transform.position;
- maidArray[selectMaidIndex].transform.position = new Vector3(100f, 100f, 100f);
- }
- }
- }
- }
- int index3 = -1;
- for (int index2 = 0; index2 < groupList.Count; ++index2)
- {
- if (poseIndex[selectMaidIndex] < (int)groupList[index2])
- {
- index3 = index2;
- break;
- }
- }
- int length2 = (int)groupList[0];
- int num3 = 0;
- if (index3 > 0)
- {
- length2 = (int)groupList[index3] - (int)groupList[index3 - 1];
- num3 = (int)groupList[index3 - 1];
- }
- if (index3 < 0)
- {
- index3 = groupList.Count;
- length2 = poseArray.Length - (int)groupList[index3 - 1];
- num3 = (int)groupList[index3 - 1];
- }
- poseComboList = new GUIContent[length2];
- int index4 = 0;
- for (int index2 = num3; index2 < num3 + length2; ++index2)
- {
- bool flag2 = false;
- foreach (IniKey key in Preferences["pose"].Keys)
- {
- if (poseArray[index2] == key.Key)
- {
- IniKey iniKey = Preferences["pose"][key.Key];
- if (iniKey.Value != null && iniKey.Value.ToString() != "" && iniKey.Value.ToString() != "del")
- {
- poseComboList[index4] =
- new GUIContent((index4 + 1).ToString() + ":" + iniKey.Value.Split('_')[0]
- + " " + key.Key);
- flag2 = true;
- }
- }
- }
- if (!flag2)
- {
- poseComboList[index4] = new GUIContent((index4 + 1).ToString() + ":" + poseArray[index2]);
- }
- ++index4;
- }
- poseCombo.scrollPos = new Vector2(0.0f, 0.0f);
- poseGroupCombo.selectedItemIndex = index3;
- poseCombo.selectedItemIndex = 0;
- }
- poseGroupIndex =
- poseGroupCombo.List(new Rect(GetPix(35),
- GetPix(95),
- GetPix(95),
- GetPix(23)),
- poseGroupComboList[index7].text,
- poseGroupComboList,
- buttonStyle2,
- "box",
- listStyle4);
- if (poseGroupCombo.isClickedComboButton)
- {
- isCombo2 = true;
- }
- else if (isCombo2)
- {
- isCombo2 = false;
- isPoseInit = true;
- poseIndex[selectMaidIndex] = poseGroupIndex <= 0 ? 0 : (int)groupList[poseGroupIndex - 1];
- if (!isLock[selectMaidIndex] && maid && maid.Visible)
- {
- string[] strArray2 = poseArray[poseIndex[selectMaidIndex]].Split(',');
- isStop[selectMaidIndex] = false;
- poseCount[selectMaidIndex] = 20;
- if (strArray2[0].Contains("_momi") || strArray2[0].Contains("paizuri_"))
- {
- maid.body0.MuneYureL(0.0f);
- maid.body0.MuneYureR(0.0f);
- }
- else
- {
- maid.body0.MuneYureL(1f);
- maid.body0.MuneYureR(1f);
- }
- if (strArray2[0].Contains("MultipleMaidsPose"))
- {
- string path = strArray2[0].Split('/')[1];
- byte[] numArray = new byte[0];
- try
- {
- using (FileStream fileStream = new FileStream(path, FileMode.Open, FileAccess.Read))
- {
- numArray = new byte[fileStream.Length];
- fileStream.Read(numArray, 0, numArray.Length);
- }
- }
- catch { }
- if (0 < numArray.Length)
- {
- long hashCode = Path.GetFileName(path).GetHashCode();
- maid.body0.CrossFade(hashCode.ToString(), numArray, false, false, false, 0.0f, 1f);
- Maid.AutoTwist[] autoTwistArray = new Maid.AutoTwist[6]
- {
- Maid.AutoTwist.ShoulderL, Maid.AutoTwist.ShoulderR, Maid.AutoTwist.WristL, Maid.AutoTwist.WristR,
- Maid.AutoTwist.ThighL, Maid.AutoTwist.ThighR
- };
- foreach (Maid.AutoTwist f_eType in autoTwistArray)
- {
- maid.SetAutoTwist(f_eType, true);
- }
- }
- }
- else if (strArray2[0].StartsWith("p") && int.TryParse(strArray2[0].Substring(1), out result))
- {
- loadPose[selectMaidIndex] = strArray2[0];
- }
- else if (!strArray2[0].StartsWith("dance_"))
- {
- maidArray[selectMaidIndex].CrossFade(strArray2[0] + ".anm", false, true, false, 0.0f, 1f);
- }
- else
- {
- if (!maid.body0.m_Bones.GetComponent<Animation>().GetClip(strArray2[0] + ".anm"))
- {
- maid.body0.LoadAnime(strArray2[0] + ".anm", GameUty.FileSystem, strArray2[0] + ".anm", false, false);
- }
- maid.body0.m_Bones.GetComponent<Animation>().Play(strArray2[0] + ".anm");
- }
- if (strArray2.Length > 1)
- {
- maid.body0.m_Bones.GetComponent<Animation>()[strArray2[0] + ".anm"].time = float.Parse(strArray2[1]);
- isDanceStop = true;
- if (strArray2.Length > 2)
- {
- transform = CMT.SearchObjName(maidArray[selectMaidIndex].body0.m_Bones.transform, "Bip01", true);
- isPoseIti[selectMaidIndex] = true;
- poseIti[selectMaidIndex] = maidArray[selectMaidIndex].transform.position;
- maidArray[selectMaidIndex].transform.position = new Vector3(100f, 100f, 100f);
- }
- }
- }
- int index2 = -1;
- for (int index3 = 0; index3 < groupList.Count; ++index3)
- {
- if (poseIndex[selectMaidIndex] < (int)groupList[index3])
- {
- index2 = index3;
- break;
- }
- }
- int length2 = (int)groupList[0];
- int num2 = 0;
- if (index2 > 0)
- {
- length2 = (int)groupList[index2] - (int)groupList[index2 - 1];
- num2 = (int)groupList[index2 - 1];
- }
- if (index2 < 0)
- {
- index2 = groupList.Count;
- length2 = poseArray.Length - (int)groupList[index2 - 1];
- num2 = (int)groupList[index2 - 1];
- }
- poseComboList = new GUIContent[length2];
- int index4 = 0;
- for (int index3 = num2; index3 < num2 + length2; ++index3)
- {
- bool flag2 = false;
- foreach (IniKey key in Preferences["pose"].Keys)
- {
- if (poseArray[index3] == key.Key)
- {
- IniKey iniKey = Preferences["pose"][key.Key];
- if (iniKey.Value != null && iniKey.Value.ToString() != "" && iniKey.Value.ToString() != "del")
- {
- poseComboList[index4] =
- new GUIContent((index4 + 1).ToString() + ":" + iniKey.Value.Split('_')[0]
- + " " + key.Key);
- flag2 = true;
- }
- }
- }
- if (!flag2)
- {
- poseComboList[index4] = new GUIContent((index4 + 1).ToString() + ":" + poseArray[index3]);
- }
- ++index4;
- }
- poseCombo.scrollPos = new Vector2(0.0f, 0.0f);
- poseGroupCombo.selectedItemIndex = index2;
- poseCombo.selectedItemIndex = 0;
- }
- if (poseCombo.isClickedComboButton)
- {
- isCombo = true;
- }
- else if (isCombo)
- {
- isCombo = false;
- isPoseInit = true;
- poseIndex[selectMaidIndex] = poseGroupIndex <= 0
- ? poseCombo.selectedItemIndex
- : (int)groupList[poseGroupIndex - 1] + poseCombo.selectedItemIndex;
- if (poseIndex[selectMaidIndex] == poseArray.Length)
- {
- poseIndex[selectMaidIndex] = 0;
- }
- if (!isLock[selectMaidIndex] && maid && maid.Visible)
- {
- string[] strArray2 = poseArray[poseIndex[selectMaidIndex]].Split(',');
- isStop[selectMaidIndex] = false;
- poseCount[selectMaidIndex] = 20;
- if (strArray2[0].Contains("_momi") || strArray2[0].Contains("paizuri_"))
- {
- maid.body0.MuneYureL(0.0f);
- maid.body0.MuneYureR(0.0f);
- }
- else
- {
- maid.body0.MuneYureL(1f);
- maid.body0.MuneYureR(1f);
- }
- if (strArray2[0].Contains("MultipleMaidsPose"))
- {
- string path = strArray2[0].Split('/')[1];
- byte[] numArray = new byte[0];
- try
- {
- using (FileStream fileStream = new FileStream(path, FileMode.Open, FileAccess.Read))
- {
- numArray = new byte[fileStream.Length];
- fileStream.Read(numArray, 0, numArray.Length);
- }
- }
- catch { }
- if (0 < numArray.Length)
- {
- long hashCode = Path.GetFileName(path).GetHashCode();
- maid.body0.CrossFade(hashCode.ToString(), numArray, false, false, false, 0.0f, 1f);
- Maid.AutoTwist[] autoTwistArray = new Maid.AutoTwist[6]
- {
- Maid.AutoTwist.ShoulderL, Maid.AutoTwist.ShoulderR, Maid.AutoTwist.WristL, Maid.AutoTwist.WristR,
- Maid.AutoTwist.ThighL, Maid.AutoTwist.ThighR
- };
- foreach (Maid.AutoTwist f_eType in autoTwistArray)
- {
- maid.SetAutoTwist(f_eType, true);
- }
- }
- }
- else if (strArray2[0].StartsWith("p") && int.TryParse(strArray2[0].Substring(1), out result))
- {
- loadPose[selectMaidIndex] = strArray2[0];
- }
- else if (!strArray2[0].StartsWith("dance_"))
- {
- maidArray[selectMaidIndex].CrossFade(strArray2[0] + ".anm", false, true, false, 0.0f, 1f);
- }
- else
- {
- if (!maid.body0.m_Bones.GetComponent<Animation>().GetClip(strArray2[0] + ".anm"))
- {
- maid.body0.LoadAnime(strArray2[0] + ".anm", GameUty.FileSystem, strArray2[0] + ".anm", false, false);
- }
- maid.body0.m_Bones.GetComponent<Animation>().Play(strArray2[0] + ".anm");
- }
- if (strArray2.Length > 1)
- {
- maid.body0.m_Bones.GetComponent<Animation>()[strArray2[0] + ".anm"].time = float.Parse(strArray2[1]);
- isDanceStop = true;
- if (strArray2.Length > 2)
- {
- transform = CMT.SearchObjName(maidArray[selectMaidIndex].body0.m_Bones.transform, "Bip01", true);
- isPoseIti[selectMaidIndex] = true;
- poseIti[selectMaidIndex] = maidArray[selectMaidIndex].transform.position;
- maidArray[selectMaidIndex].transform.position = new Vector3(100f, 100f, 100f);
- }
- }
- }
- }
- if (itemCombo.isClickedComboButton)
- {
- isCombo3 = true;
- }
- else if (isCombo3)
- {
- isCombo3 = false;
- strArray1 = new string[2];
- string[] strArray2 = itemArray[itemIndex2[selectMaidIndex]].Split(',');
- if (itemIndex2[selectMaidIndex] > 13)
- {
- strArray2 = itemArray[itemIndex2[selectMaidIndex] + 1].Split(',');
- }
- maid.DelProp(MPN.handitem, true);
- bool flag2 = false;
- if (itemIndex2[selectMaidIndex] == 0)
- {
- maid.DelProp(MPN.accvag, true);
- maid.DelProp(MPN.accanl, true);
- }
- if (itemIndex2[selectMaidIndex] == 12 || itemIndex2[selectMaidIndex] == 13)
- {
- flag2 = true;
- }
- if (!flag2)
- {
- maid.DelProp(MPN.kousoku_upper, true);
- maid.DelProp(MPN.kousoku_lower, true);
- }
- if (strArray2[0] != "")
- {
- maid.SetProp(strArray2[0], strArray2[1], 0, true, false);
- }
- if (itemIndex2[selectMaidIndex] == 12)
- {
- string[] strArray3 = itemArray[itemIndex2[selectMaidIndex] - 1].Split(',');
- maid.SetProp(strArray3[0], strArray3[1], 0, true, false);
- }
- if (itemIndex2[selectMaidIndex] == 13)
- {
- string[] strArray3 = itemArray[itemIndex2[selectMaidIndex] + 1].Split(',');
- maid.SetProp(strArray3[0], strArray3[1], 0, true, false);
- }
- if (itemIndex2[selectMaidIndex] == 23)
- {
- string[] strArray3 = itemArray[itemIndex2[selectMaidIndex]].Split(',');
- maid.SetProp(strArray3[0], strArray3[1], 0, true, false);
- cafeFlg[selectMaidIndex] = true;
- }
- maid.AllProcPropSeqStart();
- itemCombo.selectedItemIndex = itemIndex2[selectMaidIndex];
- itemIndex[selectMaidIndex] = itemIndex2[selectMaidIndex];
- }
- }
- else
- {
- isWear = GUI.Toggle(new Rect(GetPix(5),
- GetPix(98),
- GetPix(70),
- GetPix(20)),
- isWear,
- "トップス",
- style4);
- isSkirt = GUI.Toggle(new Rect(GetPix(90),
- GetPix(98),
- GetPix(70),
- GetPix(20)),
- isSkirt,
- "ボトムス",
- style4);
- isBra = GUI.Toggle(new Rect(GetPix(5),
- GetPix(123),
- GetPix(80),
- GetPix(20)),
- isBra,
- "ブラジャー",
- style4);
- isPanz = GUI.Toggle(new Rect(GetPix(90),
- GetPix(123),
- GetPix(60),
- GetPix(20)),
- isPanz,
- "パンツ",
- style4);
- isHeadset = GUI.Toggle(new Rect(GetPix(5),
- GetPix(148),
- GetPix(70),
- GetPix(20)),
- isHeadset,
- "ヘッド",
- style4);
- isMegane = GUI.Toggle(new Rect(GetPix(90),
- GetPix(148),
- GetPix(70),
- GetPix(20)),
- isMegane,
- "メガネ",
- style4);
- isAccUde = GUI.Toggle(new Rect(GetPix(5),
- GetPix(173),
- GetPix(40),
- GetPix(20)),
- isAccUde,
- "腕",
- style4);
- isGlove = GUI.Toggle(new Rect(GetPix(45),
- GetPix(173),
- GetPix(40),
- GetPix(20)),
- isGlove,
- "手袋",
- style4);
- isAccSenaka = GUI.Toggle(new Rect(GetPix(97),
- GetPix(173),
- GetPix(40),
- GetPix(20)),
- isAccSenaka,
- "背中",
- style4);
- isStkg = GUI.Toggle(new Rect(GetPix(5),
- GetPix(198),
- GetPix(70),
- GetPix(20)),
- isStkg,
- "ソックス",
- style4);
- isShoes = GUI.Toggle(new Rect(GetPix(90),
- GetPix(198),
- GetPix(70),
- GetPix(20)),
- isShoes,
- "シューズ",
- style4);
- mekure1[selectMaidIndex] =
- GUI.Toggle(new Rect(GetPix(5),
- GetPix(223),
- GetPix(62),
- GetPix(20)),
- mekure1[selectMaidIndex],
- "めくれ前",
- style4);
- mekure2[selectMaidIndex] =
- GUI.Toggle(new Rect(GetPix(67),
- GetPix(223),
- GetPix(40),
- GetPix(20)),
- mekure2[selectMaidIndex],
- "後ろ",
- style4);
- zurasi[selectMaidIndex] =
- GUI.Toggle(new Rect(GetPix(105),
- GetPix(223),
- GetPix(50),
- GetPix(20)),
- zurasi[selectMaidIndex],
- "ずらし",
- style4);
- }
- bool state = GUI.enabled;
- GUI.enabled = true;
- GUI.DragWindow();
- GUI.enabled = state;
- }
- private void FaceWindow(int winID)
- {
- GUIStyle style1 = "label";
- style1.fontSize = GetPix(12);
- style1.alignment = TextAnchor.UpperLeft;
- GUIStyle style2 = "label";
- style2.fontSize = GetPix(11);
- style2.alignment = TextAnchor.UpperLeft;
- GUIStyle style3 = "button";
- style3.fontSize = GetPix(20);
- GUIStyle buttonStyle = "button";
- buttonStyle.fontSize = GetPix(12);
- buttonStyle.alignment = TextAnchor.MiddleLeft;
- GUIStyle style4 = new GUIStyle("toggle")
- {
- fontSize = GetPix(13)
- };
- CharacterMgr characterMgr = GameMain.Instance.CharacterMgr;
- if (!faceInitFlg)
- {
- listStyle2.normal.textColor = Color.white;
- listStyle2.normal.background = MakeTex(2, 2, new Color(0.0f, 0.0f, 0.0f, 0.5f));
- listStyle2.onHover.background = listStyle2.hover.background = new Texture2D(2, 2);
- listStyle2.padding.left = listStyle2.padding.right = listStyle2.padding.top = listStyle2.padding.bottom = GetPix(0);
- listStyle2.fontSize = GetPix(12);
- faceCombo.selectedItemIndex = 0;
- List<string> stringList = new List<string>(300);
- stringList.AddRange(faceArray);
- for (int index = 1; index < 300; ++index)
- {
- IniKey iniKey = Preferences["face"]["f" + index];
- if (iniKey.Value != null)
- {
- string[] strArray = iniKey.Value.Split(':');
- if (strArray.Length > 1)
- {
- stringList.Add(strArray[0] + " :" + index + ":" + strArray[1]);
- }
- }
- else
- {
- break;
- }
- }
- faceCombo.selectedItemIndex = 0;
- faceComboList = new GUIContent[stringList.ToArray().Length];
- for (int index = 0; index < stringList.ToArray().Length; ++index)
- {
- faceComboList[index] = new GUIContent(stringList.ToArray()[index]);
- }
- faceInitFlg = true;
- }
- if (faceCombo.isClickedComboButton)
- {
- GUI.enabled = false;
- }
- if (sceneLevel == 3 || sceneLevel == 5 || isF6)
- {
- if (!isF6)
- {
- bool flag = true;
- if (faceFlg || poseFlg || sceneFlg || kankyoFlg || kankyo2Flg)
- {
- flag = false;
- }
- if (GUI.Toggle(new Rect(GetPix(2),
- GetPix(2),
- GetPix(39),
- GetPix(20)),
- flag,
- "配置",
- style4))
- {
- faceFlg = false;
- poseFlg = false;
- sceneFlg = false;
- kankyoFlg = false;
- kankyo2Flg = false;
- bGui = true;
- }
- }
- if (!yotogiFlg && GUI.Toggle(new Rect(GetPix(41),
- GetPix(2),
- GetPix(39),
- GetPix(20)),
- poseFlg,
- "操作",
- style4))
- {
- poseFlg = true;
- faceFlg = false;
- sceneFlg = false;
- kankyoFlg = false;
- kankyo2Flg = false;
- }
- if (GUI.Toggle(new Rect(GetPix(80), GetPix(2), GetPix(39), GetPix(20)),
- faceFlg,
- "表情",
- style4))
- {
- faceFlg = true;
- poseFlg = false;
- sceneFlg = false;
- kankyoFlg = false;
- kankyo2Flg = false;
- if (!faceFlg2)
- {
- isFaceInit = true;
- faceFlg2 = true;
- maidArray[selectMaidIndex].boMabataki = false;
- faceCombo.selectedItemIndex = faceIndex[selectMaidIndex];
- }
- faceCombo.selectedItemIndex = faceIndex[selectMaidIndex];
- }
- if (GUI.Toggle(new Rect(GetPix(119), GetPix(2), GetPix(39), GetPix(20)),
- kankyoFlg,
- "環境",
- style4))
- {
- poseFlg = false;
- faceFlg = false;
- sceneFlg = false;
- kankyoFlg = true;
- kankyo2Flg = false;
- }
- if (!line1)
- {
- line1 = MakeTex(2, 2, new Color(0.0f, 0.0f, 0.0f, 0.3f));
- line2 = MakeTex(2, 2, new Color(0.7f, 0.7f, 0.7f, 0.6f));
- }
- GUI.DrawTexture(new Rect(GetPix(5), GetPix(20), GetPix(160), 2f), line1);
- GUI.DrawTexture(new Rect(GetPix(5), GetPix(20), GetPix(160), 1f), line2);
- style1.fontSize = GetPix(13);
- style1.alignment = TextAnchor.MiddleCenter;
- GUI.Label(new Rect(GetPix(125), GetPix(25), GetPix(40), GetPix(25)),
- string.Concat(selectMaidIndex + 1),
- style1);
- style1.fontSize = GetPix(11);
- style1.alignment = TextAnchor.UpperLeft;
- }
- if (sceneLevel > 0)
- {
- int selectMaidIndex = this.selectMaidIndex;
- if (sceneLevel == 3 || sceneLevel == 5 && (isF7 || maidCnt > 1))
- {
- if (GUI.Button(new Rect(GetPix(5),
- GetPix(53),
- GetPix(23),
- GetPix(32)),
- "<",
- style3))
- {
- --this.selectMaidIndex;
- if (this.selectMaidIndex < 0)
- {
- this.selectMaidIndex = selectList.Count - 1;
- }
- isFaceInit = true;
- faceFlg = true;
- copyIndex = 0;
- faceCombo.selectedItemIndex = faceIndex[this.selectMaidIndex];
- }
- if (GUI.Button(new Rect(GetPix(135),
- GetPix(53),
- GetPix(23),
- GetPix(32)),
- ">",
- style3))
- {
- ++this.selectMaidIndex;
- if (selectList.Count <= this.selectMaidIndex)
- {
- this.selectMaidIndex = 0;
- }
- isFaceInit = true;
- faceFlg = true;
- copyIndex = 0;
- faceCombo.selectedItemIndex = faceIndex[this.selectMaidIndex];
- }
- }
- if (maidArray[this.selectMaidIndex].GetThumIcon())
- {
- GUI.DrawTexture(new Rect(GetPix(30),
- GetPix(25),
- GetPix(60),
- GetPix(60)),
- maidArray[this.selectMaidIndex].GetThumIcon());
- }
- GUI.Label(new Rect(GetPix(90), GetPix(50), GetPix(140), GetPix(210)),
- maidArray[this.selectMaidIndex].status.lastName + "\n" + maidArray[this.selectMaidIndex].status.firstName,
- style1);
- bool flag = GUI.Toggle(new Rect(GetPix(90),
- GetPix(25),
- GetPix(50),
- GetPix(16)),
- isShosai,
- "詳細",
- style4);
- if (flag != isShosai)
- {
- isShosai = flag;
- if (isShosai)
- {
- Preferences["config"]["hair_details"].Value = "true";
- }
- else
- {
- Preferences["config"]["hair_details"].Value = "false";
- }
- SaveConfig();
- }
- if (isFace[selectMaidIndex])
- {
- if (GUI.Button(new Rect(GetPix(5),
- GetPix(25),
- GetPix(23),
- GetPix(23)),
- "有",
- style3))
- {
- TMorph morph = maidArray[selectMaidIndex].body0.Face.morph;
- maidArray[selectMaidIndex].boMabataki = false;
- isFace[selectMaidIndex] = false;
- }
- maidArray[selectMaidIndex].boMabataki = false;
- }
- else
- {
- if (GUI.Button(new Rect(GetPix(5),
- GetPix(25),
- GetPix(23),
- GetPix(23)),
- "無",
- style3))
- {
- TMorph morph = maidArray[selectMaidIndex].body0.Face.morph;
- maidArray[selectMaidIndex].boMabataki = false;
- morph.EyeMabataki = 0.0f;
- isFaceInit = true;
- isFace[selectMaidIndex] = true;
- faceCombo.selectedItemIndex = faceIndex[selectMaidIndex];
- }
- GUI.enabled = false;
- maidArray[selectMaidIndex].boMabataki = true;
- }
- }
- if (GUI.Button(new Rect(GetPix(5), GetPix(95), GetPix(23), GetPix(23)),
- "<",
- style3))
- {
- --faceIndex[selectMaidIndex];
- if (faceIndex[selectMaidIndex] <= -1)
- {
- faceIndex[selectMaidIndex] = faceComboList.Length - 1;
- }
- TMorph morph = maidArray[selectMaidIndex].body0.Face.morph;
- maidArray[selectMaidIndex].boMabataki = false;
- morph.EyeMabataki = 0.0f;
- if (faceIndex[selectMaidIndex] < faceArray.Length)
- {
- morph.MulBlendValues(faceArray[faceIndex[selectMaidIndex]], 1f);
- }
- else
- {
- float[] fieldValue1 = GetFieldValue<TMorph, float[]>(morph, "BlendValues");
- float[] fieldValue2 = GetFieldValue<TMorph, float[]>(morph, "BlendValuesBackup");
- if (!isVR)
- {
- maidArray[selectMaidIndex].boMabataki = false;
- }
- string[] strArray = faceComboList[faceIndex[selectMaidIndex]].text.Split(':')[2].Split(',');
- fieldValue2[(int)morph.hash["eyeclose"]] = float.Parse(strArray[0]);
- fieldValue2[(int)morph.hash["eyeclose2"]] = float.Parse(strArray[1]);
- fieldValue2[(int)morph.hash["eyeclose3"]] = float.Parse(strArray[2]);
- fieldValue2[(int)morph.hash["eyeclose6"]] = float.Parse(strArray[3]);
- fieldValue1[(int)morph.hash["hitomih"]] = float.Parse(strArray[4]);
- fieldValue1[(int)morph.hash["hitomis"]] = float.Parse(strArray[5]);
- fieldValue1[(int)morph.hash["mayuha"]] = float.Parse(strArray[6]);
- fieldValue1[(int)morph.hash["mayuup"]] = float.Parse(strArray[7]);
- fieldValue1[(int)morph.hash["mayuv"]] = float.Parse(strArray[8]);
- fieldValue1[(int)morph.hash["mayuvhalf"]] = float.Parse(strArray[9]);
- fieldValue1[(int)morph.hash["moutha"]] = float.Parse(strArray[10]);
- fieldValue1[(int)morph.hash["mouths"]] = float.Parse(strArray[11]);
- fieldValue1[(int)morph.hash["mouthdw"]] = float.Parse(strArray[12]);
- fieldValue1[(int)morph.hash["mouthup"]] = float.Parse(strArray[13]);
- fieldValue1[(int)morph.hash["tangout"]] = float.Parse(strArray[14]);
- fieldValue1[(int)morph.hash["tangup"]] = float.Parse(strArray[15]);
- fieldValue1[(int)morph.hash["eyebig"]] = float.Parse(strArray[16]);
- fieldValue2[(int)morph.hash["eyeclose5"]] = float.Parse(strArray[17]);
- fieldValue1[(int)morph.hash["mayuw"]] = float.Parse(strArray[18]);
- fieldValue1[(int)morph.hash["mouthhe"]] = float.Parse(strArray[19]);
- fieldValue1[(int)morph.hash["mouthc"]] = float.Parse(strArray[20]);
- fieldValue1[(int)morph.hash["mouthi"]] = float.Parse(strArray[21]);
- fieldValue1[(int)morph.hash["mouthuphalf"]] = float.Parse(strArray[22]) + 0.01f;
- try
- {
- fieldValue1[(int)morph.hash["tangopen"]] = float.Parse(strArray[23]);
- }
- catch { }
- if (float.Parse(strArray[24]) == 1.0)
- {
- fieldValue1[(int)morph.hash["namida"]] = 1f;
- }
- else
- {
- fieldValue1[(int)morph.hash["namida"]] = 0.0f;
- }
- if (float.Parse(strArray[25]) == 1.0)
- {
- fieldValue1[(int)morph.hash["tear1"]] = 1f;
- }
- else
- {
- fieldValue1[(int)morph.hash["tear1"]] = 0.0f;
- }
- if (float.Parse(strArray[26]) == 1.0)
- {
- fieldValue1[(int)morph.hash["tear2"]] = 1f;
- }
- else
- {
- fieldValue1[(int)morph.hash["tear2"]] = 0.0f;
- }
- if (float.Parse(strArray[27]) == 1.0)
- {
- fieldValue1[(int)morph.hash["tear3"]] = 1f;
- }
- else
- {
- fieldValue1[(int)morph.hash["tear3"]] = 0.0f;
- }
- if (float.Parse(strArray[28]) == 1.0)
- {
- fieldValue1[(int)morph.hash["shock"]] = 1f;
- }
- else
- {
- fieldValue1[(int)morph.hash["shock"]] = 0.0f;
- }
- if (float.Parse(strArray[29]) == 1.0)
- {
- fieldValue1[(int)morph.hash["yodare"]] = 1f;
- }
- else
- {
- fieldValue1[(int)morph.hash["yodare"]] = 0.0f;
- }
- if (float.Parse(strArray[30]) == 1.0)
- {
- fieldValue1[(int)morph.hash["hoho"]] = 0.5f;
- }
- else
- {
- fieldValue1[(int)morph.hash["hoho"]] = 0.0f;
- }
- if (float.Parse(strArray[31]) == 1.0)
- {
- fieldValue1[(int)morph.hash["hoho2"]] = 0.5f;
- }
- else
- {
- fieldValue1[(int)morph.hash["hoho2"]] = 0.0f;
- }
- if (float.Parse(strArray[32]) == 1.0)
- {
- fieldValue1[(int)morph.hash["hohos"]] = 1f;
- }
- else
- {
- fieldValue1[(int)morph.hash["hohos"]] = 0.0f;
- }
- if (float.Parse(strArray[33]) == 1.0)
- {
- fieldValue1[(int)morph.hash["hohol"]] = 1f;
- }
- else
- {
- fieldValue1[(int)morph.hash["hohol"]] = 0.0f;
- }
- if (float.Parse(strArray[34]) == 1.0)
- {
- fieldValue1[(int)morph.hash["toothoff"]] = 1f;
- }
- else
- {
- fieldValue1[(int)morph.hash["toothoff"]] = 0.0f;
- }
- if (strArray.Length > 35)
- {
- morph.boNoseFook = float.Parse(strArray[35]) == 1.0;
- }
- }
- maidArray[selectMaidIndex].body0.Face.morph.FixBlendValues_Face();
- isFaceInit = true;
- faceCombo.selectedItemIndex = faceIndex[selectMaidIndex];
- }
- if (GUI.Button(new Rect(GetPix(135), GetPix(95), GetPix(23), GetPix(23)),
- ">",
- style3))
- {
- ++faceIndex[selectMaidIndex];
- if (faceIndex[selectMaidIndex] == faceComboList.Length)
- {
- faceIndex[selectMaidIndex] = 0;
- }
- TMorph morph = maidArray[selectMaidIndex].body0.Face.morph;
- maidArray[selectMaidIndex].boMabataki = false;
- morph.EyeMabataki = 0.0f;
- if (faceIndex[selectMaidIndex] < faceArray.Length)
- {
- morph.MulBlendValues(faceArray[faceIndex[selectMaidIndex]], 1f);
- }
- else
- {
- float[] fieldValue1 = GetFieldValue<TMorph, float[]>(morph, "BlendValues");
- float[] fieldValue2 = GetFieldValue<TMorph, float[]>(morph, "BlendValuesBackup");
- if (!isVR)
- {
- maidArray[selectMaidIndex].boMabataki = false;
- }
- string[] strArray = faceComboList[faceIndex[selectMaidIndex]].text.Split(':')[2].Split(',');
- fieldValue2[(int)morph.hash["eyeclose"]] = float.Parse(strArray[0]);
- fieldValue2[(int)morph.hash["eyeclose2"]] = float.Parse(strArray[1]);
- fieldValue2[(int)morph.hash["eyeclose3"]] = float.Parse(strArray[2]);
- fieldValue2[(int)morph.hash["eyeclose6"]] = float.Parse(strArray[3]);
- fieldValue1[(int)morph.hash["hitomih"]] = float.Parse(strArray[4]);
- fieldValue1[(int)morph.hash["hitomis"]] = float.Parse(strArray[5]);
- fieldValue1[(int)morph.hash["mayuha"]] = float.Parse(strArray[6]);
- fieldValue1[(int)morph.hash["mayuup"]] = float.Parse(strArray[7]);
- fieldValue1[(int)morph.hash["mayuv"]] = float.Parse(strArray[8]);
- fieldValue1[(int)morph.hash["mayuvhalf"]] = float.Parse(strArray[9]);
- fieldValue1[(int)morph.hash["moutha"]] = float.Parse(strArray[10]);
- fieldValue1[(int)morph.hash["mouths"]] = float.Parse(strArray[11]);
- fieldValue1[(int)morph.hash["mouthdw"]] = float.Parse(strArray[12]);
- fieldValue1[(int)morph.hash["mouthup"]] = float.Parse(strArray[13]);
- fieldValue1[(int)morph.hash["tangout"]] = float.Parse(strArray[14]);
- fieldValue1[(int)morph.hash["tangup"]] = float.Parse(strArray[15]);
- fieldValue1[(int)morph.hash["eyebig"]] = float.Parse(strArray[16]);
- fieldValue2[(int)morph.hash["eyeclose5"]] = float.Parse(strArray[17]);
- fieldValue1[(int)morph.hash["mayuw"]] = float.Parse(strArray[18]);
- fieldValue1[(int)morph.hash["mouthhe"]] = float.Parse(strArray[19]);
- fieldValue1[(int)morph.hash["mouthc"]] = float.Parse(strArray[20]);
- fieldValue1[(int)morph.hash["mouthi"]] = float.Parse(strArray[21]);
- fieldValue1[(int)morph.hash["mouthuphalf"]] = float.Parse(strArray[22]) + 0.01f;
- try
- {
- fieldValue1[(int)morph.hash["tangopen"]] = float.Parse(strArray[23]);
- }
- catch { }
- if (float.Parse(strArray[24]) == 1.0)
- {
- fieldValue1[(int)morph.hash["namida"]] = 1f;
- }
- else
- {
- fieldValue1[(int)morph.hash["namida"]] = 0.0f;
- }
- if (float.Parse(strArray[25]) == 1.0)
- {
- fieldValue1[(int)morph.hash["tear1"]] = 1f;
- }
- else
- {
- fieldValue1[(int)morph.hash["tear1"]] = 0.0f;
- }
- if (float.Parse(strArray[26]) == 1.0)
- {
- fieldValue1[(int)morph.hash["tear2"]] = 1f;
- }
- else
- {
- fieldValue1[(int)morph.hash["tear2"]] = 0.0f;
- }
- if (float.Parse(strArray[27]) == 1.0)
- {
- fieldValue1[(int)morph.hash["tear3"]] = 1f;
- }
- else
- {
- fieldValue1[(int)morph.hash["tear3"]] = 0.0f;
- }
- if (float.Parse(strArray[28]) == 1.0)
- {
- fieldValue1[(int)morph.hash["shock"]] = 1f;
- }
- else
- {
- fieldValue1[(int)morph.hash["shock"]] = 0.0f;
- }
- if (float.Parse(strArray[29]) == 1.0)
- {
- fieldValue1[(int)morph.hash["yodare"]] = 1f;
- }
- else
- {
- fieldValue1[(int)morph.hash["yodare"]] = 0.0f;
- }
- if (float.Parse(strArray[30]) == 1.0)
- {
- fieldValue1[(int)morph.hash["hoho"]] = 0.5f;
- }
- else
- {
- fieldValue1[(int)morph.hash["hoho"]] = 0.0f;
- }
- if (float.Parse(strArray[31]) == 1.0)
- {
- fieldValue1[(int)morph.hash["hoho2"]] = 0.5f;
- }
- else
- {
- fieldValue1[(int)morph.hash["hoho2"]] = 0.0f;
- }
- if (float.Parse(strArray[32]) == 1.0)
- {
- fieldValue1[(int)morph.hash["hohos"]] = 1f;
- }
- else
- {
- fieldValue1[(int)morph.hash["hohos"]] = 0.0f;
- }
- if (float.Parse(strArray[33]) == 1.0)
- {
- fieldValue1[(int)morph.hash["hohol"]] = 1f;
- }
- else
- {
- fieldValue1[(int)morph.hash["hohol"]] = 0.0f;
- }
- if (float.Parse(strArray[34]) == 1.0)
- {
- fieldValue1[(int)morph.hash["toothoff"]] = 1f;
- }
- else
- {
- fieldValue1[(int)morph.hash["toothoff"]] = 0.0f;
- }
- if (strArray.Length > 35)
- {
- morph.boNoseFook = float.Parse(strArray[35]) == 1.0;
- }
- }
- maidArray[selectMaidIndex].body0.Face.morph.FixBlendValues_Face();
- isFaceInit = true;
- faceCombo.selectedItemIndex = faceIndex[selectMaidIndex];
- }
- if (!isShosai)
- {
- GUI.Label(new Rect(GetPix(8), GetPix(130), GetPix(100), GetPix(25)),
- "目の開閉",
- style1);
- eyeclose = GUI.HorizontalSlider(new Rect(GetPix(8),
- GetPix(150),
- GetPix(70),
- GetPix(20)),
- eyeclose,
- 0.0f,
- 1f);
- GUI.Label(new Rect(GetPix(88), GetPix(130), GetPix(100), GetPix(25)),
- "にっこり",
- style1);
- eyeclose2 = GUI.HorizontalSlider(new Rect(GetPix(88),
- GetPix(150),
- GetPix(70),
- GetPix(20)),
- eyeclose2,
- 0.0f,
- 1f);
- GUI.Label(new Rect(GetPix(8), GetPix(170), GetPix(100), GetPix(25)),
- "ジト目",
- style1);
- eyeclose3 = GUI.HorizontalSlider(new Rect(GetPix(8),
- GetPix(190),
- GetPix(70),
- GetPix(20)),
- eyeclose3,
- 0.0f,
- 1f);
- GUI.Label(new Rect(GetPix(88), GetPix(170), GetPix(100), GetPix(25)),
- "ウインク",
- style1);
- eyeclose6 = GUI.HorizontalSlider(new Rect(GetPix(88),
- GetPix(190),
- GetPix(70),
- GetPix(20)),
- eyeclose6,
- 0.0f,
- 1f);
- GUI.Label(new Rect(GetPix(8), GetPix(210), GetPix(100), GetPix(25)),
- "ハイライト",
- style1);
- hitomih = GUI.HorizontalSlider(new Rect(GetPix(8),
- GetPix(230),
- GetPix(70),
- GetPix(20)),
- hitomih,
- 0.0f,
- 2f);
- GUI.Label(new Rect(GetPix(88), GetPix(210), GetPix(100), GetPix(25)),
- "瞳サイズ",
- style1);
- hitomis = GUI.HorizontalSlider(new Rect(GetPix(88),
- GetPix(230),
- GetPix(70),
- GetPix(20)),
- hitomis,
- 0.0f,
- 1f);
- GUI.Label(new Rect(GetPix(8), GetPix(250), GetPix(100), GetPix(25)),
- "眉角度",
- style1);
- mayuha = GUI.HorizontalSlider(new Rect(GetPix(8),
- GetPix(270),
- GetPix(70),
- GetPix(20)),
- mayuha,
- 0.0f,
- 1f);
- GUI.Label(new Rect(GetPix(8), GetPix(290), GetPix(100), GetPix(25)),
- "眉上げ",
- style1);
- mayuup = GUI.HorizontalSlider(new Rect(GetPix(8),
- GetPix(310),
- GetPix(70),
- GetPix(20)),
- mayuup,
- 0.0f,
- 0.8f);
- GUI.Label(new Rect(GetPix(88), GetPix(290), GetPix(100), GetPix(25)),
- "眉下げ",
- style1);
- mayuv = GUI.HorizontalSlider(new Rect(GetPix(88),
- GetPix(310),
- GetPix(70),
- GetPix(20)),
- mayuv,
- 0.0f,
- 0.8f);
- GUI.Label(new Rect(GetPix(8), GetPix(330), GetPix(100), GetPix(25)),
- "口開け1",
- style1);
- moutha = GUI.HorizontalSlider(new Rect(GetPix(8),
- GetPix(350),
- GetPix(70),
- GetPix(20)),
- moutha,
- 0.0f,
- 1f);
- GUI.Label(new Rect(GetPix(88), GetPix(330), GetPix(100), GetPix(25)),
- "口開け2",
- style1);
- mouths = GUI.HorizontalSlider(new Rect(GetPix(88),
- GetPix(350),
- GetPix(70),
- GetPix(20)),
- mouths,
- 0.0f,
- 0.9f);
- GUI.Label(new Rect(GetPix(8), GetPix(370), GetPix(100), GetPix(25)),
- "口角上げ",
- style1);
- mouthup = GUI.HorizontalSlider(new Rect(GetPix(8),
- GetPix(390),
- GetPix(70),
- GetPix(20)),
- mouthup,
- 0.0f,
- 1.4f);
- GUI.Label(new Rect(GetPix(88), GetPix(370), GetPix(100), GetPix(25)),
- "口角下げ",
- style1);
- mouthdw = GUI.HorizontalSlider(new Rect(GetPix(88),
- GetPix(390),
- GetPix(70),
- GetPix(20)),
- mouthdw,
- 0.0f,
- 1f);
- GUI.Label(new Rect(GetPix(8), GetPix(410), GetPix(100), GetPix(25)),
- "舌出し",
- style1);
- tangout = GUI.HorizontalSlider(new Rect(GetPix(8),
- GetPix(430),
- GetPix(70),
- GetPix(20)),
- tangout,
- 0.0f,
- 1f);
- GUI.Label(new Rect(GetPix(88), GetPix(410), GetPix(100), GetPix(25)),
- "舌上げ",
- style1);
- tangup = GUI.HorizontalSlider(new Rect(GetPix(88),
- GetPix(430),
- GetPix(70),
- GetPix(20)),
- tangup,
- 0.0f,
- 0.7f);
- isHoho2 = GUI.Toggle(new Rect(GetPix(5),
- GetPix(455),
- GetPix(50),
- GetPix(20)),
- isHoho2,
- "赤面",
- style4);
- isShock = GUI.Toggle(new Rect(GetPix(60),
- GetPix(455),
- GetPix(70),
- GetPix(20)),
- isShock,
- "ショック",
- style4);
- isNamida = GUI.Toggle(new Rect(GetPix(5),
- GetPix(480),
- GetPix(50),
- GetPix(20)),
- isNamida,
- "涙",
- style4);
- isYodare = GUI.Toggle(new Rect(GetPix(60),
- GetPix(480),
- GetPix(50),
- GetPix(20)),
- isYodare,
- "涎",
- style4);
- isTear1 = GUI.Toggle(new Rect(GetPix(5),
- GetPix(505),
- GetPix(50),
- GetPix(20)),
- isTear1,
- "涙1",
- style4);
- isTear2 = GUI.Toggle(new Rect(GetPix(60),
- GetPix(505),
- GetPix(50),
- GetPix(20)),
- isTear2,
- "涙2",
- style4);
- isTear3 = GUI.Toggle(new Rect(GetPix(115),
- GetPix(505),
- GetPix(50),
- GetPix(20)),
- isTear3,
- "涙3",
- style4);
- isHohos = GUI.Toggle(new Rect(GetPix(5),
- GetPix(530),
- GetPix(50),
- GetPix(20)),
- isHohos,
- "頬1",
- style4);
- isHoho = GUI.Toggle(new Rect(GetPix(60),
- GetPix(530),
- GetPix(50),
- GetPix(20)),
- isHoho,
- "頬2",
- style4);
- isHohol = GUI.Toggle(new Rect(GetPix(115),
- GetPix(530),
- GetPix(50),
- GetPix(20)),
- isHohol,
- "頬3",
- style4);
- }
- else
- {
- int i1 = 120;
- int i2 = 135;
- int num = 28;
- GUI.Label(new Rect(GetPix(8), GetPix(i1), GetPix(100), GetPix(25)),
- "目の開閉",
- style2);
- eyeclose = GUI.HorizontalSlider(new Rect(GetPix(8),
- GetPix(i2),
- GetPix(70),
- GetPix(20)),
- eyeclose,
- 0.0f,
- 1f);
- GUI.Label(new Rect(GetPix(88), GetPix(i1), GetPix(100), GetPix(25)),
- "にっこり",
- style2);
- eyeclose2 = GUI.HorizontalSlider(new Rect(GetPix(88),
- GetPix(i2),
- GetPix(70),
- GetPix(20)),
- eyeclose2,
- 0.0f,
- 1f);
- GUI.Label(new Rect(GetPix(8),
- GetPix(i1 + num),
- GetPix(100),
- GetPix(25)),
- "ジト目",
- style2);
- eyeclose3 = GUI.HorizontalSlider(new Rect(GetPix(8),
- GetPix(i2 + num),
- GetPix(70),
- GetPix(20)),
- eyeclose3,
- 0.0f,
- 1f);
- GUI.Label(new Rect(GetPix(88),
- GetPix(i1 + num),
- GetPix(100),
- GetPix(25)),
- "見開く",
- style2);
- eyebig = GUI.HorizontalSlider(new Rect(GetPix(88),
- GetPix(i2 + num),
- GetPix(70),
- GetPix(20)),
- eyebig,
- 0.0f,
- 1f);
- GUI.Label(new Rect(GetPix(8),
- GetPix(i1 + num * 2),
- GetPix(100),
- GetPix(25)),
- "ウインク1",
- style2);
- eyeclose6 = GUI.HorizontalSlider(new Rect(GetPix(8),
- GetPix(i2 + num * 2),
- GetPix(70),
- GetPix(20)),
- eyeclose6,
- 0.0f,
- 1f);
- GUI.Label(new Rect(GetPix(88),
- GetPix(i1 + num * 2),
- GetPix(100),
- GetPix(25)),
- "ウインク2",
- style2);
- eyeclose5 = GUI.HorizontalSlider(new Rect(GetPix(88),
- GetPix(i2 + num * 2),
- GetPix(70),
- GetPix(20)),
- eyeclose5,
- 0.0f,
- 1f);
- GUI.Label(new Rect(GetPix(8),
- GetPix(i1 + num * 3),
- GetPix(100),
- GetPix(25)),
- "ハイライト",
- style2);
- hitomih = GUI.HorizontalSlider(new Rect(GetPix(8),
- GetPix(i2 + num * 3),
- GetPix(70),
- GetPix(20)),
- hitomih,
- 0.0f,
- 2f);
- GUI.Label(new Rect(GetPix(88),
- GetPix(i1 + num * 3),
- GetPix(100),
- GetPix(25)),
- "瞳サイズ",
- style2);
- hitomis = GUI.HorizontalSlider(new Rect(GetPix(88),
- GetPix(i2 + num * 3),
- GetPix(70),
- GetPix(20)),
- hitomis,
- 0.0f,
- 1f);
- GUI.Label(new Rect(GetPix(8),
- GetPix(i1 + num * 4),
- GetPix(100),
- GetPix(25)),
- "眉角度1",
- style2);
- mayuha = GUI.HorizontalSlider(new Rect(GetPix(8),
- GetPix(i2 + num * 4),
- GetPix(70),
- GetPix(20)),
- mayuha,
- 0.0f,
- 1f);
- GUI.Label(new Rect(GetPix(88),
- GetPix(i1 + num * 4),
- GetPix(100),
- GetPix(25)),
- "眉角度2",
- style2);
- mayuw = GUI.HorizontalSlider(new Rect(GetPix(88),
- GetPix(i2 + num * 4),
- GetPix(70),
- GetPix(20)),
- mayuw,
- 0.0f,
- 1f);
- GUI.Label(new Rect(GetPix(8),
- GetPix(i1 + num * 5),
- GetPix(100),
- GetPix(25)),
- "眉上げ",
- style2);
- mayuup = GUI.HorizontalSlider(new Rect(GetPix(8),
- GetPix(i2 + num * 5),
- GetPix(70),
- GetPix(20)),
- mayuup,
- 0.0f,
- 0.8f);
- GUI.Label(new Rect(GetPix(88),
- GetPix(i1 + num * 5),
- GetPix(100),
- GetPix(25)),
- "眉下げ1",
- style2);
- mayuv = GUI.HorizontalSlider(new Rect(GetPix(88),
- GetPix(i2 + num * 5),
- GetPix(70),
- GetPix(20)),
- mayuv,
- 0.0f,
- 0.8f);
- GUI.Label(new Rect(GetPix(8),
- GetPix(i1 + num * 6),
- GetPix(100),
- GetPix(25)),
- "眉下げ2",
- style2);
- mayuvhalf = GUI.HorizontalSlider(new Rect(GetPix(8),
- GetPix(i2 + num * 6),
- GetPix(70),
- GetPix(20)),
- mayuvhalf,
- 0.0f,
- 0.9f);
- GUI.Label(new Rect(GetPix(8),
- GetPix(i1 + num * 7),
- GetPix(100),
- GetPix(25)),
- "口開け1",
- style2);
- moutha = GUI.HorizontalSlider(new Rect(GetPix(8),
- GetPix(i2 + num * 7),
- GetPix(70),
- GetPix(20)),
- moutha,
- 0.0f,
- 1f);
- GUI.Label(new Rect(GetPix(88),
- GetPix(i1 + num * 7),
- GetPix(100),
- GetPix(25)),
- "口開け2",
- style2);
- mouths = GUI.HorizontalSlider(new Rect(GetPix(88),
- GetPix(i2 + num * 7),
- GetPix(70),
- GetPix(20)),
- mouths,
- 0.0f,
- 0.9f);
- GUI.Label(new Rect(GetPix(8),
- GetPix(i1 + num * 8),
- GetPix(100),
- GetPix(25)),
- "口幅狭く",
- style2);
- mouthc = GUI.HorizontalSlider(new Rect(GetPix(8),
- GetPix(i2 + num * 8),
- GetPix(70),
- GetPix(20)),
- mouthc,
- 0.0f,
- 1f);
- GUI.Label(new Rect(GetPix(88),
- GetPix(i1 + num * 8),
- GetPix(100),
- GetPix(25)),
- "口幅広く",
- style2);
- mouthi = GUI.HorizontalSlider(new Rect(GetPix(88),
- GetPix(i2 + num * 8),
- GetPix(70),
- GetPix(20)),
- mouthi,
- 0.0f,
- 1f);
- GUI.Label(new Rect(GetPix(8),
- GetPix(i1 + num * 9),
- GetPix(100),
- GetPix(25)),
- "口角上げ",
- style2);
- mouthup = GUI.HorizontalSlider(new Rect(GetPix(8),
- GetPix(i2 + num * 9),
- GetPix(70),
- GetPix(20)),
- mouthup,
- 0.0f,
- 1.4f);
- GUI.Label(new Rect(GetPix(88),
- GetPix(i1 + num * 9),
- GetPix(100),
- GetPix(25)),
- "口角下げ",
- style2);
- mouthdw = GUI.HorizontalSlider(new Rect(GetPix(88),
- GetPix(i2 + num * 9),
- GetPix(70),
- GetPix(20)),
- mouthdw,
- 0.0f,
- 1f);
- GUI.Label(new Rect(GetPix(8),
- GetPix(i1 + num * 10),
- GetPix(100),
- GetPix(25)),
- "口中央上げ",
- style2);
- mouthhe = GUI.HorizontalSlider(new Rect(GetPix(8),
- GetPix(i2 + num * 10),
- GetPix(70),
- GetPix(20)),
- mouthhe,
- 0.0f,
- 1f);
- GUI.Label(new Rect(GetPix(88),
- GetPix(i1 + num * 10),
- GetPix(100),
- GetPix(25)),
- "左口角上げ",
- style2);
- mouthuphalf = GUI.HorizontalSlider(new Rect(GetPix(88),
- GetPix(i2 + num * 10),
- GetPix(70),
- GetPix(20)),
- mouthuphalf,
- 0.0f,
- 2f);
- GUI.Label(new Rect(GetPix(8),
- GetPix(i1 + num * 11),
- GetPix(100),
- GetPix(25)),
- "舌出し",
- style2);
- tangout = GUI.HorizontalSlider(new Rect(GetPix(8),
- GetPix(i2 + num * 11),
- GetPix(70),
- GetPix(20)),
- tangout,
- 0.0f,
- 1f);
- GUI.Label(new Rect(GetPix(88),
- GetPix(i1 + num * 11),
- GetPix(100),
- GetPix(25)),
- "舌上げ",
- style2);
- tangup = GUI.HorizontalSlider(new Rect(GetPix(88),
- GetPix(i2 + num * 11),
- GetPix(70),
- GetPix(20)),
- tangup,
- 0.0f,
- 0.7f);
- GUI.Label(new Rect(GetPix(8),
- GetPix(i1 + num * 12),
- GetPix(100),
- GetPix(25)),
- "舌根上げ",
- style2);
- tangopen = GUI.HorizontalSlider(new Rect(GetPix(8),
- GetPix(i2 + num * 12),
- GetPix(70),
- GetPix(20)),
- tangopen,
- 0.0f,
- 1f);
- bool enabled = GUI.enabled;
- if (!faceCombo.isClickedComboButton)
- {
- GUI.enabled = true;
- }
- GUI.enabled = enabled;
- isHoho2 = GUI.Toggle(new Rect(GetPix(5),
- GetPix(489),
- GetPix(50),
- GetPix(16)),
- isHoho2,
- "赤面",
- style4);
- isShock = GUI.Toggle(new Rect(GetPix(60),
- GetPix(489),
- GetPix(58),
- GetPix(16)),
- isShock,
- "ショック",
- style4);
- isNosefook = GUI.Toggle(new Rect(GetPix(115),
- GetPix(489),
- GetPix(62),
- GetPix(16)),
- isNosefook,
- "鼻フック",
- style4);
- isNamida = GUI.Toggle(new Rect(GetPix(5),
- GetPix(511),
- GetPix(50),
- GetPix(16)),
- isNamida,
- "涙",
- style4);
- isYodare = GUI.Toggle(new Rect(GetPix(60),
- GetPix(511),
- GetPix(50),
- GetPix(16)),
- isYodare,
- "涎",
- style4);
- isToothoff = !GUI.Toggle(new Rect(GetPix(115),
- GetPix(511),
- GetPix(50),
- GetPix(16)),
- !isToothoff,
- "歯",
- style4);
- isTear1 = GUI.Toggle(new Rect(GetPix(5),
- GetPix(533),
- GetPix(50),
- GetPix(16)),
- isTear1,
- "涙1",
- style4);
- isTear2 = GUI.Toggle(new Rect(GetPix(60),
- GetPix(533),
- GetPix(50),
- GetPix(16)),
- isTear2,
- "涙2",
- style4);
- isTear3 = GUI.Toggle(new Rect(GetPix(115),
- GetPix(533),
- GetPix(50),
- GetPix(16)),
- isTear3,
- "涙3",
- style4);
- isHohos = GUI.Toggle(new Rect(GetPix(5),
- GetPix(555),
- GetPix(50),
- GetPix(16)),
- isHohos,
- "頬1",
- style4);
- isHoho = GUI.Toggle(new Rect(GetPix(60),
- GetPix(555),
- GetPix(50),
- GetPix(16)),
- isHoho,
- "頬2",
- style4);
- isHohol = GUI.Toggle(new Rect(GetPix(115),
- GetPix(555),
- GetPix(50),
- GetPix(16)),
- isHohol,
- "頬3",
- style4);
- }
- int num1 = 0;
- if (isShosai)
- {
- num1 = 22;
- }
- isFaceEdit = GUI.Toggle(new Rect(GetPix(5),
- GetPix(555 + num1),
- GetPix(50),
- GetPix(16)),
- isFaceEdit,
- "登録",
- style4);
- if (isFaceEdit)
- {
- inName4 = GUI.TextField(new Rect(GetPix(5),
- GetPix(575 + num1),
- GetPix(100),
- GetPix(20)),
- inName4);
- if (GUI.Button(new Rect(GetPix(107),
- GetPix(575 + num1),
- GetPix(35),
- GetPix(20)),
- "追加",
- style3))
- {
- GameMain.Instance.SoundMgr.PlaySe("se002.ogg", false);
- GUI.FocusControl("");
- int num2 = 1;
- for (int index = 1; index < 1000; ++index)
- {
- if (Preferences["face"]["f" + index].Value == null)
- {
- num2 = index;
- break;
- }
- }
- TMorph morph = maidArray[selectMaidIndex].body0.Face.morph;
- float[] fieldValue1 = GetFieldValue<TMorph, float[]>(morph, "BlendValues");
- float[] fieldValue2 = GetFieldValue<TMorph, float[]>(morph, "BlendValuesBackup");
- string str1 = inName4 + ":" + fieldValue2[(int)morph.hash["eyeclose"]] + ","
- + fieldValue2[(int)morph.hash["eyeclose2"]] + ","
- + fieldValue2[(int)morph.hash["eyeclose3"]] + ","
- + fieldValue2[(int)morph.hash["eyeclose6"]] + ","
- + fieldValue1[(int)morph.hash["hitomih"]] + ","
- + fieldValue1[(int)morph.hash["hitomis"]] + ","
- + fieldValue1[(int)morph.hash["mayuha"]] + ","
- + fieldValue1[(int)morph.hash["mayuup"]] + ","
- + fieldValue1[(int)morph.hash["mayuv"]] + ","
- + fieldValue1[(int)morph.hash["mayuvhalf"]] + ","
- + fieldValue1[(int)morph.hash["moutha"]] + ","
- + fieldValue1[(int)morph.hash["mouths"]] + ","
- + fieldValue1[(int)morph.hash["mouthdw"]] + ","
- + fieldValue1[(int)morph.hash["mouthup"]] + ","
- + fieldValue1[(int)morph.hash["tangout"]] + ","
- + fieldValue1[(int)morph.hash["tangup"]] + ","
- + fieldValue1[(int)morph.hash["eyebig"]] + ","
- + fieldValue2[(int)morph.hash["eyeclose5"]] + ","
- + fieldValue1[(int)morph.hash["mayuw"]] + ","
- + fieldValue1[(int)morph.hash["mouthhe"]] + ","
- + fieldValue1[(int)morph.hash["mouthc"]] + ","
- + fieldValue1[(int)morph.hash["mouthi"]] + ","
- + fieldValue1[(int)morph.hash["mouthuphalf"]] + ",";
- string str2;
- try
- {
- str2 = str1 + fieldValue1[(int)morph.hash["tangopen"]] + ",";
- }
- catch
- {
- str2 = str1 + "0,";
- }
- string str3 = fieldValue1[(int)morph.hash["namida"]] <= 0.0
- ? str2 + 0 + ","
- : str2 + 1 + ",";
- string str4 = fieldValue1[(int)morph.hash["tear1"]] <= 0.0
- ? str3 + 0 + ","
- : str3 + 1 + ",";
- string str5 = fieldValue1[(int)morph.hash["tear2"]] <= 0.0
- ? str4 + 0 + ","
- : str4 + 1 + ",";
- string str6 = fieldValue1[(int)morph.hash["tear3"]] <= 0.0
- ? str5 + 0 + ","
- : str5 + 1 + ",";
- string str7 = fieldValue1[(int)morph.hash["shock"]] <= 0.0
- ? str6 + 0 + ","
- : str6 + 1 + ",";
- string str8 = fieldValue1[(int)morph.hash["yodare"]] <= 0.0
- ? str7 + 0 + ","
- : str7 + 1 + ",";
- string str9 = fieldValue1[(int)morph.hash["hoho"]] <= 0.0
- ? str8 + 0 + ","
- : str8 + 1 + ",";
- string str10 = fieldValue1[(int)morph.hash["hoho2"]] <= 0.0
- ? str9 + 0 + ","
- : str9 + 1 + ",";
- string str11 = fieldValue1[(int)morph.hash["hohos"]] <= 0.0
- ? str10 + 0 + ","
- : str10 + 1 + ",";
- string str12 = fieldValue1[(int)morph.hash["hohol"]] <= 0.0
- ? str11 + 0 + ","
- : str11 + 1 + ",";
- string str13 = fieldValue1[(int)morph.hash["toothoff"]] <= 0.0
- ? str12 + 0 + ","
- : str12 + 1 + ",";
- string str14 = fieldValue1[(int)morph.hash["nosefook"]] <= 0.0
- ? str13 + 0 + ":"
- : str13 + 1 + ":";
- Preferences["face"]["f" + num2].Value = str14;
- SaveConfig();
- List<string> stringList = new List<string>(300);
- stringList.AddRange(faceArray);
- for (int index = 1; index < 300; ++index)
- {
- IniKey iniKey = Preferences["face"]["f" + index];
- if (iniKey.Value != null)
- {
- string[] strArray = iniKey.Value.Split(':');
- if (strArray.Length > 1)
- {
- stringList.Add(strArray[0] + " :" + index + ":" + strArray[1]);
- }
- }
- else
- {
- break;
- }
- }
- faceCombo.selectedItemIndex = 0;
- faceComboList = new GUIContent[stringList.ToArray().Length];
- for (int index = 0; index < stringList.ToArray().Length; ++index)
- {
- faceComboList[index] = new GUIContent(stringList.ToArray()[index]);
- }
- faceCombo.selectedItemIndex = stringList.ToArray().Length - 1;
- inName4 = "";
- }
- if (faceIndex[selectMaidIndex] < faceArray.Length)
- {
- GUI.enabled = false;
- }
- if (GUI.Button(new Rect(GetPix(144),
- GetPix(575 + num1),
- GetPix(24),
- GetPix(20)),
- "削",
- style3))
- {
- GameMain.Instance.SoundMgr.PlaySe("se002.ogg", false);
- Preferences["face"]["f" + faceComboList[faceIndex[selectMaidIndex]].text.Split(':')[1]].Value = "del";
- SaveConfig();
- List<string> stringList = new List<string>(300);
- stringList.AddRange(faceArray);
- for (int index = 1; index < 300; ++index)
- {
- IniKey iniKey = Preferences["face"]["f" + index];
- if (iniKey.Value != null)
- {
- string[] strArray = iniKey.Value.Split(':');
- if (strArray.Length > 1)
- {
- stringList.Add(strArray[0] + " :" + index + ":" + strArray[1]);
- }
- }
- else
- {
- break;
- }
- }
- faceCombo.selectedItemIndex = 0;
- faceComboList = new GUIContent[stringList.ToArray().Length];
- for (int index = 0; index < stringList.ToArray().Length; ++index)
- {
- faceComboList[index] = new GUIContent(stringList.ToArray()[index]);
- }
- faceCombo.selectedItemIndex = 0;
- for (int index = 0; index < maidCnt; ++index)
- {
- if (maidArray[index] && maidArray[index].Visible
- && stringList.ToArray().Length <= faceIndex[index])
- {
- faceIndex[index] = 0;
- }
- }
- }
- GUI.enabled = true;
- }
- if (faceCombo.isClickedComboButton)
- {
- GUI.enabled = true;
- }
- if (isFace[selectMaidIndex])
- {
- faceIndex[selectMaidIndex] =
- faceCombo.List(new Rect(GetPix(35),
- GetPix(95),
- GetPix(95),
- GetPix(23)),
- faceComboList[faceIndex[selectMaidIndex]].text,
- faceComboList,
- buttonStyle,
- "box",
- listStyle2);
- }
- else
- {
- faceCombo.List(new Rect(GetPix(35), GetPix(95), GetPix(95), GetPix(23)),
- faceComboList[faceIndex[selectMaidIndex]].text,
- faceComboList,
- buttonStyle,
- "box",
- listStyle2);
- }
- if (faceCombo.isClickedComboButton)
- {
- isCombo = true;
- }
- else if (isCombo)
- {
- isCombo = false;
- TMorph morph = maidArray[selectMaidIndex].body0.Face.morph;
- float[] fieldValue1 = GetFieldValue<TMorph, float[]>(morph, "BlendValues");
- morph.EyeMabataki = 0.0f;
- if (faceIndex[selectMaidIndex] < faceArray.Length)
- {
- morph.MulBlendValues(faceArray[faceIndex[selectMaidIndex]], 1f);
- }
- else
- {
- float[] fieldValue2 = GetFieldValue<TMorph, float[]>(morph, "BlendValuesBackup");
- if (!isVR)
- {
- maidArray[selectMaidIndex].boMabataki = false;
- }
- string[] strArray = faceComboList[faceIndex[selectMaidIndex]].text.Split(':')[2].Split(',');
- fieldValue2[(int)morph.hash["eyeclose"]] = float.Parse(strArray[0]);
- fieldValue2[(int)morph.hash["eyeclose2"]] = float.Parse(strArray[1]);
- fieldValue2[(int)morph.hash["eyeclose3"]] = float.Parse(strArray[2]);
- fieldValue2[(int)morph.hash["eyeclose6"]] = float.Parse(strArray[3]);
- fieldValue1[(int)morph.hash["hitomih"]] = float.Parse(strArray[4]);
- fieldValue1[(int)morph.hash["hitomis"]] = float.Parse(strArray[5]);
- fieldValue1[(int)morph.hash["mayuha"]] = float.Parse(strArray[6]);
- fieldValue1[(int)morph.hash["mayuup"]] = float.Parse(strArray[7]);
- fieldValue1[(int)morph.hash["mayuv"]] = float.Parse(strArray[8]);
- fieldValue1[(int)morph.hash["mayuvhalf"]] = float.Parse(strArray[9]);
- fieldValue1[(int)morph.hash["moutha"]] = float.Parse(strArray[10]);
- fieldValue1[(int)morph.hash["mouths"]] = float.Parse(strArray[11]);
- fieldValue1[(int)morph.hash["mouthdw"]] = float.Parse(strArray[12]);
- fieldValue1[(int)morph.hash["mouthup"]] = float.Parse(strArray[13]);
- fieldValue1[(int)morph.hash["tangout"]] = float.Parse(strArray[14]);
- fieldValue1[(int)morph.hash["tangup"]] = float.Parse(strArray[15]);
- fieldValue1[(int)morph.hash["eyebig"]] = float.Parse(strArray[16]);
- fieldValue2[(int)morph.hash["eyeclose5"]] = float.Parse(strArray[17]);
- fieldValue1[(int)morph.hash["mayuw"]] = float.Parse(strArray[18]);
- fieldValue1[(int)morph.hash["mouthhe"]] = float.Parse(strArray[19]);
- fieldValue1[(int)morph.hash["mouthc"]] = float.Parse(strArray[20]);
- fieldValue1[(int)morph.hash["mouthi"]] = float.Parse(strArray[21]);
- fieldValue1[(int)morph.hash["mouthuphalf"]] = float.Parse(strArray[22]) + 0.01f;
- try
- {
- fieldValue1[(int)morph.hash["tangopen"]] = float.Parse(strArray[23]);
- }
- catch { }
- if (float.Parse(strArray[24]) == 1.0)
- {
- fieldValue1[(int)morph.hash["namida"]] = 1f;
- }
- else
- {
- fieldValue1[(int)morph.hash["namida"]] = 0.0f;
- }
- if (float.Parse(strArray[25]) == 1.0)
- {
- fieldValue1[(int)morph.hash["tear1"]] = 1f;
- }
- else
- {
- fieldValue1[(int)morph.hash["tear1"]] = 0.0f;
- }
- if (float.Parse(strArray[26]) == 1.0)
- {
- fieldValue1[(int)morph.hash["tear2"]] = 1f;
- }
- else
- {
- fieldValue1[(int)morph.hash["tear2"]] = 0.0f;
- }
- if (float.Parse(strArray[27]) == 1.0)
- {
- fieldValue1[(int)morph.hash["tear3"]] = 1f;
- }
- else
- {
- fieldValue1[(int)morph.hash["tear3"]] = 0.0f;
- }
- if (float.Parse(strArray[28]) == 1.0)
- {
- fieldValue1[(int)morph.hash["shock"]] = 1f;
- }
- else
- {
- fieldValue1[(int)morph.hash["shock"]] = 0.0f;
- }
- if (float.Parse(strArray[29]) == 1.0)
- {
- fieldValue1[(int)morph.hash["yodare"]] = 1f;
- }
- else
- {
- fieldValue1[(int)morph.hash["yodare"]] = 0.0f;
- }
- if (float.Parse(strArray[30]) == 1.0)
- {
- fieldValue1[(int)morph.hash["hoho"]] = 0.5f;
- }
- else
- {
- fieldValue1[(int)morph.hash["hoho"]] = 0.0f;
- }
- if (float.Parse(strArray[31]) == 1.0)
- {
- fieldValue1[(int)morph.hash["hoho2"]] = 0.5f;
- }
- else
- {
- fieldValue1[(int)morph.hash["hoho2"]] = 0.0f;
- }
- if (float.Parse(strArray[32]) == 1.0)
- {
- fieldValue1[(int)morph.hash["hohos"]] = 1f;
- }
- else
- {
- fieldValue1[(int)morph.hash["hohos"]] = 0.0f;
- }
- if (float.Parse(strArray[33]) == 1.0)
- {
- fieldValue1[(int)morph.hash["hohol"]] = 1f;
- }
- else
- {
- fieldValue1[(int)morph.hash["hohol"]] = 0.0f;
- }
- if (float.Parse(strArray[34]) == 1.0)
- {
- fieldValue1[(int)morph.hash["toothoff"]] = 1f;
- }
- else
- {
- fieldValue1[(int)morph.hash["toothoff"]] = 0.0f;
- }
- if (strArray.Length > 35)
- {
- morph.boNoseFook = float.Parse(strArray[35]) == 1.0;
- }
- }
- maidArray[selectMaidIndex].body0.Face.morph.FixBlendValues_Face();
- isFaceInit = true;
- faceCombo.selectedItemIndex = faceIndex[selectMaidIndex];
- }
- GUI.enabled = !faceCombo.isClickedComboButton;
- bool state = GUI.enabled;
- GUI.enabled = true;
- GUI.DragWindow();
- GUI.enabled = state;
- yotogiFlg = false;
- if (sceneLevel != 14
- || !GameObject
- .Find("/UI Root/YotogiPlayPanel/CommandViewer/SkillViewer/MaskGroup/SkillGroup/CommandParent/CommandUnit"))
- {
- return;
- }
- yotogiFlg = true;
- }
- private void MaidCallWindow(int winID)
- {
- CharacterMgr characterMgr = GameMain.Instance.CharacterMgr;
- GUIStyle style1 = "label";
- style1.fontSize = GetPix(14);
- style1.alignment = TextAnchor.UpperLeft;
- GUIStyle style2 = "button";
- style2.fontSize = GetPix(16);
- style2.alignment = TextAnchor.MiddleCenter;
- GUIStyle style3 = new GUIStyle("toggle")
- {
- fontSize = GetPix(13)
- };
- float pix = GetPix(70);
- if (comboBoxList == null)
- {
- comboBoxControl.selectedItemIndex = 0;
- comboBoxList = new GUIContent[11];
- comboBoxList[0] = new GUIContent("通常");
- comboBoxList[1] = new GUIContent("横一列");
- comboBoxList[2] = new GUIContent("縦一列");
- comboBoxList[3] = new GUIContent("斜め");
- comboBoxList[4] = new GUIContent("円(外向き)");
- comboBoxList[5] = new GUIContent("円(内向き)");
- comboBoxList[6] = new GUIContent("扇");
- comboBoxList[7] = new GUIContent("V");
- comboBoxList[8] = new GUIContent("^");
- comboBoxList[9] = new GUIContent("M");
- comboBoxList[10] = new GUIContent("W");
- }
- bool flag1 = true;
- if (faceFlg || poseFlg || sceneFlg || kankyoFlg || kankyo2Flg)
- {
- flag1 = false;
- }
- if (!isF6 && GUI.Toggle(new Rect(GetPix(2),
- GetPix(2),
- GetPix(39),
- GetPix(20)),
- flag1,
- "配置",
- style3))
- {
- faceFlg = false;
- poseFlg = false;
- sceneFlg = false;
- kankyoFlg = false;
- kankyo2Flg = false;
- bGui = true;
- }
- if (!yotogiFlg && GUI.Toggle(new Rect(GetPix(41),
- GetPix(2),
- GetPix(39),
- GetPix(20)),
- poseFlg,
- "操作",
- style3))
- {
- poseFlg = true;
- faceFlg = false;
- sceneFlg = false;
- kankyoFlg = false;
- kankyo2Flg = false;
- }
- if (GUI.Toggle(new Rect(GetPix(80), GetPix(2), GetPix(39), GetPix(20)),
- faceFlg,
- "表情",
- style3))
- {
- faceFlg = true;
- poseFlg = false;
- sceneFlg = false;
- kankyoFlg = false;
- kankyo2Flg = false;
- if (!faceFlg2)
- {
- isFaceInit = true;
- faceFlg2 = true;
- maidArray[selectMaidIndex].boMabataki = false;
- faceCombo.selectedItemIndex = faceIndex[selectMaidIndex];
- }
- }
- if (GUI.Toggle(new Rect(GetPix(119), GetPix(2), GetPix(39), GetPix(20)),
- kankyoFlg,
- "環境",
- style3))
- {
- poseFlg = false;
- faceFlg = false;
- sceneFlg = false;
- kankyoFlg = true;
- kankyo2Flg = false;
- }
- if (!line1)
- {
- line1 = MakeTex(2, 2, new Color(0.0f, 0.0f, 0.0f, 0.3f));
- line2 = MakeTex(2, 2, new Color(0.7f, 0.7f, 0.7f, 0.6f));
- }
- GUI.DrawTexture(new Rect(GetPix(5), GetPix(20), GetPix(160), 2f), line1);
- GUI.DrawTexture(new Rect(GetPix(5), GetPix(20), GetPix(160), 1f), line2);
- int stockMaidCount1 = characterMgr.GetStockMaidCount();
- Rect position;
- Rect viewRect;
- if (sceneLevel != 5)
- {
- position = new Rect(GetPix(7),
- GetPix(110),
- rectWin.width - GetPix(14),
- rectWin.height * 0.83f);
- viewRect = new Rect(0.0f,
- 0.0f,
- position.width * 0.85f,
- (pix + GetPix(5)) * stockMaidCount1 + GetPix(15));
- }
- else
- {
- position = new Rect(GetPix(7),
- GetPix(110),
- rectWin.width - GetPix(14),
- (float)(rectWin.height * 0.829999983310699 * 0.980000019073486));
- viewRect = new Rect(0.0f,
- 0.0f,
- position.width * 0.85f,
- (float)((pix + (double)GetPix(5)) * stockMaidCount1
- + GetPix(15) * 0.920000016689301));
- }
- float y = 0.0f;
- if (comboBoxControl.isClickedComboButton)
- {
- GUI.enabled = false;
- }
- if (GUI.Button(new Rect(GetPix(10), GetPix(78), rectWin.width * 0.85f, GetPix(28)),
- "呼び出す",
- style2))
- {
- isYobidashi = true;
- selectMaidIndex = 0;
- copyIndex = 0;
- for (int index = 0; index < maxMaidCnt; ++index)
- {
- if (!isLock[index] && maidArray[index] && maidArray[index].Visible)
- {
- maidArray[index].CrossFade(poseArray[0] + ".anm", false, true, false, 0.0f, 1f);
- maidArray[index].SetAutoTwistAll(true);
- }
- maidArray[index] = null;
- }
- for (int index = 0; index < maxMaidCnt; ++index)
- {
- isStop[index] = false;
- }
- bGui = false;
- isFadeOut = true;
- GameMain.Instance.MainCamera.FadeOut(0.0f, false, null, true, new Color());
- for (int index = 0; index < characterMgr.GetStockMaidCount(); ++index)
- {
- characterMgr.GetStockMaidList()[index].Visible = false;
- }
- }
- GUIStyle style4 = "button";
- style4.fontSize = GetPix(13);
- GUIStyleState guiStyleState = new GUIStyleState();
- if (GUI.Button(new Rect(GetPix(10), GetPix(52), rectWin.width * 0.4f, GetPix(23)),
- "7人選択",
- style4))
- {
- if (sceneLevel != 5)
- {
- selectList = new ArrayList
- {
- 0,
- 1,
- 2,
- 3,
- 4,
- 5,
- 6
- };
- }
- else
- {
- int stockMaidCount2 = characterMgr.GetStockMaidCount();
- selectList = new ArrayList
- {
- editMaid
- };
- if (stockMaidCount2 > 1)
- {
- if (editMaid >= 1)
- {
- selectList.Add(0);
- }
- else if (stockMaidCount2 > 2)
- {
- selectList.Add(1);
- }
- }
- if (stockMaidCount2 > 2)
- {
- if (editMaid >= 2)
- {
- selectList.Add(1);
- }
- else if (stockMaidCount2 > 3)
- {
- selectList.Add(2);
- }
- }
- if (stockMaidCount2 > 3)
- {
- if (editMaid >= 3)
- {
- selectList.Add(2);
- }
- else if (stockMaidCount2 > 4)
- {
- selectList.Add(3);
- }
- }
- if (stockMaidCount2 > 4)
- {
- if (editMaid >= 4)
- {
- selectList.Add(3);
- }
- else if (stockMaidCount2 > 5)
- {
- selectList.Add(4);
- }
- }
- if (stockMaidCount2 > 5)
- {
- if (editMaid >= 5)
- {
- selectList.Add(4);
- }
- else if (stockMaidCount2 > 6)
- {
- selectList.Add(5);
- }
- }
- if (stockMaidCount2 > 6)
- {
- if (editMaid >= 6)
- {
- selectList.Add(5);
- }
- else if (stockMaidCount2 > 7)
- {
- selectList.Add(6);
- }
- }
- }
- }
- if (GUI.Button(new Rect(rectWin.width * 0.5f, GetPix(52), rectWin.width * 0.4f, GetPix(23)),
- "選択解除",
- style4))
- {
- selectList = new ArrayList();
- if (sceneLevel == 5)
- {
- selectList.Add(editMaid);
- }
- }
- GUI.enabled = true;
- scrollPos = GUI.BeginScrollView(position, scrollPos, viewRect);
- for (int nStockNo = 0; nStockNo < characterMgr.GetStockMaidCount(); ++nStockNo)
- {
- GUI.enabled = true;
- GUI.DrawTexture(new Rect(2f, y + 2f, (float)(rectWin.width * 0.829999983310699 - 4.0), pix - 4f),
- Texture2D.whiteTexture);
- bool flag2 = false;
- for (int index = 0; index < selectList.Count; ++index)
- {
- if ((int)selectList[index] == nStockNo)
- {
- flag2 = true;
- break;
- }
- }
- if (comboBoxControl.isClickedComboButton)
- {
- GUI.enabled = false;
- GUI.Button(new Rect(0.0f, y, rectWin.width * 0.83f, pix), "", style2);
- GUI.Button(new Rect(0.0f, y, rectWin.width * 0.83f, pix), "", style2);
- }
- if (GUI.Button(new Rect(0.0f, y, rectWin.width * 0.83f, pix), "", style2))
- {
- if (flag2)
- {
- for (int index = 0; index < selectList.Count; ++index)
- {
- if ((int)selectList[index] == nStockNo && (sceneLevel != 5 || (int)selectList[index] != editMaid))
- {
- selectList.Remove(nStockNo);
- break;
- }
- }
- }
- else
- {
- if (selectList.Count > maxMaidCnt - 1)
- {
- selectList.Remove(selectList[maxMaidCnt - 1]);
- }
- selectList.Add(nStockNo);
- }
- }
- GUI.enabled = true;
- if (flag2)
- {
- GUI.DrawTexture(new Rect(5f, y + 5f, (float)(rectWin.width * 0.829999983310699 - 10.0), pix - 10f),
- Texture2D.whiteTexture);
- }
- if (characterMgr.GetStockMaid(nStockNo).GetThumIcon())
- {
- GUI.DrawTexture(new Rect(0.0f, y - 5f, pix, pix), characterMgr.GetStockMaid(nStockNo).GetThumIcon());
- }
- string text = characterMgr.GetStockMaid(nStockNo).status.lastName + "\n"
- + characterMgr.GetStockMaid(nStockNo).status.firstName;
- guiStyleState.textColor = Color.black;
- style1.normal = guiStyleState;
- GUI.Label(new Rect(GetPix(65), y + pix / 4f, pix * 2f, pix * 3f), text, style1);
- if (flag2)
- {
- for (int index = 0; index < selectList.Count; ++index)
- {
- if ((int)selectList[index] == nStockNo)
- {
- GUI.Label(new Rect(rectWin.width * 0.7f, y + 6f, pix, pix), (index + 1).ToString(), style1);
- break;
- }
- }
- }
- y += pix + GetPix(5);
- }
- GUI.EndScrollView();
- guiStyleState.textColor = Color.white;
- style1.normal = guiStyleState;
- comboBoxControl.List(new Rect(GetPix(10), GetPix(25), rectWin.width * 0.56f, GetPix(24)),
- comboBoxList[comboBoxControl.GetSelectedItemIndex()].text,
- comboBoxList,
- listStyle);
- bool OKButton = GUI.Button(new Rect(rectWin.width * 0.66f, GetPix(25), rectWin.width * 0.24f, GetPix(24)),
- "決定",
- style4);
- GUI.DragWindow();
- if (!OKButton)
- {
- return;
- }
- for (int index = 0; index < maxMaidCnt; ++index)
- {
- isStop[index] = false;
- }
- switch (comboBoxControl.GetSelectedItemIndex())
- {
- case 0:
- for (int index = 0; index < maidCnt; ++index)
- {
- Vector3 zero1 = Vector3.zero;
- Vector3 zero2 = Vector3.zero;
- if (selectList.Count <= 7)
- {
- if (selectList.Count % 2 == 1)
- {
- switch (index)
- {
- case 0:
- maidArray[index].SetPos(new Vector3(0.0f, 0.0f, 0.0f));
- break;
- case 1:
- maidArray[index].SetPos(new Vector3(-0.6f, 0.0f, 0.26f));
- break;
- case 2:
- maidArray[index].SetPos(new Vector3(0.6f, 0.0f, 0.26f));
- break;
- case 3:
- maidArray[index].SetPos(new Vector3(-1.1f, 0.0f, 0.69f));
- break;
- case 4:
- maidArray[index].SetPos(new Vector3(1.1f, 0.0f, 0.69f));
- break;
- case 5:
- maidArray[index].SetPos(new Vector3(-1.47f, 0.0f, 1.1f));
- break;
- case 6:
- maidArray[index].SetPos(new Vector3(1.47f, 0.0f, 1.1f));
- break;
- }
- }
- else
- {
- switch (index)
- {
- case 0:
- maidArray[index].SetPos(new Vector3(0.3f, 0.0f, 0.0f));
- break;
- case 1:
- maidArray[index].SetPos(new Vector3(-0.3f, 0.0f, 0.0f));
- break;
- case 2:
- maidArray[index].SetPos(new Vector3(0.7f, 0.0f, 0.4f));
- break;
- case 3:
- maidArray[index].SetPos(new Vector3(-0.7f, 0.0f, 0.4f));
- break;
- case 4:
- maidArray[index].SetPos(new Vector3(1f, 0.0f, 0.9f));
- break;
- case 5:
- maidArray[index].SetPos(new Vector3(-1f, 0.0f, 0.9f));
- break;
- }
- }
- }
- else
- {
- float num1 = 0.0f;
- if (selectList.Count >= 11)
- {
- float num2 = -0.4f;
- if (selectList.Count % 2 == 1)
- {
- switch (index)
- {
- case 0:
- maidArray[index].SetPos(new Vector3(0.0f, 0.0f, 0.0f + num2));
- break;
- case 1:
- maidArray[index].SetPos(new Vector3(-0.5f, 0.0f, 0.2f + num2));
- break;
- case 2:
- maidArray[index].SetPos(new Vector3(0.5f, 0.0f, 0.2f + num2));
- break;
- case 3:
- maidArray[index].SetPos(new Vector3(-0.9f, 0.0f, 0.55f + num2));
- break;
- case 4:
- maidArray[index].SetPos(new Vector3(0.9f, 0.0f, 0.55f + num2));
- break;
- case 5:
- maidArray[index].SetPos(new Vector3(-1.25f, 0.0f, 0.9f + num2));
- break;
- case 6:
- maidArray[index].SetPos(new Vector3(1.25f, 0.0f, 0.9f + num2));
- break;
- case 7:
- maidArray[index].SetPos(new Vector3(-1.57f, 0.0f, 1.3f + num2));
- break;
- case 8:
- maidArray[index].SetPos(new Vector3(1.57f, 0.0f, 1.3f + num2));
- break;
- case 9:
- maidArray[index].SetPos(new Vector3(-1.77f, 0.0f, 1.72f + num2));
- break;
- case 10:
- maidArray[index].SetPos(new Vector3(1.77f, 0.0f, 1.72f + num2));
- break;
- case 11:
- maidArray[index].SetPos(new Vector3(-1.85f, 0.0f, 2.17f + num2));
- break;
- case 12:
- maidArray[index].SetPos(new Vector3(1.85f, 0.0f, 2.17f + num2));
- break;
- default:
- maidArray[index].SetPos(new Vector3(0.0f, 0.0f, 0.7f + num2));
- break;
- }
- }
- else
- {
- switch (index)
- {
- case 0:
- maidArray[index].SetPos(new Vector3(0.25f, 0.0f, 0.0f + num2));
- break;
- case 1:
- maidArray[index].SetPos(new Vector3(-0.25f, 0.0f, 0.0f + num2));
- break;
- case 2:
- maidArray[index].SetPos(new Vector3(0.7f, 0.0f, 0.25f + num2));
- break;
- case 3:
- maidArray[index].SetPos(new Vector3(-0.7f, 0.0f, 0.25f + num2));
- break;
- case 4:
- maidArray[index].SetPos(new Vector3(1.05f, 0.0f, 0.6f + num2));
- break;
- case 5:
- maidArray[index].SetPos(new Vector3(-1.05f, 0.0f, 0.6f + num2));
- break;
- case 6:
- maidArray[index].SetPos(new Vector3(1.35f, 0.0f, 0.9f + num2));
- break;
- case 7:
- maidArray[index].SetPos(new Vector3(-1.35f, 0.0f, 0.9f + num2));
- break;
- case 8:
- maidArray[index].SetPos(new Vector3(1.6f, 0.0f, 1.3f + num2));
- break;
- case 9:
- maidArray[index].SetPos(new Vector3(-1.6f, 0.0f, 1.3f + num2));
- break;
- case 10:
- maidArray[index].SetPos(new Vector3(1.8f, 0.0f, 1.72f + num2));
- break;
- case 11:
- maidArray[index].SetPos(new Vector3(-1.8f, 0.0f, 1.72f + num2));
- break;
- case 12:
- maidArray[index].SetPos(new Vector3(1.9f, 0.0f, 2.17f + num2));
- break;
- case 13:
- maidArray[index].SetPos(new Vector3(-1.9f, 0.0f, 2.17f + num2));
- break;
- default:
- maidArray[index].SetPos(new Vector3(0.0f, 0.0f, 0.7f + num2));
- break;
- }
- }
- }
- else if (selectList.Count >= 8)
- {
- if (selectList.Count >= 9)
- {
- num1 = -0.2f;
- }
- if (selectList.Count % 2 == 1)
- {
- switch (index)
- {
- case 0:
- maidArray[index].SetPos(new Vector3(0.0f, 0.0f, 0.0f + num1));
- break;
- case 1:
- maidArray[index].SetPos(new Vector3(-0.55f, 0.0f, 0.2f + num1));
- break;
- case 2:
- maidArray[index].SetPos(new Vector3(0.55f, 0.0f, 0.2f + num1));
- break;
- case 3:
- maidArray[index].SetPos(new Vector3(-1f, 0.0f, 0.6f + num1));
- break;
- case 4:
- maidArray[index].SetPos(new Vector3(1f, 0.0f, 0.6f + num1));
- break;
- case 5:
- maidArray[index].SetPos(new Vector3(-1.35f, 0.0f, 1f + num1));
- break;
- case 6:
- maidArray[index].SetPos(new Vector3(1.35f, 0.0f, 1f + num1));
- break;
- case 7:
- maidArray[index].SetPos(new Vector3(-1.6f, 0.0f, 1.4f + num1));
- break;
- case 8:
- maidArray[index].SetPos(new Vector3(1.6f, 0.0f, 1.4f + num1));
- break;
- }
- }
- else
- {
- switch (index)
- {
- case 0:
- maidArray[index].SetPos(new Vector3(0.28f, 0.0f, 0.0f + num1));
- break;
- case 1:
- maidArray[index].SetPos(new Vector3(-0.28f, 0.0f, 0.0f + num1));
- break;
- case 2:
- maidArray[index].SetPos(new Vector3(0.78f, 0.0f, 0.3f + num1));
- break;
- case 3:
- maidArray[index].SetPos(new Vector3(-0.78f, 0.0f, 0.3f + num1));
- break;
- case 4:
- maidArray[index].SetPos(new Vector3(1.22f, 0.0f, 0.7f + num1));
- break;
- case 5:
- maidArray[index].SetPos(new Vector3(-1.22f, 0.0f, 0.7f + num1));
- break;
- case 6:
- maidArray[index].SetPos(new Vector3(1.55f, 0.0f, 1.1f + num1));
- break;
- case 7:
- maidArray[index].SetPos(new Vector3(-1.55f, 0.0f, 1.1f + num1));
- break;
- case 8:
- maidArray[index].SetPos(new Vector3(1.77f, 0.0f, 1.58f + num1));
- break;
- case 9:
- maidArray[index].SetPos(new Vector3(-1.77f, 0.0f, 1.58f + num1));
- break;
- }
- }
- }
- }
- zero2.y = (float)(Math.Atan2(maidArray[index].transform.position.x,
- maidArray[index].transform.position.z - 1.5) * 180.0 / Math.PI) + 180f;
- maidArray[index].SetRot(zero2);
- }
- break;
- case 1:
- for (int index = 0; index < maidCnt; ++index)
- {
- Vector3 zero1 = Vector3.zero;
- Vector3 zero2 = Vector3.zero;
- if (maidCnt < 9)
- {
- switch (index)
- {
- case 1:
- zero1.x = -0.6f;
- break;
- case 2:
- zero1.x = 0.6f;
- break;
- case 3:
- zero1.x = -1.2f;
- break;
- case 4:
- zero1.x = 1.2f;
- break;
- case 5:
- zero1.x = -1.8f;
- break;
- case 6:
- zero1.x = 1.8f;
- break;
- case 7:
- zero1.x = -2.4f;
- break;
- case 8:
- zero1.x = 2.4f;
- break;
- case 9:
- zero1.x = -3f;
- break;
- case 10:
- zero1.x = 3f;
- break;
- }
- }
- else
- {
- switch (index)
- {
- case 1:
- zero1.x = -0.5f;
- break;
- case 2:
- zero1.x = 0.5f;
- break;
- case 3:
- zero1.x = -1f;
- break;
- case 4:
- zero1.x = 1f;
- break;
- case 5:
- zero1.x = -1.5f;
- break;
- case 6:
- zero1.x = 1.5f;
- break;
- case 7:
- zero1.x = -2f;
- break;
- case 8:
- zero1.x = 2f;
- break;
- case 9:
- zero1.x = -2.5f;
- break;
- case 10:
- zero1.x = 2.5f;
- break;
- case 11:
- zero1.x = -3f;
- break;
- case 12:
- zero1.x = 3f;
- break;
- case 13:
- zero1.x = -3.5f;
- break;
- }
- }
- maidArray[index].SetPos(zero1);
- maidArray[index].SetRot(zero2);
- if (index >= 14)
- {
- maidArray[index].SetPos(new Vector3(0.0f, 0.0f, 0.7f));
- }
- }
- break;
- case 2:
- for (int index = 0; index < maidCnt; ++index)
- {
- Vector3 zero1 = Vector3.zero;
- Vector3 zero2 = Vector3.zero;
- if (maidCnt < 9)
- {
- switch (index)
- {
- case 1:
- zero1.z = 0.6f;
- break;
- case 2:
- zero1.z = -0.6f;
- break;
- case 3:
- zero1.z = 1.2f;
- break;
- case 4:
- zero1.z = -1.2f;
- break;
- case 5:
- zero1.z = 1.8f;
- break;
- case 6:
- zero1.z = -1.8f;
- break;
- case 7:
- zero1.z = 2.4f;
- break;
- case 8:
- zero1.z = -2.4f;
- break;
- case 9:
- zero1.z = 3f;
- break;
- case 10:
- zero1.z = -3f;
- break;
- }
- }
- else
- {
- switch (index)
- {
- case 1:
- zero1.z = 0.5f;
- break;
- case 2:
- zero1.z = -0.5f;
- break;
- case 3:
- zero1.z = 1f;
- break;
- case 4:
- zero1.z = -1f;
- break;
- case 5:
- zero1.z = 1.5f;
- break;
- case 6:
- zero1.z = -1.5f;
- break;
- case 7:
- zero1.z = 2f;
- break;
- case 8:
- zero1.z = -2f;
- break;
- case 9:
- zero1.z = 2.5f;
- break;
- case 10:
- zero1.z = -2.5f;
- break;
- case 11:
- zero1.z = 3f;
- break;
- case 12:
- zero1.z = -3f;
- break;
- case 13:
- zero1.z = 3.5f;
- break;
- }
- }
- maidArray[index].SetPos(zero1);
- maidArray[index].SetRot(zero2);
- if (index >= 14)
- {
- maidArray[index].SetPos(new Vector3(0.0f, 0.0f, 0.7f));
- }
- }
- break;
- case 3:
- for (int index = 0; index < maidCnt; ++index)
- {
- Vector3 zero1 = Vector3.zero;
- Vector3 zero2 = Vector3.zero;
- float num = 0.5f;
- if (maidCnt > 11)
- {
- num = 0.25f;
- }
- else if (maidCnt > 9)
- {
- num = 0.32f;
- }
- else if (maidCnt > 7)
- {
- num = 0.4f;
- }
- switch (index)
- {
- case 1:
- zero1.x = -num;
- zero1.z = num;
- break;
- case 2:
- zero1.x = num;
- zero1.z = -num;
- break;
- case 3:
- zero1.x = (float)(-num * 2.0);
- zero1.z = num * 2f;
- break;
- case 4:
- zero1.x = num * 2f;
- zero1.z = (float)(-num * 2.0);
- break;
- case 5:
- zero1.x = (float)(-num * 3.0);
- zero1.z = num * 3f;
- break;
- case 6:
- zero1.x = num * 3f;
- zero1.z = (float)(-num * 3.0);
- break;
- case 7:
- zero1.x = (float)(-num * 4.0);
- zero1.z = num * 4f;
- break;
- case 8:
- zero1.x = num * 4f;
- zero1.z = (float)(-num * 4.0);
- break;
- case 9:
- zero1.x = (float)(-num * 5.0);
- zero1.z = num * 5f;
- break;
- case 10:
- zero1.x = num * 5f;
- zero1.z = (float)(-num * 5.0);
- break;
- case 11:
- zero1.x = (float)(-num * 6.0);
- zero1.z = num * 6f;
- break;
- case 12:
- zero1.x = num * 6f;
- zero1.z = (float)(-num * 6.0);
- break;
- case 13:
- zero1.x = (float)(-num * 7.0);
- zero1.z = num * 7f;
- break;
- }
- maidArray[index].SetPos(zero1);
- maidArray[index].SetRot(zero2);
- if (index >= 14)
- {
- maidArray[index].SetPos(new Vector3(0.0f, 0.0f, 0.7f));
- }
- }
- break;
- case 4:
- for (int index = 0; index < maidCnt; ++index)
- {
- Vector3 zero1 = Vector3.zero;
- Vector3 zero2 = Vector3.zero;
- float num = (float)(0.400000005960464 + 0.0799999982118607 * maidCnt);
- zero1.x = num * (float)Math.Cos(Math.PI / 180.0 * (90 + 360 * index / maidCnt));
- zero1.z = num * (float)Math.Sin(Math.PI / 180.0 * (90 + 360 * index / maidCnt));
- maidArray[index].SetPos(zero1);
- zero2.y = (float)(Math.Atan2(zero1.x, zero1.z) * 180.0 / Math.PI);
- maidArray[index].SetRot(zero2);
- }
- break;
- case 5:
- for (int index = 0; index < maidCnt; ++index)
- {
- Vector3 zero1 = Vector3.zero;
- Vector3 zero2 = Vector3.zero;
- float num = (float)(0.400000005960464 + 0.0799999982118607 * maidCnt);
- zero1.x = num * (float)Math.Cos(Math.PI / 180.0 * (90 + 360 * index / maidCnt));
- zero1.z = num * (float)Math.Sin(Math.PI / 180.0 * (90 + 360 * index / maidCnt));
- maidArray[index].SetPos(zero1);
- zero2.y = (float)(Math.Atan2(zero1.x, zero1.z) * 180.0 / Math.PI) + 180f;
- maidArray[index].SetRot(zero2);
- }
- break;
- case 6:
- for (int index = 0; index < maidCnt; ++index)
- {
- Vector3 zero1 = Vector3.zero;
- Vector3 zero2 = Vector3.zero;
- float num = 0.0f;
- if (maidCnt > 9)
- {
- num = -0.4f;
- }
- else if (maidCnt > 7)
- {
- num = -0.2f;
- }
- switch (index)
- {
- case 0:
- zero1.z = 0.3f;
- break;
- case 1:
- zero1.x = -0.9f;
- zero1.z = -0.4f;
- zero2.y = 40f;
- break;
- case 2:
- zero1.x = 0.9f;
- zero1.z = -0.4f;
- zero2.y = -40f;
- break;
- case 3:
- zero1.x = -0.4f;
- zero1.z = -0.8f;
- zero2.y = 20f;
- break;
- case 4:
- zero1.x = 0.4f;
- zero1.z = -0.8f;
- zero2.y = -20f;
- break;
- case 5:
- zero1.x = -1.2f;
- zero1.z = 0.1f;
- zero2.y = 60f;
- break;
- case 6:
- zero1.x = 1.2f;
- zero1.z = 0.1f;
- zero2.y = -60f;
- break;
- case 7:
- zero1.x = -1.5f;
- zero1.z = 0.6f;
- zero2.y = 80f;
- break;
- case 8:
- zero1.x = 1.5f;
- zero1.z = 0.6f;
- zero2.y = -80f;
- break;
- case 9:
- zero1.x = -1.6f;
- zero1.z = 1.15f;
- zero2.y = 100f;
- break;
- case 10:
- zero1.x = 1.6f;
- zero1.z = 1.15f;
- zero2.y = -100f;
- break;
- case 11:
- zero1.x = -1.6f;
- zero1.z = 1.65f;
- zero2.y = 110f;
- break;
- case 12:
- zero1.x = 1.65f;
- zero1.z = 1.65f;
- zero2.y = -110f;
- break;
- case 13:
- zero1.x = -1.65f;
- zero1.z = 2.15f;
- zero2.y = 120f;
- break;
- }
- if (index > 0)
- {
- zero1.z += num;
- }
- else
- {
- zero1.z -= num;
- }
- maidArray[index].SetPos(zero1);
- maidArray[index].SetRot(zero2);
- if (index >= 14)
- {
- maidArray[index].SetPos(new Vector3(0.0f, 0.0f, 0.7f));
- }
- }
- break;
- case 7:
- for (int index = 0; index < maidCnt; ++index)
- {
- Vector3 zero1 = Vector3.zero;
- Vector3 zero2 = Vector3.zero;
- float num = 0.0f;
- if (maidCnt > 11)
- {
- num = 0.6f;
- }
- else if (maidCnt > 9)
- {
- num = 0.4f;
- }
- else if (maidCnt > 7)
- {
- num = 0.2f;
- }
- switch (index)
- {
- case 0:
- zero1.z = 0.8f;
- break;
- case 1:
- zero1.x = -0.45f;
- zero1.z = 0.3f;
- zero2.y = -10f;
- break;
- case 2:
- zero1.x = 0.45f;
- zero1.z = 0.3f;
- zero2.y = 10f;
- break;
- case 3:
- zero1.x = -0.8f;
- zero1.z = -0.2f;
- zero2.y = -20f;
- break;
- case 4:
- zero1.x = 0.8f;
- zero1.z = -0.2f;
- zero2.y = 20f;
- break;
- case 5:
- zero1.x = -1.2f;
- zero1.z = -0.75f;
- zero2.y = -30f;
- break;
- case 6:
- zero1.x = 1.2f;
- zero1.z = -0.75f;
- zero2.y = 30f;
- break;
- case 7:
- zero1.x = -1.6f;
- zero1.z = -1.25f;
- zero2.y = -40f;
- break;
- case 8:
- zero1.x = 1.6f;
- zero1.z = -1.25f;
- zero2.y = 40f;
- break;
- case 9:
- zero1.x = -2f;
- zero1.z = -1.75f;
- zero2.y = -50f;
- break;
- case 10:
- zero1.x = 2f;
- zero1.z = -1.75f;
- zero2.y = 50f;
- break;
- case 11:
- zero1.x = -2.4f;
- zero1.z = -2.25f;
- zero2.y = -60f;
- break;
- case 12:
- zero1.x = 2.4f;
- zero1.z = -2.25f;
- zero2.y = 60f;
- break;
- case 13:
- zero1.x = -2.8f;
- zero1.z = -2.75f;
- zero2.y = -70f;
- break;
- }
- zero1.z += num;
- maidArray[index].SetPos(zero1);
- maidArray[index].SetRot(zero2);
- if (index >= 14)
- {
- maidArray[index].SetPos(new Vector3(0.0f, 0.0f, 0.7f));
- }
- }
- break;
- case 8:
- for (int index = 0; index < maidCnt; ++index)
- {
- Vector3 zero1 = Vector3.zero;
- Vector3 zero2 = Vector3.zero;
- float num = 0.0f;
- if (maidCnt > 11)
- {
- num = -0.6f;
- }
- else if (maidCnt > 9)
- {
- num = -0.4f;
- }
- else if (maidCnt > 7)
- {
- num = -0.2f;
- }
- switch (index)
- {
- case 0:
- zero1.z = -0.75f;
- break;
- case 1:
- zero1.x = -0.45f;
- zero1.z = -0.2f;
- zero2.y = 20f;
- break;
- case 2:
- zero1.x = 0.45f;
- zero1.z = -0.2f;
- zero2.y = -20f;
- break;
- case 3:
- zero1.x = -0.8f;
- zero1.z = 0.3f;
- zero2.y = 35f;
- break;
- case 4:
- zero1.x = 0.8f;
- zero1.z = 0.3f;
- zero2.y = -35f;
- break;
- case 5:
- zero1.x = -1.2f;
- zero1.z = 0.8f;
- zero2.y = 50f;
- break;
- case 6:
- zero1.x = 1.2f;
- zero1.z = 0.8f;
- zero2.y = -50f;
- break;
- case 7:
- zero1.x = -1.6f;
- zero1.z = 1.3f;
- zero2.y = 65f;
- break;
- case 8:
- zero1.x = 1.6f;
- zero1.z = 1.3f;
- zero2.y = -65f;
- break;
- case 9:
- zero1.x = -2f;
- zero1.z = 1.8f;
- zero2.y = 80f;
- break;
- case 10:
- zero1.x = 2f;
- zero1.z = 1.8f;
- zero2.y = -80f;
- break;
- case 11:
- zero1.x = -2.4f;
- zero1.z = 2.3f;
- zero2.y = 90f;
- break;
- case 12:
- zero1.x = 2.4f;
- zero1.z = 2.3f;
- zero2.y = -90f;
- break;
- case 13:
- zero1.x = -2.8f;
- zero1.z = 2.8f;
- zero2.y = 100f;
- break;
- }
- zero1.z += num;
- maidArray[index].SetPos(zero1);
- maidArray[index].SetRot(zero2);
- if (index >= 14)
- {
- maidArray[index].SetPos(new Vector3(0.0f, 0.0f, 0.7f));
- }
- }
- break;
- case 9:
- for (int index = 0; index < maidCnt; ++index)
- {
- Vector3 zero1 = Vector3.zero;
- Vector3 zero2 = Vector3.zero;
- float num = 1f;
- if (maidCnt > 9)
- {
- num = 0.84f;
- }
- else if (maidCnt > 7)
- {
- num = 0.92f;
- }
- switch (index)
- {
- case 0:
- zero1.z = 0.0f;
- break;
- case 1:
- zero1.x = -0.5f;
- zero1.z = -0.5f;
- break;
- case 2:
- zero1.x = 0.5f;
- zero1.z = -0.5f;
- break;
- case 3:
- zero1.x = -1f;
- zero1.z = 0.2f;
- break;
- case 4:
- zero1.x = 1f;
- zero1.z = 0.2f;
- break;
- case 5:
- zero1.x = -1.5f;
- zero1.z = -0.5f;
- break;
- case 6:
- zero1.x = 1.5f;
- zero1.z = -0.5f;
- break;
- case 7:
- zero1.x = -2f;
- zero1.z = 0.2f;
- break;
- case 8:
- zero1.x = 2f;
- zero1.z = 0.2f;
- break;
- case 9:
- zero1.x = -2.5f;
- zero1.z = -0.5f;
- break;
- case 10:
- zero1.x = 2.5f;
- zero1.z = -0.5f;
- break;
- case 11:
- zero1.x = -3f;
- zero1.z = 0.2f;
- break;
- case 12:
- zero1.x = 3f;
- zero1.z = 0.2f;
- break;
- case 13:
- zero1.x = -3.5f;
- zero1.z = -0.5f;
- break;
- }
- zero1.x *= num;
- maidArray[index].SetPos(zero1);
- maidArray[index].SetRot(zero2);
- if (index >= 14)
- {
- maidArray[index].SetPos(new Vector3(0.0f, 0.0f, 0.7f));
- }
- }
- break;
- case 10:
- for (int index = 0; index < maidCnt; ++index)
- {
- Vector3 zero1 = Vector3.zero;
- Vector3 zero2 = Vector3.zero;
- float num = 1f;
- if (maidCnt > 9)
- {
- num = 0.84f;
- }
- else if (maidCnt > 7)
- {
- num = 0.92f;
- }
- switch (index)
- {
- case 0:
- zero1.z = -0.4f;
- break;
- case 1:
- zero1.x = -0.5f;
- zero1.z = 0.2f;
- break;
- case 2:
- zero1.x = 0.5f;
- zero1.z = 0.2f;
- break;
- case 3:
- zero1.x = -1f;
- zero1.z = -0.5f;
- break;
- case 4:
- zero1.x = 1f;
- zero1.z = -0.5f;
- break;
- case 5:
- zero1.x = -1.5f;
- zero1.z = 0.2f;
- break;
- case 6:
- zero1.x = 1.5f;
- zero1.z = 0.2f;
- break;
- case 7:
- zero1.x = -2f;
- zero1.z = -0.5f;
- break;
- case 8:
- zero1.x = 2f;
- zero1.z = -0.5f;
- break;
- case 9:
- zero1.x = -2.5f;
- zero1.z = 0.2f;
- break;
- case 10:
- zero1.x = 2.5f;
- zero1.z = 0.2f;
- break;
- case 11:
- zero1.x = -3f;
- zero1.z = -0.5f;
- break;
- case 12:
- zero1.x = 3f;
- zero1.z = -0.5f;
- break;
- case 13:
- zero1.x = -3.5f;
- zero1.z = 0.2f;
- break;
- }
- zero1.x *= num;
- maidArray[index].SetPos(zero1);
- maidArray[index].SetRot(zero2);
- if (index >= 14)
- {
- maidArray[index].SetPos(new Vector3(0.0f, 0.0f, 0.7f));
- }
- }
- break;
- }
- for (int index = 0; index < maxMaidCnt; ++index)
- {
- if (!isLock[index] && maidArray[index] != null && maidArray[index].Visible)
- {
- maidArray[index].CrossFade(poseArray[0] + ".anm", false, true, false, 0.0f, 1f);
- maidArray[index].SetAutoTwistAll(true);
- }
- }
- }
- private void MessageWindow(int winID)
- {
- GUIStyle style1 = "label";
- style1.fontSize = GetPix(12);
- style1.alignment = TextAnchor.UpperLeft;
- GUIStyle style2 = "button";
- style2.fontSize = GetPix(16);
- GUI.Label(new Rect(GetPix(8), GetPix(4), GetPix(80), GetPix(25)),
- "名前",
- style1);
- inName = GUI.TextField(new Rect(GetPix(35),
- GetPix(4),
- GetPix(120),
- GetPix(20)),
- inName);
- GUI.Label(new Rect(GetPix(180), GetPix(4), GetPix(100), GetPix(25)),
- "サイズ",
- style1);
- fontSize = (int)GUI.HorizontalSlider(new Rect(GetPix(220),
- GetPix(9),
- GetPix(100),
- GetPix(20)),
- fontSize,
- 25f,
- 60f);
- if (fontSize != mFontSize)
- {
- mFontSize = fontSize;
- GameObject gameObject = GameObject.Find("__GameMain__/SystemUI Root").transform.Find("MessageWindowPanel").gameObject;
- MessageClass messageClass = new MessageClass(gameObject, GameMain.Instance.ScriptMgr.adv_kag.MessageWindowMgr);
- SetFieldValue2<UILabel, int>(UTY.GetChildObject(gameObject, "MessageViewer/MsgParent/Message", false)
- .GetComponent<UILabel>(),
- "mFontSize",
- fontSize);
- }
- GUI.Label(new Rect(GetPix(325), GetPix(4), GetPix(100), GetPix(25)),
- fontSize.ToString() + "pt",
- style1);
- inText = GUI.TextArea(new Rect(GetPix(8),
- GetPix(26),
- rectWin2.width - GetPix(15),
- GetPix(52)),
- inText,
- 300);
- if (GUI.Button(new Rect(GetPix(8), GetPix(82), GetPix(60), GetPix(20)),
- "決定",
- style2))
- {
- isMessage = true;
- bGuiMessage = false;
- GameObject gameObject1 = GameObject.Find("__GameMain__/SystemUI Root").transform.Find("MessageWindowPanel").gameObject;
- MessageWindowMgr messageWindowMgr = GameMain.Instance.ScriptMgr.adv_kag.MessageWindowMgr;
- messageWindowMgr.OpenMessageWindowPanel();
- MessageClass inst = new MessageClass(gameObject1, messageWindowMgr);
- UILabel component = UTY.GetChildObject(gameObject1, "MessageViewer/MsgParent/Message", false).GetComponent<UILabel>();
- component.ProcessText();
- SetFieldValue2<UILabel, int>(component, "mFontSize", fontSize);
- SetFieldValue5<MessageClass, UILabel>(inst, "message_label_", component);
- inst.SetText(inName, inText, "", 0, AudioSourceMgr.Type.System);
- inst.FinishChAnime();
- }
- GUI.DragWindow();
- }
- private void SaveManagerWindow(int winID)
- {
- GUIStyle labelStyle = new GUIStyle("label");
- labelStyle.fontSize = GetPix(12);
- labelStyle.alignment = TextAnchor.MiddleCenter;
- GUIStyle newSaveStyle = new GUIStyle("button");
- newSaveStyle.fontSize = GetPix(50);
- newSaveStyle.alignment = TextAnchor.MiddleCenter;
- GUIStyle saveImageStyle = new GUIStyle("box");
- saveImageStyle.fontSize = GetPix(12);
- saveImageStyle.alignment = TextAnchor.MiddleCenter;
- saveImageStyle.padding = new RectOffset(0, 0, 0, 0);
- GUIStyle saveControlStyle = new GUIStyle("button");
- saveControlStyle.fontSize = GetPix(18);
- // Window variables
- float windowPadding = GetPix(10);
- float windowPaddingY = GetPix(20);
- if (GUI.Button(new Rect(
- windowPadding,
- windowPadding,
- GetPix(25),
- GetPix(25)
- ), "X", saveControlStyle))
- {
- faceFlg = false;
- poseFlg = false;
- sceneFlg = false;
- kankyoFlg = true;
- kankyo2Flg = false;
- bGui = true;
- copyIndex = 0;
- }
- if (GUI.Button(new Rect(
- windowPaddingY + GetPix(25),
- windowPadding,
- GetPix(85),
- GetPix(25)
- ), "Refresh", saveControlStyle))
- {
- InitializeSaveList();
- }
- if (createSaveFlag || loadSaveFlag)
- {
- GUI.enabled = false;
- }
- #region SAVE_GRID
- float saveGridX = windowPadding + Mathf.Max(480, GetPix(480)) + windowPadding;
- float saveGridY = windowPaddingY;
- float saveGridWidth = saveManagerRect.width - saveGridX - windowPadding;
- float saveGridHeight = saveManagerRect.height - windowPaddingY;
- int numImages = saveScenes.Count;
- float scale = 0.5f;
- float imageWidth = Mathf.Min(480f * scale, GetPix(480) * scale);
- float imageHeight = Mathf.Min(270f * scale, GetPix(270) * scale);
- float imagePadding = GetPix(12);
- int maxColumns = Mathf.Max(1, (int)(saveGridWidth / (imageWidth + imagePadding)));
- float imageGridWidth = maxColumns * (imageWidth + imagePadding);
- float imageGridX = saveGridX + (saveGridWidth / 2f - imageGridWidth / 2f) + windowPadding;
- float imageGridOffset = (saveGridWidth - imageGridWidth) / 2f;
- Rect saveGridScrollRect = new Rect(
- saveGridX + windowPadding
- , saveGridY
- , saveGridWidth - windowPadding
- , saveGridHeight - windowPadding
- );
- Rect saveGridScrollView = new Rect(0, 0
- , saveGridWidth - 30
- , (numImages / maxColumns + 1) * (imageHeight + imagePadding) + imagePadding
- );
- GUI.Box(new Rect(
- saveGridX
- , saveGridY
- , saveGridWidth
- , saveGridHeight - windowPadding
- ), "");
- saveManagerScrollPos = GUI.BeginScrollView(saveGridScrollRect, saveManagerScrollPos, saveGridScrollView);
- if (GUI.Button(new Rect(
- imageGridOffset
- , imagePadding
- , imageWidth
- , imageHeight)
- , "+", newSaveStyle))
- {
- createSaveFlag = true;
- TakeScreenshot();
- }
- int j = 1;
- int i = numImages - 1;
- while (i >= 0 && j <= numImages)
- {
- Texture2D saveImage = saveScenes[i]?.Item2 ?? null;
- if (saveImage != null)
- {
- if (GUI.Button(new Rect(
- (j % maxColumns) * imageWidth + (j % maxColumns) * imagePadding + imageGridOffset
- , (j / maxColumns) * imageHeight + (j / maxColumns + 1) * imagePadding
- , imageWidth
- , imageHeight)
- , saveImage, saveImageStyle))
- {
- selectedSave = i;
- }
- i--;
- j++;
- }
- }
- GUI.EndScrollView();
- #endregion
- #region SAVE_CONTROLS
- if (numImages > 0)
- {
- Texture2D previewImage = saveScenes[selectedSave]?.Item2 ?? null;
- if (previewImage != null)
- {
- float saveManagerX = windowPadding;
- float saveManagerY = windowPaddingY + GetPix(80);
- int previewWidth = Mathf.Min(previewImage.width, GetPix(previewImage.width));
- int previewHeight = Mathf.Min(previewImage.height, GetPix(previewImage.height));
- float previewX = saveManagerX + (saveGridX / 2 - previewWidth / 2);
- float previewY = saveManagerY;
- GUI.DrawTexture(new Rect(
- previewX - GetPix(10)
- , previewY - GetPix(10)
- , previewWidth + GetPix(20)
- , previewHeight + GetPix(20))
- , frame
- );
- GUI.DrawTexture(new Rect(
- previewX,
- previewY,
- previewWidth,
- previewHeight
- ), previewImage);
- float saveControlX = previewX + GetPix(20);
- float saveControlY = saveManagerY + previewHeight + windowPaddingY;
- int saveControlWidth = GetPix(110);
- int saveControlHeight = GetPix(40);
- if (GUI.Button(new Rect(
- saveControlX
- , saveControlY
- , saveControlWidth
- , saveControlHeight)
- , "Overwrite", saveControlStyle))
- {
- createSaveFlag = true;
- overwriteFlag = true;
- TakeScreenshot();
- }
- if (GUI.Button(new Rect(
- previewX + previewWidth - saveControlWidth - GetPix(20)
- , saveControlY
- , saveControlWidth
- , saveControlHeight)
- , "Load", saveControlStyle))
- {
- // string sceneData = LoadSave(saveScenes[selectedSave].Item1.FullName);
- // Debug.Log(sceneData);
- loadSaveFlag = true;
- loadScene = 1;
- }
- }
- }
- #endregion
- GUI.enabled = true;
- if (createSaveFlag)
- {
- if (File.Exists(thum_file_path_))
- {
- if (overwriteFlag)
- OverWrite();
- SaveScene();
- createSaveFlag = false;
- overwriteFlag = false;
- }
- }
- GUI.DragWindow();
- }
- public void TakeScreenshot()
- {
- GameMain.Instance.SoundMgr.PlaySe("se002.ogg", false);
- isScreen2 = true;
- if (!isMessage)
- {
- ui_cam_hide_list_.Clear();
- foreach (UICamera uiCamera in NGUITools.FindActive<UICamera>())
- {
- if (uiCamera.GetComponent<Camera>().enabled)
- {
- uiCamera.GetComponent<Camera>().enabled = false;
- ui_cam_hide_list_.Add(uiCamera);
- }
- }
- }
- else
- {
- editUI = GameObject.Find("/UI Root/Camera");
- if (editUI != null)
- {
- editUI.SetActive(false);
- }
- if (GameMain.Instance.CMSystem.ViewFps)
- {
- UTY.GetChildObject(GameMain.Instance.gameObject, "SystemUI Root/FpsCounter", false).SetActive(false);
- }
- GameObject childObject1 = UTY.GetChildObject(GameMain.Instance.gameObject, "SystemUI Root/SystemDialog", false);
- GameObject childObject2 = UTY.GetChildObject(GameMain.Instance.gameObject, "SystemUI Root/SystemShortcut", false);
- childObject1.SetActive(false);
- childObject2.SetActive(false);
- }
- isGui = bGui;
- bGui = false;
- try
- {
- thum_byte_to_base64_ = string.Empty;
- thum_file_path_ = Path.Combine(Path.GetTempPath(), "cm3d2_" + Guid.NewGuid().ToString() + ".png");
- GameMain.Instance.MainCamera.ScreenShot(thum_file_path_, 1, true);
- }
- catch { }
- }
- }
- }
|