MultipleMaids.Gui.cs 403 KB

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