1
0

MultipleMaids.MaidUpdate.cs 922 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329330331332333334335336337338339340341342343344345346347348349350351352353354355356357358359360361362363364365366367368369370371372373374375376377378379380381382383384385386387388389390391392393394395396397398399400401402403404405406407408409410411412413414415416417418419420421422423424425426427428429430431432433434435436437438439440441442443444445446447448449450451452453454455456457458459460461462463464465466467468469470471472473474475476477478479480481482483484485486487488489490491492493494495496497498499500501502503504505506507508509510511512513514515516517518519520521522523524525526527528529530531532533534535536537538539540541542543544545546547548549550551552553554555556557558559560561562563564565566567568569570571572573574575576577578579580581582583584585586587588589590591592593594595596597598599600601602603604605606607608609610611612613614615616617618619620621622623624625626627628629630631632633634635636637638639640641642643644645646647648649650651652653654655656657658659660661662663664665666667668669670671672673674675676677678679680681682683684685686687688689690691692693694695696697698699700701702703704705706707708709710711712713714715716717718719720721722723724725726727728729730731732733734735736737738739740741742743744745746747748749750751752753754755756757758759760761762763764765766767768769770771772773774775776777778779780781782783784785786787788789790791792793794795796797798799800801802803804805806807808809810811812813814815816817818819820821822823824825826827828829830831832833834835836837838839840841842843844845846847848849850851852853854855856857858859860861862863864865866867868869870871872873874875876877878879880881882883884885886887888889890891892893894895896897898899900901902903904905906907908909910911912913914915916917918919920921922923924925926927928929930931932933934935936937938939940941942943944945946947948949950951952953954955956957958959960961962963964965966967968969970971972973974975976977978979980981982983984985986987988989990991992993994995996997998999100010011002100310041005100610071008100910101011101210131014101510161017101810191020102110221023102410251026102710281029103010311032103310341035103610371038103910401041104210431044104510461047104810491050105110521053105410551056105710581059106010611062106310641065106610671068106910701071107210731074107510761077107810791080108110821083108410851086108710881089109010911092109310941095109610971098109911001101110211031104110511061107110811091110111111121113111411151116111711181119112011211122112311241125112611271128112911301131113211331134113511361137113811391140114111421143114411451146114711481149115011511152115311541155115611571158115911601161116211631164116511661167116811691170117111721173117411751176117711781179118011811182118311841185118611871188118911901191119211931194119511961197119811991200120112021203120412051206120712081209121012111212121312141215121612171218121912201221122212231224122512261227122812291230123112321233123412351236123712381239124012411242124312441245124612471248124912501251125212531254125512561257125812591260126112621263126412651266126712681269127012711272127312741275127612771278127912801281128212831284128512861287128812891290129112921293129412951296129712981299130013011302130313041305130613071308130913101311131213131314131513161317131813191320132113221323132413251326132713281329133013311332133313341335133613371338133913401341134213431344134513461347134813491350135113521353135413551356135713581359136013611362136313641365136613671368136913701371137213731374137513761377137813791380138113821383138413851386138713881389139013911392139313941395139613971398139914001401140214031404140514061407140814091410141114121413141414151416141714181419142014211422142314241425142614271428142914301431143214331434143514361437143814391440144114421443144414451446144714481449145014511452145314541455145614571458145914601461146214631464146514661467146814691470147114721473147414751476147714781479148014811482148314841485148614871488148914901491149214931494149514961497149814991500150115021503150415051506150715081509151015111512151315141515151615171518151915201521152215231524152515261527152815291530153115321533153415351536153715381539154015411542154315441545154615471548154915501551155215531554155515561557155815591560156115621563156415651566156715681569157015711572157315741575157615771578157915801581158215831584158515861587158815891590159115921593159415951596159715981599160016011602160316041605160616071608160916101611161216131614161516161617161816191620162116221623162416251626162716281629163016311632163316341635163616371638163916401641164216431644164516461647164816491650165116521653165416551656165716581659166016611662166316641665166616671668166916701671167216731674167516761677167816791680168116821683168416851686168716881689169016911692169316941695169616971698169917001701170217031704170517061707170817091710171117121713171417151716171717181719172017211722172317241725172617271728172917301731173217331734173517361737173817391740174117421743174417451746174717481749175017511752175317541755175617571758175917601761176217631764176517661767176817691770177117721773177417751776177717781779178017811782178317841785178617871788178917901791179217931794179517961797179817991800180118021803180418051806180718081809181018111812181318141815181618171818181918201821182218231824182518261827182818291830183118321833183418351836183718381839184018411842184318441845184618471848184918501851185218531854185518561857185818591860186118621863186418651866186718681869187018711872187318741875187618771878187918801881188218831884188518861887188818891890189118921893189418951896189718981899190019011902190319041905190619071908190919101911191219131914191519161917191819191920192119221923192419251926192719281929193019311932193319341935193619371938193919401941194219431944194519461947194819491950195119521953195419551956195719581959196019611962196319641965196619671968196919701971197219731974197519761977197819791980198119821983198419851986198719881989199019911992199319941995199619971998199920002001200220032004200520062007200820092010201120122013201420152016201720182019202020212022202320242025202620272028202920302031203220332034203520362037203820392040204120422043204420452046204720482049205020512052205320542055205620572058205920602061206220632064206520662067206820692070207120722073207420752076207720782079208020812082208320842085208620872088208920902091209220932094209520962097209820992100210121022103210421052106210721082109211021112112211321142115211621172118211921202121212221232124212521262127212821292130213121322133213421352136213721382139214021412142214321442145214621472148214921502151215221532154215521562157215821592160216121622163216421652166216721682169217021712172217321742175217621772178217921802181218221832184218521862187218821892190219121922193219421952196219721982199220022012202220322042205220622072208220922102211221222132214221522162217221822192220222122222223222422252226222722282229223022312232223322342235223622372238223922402241224222432244224522462247224822492250225122522253225422552256225722582259226022612262226322642265226622672268226922702271227222732274227522762277227822792280228122822283228422852286228722882289229022912292229322942295229622972298229923002301230223032304230523062307230823092310231123122313231423152316231723182319232023212322232323242325232623272328232923302331233223332334233523362337233823392340234123422343234423452346234723482349235023512352235323542355235623572358235923602361236223632364236523662367236823692370237123722373237423752376237723782379238023812382238323842385238623872388238923902391239223932394239523962397239823992400240124022403240424052406240724082409241024112412241324142415241624172418241924202421242224232424242524262427242824292430243124322433243424352436243724382439244024412442244324442445244624472448244924502451245224532454245524562457245824592460246124622463246424652466246724682469247024712472247324742475247624772478247924802481248224832484248524862487248824892490249124922493249424952496249724982499250025012502250325042505250625072508250925102511251225132514251525162517251825192520252125222523252425252526252725282529253025312532253325342535253625372538253925402541254225432544254525462547254825492550255125522553255425552556255725582559256025612562256325642565256625672568256925702571257225732574257525762577257825792580258125822583258425852586258725882589259025912592259325942595259625972598259926002601260226032604260526062607260826092610261126122613261426152616261726182619262026212622262326242625262626272628262926302631263226332634263526362637263826392640264126422643264426452646264726482649265026512652265326542655265626572658265926602661266226632664266526662667266826692670267126722673267426752676267726782679268026812682268326842685268626872688268926902691269226932694269526962697269826992700270127022703270427052706270727082709271027112712271327142715271627172718271927202721272227232724272527262727272827292730273127322733273427352736273727382739274027412742274327442745274627472748274927502751275227532754275527562757275827592760276127622763276427652766276727682769277027712772277327742775277627772778277927802781278227832784278527862787278827892790279127922793279427952796279727982799280028012802280328042805280628072808280928102811281228132814281528162817281828192820282128222823282428252826282728282829283028312832283328342835283628372838283928402841284228432844284528462847284828492850285128522853285428552856285728582859286028612862286328642865286628672868286928702871287228732874287528762877287828792880288128822883288428852886288728882889289028912892289328942895289628972898289929002901290229032904290529062907290829092910291129122913291429152916291729182919292029212922292329242925292629272928292929302931293229332934293529362937293829392940294129422943294429452946294729482949295029512952295329542955295629572958295929602961296229632964296529662967296829692970297129722973297429752976297729782979298029812982298329842985298629872988298929902991299229932994299529962997299829993000300130023003300430053006300730083009301030113012301330143015301630173018301930203021302230233024302530263027302830293030303130323033303430353036303730383039304030413042304330443045304630473048304930503051305230533054305530563057305830593060306130623063306430653066306730683069307030713072307330743075307630773078307930803081308230833084308530863087308830893090309130923093309430953096309730983099310031013102310331043105310631073108310931103111311231133114311531163117311831193120312131223123312431253126312731283129313031313132313331343135313631373138313931403141314231433144314531463147314831493150315131523153315431553156315731583159316031613162316331643165316631673168316931703171317231733174317531763177317831793180318131823183318431853186318731883189319031913192319331943195319631973198319932003201320232033204320532063207320832093210321132123213321432153216321732183219322032213222322332243225322632273228322932303231323232333234323532363237323832393240324132423243324432453246324732483249325032513252325332543255325632573258325932603261326232633264326532663267326832693270327132723273327432753276327732783279328032813282328332843285328632873288328932903291329232933294329532963297329832993300330133023303330433053306330733083309331033113312331333143315331633173318331933203321332233233324332533263327332833293330333133323333333433353336333733383339334033413342334333443345334633473348334933503351335233533354335533563357335833593360336133623363336433653366336733683369337033713372337333743375337633773378337933803381338233833384338533863387338833893390339133923393339433953396339733983399340034013402340334043405340634073408340934103411341234133414341534163417341834193420342134223423342434253426342734283429343034313432343334343435343634373438343934403441344234433444344534463447344834493450345134523453345434553456345734583459346034613462346334643465346634673468346934703471347234733474347534763477347834793480348134823483348434853486348734883489349034913492349334943495349634973498349935003501350235033504350535063507350835093510351135123513351435153516351735183519352035213522352335243525352635273528352935303531353235333534353535363537353835393540354135423543354435453546354735483549355035513552355335543555355635573558355935603561356235633564356535663567356835693570357135723573357435753576357735783579358035813582358335843585358635873588358935903591359235933594359535963597359835993600360136023603360436053606360736083609361036113612361336143615361636173618361936203621362236233624362536263627362836293630363136323633363436353636363736383639364036413642364336443645364636473648364936503651365236533654365536563657365836593660366136623663366436653666366736683669367036713672367336743675367636773678367936803681368236833684368536863687368836893690369136923693369436953696369736983699370037013702370337043705370637073708370937103711371237133714371537163717371837193720372137223723372437253726372737283729373037313732373337343735373637373738373937403741374237433744374537463747374837493750375137523753375437553756375737583759376037613762376337643765376637673768376937703771377237733774377537763777377837793780378137823783378437853786378737883789379037913792379337943795379637973798379938003801380238033804380538063807380838093810381138123813381438153816381738183819382038213822382338243825382638273828382938303831383238333834383538363837383838393840384138423843384438453846384738483849385038513852385338543855385638573858385938603861386238633864386538663867386838693870387138723873387438753876387738783879388038813882388338843885388638873888388938903891389238933894389538963897389838993900390139023903390439053906390739083909391039113912391339143915391639173918391939203921392239233924392539263927392839293930393139323933393439353936393739383939394039413942394339443945394639473948394939503951395239533954395539563957395839593960396139623963396439653966396739683969397039713972397339743975397639773978397939803981398239833984398539863987398839893990399139923993399439953996399739983999400040014002400340044005400640074008400940104011401240134014401540164017401840194020402140224023402440254026402740284029403040314032403340344035403640374038403940404041404240434044404540464047404840494050405140524053405440554056405740584059406040614062406340644065406640674068406940704071407240734074407540764077407840794080408140824083408440854086408740884089409040914092409340944095409640974098409941004101410241034104410541064107410841094110411141124113411441154116411741184119412041214122412341244125412641274128412941304131413241334134413541364137413841394140414141424143414441454146414741484149415041514152415341544155415641574158415941604161416241634164416541664167416841694170417141724173417441754176417741784179418041814182418341844185418641874188418941904191419241934194419541964197419841994200420142024203420442054206420742084209421042114212421342144215421642174218421942204221422242234224422542264227422842294230423142324233423442354236423742384239424042414242424342444245424642474248424942504251425242534254425542564257425842594260426142624263426442654266426742684269427042714272427342744275427642774278427942804281428242834284428542864287428842894290429142924293429442954296429742984299430043014302430343044305430643074308430943104311431243134314431543164317431843194320432143224323432443254326432743284329433043314332433343344335433643374338433943404341434243434344434543464347434843494350435143524353435443554356435743584359436043614362436343644365436643674368436943704371437243734374437543764377437843794380438143824383438443854386438743884389439043914392439343944395439643974398439944004401440244034404440544064407440844094410441144124413441444154416441744184419442044214422442344244425442644274428442944304431443244334434443544364437443844394440444144424443444444454446444744484449445044514452445344544455445644574458445944604461446244634464446544664467446844694470447144724473447444754476447744784479448044814482448344844485448644874488448944904491449244934494449544964497449844994500450145024503450445054506450745084509451045114512451345144515451645174518451945204521452245234524452545264527452845294530453145324533453445354536453745384539454045414542454345444545454645474548454945504551455245534554455545564557455845594560456145624563456445654566456745684569457045714572457345744575457645774578457945804581458245834584458545864587458845894590459145924593459445954596459745984599460046014602460346044605460646074608460946104611461246134614461546164617461846194620462146224623462446254626462746284629463046314632463346344635463646374638463946404641464246434644464546464647464846494650465146524653465446554656465746584659466046614662466346644665466646674668466946704671467246734674467546764677467846794680468146824683468446854686468746884689469046914692469346944695469646974698469947004701470247034704470547064707470847094710471147124713471447154716471747184719472047214722472347244725472647274728472947304731473247334734473547364737473847394740474147424743474447454746474747484749475047514752475347544755475647574758475947604761476247634764476547664767476847694770477147724773477447754776477747784779478047814782478347844785478647874788478947904791479247934794479547964797479847994800480148024803480448054806480748084809481048114812481348144815481648174818481948204821482248234824482548264827482848294830483148324833483448354836483748384839484048414842484348444845484648474848484948504851485248534854485548564857485848594860486148624863486448654866486748684869487048714872487348744875487648774878487948804881488248834884488548864887488848894890489148924893489448954896489748984899490049014902490349044905490649074908490949104911491249134914491549164917491849194920492149224923492449254926492749284929493049314932493349344935493649374938493949404941494249434944494549464947494849494950495149524953495449554956495749584959496049614962496349644965496649674968496949704971497249734974497549764977497849794980498149824983498449854986498749884989499049914992499349944995499649974998499950005001500250035004500550065007500850095010501150125013501450155016501750185019502050215022502350245025502650275028502950305031503250335034503550365037503850395040504150425043504450455046504750485049505050515052505350545055505650575058505950605061506250635064506550665067506850695070507150725073507450755076507750785079508050815082508350845085508650875088508950905091509250935094509550965097509850995100510151025103510451055106510751085109511051115112511351145115511651175118511951205121512251235124512551265127512851295130513151325133513451355136513751385139514051415142514351445145514651475148514951505151515251535154515551565157515851595160516151625163516451655166516751685169517051715172517351745175517651775178517951805181518251835184518551865187518851895190519151925193519451955196519751985199520052015202520352045205520652075208520952105211521252135214521552165217521852195220522152225223522452255226522752285229523052315232523352345235523652375238523952405241524252435244524552465247524852495250525152525253525452555256525752585259526052615262526352645265526652675268526952705271527252735274527552765277527852795280528152825283528452855286528752885289529052915292529352945295529652975298529953005301530253035304530553065307530853095310531153125313531453155316531753185319532053215322532353245325532653275328532953305331533253335334533553365337533853395340534153425343534453455346534753485349535053515352535353545355535653575358535953605361536253635364536553665367536853695370537153725373537453755376537753785379538053815382538353845385538653875388538953905391539253935394539553965397539853995400540154025403540454055406540754085409541054115412541354145415541654175418541954205421542254235424542554265427542854295430543154325433543454355436543754385439544054415442544354445445544654475448544954505451545254535454545554565457545854595460546154625463546454655466546754685469547054715472547354745475547654775478547954805481548254835484548554865487548854895490549154925493549454955496549754985499550055015502550355045505550655075508550955105511551255135514551555165517551855195520552155225523552455255526552755285529553055315532553355345535553655375538553955405541554255435544554555465547554855495550555155525553555455555556555755585559556055615562556355645565556655675568556955705571557255735574557555765577557855795580558155825583558455855586558755885589559055915592559355945595559655975598559956005601560256035604560556065607560856095610561156125613561456155616561756185619562056215622562356245625562656275628562956305631563256335634563556365637563856395640564156425643564456455646564756485649565056515652565356545655565656575658565956605661566256635664566556665667566856695670567156725673567456755676567756785679568056815682568356845685568656875688568956905691569256935694569556965697569856995700570157025703570457055706570757085709571057115712571357145715571657175718571957205721572257235724572557265727572857295730573157325733573457355736573757385739574057415742574357445745574657475748574957505751575257535754575557565757575857595760576157625763576457655766576757685769577057715772577357745775577657775778577957805781578257835784578557865787578857895790579157925793579457955796579757985799580058015802580358045805580658075808580958105811581258135814581558165817581858195820582158225823582458255826582758285829583058315832583358345835583658375838583958405841584258435844584558465847584858495850585158525853585458555856585758585859586058615862586358645865586658675868586958705871587258735874587558765877587858795880588158825883588458855886588758885889589058915892589358945895589658975898589959005901590259035904590559065907590859095910591159125913591459155916591759185919592059215922592359245925592659275928592959305931593259335934593559365937593859395940594159425943594459455946594759485949595059515952595359545955595659575958595959605961596259635964596559665967596859695970597159725973597459755976597759785979598059815982598359845985598659875988598959905991599259935994599559965997599859996000600160026003600460056006600760086009601060116012601360146015601660176018601960206021602260236024602560266027602860296030603160326033603460356036603760386039604060416042604360446045604660476048604960506051605260536054605560566057605860596060606160626063606460656066606760686069607060716072607360746075607660776078607960806081608260836084608560866087608860896090609160926093609460956096609760986099610061016102610361046105610661076108610961106111611261136114611561166117611861196120612161226123612461256126612761286129613061316132613361346135613661376138613961406141614261436144614561466147614861496150615161526153615461556156615761586159616061616162616361646165616661676168616961706171617261736174617561766177617861796180618161826183618461856186618761886189619061916192619361946195619661976198619962006201620262036204620562066207620862096210621162126213621462156216621762186219622062216222622362246225622662276228622962306231623262336234623562366237623862396240624162426243624462456246624762486249625062516252625362546255625662576258625962606261626262636264626562666267626862696270627162726273627462756276627762786279628062816282628362846285628662876288628962906291629262936294629562966297629862996300630163026303630463056306630763086309631063116312631363146315631663176318631963206321632263236324632563266327632863296330633163326333633463356336633763386339634063416342634363446345634663476348634963506351635263536354635563566357635863596360636163626363636463656366636763686369637063716372637363746375637663776378637963806381638263836384638563866387638863896390639163926393639463956396639763986399640064016402640364046405640664076408640964106411641264136414641564166417641864196420642164226423642464256426642764286429643064316432643364346435643664376438643964406441644264436444644564466447644864496450645164526453645464556456645764586459646064616462646364646465646664676468646964706471647264736474647564766477647864796480648164826483648464856486648764886489649064916492649364946495649664976498649965006501650265036504650565066507650865096510651165126513651465156516651765186519652065216522652365246525652665276528652965306531653265336534653565366537653865396540654165426543654465456546654765486549655065516552655365546555655665576558655965606561656265636564656565666567656865696570657165726573657465756576657765786579658065816582658365846585658665876588658965906591659265936594659565966597659865996600660166026603660466056606660766086609661066116612661366146615661666176618661966206621662266236624662566266627662866296630663166326633663466356636663766386639664066416642664366446645664666476648664966506651665266536654665566566657665866596660666166626663666466656666666766686669667066716672667366746675667666776678667966806681668266836684668566866687668866896690669166926693669466956696669766986699670067016702670367046705670667076708670967106711671267136714671567166717671867196720672167226723672467256726672767286729673067316732673367346735673667376738673967406741674267436744674567466747674867496750675167526753675467556756675767586759676067616762676367646765676667676768676967706771677267736774677567766777677867796780678167826783678467856786678767886789679067916792679367946795679667976798679968006801680268036804680568066807680868096810681168126813681468156816681768186819682068216822682368246825682668276828682968306831683268336834683568366837683868396840684168426843684468456846684768486849685068516852685368546855685668576858685968606861686268636864686568666867686868696870687168726873687468756876687768786879688068816882688368846885688668876888688968906891689268936894689568966897689868996900690169026903690469056906690769086909691069116912691369146915691669176918691969206921692269236924692569266927692869296930693169326933693469356936693769386939694069416942694369446945694669476948694969506951695269536954695569566957695869596960696169626963696469656966696769686969697069716972697369746975697669776978697969806981698269836984698569866987698869896990699169926993699469956996699769986999700070017002700370047005700670077008700970107011701270137014701570167017701870197020702170227023702470257026702770287029703070317032703370347035703670377038703970407041704270437044704570467047704870497050705170527053705470557056705770587059706070617062706370647065706670677068706970707071707270737074707570767077707870797080708170827083708470857086708770887089709070917092709370947095709670977098709971007101710271037104710571067107710871097110711171127113711471157116711771187119712071217122712371247125712671277128712971307131713271337134713571367137713871397140714171427143714471457146714771487149715071517152715371547155715671577158715971607161716271637164716571667167716871697170717171727173717471757176717771787179718071817182718371847185718671877188718971907191719271937194719571967197719871997200720172027203720472057206720772087209721072117212721372147215721672177218721972207221722272237224722572267227722872297230723172327233723472357236723772387239724072417242724372447245724672477248724972507251725272537254725572567257725872597260726172627263726472657266726772687269727072717272727372747275727672777278727972807281728272837284728572867287728872897290729172927293729472957296729772987299730073017302730373047305730673077308730973107311731273137314731573167317731873197320732173227323732473257326732773287329733073317332733373347335733673377338733973407341734273437344734573467347734873497350735173527353735473557356735773587359736073617362736373647365736673677368736973707371737273737374737573767377737873797380738173827383738473857386738773887389739073917392739373947395739673977398739974007401740274037404740574067407740874097410741174127413741474157416741774187419742074217422742374247425742674277428742974307431743274337434743574367437743874397440744174427443744474457446744774487449745074517452745374547455745674577458745974607461746274637464746574667467746874697470747174727473747474757476747774787479748074817482748374847485748674877488748974907491749274937494749574967497749874997500750175027503750475057506750775087509751075117512751375147515751675177518751975207521752275237524752575267527752875297530753175327533753475357536753775387539754075417542754375447545754675477548754975507551755275537554755575567557755875597560756175627563756475657566756775687569757075717572757375747575757675777578757975807581758275837584758575867587758875897590759175927593759475957596759775987599760076017602760376047605760676077608760976107611761276137614761576167617761876197620762176227623762476257626762776287629763076317632763376347635763676377638763976407641764276437644764576467647764876497650765176527653765476557656765776587659766076617662766376647665766676677668766976707671767276737674767576767677767876797680768176827683768476857686768776887689769076917692769376947695769676977698769977007701770277037704770577067707770877097710771177127713771477157716771777187719772077217722772377247725772677277728772977307731773277337734773577367737773877397740774177427743774477457746774777487749775077517752775377547755775677577758775977607761776277637764776577667767776877697770777177727773777477757776777777787779778077817782778377847785778677877788778977907791779277937794779577967797779877997800780178027803780478057806780778087809781078117812781378147815781678177818781978207821782278237824782578267827782878297830783178327833783478357836783778387839784078417842784378447845784678477848784978507851785278537854785578567857785878597860786178627863786478657866786778687869787078717872787378747875787678777878787978807881788278837884788578867887788878897890789178927893789478957896789778987899790079017902790379047905790679077908790979107911791279137914791579167917791879197920792179227923792479257926792779287929793079317932793379347935793679377938793979407941794279437944794579467947794879497950795179527953795479557956795779587959796079617962796379647965796679677968796979707971797279737974797579767977797879797980798179827983798479857986798779887989799079917992799379947995799679977998799980008001800280038004800580068007800880098010801180128013801480158016801780188019802080218022802380248025802680278028802980308031803280338034803580368037803880398040804180428043804480458046804780488049805080518052805380548055805680578058805980608061806280638064806580668067806880698070807180728073807480758076807780788079808080818082808380848085808680878088808980908091809280938094809580968097809880998100810181028103810481058106810781088109811081118112811381148115811681178118811981208121812281238124812581268127812881298130813181328133813481358136813781388139814081418142814381448145814681478148814981508151815281538154815581568157815881598160816181628163816481658166816781688169817081718172817381748175817681778178817981808181818281838184818581868187818881898190819181928193819481958196819781988199820082018202820382048205820682078208820982108211821282138214821582168217821882198220822182228223822482258226822782288229823082318232823382348235823682378238823982408241824282438244824582468247824882498250825182528253825482558256825782588259826082618262826382648265826682678268826982708271827282738274827582768277827882798280828182828283828482858286828782888289829082918292829382948295829682978298829983008301830283038304830583068307830883098310831183128313831483158316831783188319832083218322832383248325832683278328832983308331833283338334833583368337833883398340834183428343834483458346834783488349835083518352835383548355835683578358835983608361836283638364836583668367836883698370837183728373837483758376837783788379838083818382838383848385838683878388838983908391839283938394839583968397839883998400840184028403840484058406840784088409841084118412841384148415841684178418841984208421842284238424842584268427842884298430843184328433843484358436843784388439844084418442844384448445844684478448844984508451845284538454845584568457845884598460846184628463846484658466846784688469847084718472847384748475847684778478847984808481848284838484848584868487848884898490849184928493849484958496849784988499850085018502850385048505850685078508850985108511851285138514851585168517851885198520852185228523852485258526852785288529853085318532853385348535853685378538853985408541854285438544854585468547854885498550855185528553855485558556855785588559856085618562856385648565856685678568856985708571857285738574857585768577857885798580858185828583858485858586858785888589859085918592859385948595859685978598859986008601860286038604860586068607860886098610861186128613861486158616861786188619862086218622862386248625862686278628862986308631863286338634863586368637863886398640864186428643864486458646864786488649865086518652865386548655865686578658865986608661866286638664866586668667866886698670867186728673867486758676867786788679868086818682868386848685868686878688868986908691869286938694869586968697869886998700870187028703870487058706870787088709871087118712871387148715871687178718871987208721872287238724872587268727872887298730873187328733873487358736873787388739874087418742874387448745874687478748874987508751875287538754875587568757875887598760876187628763876487658766876787688769877087718772877387748775877687778778877987808781878287838784878587868787878887898790879187928793879487958796879787988799880088018802880388048805880688078808880988108811881288138814881588168817881888198820882188228823882488258826882788288829883088318832883388348835883688378838883988408841884288438844884588468847884888498850885188528853885488558856885788588859886088618862886388648865886688678868886988708871887288738874887588768877887888798880888188828883888488858886888788888889889088918892889388948895889688978898889989008901890289038904890589068907890889098910891189128913891489158916891789188919892089218922892389248925892689278928892989308931893289338934893589368937893889398940894189428943894489458946894789488949895089518952895389548955895689578958895989608961896289638964896589668967896889698970897189728973897489758976897789788979898089818982898389848985898689878988898989908991899289938994899589968997899889999000900190029003900490059006900790089009901090119012901390149015901690179018901990209021902290239024902590269027902890299030903190329033903490359036903790389039904090419042904390449045904690479048904990509051905290539054905590569057905890599060906190629063906490659066906790689069907090719072907390749075907690779078907990809081908290839084908590869087908890899090909190929093909490959096909790989099910091019102910391049105910691079108910991109111911291139114911591169117911891199120912191229123912491259126912791289129913091319132913391349135913691379138913991409141914291439144914591469147914891499150915191529153915491559156915791589159916091619162916391649165916691679168916991709171917291739174917591769177917891799180918191829183918491859186918791889189919091919192919391949195919691979198919992009201920292039204920592069207920892099210921192129213921492159216921792189219922092219222922392249225922692279228922992309231923292339234923592369237923892399240924192429243924492459246924792489249925092519252925392549255925692579258925992609261926292639264926592669267926892699270927192729273927492759276927792789279928092819282928392849285928692879288928992909291929292939294929592969297929892999300930193029303930493059306930793089309931093119312931393149315931693179318931993209321932293239324932593269327932893299330933193329333933493359336933793389339934093419342934393449345934693479348934993509351935293539354935593569357935893599360936193629363936493659366936793689369937093719372937393749375937693779378937993809381938293839384938593869387938893899390939193929393939493959396939793989399940094019402940394049405940694079408940994109411941294139414941594169417941894199420942194229423942494259426942794289429943094319432943394349435943694379438943994409441944294439444944594469447944894499450945194529453945494559456945794589459946094619462946394649465946694679468946994709471947294739474947594769477947894799480948194829483948494859486948794889489949094919492949394949495949694979498949995009501950295039504950595069507950895099510951195129513951495159516951795189519952095219522952395249525952695279528952995309531953295339534953595369537953895399540954195429543954495459546954795489549955095519552955395549555955695579558955995609561956295639564956595669567956895699570957195729573957495759576957795789579958095819582958395849585958695879588958995909591959295939594959595969597959895999600960196029603960496059606960796089609961096119612961396149615961696179618961996209621962296239624962596269627962896299630963196329633963496359636963796389639964096419642964396449645964696479648964996509651965296539654965596569657965896599660966196629663966496659666966796689669967096719672967396749675967696779678967996809681968296839684968596869687968896899690969196929693969496959696969796989699970097019702970397049705970697079708970997109711971297139714971597169717971897199720972197229723972497259726972797289729973097319732973397349735973697379738973997409741974297439744974597469747974897499750975197529753975497559756975797589759976097619762976397649765976697679768976997709771977297739774977597769777977897799780978197829783978497859786978797889789979097919792979397949795979697979798979998009801980298039804980598069807980898099810981198129813981498159816981798189819982098219822982398249825982698279828982998309831983298339834983598369837983898399840984198429843984498459846984798489849985098519852985398549855985698579858985998609861986298639864986598669867986898699870987198729873987498759876987798789879988098819882988398849885988698879888988998909891989298939894989598969897989898999900990199029903990499059906990799089909991099119912991399149915991699179918991999209921992299239924992599269927992899299930993199329933993499359936993799389939994099419942994399449945994699479948994999509951995299539954995599569957995899599960996199629963996499659966996799689969997099719972997399749975997699779978997999809981998299839984998599869987998899899990999199929993999499959996999799989999100001000110002100031000410005100061000710008100091001010011100121001310014100151001610017100181001910020100211002210023100241002510026100271002810029100301003110032100331003410035100361003710038100391004010041100421004310044100451004610047100481004910050100511005210053100541005510056100571005810059100601006110062100631006410065100661006710068100691007010071100721007310074100751007610077100781007910080100811008210083100841008510086100871008810089100901009110092100931009410095100961009710098100991010010101101021010310104101051010610107101081010910110101111011210113101141011510116101171011810119101201012110122101231012410125101261012710128101291013010131101321013310134101351013610137101381013910140101411014210143101441014510146101471014810149101501015110152101531015410155101561015710158101591016010161101621016310164101651016610167101681016910170101711017210173101741017510176101771017810179101801018110182101831018410185101861018710188101891019010191101921019310194101951019610197101981019910200102011020210203102041020510206102071020810209102101021110212102131021410215102161021710218102191022010221102221022310224102251022610227102281022910230102311023210233102341023510236102371023810239102401024110242102431024410245102461024710248102491025010251102521025310254102551025610257102581025910260102611026210263102641026510266102671026810269102701027110272102731027410275102761027710278102791028010281102821028310284102851028610287102881028910290102911029210293102941029510296102971029810299103001030110302103031030410305103061030710308103091031010311103121031310314103151031610317103181031910320103211032210323103241032510326103271032810329103301033110332103331033410335103361033710338103391034010341103421034310344103451034610347103481034910350103511035210353103541035510356103571035810359103601036110362103631036410365103661036710368103691037010371103721037310374103751037610377103781037910380103811038210383103841038510386103871038810389103901039110392103931039410395103961039710398103991040010401104021040310404104051040610407104081040910410104111041210413104141041510416104171041810419104201042110422104231042410425104261042710428104291043010431104321043310434104351043610437104381043910440104411044210443104441044510446104471044810449104501045110452104531045410455104561045710458104591046010461104621046310464104651046610467104681046910470104711047210473104741047510476104771047810479104801048110482104831048410485104861048710488104891049010491104921049310494104951049610497104981049910500105011050210503105041050510506105071050810509105101051110512105131051410515105161051710518105191052010521105221052310524105251052610527105281052910530105311053210533105341053510536105371053810539105401054110542105431054410545105461054710548105491055010551105521055310554105551055610557105581055910560105611056210563105641056510566105671056810569105701057110572105731057410575105761057710578105791058010581105821058310584105851058610587105881058910590105911059210593105941059510596105971059810599106001060110602106031060410605106061060710608106091061010611106121061310614106151061610617106181061910620106211062210623106241062510626106271062810629106301063110632106331063410635106361063710638106391064010641106421064310644106451064610647106481064910650106511065210653106541065510656106571065810659106601066110662106631066410665106661066710668106691067010671106721067310674106751067610677106781067910680106811068210683106841068510686106871068810689106901069110692106931069410695106961069710698106991070010701107021070310704107051070610707107081070910710107111071210713107141071510716107171071810719107201072110722107231072410725107261072710728107291073010731107321073310734107351073610737107381073910740107411074210743107441074510746107471074810749107501075110752107531075410755107561075710758107591076010761107621076310764107651076610767107681076910770107711077210773107741077510776107771077810779107801078110782107831078410785107861078710788107891079010791107921079310794107951079610797107981079910800108011080210803108041080510806108071080810809108101081110812108131081410815108161081710818108191082010821108221082310824108251082610827108281082910830108311083210833108341083510836108371083810839108401084110842108431084410845108461084710848108491085010851108521085310854108551085610857108581085910860108611086210863108641086510866108671086810869108701087110872108731087410875108761087710878108791088010881108821088310884108851088610887108881088910890108911089210893108941089510896108971089810899109001090110902109031090410905109061090710908109091091010911109121091310914109151091610917109181091910920109211092210923109241092510926109271092810929109301093110932109331093410935109361093710938109391094010941109421094310944109451094610947109481094910950109511095210953109541095510956109571095810959109601096110962109631096410965109661096710968109691097010971109721097310974109751097610977109781097910980109811098210983109841098510986109871098810989109901099110992109931099410995109961099710998109991100011001110021100311004110051100611007110081100911010110111101211013110141101511016110171101811019110201102111022110231102411025110261102711028110291103011031110321103311034110351103611037110381103911040110411104211043110441104511046110471104811049110501105111052110531105411055110561105711058110591106011061110621106311064110651106611067110681106911070110711107211073110741107511076110771107811079110801108111082110831108411085110861108711088110891109011091110921109311094110951109611097110981109911100111011110211103111041110511106111071110811109111101111111112111131111411115111161111711118111191112011121111221112311124111251112611127111281112911130111311113211133111341113511136111371113811139111401114111142111431114411145111461114711148111491115011151111521115311154111551115611157111581115911160111611116211163111641116511166111671116811169111701117111172111731117411175111761117711178111791118011181111821118311184111851118611187111881118911190111911119211193111941119511196111971119811199112001120111202112031120411205112061120711208112091121011211112121121311214112151121611217112181121911220112211122211223112241122511226112271122811229112301123111232112331123411235112361123711238112391124011241112421124311244112451124611247112481124911250112511125211253112541125511256112571125811259112601126111262112631126411265112661126711268112691127011271112721127311274112751127611277112781127911280112811128211283112841128511286112871128811289112901129111292112931129411295112961129711298112991130011301113021130311304113051130611307113081130911310113111131211313113141131511316113171131811319113201132111322113231132411325113261132711328113291133011331113321133311334113351133611337113381133911340113411134211343113441134511346113471134811349113501135111352113531135411355113561135711358113591136011361113621136311364113651136611367113681136911370113711137211373113741137511376113771137811379113801138111382113831138411385113861138711388113891139011391113921139311394113951139611397113981139911400114011140211403114041140511406114071140811409114101141111412114131141411415114161141711418114191142011421114221142311424114251142611427114281142911430114311143211433114341143511436114371143811439114401144111442114431144411445114461144711448114491145011451114521145311454114551145611457114581145911460114611146211463114641146511466114671146811469114701147111472114731147411475114761147711478114791148011481114821148311484114851148611487114881148911490114911149211493114941149511496114971149811499115001150111502115031150411505115061150711508115091151011511115121151311514115151151611517115181151911520115211152211523115241152511526115271152811529115301153111532115331153411535115361153711538115391154011541115421154311544115451154611547115481154911550115511155211553115541155511556115571155811559115601156111562115631156411565115661156711568115691157011571115721157311574115751157611577115781157911580115811158211583115841158511586115871158811589115901159111592115931159411595115961159711598115991160011601116021160311604116051160611607116081160911610116111161211613116141161511616116171161811619116201162111622116231162411625116261162711628116291163011631116321163311634116351163611637116381163911640116411164211643116441164511646116471164811649116501165111652116531165411655116561165711658116591166011661116621166311664116651166611667116681166911670116711167211673116741167511676116771167811679116801168111682116831168411685116861168711688116891169011691116921169311694116951169611697116981169911700117011170211703117041170511706117071170811709117101171111712117131171411715117161171711718117191172011721117221172311724117251172611727117281172911730117311173211733117341173511736117371173811739117401174111742117431174411745117461174711748117491175011751117521175311754117551175611757117581175911760117611176211763117641176511766117671176811769117701177111772117731177411775117761177711778117791178011781117821178311784117851178611787117881178911790117911179211793117941179511796117971179811799118001180111802118031180411805118061180711808118091181011811118121181311814118151181611817118181181911820118211182211823118241182511826118271182811829118301183111832118331183411835118361183711838118391184011841118421184311844118451184611847118481184911850118511185211853118541185511856118571185811859118601186111862118631186411865118661186711868118691187011871118721187311874118751187611877118781187911880118811188211883118841188511886118871188811889118901189111892118931189411895118961189711898118991190011901119021190311904119051190611907119081190911910119111191211913119141191511916119171191811919119201192111922119231192411925119261192711928119291193011931119321193311934119351193611937119381193911940119411194211943119441194511946119471194811949119501195111952119531195411955119561195711958119591196011961119621196311964119651196611967119681196911970119711197211973119741197511976119771197811979119801198111982119831198411985119861198711988119891199011991119921199311994119951199611997119981199912000120011200212003120041200512006120071200812009120101201112012120131201412015120161201712018120191202012021120221202312024120251202612027120281202912030120311203212033120341203512036120371203812039120401204112042120431204412045120461204712048120491205012051120521205312054120551205612057120581205912060120611206212063120641206512066120671206812069120701207112072120731207412075120761207712078120791208012081120821208312084120851208612087120881208912090120911209212093120941209512096120971209812099121001210112102121031210412105121061210712108121091211012111121121211312114121151211612117121181211912120121211212212123121241212512126121271212812129121301213112132121331213412135121361213712138121391214012141121421214312144121451214612147121481214912150121511215212153121541215512156121571215812159121601216112162121631216412165121661216712168121691217012171121721217312174121751217612177121781217912180121811218212183121841218512186121871218812189121901219112192121931219412195121961219712198121991220012201122021220312204122051220612207122081220912210122111221212213122141221512216122171221812219122201222112222122231222412225122261222712228122291223012231122321223312234122351223612237122381223912240122411224212243122441224512246122471224812249122501225112252122531225412255122561225712258122591226012261122621226312264122651226612267122681226912270122711227212273122741227512276122771227812279122801228112282122831228412285122861228712288122891229012291122921229312294122951229612297122981229912300123011230212303123041230512306123071230812309123101231112312123131231412315123161231712318123191232012321123221232312324123251232612327123281232912330123311233212333123341233512336123371233812339123401234112342123431234412345123461234712348123491235012351123521235312354123551235612357123581235912360123611236212363123641236512366123671236812369123701237112372123731237412375123761237712378123791238012381123821238312384123851238612387123881238912390123911239212393123941239512396123971239812399124001240112402124031240412405124061240712408124091241012411124121241312414124151241612417124181241912420124211242212423124241242512426124271242812429124301243112432124331243412435124361243712438124391244012441124421244312444124451244612447124481244912450124511245212453124541245512456124571245812459124601246112462124631246412465124661246712468124691247012471124721247312474124751247612477124781247912480124811248212483124841248512486124871248812489124901249112492124931249412495124961249712498124991250012501125021250312504125051250612507125081250912510125111251212513125141251512516125171251812519125201252112522125231252412525125261252712528125291253012531125321253312534125351253612537125381253912540125411254212543125441254512546125471254812549125501255112552125531255412555125561255712558125591256012561125621256312564125651256612567125681256912570125711257212573125741257512576125771257812579125801258112582125831258412585125861258712588125891259012591125921259312594125951259612597125981259912600126011260212603126041260512606126071260812609126101261112612126131261412615126161261712618126191262012621126221262312624126251262612627126281262912630126311263212633126341263512636126371263812639126401264112642126431264412645126461264712648126491265012651126521265312654126551265612657126581265912660126611266212663126641266512666126671266812669126701267112672126731267412675126761267712678126791268012681126821268312684126851268612687126881268912690126911269212693126941269512696126971269812699127001270112702127031270412705127061270712708127091271012711127121271312714127151271612717127181271912720127211272212723127241272512726127271272812729127301273112732127331273412735127361273712738127391274012741127421274312744127451274612747127481274912750127511275212753127541275512756127571275812759127601276112762127631276412765127661276712768127691277012771127721277312774127751277612777127781277912780127811278212783127841278512786127871278812789127901279112792127931279412795127961279712798127991280012801128021280312804128051280612807128081280912810128111281212813128141281512816128171281812819128201282112822128231282412825128261282712828128291283012831128321283312834128351283612837128381283912840128411284212843128441284512846128471284812849128501285112852128531285412855128561285712858128591286012861128621286312864128651286612867128681286912870128711287212873128741287512876128771287812879128801288112882128831288412885128861288712888128891289012891128921289312894128951289612897128981289912900129011290212903129041290512906129071290812909129101291112912129131291412915129161291712918129191292012921129221292312924129251292612927129281292912930129311293212933129341293512936129371293812939129401294112942129431294412945129461294712948129491295012951129521295312954129551295612957129581295912960129611296212963129641296512966129671296812969129701297112972129731297412975129761297712978129791298012981129821298312984129851298612987129881298912990129911299212993129941299512996129971299812999130001300113002130031300413005130061300713008130091301013011130121301313014130151301613017130181301913020130211302213023130241302513026130271302813029130301303113032130331303413035130361303713038130391304013041130421304313044130451304613047130481304913050130511305213053130541305513056130571305813059130601306113062130631306413065130661306713068130691307013071130721307313074130751307613077130781307913080130811308213083130841308513086130871308813089130901309113092130931309413095130961309713098130991310013101131021310313104131051310613107131081310913110131111311213113131141311513116131171311813119131201312113122131231312413125131261312713128131291313013131131321313313134131351313613137131381313913140131411314213143131441314513146131471314813149131501315113152131531315413155131561315713158131591316013161131621316313164131651316613167131681316913170131711317213173131741317513176131771317813179131801318113182131831318413185131861318713188131891319013191131921319313194131951319613197131981319913200132011320213203132041320513206132071320813209132101321113212132131321413215132161321713218132191322013221132221322313224132251322613227132281322913230132311323213233132341323513236132371323813239132401324113242132431324413245132461324713248132491325013251132521325313254132551325613257132581325913260132611326213263132641326513266132671326813269132701327113272132731327413275132761327713278132791328013281132821328313284132851328613287132881328913290132911329213293132941329513296132971329813299133001330113302133031330413305133061330713308133091331013311133121331313314133151331613317133181331913320133211332213323133241332513326133271332813329133301333113332133331333413335133361333713338133391334013341133421334313344133451334613347133481334913350133511335213353133541335513356133571335813359133601336113362133631336413365133661336713368133691337013371133721337313374133751337613377133781337913380133811338213383133841338513386133871338813389133901339113392133931339413395133961339713398133991340013401134021340313404134051340613407134081340913410134111341213413134141341513416134171341813419134201342113422134231342413425134261342713428134291343013431134321343313434134351343613437134381343913440134411344213443134441344513446134471344813449134501345113452134531345413455134561345713458134591346013461134621346313464134651346613467134681346913470134711347213473134741347513476134771347813479134801348113482134831348413485134861348713488134891349013491134921349313494134951349613497134981349913500135011350213503135041350513506135071350813509135101351113512135131351413515135161351713518135191352013521135221352313524135251352613527135281352913530135311353213533135341353513536135371353813539135401354113542135431354413545135461354713548135491355013551135521355313554135551355613557135581355913560135611356213563135641356513566135671356813569135701357113572135731357413575135761357713578135791358013581135821358313584135851358613587135881358913590135911359213593135941359513596135971359813599136001360113602136031360413605136061360713608136091361013611136121361313614136151361613617136181361913620136211362213623136241362513626136271362813629136301363113632136331363413635136361363713638136391364013641136421364313644136451364613647136481364913650136511365213653136541365513656136571365813659136601366113662136631366413665136661366713668136691367013671136721367313674136751367613677136781367913680136811368213683136841368513686136871368813689136901369113692136931369413695136961369713698136991370013701137021370313704137051370613707137081370913710137111371213713137141371513716137171371813719137201372113722137231372413725137261372713728137291373013731137321373313734137351373613737137381373913740137411374213743137441374513746137471374813749137501375113752137531375413755137561375713758137591376013761137621376313764137651376613767137681376913770137711377213773137741377513776137771377813779137801378113782137831378413785137861378713788137891379013791137921379313794137951379613797137981379913800138011380213803138041380513806138071380813809138101381113812138131381413815138161381713818138191382013821138221382313824138251382613827138281382913830138311383213833138341383513836138371383813839138401384113842138431384413845138461384713848138491385013851138521385313854138551385613857138581385913860138611386213863138641386513866138671386813869138701387113872138731387413875138761387713878138791388013881138821388313884138851388613887138881388913890138911389213893138941389513896138971389813899139001390113902139031390413905139061390713908139091391013911139121391313914139151391613917139181391913920139211392213923139241392513926139271392813929139301393113932139331393413935139361393713938139391394013941139421394313944139451394613947139481394913950139511395213953139541395513956139571395813959139601396113962139631396413965139661396713968139691397013971139721397313974139751397613977139781397913980139811398213983139841398513986139871398813989139901399113992139931399413995139961399713998139991400014001140021400314004140051400614007140081400914010140111401214013140141401514016140171401814019140201402114022140231402414025140261402714028140291403014031140321403314034140351403614037140381403914040140411404214043140441404514046140471404814049140501405114052140531405414055140561405714058140591406014061140621406314064140651406614067140681406914070140711407214073140741407514076140771407814079140801408114082140831408414085140861408714088140891409014091140921409314094140951409614097140981409914100141011410214103141041410514106141071410814109141101411114112141131411414115141161411714118141191412014121141221412314124141251412614127141281412914130141311413214133141341413514136141371413814139141401414114142141431414414145141461414714148141491415014151141521415314154141551415614157141581415914160141611416214163141641416514166141671416814169141701417114172141731417414175141761417714178141791418014181141821418314184141851418614187141881418914190141911419214193141941419514196141971419814199142001420114202142031420414205142061420714208142091421014211142121421314214142151421614217142181421914220142211422214223142241422514226142271422814229142301423114232142331423414235142361423714238142391424014241142421424314244142451424614247142481424914250142511425214253142541425514256142571425814259142601426114262142631426414265142661426714268142691427014271142721427314274142751427614277142781427914280142811428214283142841428514286142871428814289142901429114292142931429414295142961429714298142991430014301143021430314304143051430614307143081430914310143111431214313143141431514316143171431814319143201432114322143231432414325143261432714328143291433014331143321433314334143351433614337143381433914340143411434214343143441434514346143471434814349143501435114352143531435414355143561435714358143591436014361143621436314364143651436614367143681436914370143711437214373143741437514376143771437814379143801438114382143831438414385143861438714388143891439014391143921439314394143951439614397143981439914400144011440214403144041440514406144071440814409144101441114412144131441414415144161441714418144191442014421144221442314424144251442614427144281442914430144311443214433144341443514436144371443814439144401444114442144431444414445144461444714448144491445014451144521445314454144551445614457144581445914460144611446214463144641446514466144671446814469144701447114472144731447414475144761447714478144791448014481144821448314484144851448614487144881448914490144911449214493144941449514496144971449814499145001450114502145031450414505145061450714508145091451014511145121451314514145151451614517145181451914520145211452214523145241452514526145271452814529145301453114532145331453414535145361453714538145391454014541145421454314544145451454614547145481454914550145511455214553145541455514556145571455814559145601456114562145631456414565145661456714568145691457014571145721457314574145751457614577145781457914580145811458214583145841458514586145871458814589145901459114592145931459414595145961459714598145991460014601146021460314604146051460614607146081460914610146111461214613146141461514616146171461814619146201462114622146231462414625146261462714628146291463014631146321463314634146351463614637146381463914640146411464214643146441464514646146471464814649146501465114652146531465414655146561465714658146591466014661146621466314664146651466614667146681466914670146711467214673146741467514676146771467814679146801468114682146831468414685146861468714688146891469014691146921469314694146951469614697146981469914700147011470214703147041470514706147071470814709147101471114712147131471414715147161471714718147191472014721147221472314724147251472614727147281472914730147311473214733147341473514736147371473814739147401474114742147431474414745147461474714748147491475014751147521475314754147551475614757147581475914760147611476214763147641476514766147671476814769147701477114772147731477414775147761477714778147791478014781147821478314784147851478614787147881478914790147911479214793147941479514796147971479814799148001480114802148031480414805148061480714808148091481014811148121481314814148151481614817148181481914820148211482214823148241482514826148271482814829148301483114832148331483414835148361483714838148391484014841148421484314844148451484614847148481484914850148511485214853148541485514856148571485814859148601486114862148631486414865148661486714868148691487014871148721487314874148751487614877148781487914880148811488214883148841488514886148871488814889148901489114892148931489414895148961489714898148991490014901149021490314904149051490614907149081490914910149111491214913149141491514916149171491814919149201492114922149231492414925149261492714928149291493014931149321493314934149351493614937149381493914940149411494214943149441494514946149471494814949149501495114952149531495414955149561495714958149591496014961149621496314964149651496614967149681496914970149711497214973149741497514976149771497814979149801498114982149831498414985149861498714988149891499014991149921499314994149951499614997149981499915000150011500215003150041500515006150071500815009150101501115012150131501415015150161501715018150191502015021150221502315024150251502615027150281502915030150311503215033150341503515036150371503815039150401504115042150431504415045150461504715048150491505015051150521505315054150551505615057150581505915060150611506215063150641506515066150671506815069150701507115072150731507415075150761507715078150791508015081150821508315084150851508615087150881508915090150911509215093150941509515096150971509815099151001510115102151031510415105151061510715108151091511015111151121511315114151151511615117151181511915120151211512215123151241512515126151271512815129151301513115132151331513415135151361513715138151391514015141151421514315144151451514615147151481514915150151511515215153151541515515156151571515815159151601516115162151631516415165151661516715168151691517015171151721517315174151751517615177151781517915180151811518215183151841518515186151871518815189151901519115192151931519415195151961519715198151991520015201152021520315204152051520615207152081520915210152111521215213152141521515216152171521815219152201522115222152231522415225152261522715228152291523015231152321523315234152351523615237152381523915240152411524215243152441524515246152471524815249152501525115252152531525415255152561525715258152591526015261152621526315264152651526615267152681526915270152711527215273152741527515276152771527815279152801528115282152831528415285152861528715288152891529015291152921529315294152951529615297152981529915300153011530215303153041530515306153071530815309153101531115312153131531415315153161531715318153191532015321153221532315324153251532615327153281532915330153311533215333153341533515336153371533815339153401534115342153431534415345153461534715348153491535015351153521535315354153551535615357153581535915360153611536215363153641536515366153671536815369153701537115372153731537415375153761537715378153791538015381153821538315384153851538615387153881538915390153911539215393153941539515396153971539815399154001540115402154031540415405154061540715408154091541015411154121541315414154151541615417154181541915420154211542215423154241542515426154271542815429154301543115432154331543415435154361543715438154391544015441154421544315444154451544615447154481544915450154511545215453154541545515456154571545815459154601546115462154631546415465154661546715468154691547015471154721547315474154751547615477154781547915480154811548215483154841548515486154871548815489154901549115492154931549415495154961549715498154991550015501155021550315504155051550615507155081550915510155111551215513155141551515516155171551815519155201552115522155231552415525155261552715528155291553015531155321553315534155351553615537155381553915540155411554215543155441554515546155471554815549155501555115552155531555415555155561555715558155591556015561155621556315564155651556615567155681556915570155711557215573155741557515576155771557815579155801558115582155831558415585155861558715588155891559015591155921559315594155951559615597155981559915600156011560215603156041560515606156071560815609156101561115612156131561415615156161561715618156191562015621156221562315624156251562615627156281562915630156311563215633156341563515636156371563815639156401564115642156431564415645156461564715648156491565015651156521565315654156551565615657156581565915660156611566215663156641566515666156671566815669156701567115672156731567415675156761567715678156791568015681156821568315684156851568615687156881568915690156911569215693156941569515696156971569815699157001570115702157031570415705157061570715708157091571015711157121571315714157151571615717157181571915720157211572215723157241572515726157271572815729157301573115732157331573415735157361573715738157391574015741157421574315744157451574615747157481574915750157511575215753157541575515756157571575815759157601576115762157631576415765157661576715768157691577015771157721577315774157751577615777157781577915780157811578215783157841578515786157871578815789157901579115792157931579415795157961579715798157991580015801158021580315804158051580615807158081580915810158111581215813158141581515816158171581815819158201582115822158231582415825158261582715828158291583015831158321583315834158351583615837158381583915840158411584215843158441584515846158471584815849158501585115852158531585415855158561585715858158591586015861158621586315864158651586615867158681586915870158711587215873158741587515876158771587815879158801588115882158831588415885158861588715888158891589015891158921589315894158951589615897158981589915900159011590215903159041590515906159071590815909159101591115912159131591415915159161591715918159191592015921159221592315924159251592615927159281592915930159311593215933159341593515936159371593815939159401594115942159431594415945159461594715948159491595015951159521595315954159551595615957159581595915960159611596215963159641596515966159671596815969159701597115972159731597415975159761597715978159791598015981159821598315984159851598615987159881598915990159911599215993159941599515996159971599815999160001600116002160031600416005160061600716008160091601016011160121601316014160151601616017160181601916020160211602216023160241602516026160271602816029160301603116032160331603416035160361603716038160391604016041160421604316044160451604616047160481604916050160511605216053160541605516056160571605816059160601606116062160631606416065160661606716068160691607016071160721607316074160751607616077160781607916080160811608216083160841608516086160871608816089160901609116092160931609416095160961609716098160991610016101161021610316104161051610616107161081610916110161111611216113161141611516116161171611816119161201612116122161231612416125161261612716128161291613016131161321613316134161351613616137161381613916140161411614216143161441614516146161471614816149161501615116152161531615416155161561615716158161591616016161161621616316164161651616616167161681616916170161711617216173161741617516176161771617816179161801618116182161831618416185161861618716188161891619016191161921619316194161951619616197161981619916200162011620216203162041620516206162071620816209162101621116212162131621416215162161621716218162191622016221162221622316224162251622616227162281622916230162311623216233162341623516236162371623816239162401624116242162431624416245162461624716248162491625016251162521625316254162551625616257162581625916260162611626216263162641626516266162671626816269162701627116272162731627416275162761627716278162791628016281162821628316284162851628616287162881628916290162911629216293162941629516296162971629816299163001630116302163031630416305163061630716308163091631016311163121631316314163151631616317163181631916320163211632216323163241632516326163271632816329163301633116332163331633416335163361633716338163391634016341163421634316344163451634616347163481634916350163511635216353163541635516356163571635816359163601636116362163631636416365163661636716368163691637016371163721637316374163751637616377163781637916380163811638216383163841638516386163871638816389163901639116392163931639416395163961639716398163991640016401164021640316404164051640616407164081640916410164111641216413164141641516416164171641816419164201642116422164231642416425164261642716428164291643016431164321643316434164351643616437164381643916440164411644216443164441644516446164471644816449164501645116452164531645416455164561645716458164591646016461164621646316464164651646616467164681646916470164711647216473164741647516476164771647816479164801648116482164831648416485164861648716488164891649016491164921649316494164951649616497164981649916500165011650216503165041650516506165071650816509165101651116512165131651416515165161651716518165191652016521165221652316524165251652616527165281652916530165311653216533165341653516536165371653816539165401654116542165431654416545165461654716548165491655016551165521655316554165551655616557165581655916560165611656216563165641656516566165671656816569165701657116572165731657416575165761657716578165791658016581165821658316584165851658616587165881658916590165911659216593165941659516596165971659816599166001660116602166031660416605166061660716608166091661016611166121661316614166151661616617166181661916620166211662216623166241662516626166271662816629166301663116632166331663416635166361663716638166391664016641166421664316644166451664616647166481664916650166511665216653166541665516656166571665816659166601666116662166631666416665166661666716668166691667016671166721667316674166751667616677166781667916680166811668216683166841668516686166871668816689166901669116692166931669416695166961669716698166991670016701167021670316704167051670616707167081670916710167111671216713167141671516716167171671816719167201672116722167231672416725167261672716728167291673016731167321673316734167351673616737167381673916740167411674216743167441674516746167471674816749167501675116752167531675416755167561675716758167591676016761167621676316764167651676616767167681676916770167711677216773167741677516776167771677816779167801678116782167831678416785167861678716788167891679016791167921679316794167951679616797167981679916800168011680216803168041680516806168071680816809168101681116812168131681416815168161681716818168191682016821168221682316824168251682616827168281682916830168311683216833168341683516836168371683816839168401684116842168431684416845168461684716848168491685016851168521685316854168551685616857168581685916860168611686216863168641686516866168671686816869168701687116872168731687416875168761687716878168791688016881168821688316884168851688616887168881688916890168911689216893168941689516896168971689816899169001690116902169031690416905169061690716908169091691016911169121691316914169151691616917169181691916920169211692216923169241692516926169271692816929169301693116932169331693416935169361693716938169391694016941169421694316944169451694616947169481694916950169511695216953169541695516956169571695816959169601696116962169631696416965169661696716968169691697016971169721697316974169751697616977169781697916980169811698216983169841698516986169871698816989169901699116992169931699416995169961699716998169991700017001170021700317004170051700617007170081700917010170111701217013170141701517016170171701817019170201702117022170231702417025170261702717028170291703017031170321703317034170351703617037170381703917040170411704217043170441704517046170471704817049170501705117052170531705417055170561705717058170591706017061170621706317064170651706617067170681706917070170711707217073170741707517076170771707817079170801708117082170831708417085170861708717088170891709017091170921709317094170951709617097170981709917100171011710217103171041710517106171071710817109171101711117112171131711417115171161711717118171191712017121171221712317124171251712617127171281712917130171311713217133171341713517136171371713817139171401714117142171431714417145171461714717148171491715017151171521715317154171551715617157171581715917160171611716217163171641716517166171671716817169171701717117172171731717417175171761717717178171791718017181171821718317184171851718617187171881718917190171911719217193171941719517196171971719817199172001720117202172031720417205172061720717208172091721017211172121721317214172151721617217172181721917220172211722217223172241722517226172271722817229172301723117232172331723417235172361723717238172391724017241172421724317244172451724617247172481724917250172511725217253172541725517256172571725817259172601726117262172631726417265172661726717268172691727017271172721727317274172751727617277172781727917280172811728217283172841728517286172871728817289172901729117292172931729417295172961729717298172991730017301173021730317304173051730617307173081730917310173111731217313173141731517316173171731817319173201732117322173231732417325173261732717328173291733017331173321733317334173351733617337173381733917340173411734217343173441734517346173471734817349173501735117352173531735417355173561735717358173591736017361173621736317364173651736617367173681736917370173711737217373173741737517376173771737817379173801738117382173831738417385173861738717388173891739017391173921739317394173951739617397173981739917400174011740217403174041740517406174071740817409174101741117412174131741417415174161741717418174191742017421174221742317424174251742617427174281742917430174311743217433174341743517436174371743817439174401744117442174431744417445174461744717448174491745017451174521745317454174551745617457174581745917460174611746217463174641746517466174671746817469174701747117472174731747417475174761747717478174791748017481174821748317484174851748617487174881748917490174911749217493174941749517496174971749817499175001750117502175031750417505175061750717508175091751017511175121751317514175151751617517
  1. using ExIni;
  2. using System;
  3. using System.Collections;
  4. using System.Collections.Generic;
  5. using System.Diagnostics;
  6. using System.IO;
  7. using System.Linq;
  8. using System.Text.RegularExpressions;
  9. using UnityEngine;
  10. using Object = UnityEngine.Object;
  11. using Random = System.Random;
  12. namespace CM3D2.MultipleMaids.Plugin
  13. {
  14. public partial class MultipleMaids
  15. {
  16. private void MaidUpdate()
  17. {
  18. if (isHaiti)
  19. {
  20. for (int i = 0; i < maxMaidCnt; i++)
  21. {
  22. if (gHandL[i])
  23. {
  24. HandL1[i] = null;
  25. Destroy(gHandL[i]);
  26. Destroy(gArmL[i]);
  27. Destroy(gFootL[i]);
  28. Destroy(gHizaL[i]);
  29. Destroy(gHandR[i]);
  30. Destroy(gArmR[i]);
  31. Destroy(gFootR[i]);
  32. Destroy(gHizaR[i]);
  33. Destroy(gClavicleL[i]);
  34. Destroy(gClavicleR[i]);
  35. Destroy(gNeck[i]);
  36. Destroy(gSpine[i]);
  37. Destroy(gSpine0a[i]);
  38. Destroy(gSpine1a[i]);
  39. Destroy(gSpine1[i]);
  40. Destroy(gPelvis[i]);
  41. }
  42. }
  43. for (int j = 0; j < maidCnt; j++)
  44. {
  45. Vector3 zero = Vector3.zero;
  46. Vector3 zero2 = Vector3.zero;
  47. if (selectList.Count <= 7)
  48. {
  49. if (selectList.Count % 2 == 1)
  50. {
  51. switch (j)
  52. {
  53. case 0:
  54. maidArray[j].SetPos(new Vector3(0f, 0f, 0f));
  55. break;
  56. case 1:
  57. maidArray[j].SetPos(new Vector3(-0.6f, 0f, 0.26f));
  58. break;
  59. case 2:
  60. maidArray[j].SetPos(new Vector3(0.6f, 0f, 0.26f));
  61. break;
  62. case 3:
  63. maidArray[j].SetPos(new Vector3(-1.1f, 0f, 0.69f));
  64. break;
  65. case 4:
  66. maidArray[j].SetPos(new Vector3(1.1f, 0f, 0.69f));
  67. break;
  68. case 5:
  69. maidArray[j].SetPos(new Vector3(-1.47f, 0f, 1.1f));
  70. break;
  71. case 6:
  72. maidArray[j].SetPos(new Vector3(1.47f, 0f, 1.1f));
  73. break;
  74. }
  75. }
  76. else
  77. {
  78. switch (j)
  79. {
  80. case 0:
  81. maidArray[j].SetPos(new Vector3(0.3f, 0f, 0f));
  82. break;
  83. case 1:
  84. maidArray[j].SetPos(new Vector3(-0.3f, 0f, 0f));
  85. break;
  86. case 2:
  87. maidArray[j].SetPos(new Vector3(0.7f, 0f, 0.4f));
  88. break;
  89. case 3:
  90. maidArray[j].SetPos(new Vector3(-0.7f, 0f, 0.4f));
  91. break;
  92. case 4:
  93. maidArray[j].SetPos(new Vector3(1f, 0f, 0.9f));
  94. break;
  95. case 5:
  96. maidArray[j].SetPos(new Vector3(-1f, 0f, 0.9f));
  97. break;
  98. }
  99. }
  100. }
  101. else
  102. {
  103. float num = 0f;
  104. if (selectList.Count >= 11)
  105. {
  106. num = -0.4f;
  107. if (selectList.Count % 2 == 1)
  108. {
  109. switch (j)
  110. {
  111. case 0:
  112. maidArray[j].SetPos(new Vector3(0f, 0f, 0f + num));
  113. break;
  114. case 1:
  115. maidArray[j].SetPos(new Vector3(-0.5f, 0f, 0.2f + num));
  116. break;
  117. case 2:
  118. maidArray[j].SetPos(new Vector3(0.5f, 0f, 0.2f + num));
  119. break;
  120. case 3:
  121. maidArray[j].SetPos(new Vector3(-0.9f, 0f, 0.55f + num));
  122. break;
  123. case 4:
  124. maidArray[j].SetPos(new Vector3(0.9f, 0f, 0.55f + num));
  125. break;
  126. case 5:
  127. maidArray[j].SetPos(new Vector3(-1.25f, 0f, 0.9f + num));
  128. break;
  129. case 6:
  130. maidArray[j].SetPos(new Vector3(1.25f, 0f, 0.9f + num));
  131. break;
  132. case 7:
  133. maidArray[j].SetPos(new Vector3(-1.57f, 0f, 1.3f + num));
  134. break;
  135. case 8:
  136. maidArray[j].SetPos(new Vector3(1.57f, 0f, 1.3f + num));
  137. break;
  138. case 9:
  139. maidArray[j].SetPos(new Vector3(-1.77f, 0f, 1.72f + num));
  140. break;
  141. case 10:
  142. maidArray[j].SetPos(new Vector3(1.77f, 0f, 1.72f + num));
  143. break;
  144. case 11:
  145. maidArray[j].SetPos(new Vector3(-1.85f, 0f, 2.17f + num));
  146. break;
  147. case 12:
  148. maidArray[j].SetPos(new Vector3(1.85f, 0f, 2.17f + num));
  149. break;
  150. default:
  151. maidArray[j].SetPos(new Vector3(0f, 0f, 0.7f + num));
  152. break;
  153. }
  154. }
  155. else
  156. {
  157. switch (j)
  158. {
  159. case 0:
  160. maidArray[j].SetPos(new Vector3(0.25f, 0f, 0f + num));
  161. break;
  162. case 1:
  163. maidArray[j].SetPos(new Vector3(-0.25f, 0f, 0f + num));
  164. break;
  165. case 2:
  166. maidArray[j].SetPos(new Vector3(0.7f, 0f, 0.25f + num));
  167. break;
  168. case 3:
  169. maidArray[j].SetPos(new Vector3(-0.7f, 0f, 0.25f + num));
  170. break;
  171. case 4:
  172. maidArray[j].SetPos(new Vector3(1.05f, 0f, 0.6f + num));
  173. break;
  174. case 5:
  175. maidArray[j].SetPos(new Vector3(-1.05f, 0f, 0.6f + num));
  176. break;
  177. case 6:
  178. maidArray[j].SetPos(new Vector3(1.35f, 0f, 0.9f + num));
  179. break;
  180. case 7:
  181. maidArray[j].SetPos(new Vector3(-1.35f, 0f, 0.9f + num));
  182. break;
  183. case 8:
  184. maidArray[j].SetPos(new Vector3(1.6f, 0f, 1.3f + num));
  185. break;
  186. case 9:
  187. maidArray[j].SetPos(new Vector3(-1.6f, 0f, 1.3f + num));
  188. break;
  189. case 10:
  190. maidArray[j].SetPos(new Vector3(1.8f, 0f, 1.72f + num));
  191. break;
  192. case 11:
  193. maidArray[j].SetPos(new Vector3(-1.8f, 0f, 1.72f + num));
  194. break;
  195. case 12:
  196. maidArray[j].SetPos(new Vector3(1.9f, 0f, 2.17f + num));
  197. break;
  198. case 13:
  199. maidArray[j].SetPos(new Vector3(-1.9f, 0f, 2.17f + num));
  200. break;
  201. default:
  202. maidArray[j].SetPos(new Vector3(0f, 0f, 0.7f + num));
  203. break;
  204. }
  205. }
  206. }
  207. else if (selectList.Count >= 8)
  208. {
  209. if (selectList.Count >= 9)
  210. {
  211. num = -0.2f;
  212. }
  213. if (selectList.Count % 2 == 1)
  214. {
  215. switch (j)
  216. {
  217. case 0:
  218. maidArray[j].SetPos(new Vector3(0f, 0f, 0f + num));
  219. break;
  220. case 1:
  221. maidArray[j].SetPos(new Vector3(-0.55f, 0f, 0.2f + num));
  222. break;
  223. case 2:
  224. maidArray[j].SetPos(new Vector3(0.55f, 0f, 0.2f + num));
  225. break;
  226. case 3:
  227. maidArray[j].SetPos(new Vector3(-1f, 0f, 0.6f + num));
  228. break;
  229. case 4:
  230. maidArray[j].SetPos(new Vector3(1f, 0f, 0.6f + num));
  231. break;
  232. case 5:
  233. maidArray[j].SetPos(new Vector3(-1.35f, 0f, 1f + num));
  234. break;
  235. case 6:
  236. maidArray[j].SetPos(new Vector3(1.35f, 0f, 1f + num));
  237. break;
  238. case 7:
  239. maidArray[j].SetPos(new Vector3(-1.6f, 0f, 1.4f + num));
  240. break;
  241. case 8:
  242. maidArray[j].SetPos(new Vector3(1.6f, 0f, 1.4f + num));
  243. break;
  244. }
  245. }
  246. else
  247. {
  248. switch (j)
  249. {
  250. case 0:
  251. maidArray[j].SetPos(new Vector3(0.28f, 0f, 0f + num));
  252. break;
  253. case 1:
  254. maidArray[j].SetPos(new Vector3(-0.28f, 0f, 0f + num));
  255. break;
  256. case 2:
  257. maidArray[j].SetPos(new Vector3(0.78f, 0f, 0.3f + num));
  258. break;
  259. case 3:
  260. maidArray[j].SetPos(new Vector3(-0.78f, 0f, 0.3f + num));
  261. break;
  262. case 4:
  263. maidArray[j].SetPos(new Vector3(1.22f, 0f, 0.7f + num));
  264. break;
  265. case 5:
  266. maidArray[j].SetPos(new Vector3(-1.22f, 0f, 0.7f + num));
  267. break;
  268. case 6:
  269. maidArray[j].SetPos(new Vector3(1.55f, 0f, 1.1f + num));
  270. break;
  271. case 7:
  272. maidArray[j].SetPos(new Vector3(-1.55f, 0f, 1.1f + num));
  273. break;
  274. case 8:
  275. maidArray[j].SetPos(new Vector3(1.77f, 0f, 1.58f + num));
  276. break;
  277. case 9:
  278. maidArray[j].SetPos(new Vector3(-1.77f, 0f, 1.58f + num));
  279. break;
  280. }
  281. }
  282. }
  283. }
  284. zero2.y = (float)(Math.Atan2(maidArray[j].transform.position.x,
  285. maidArray[j].transform.position.z - 1.5f) * 180.0 / 3.1415926535897931) + 180f;
  286. maidArray[j].SetRot(zero2);
  287. }
  288. isHaiti = false;
  289. }
  290. if (isYobidashi)
  291. {
  292. bool flag = false;
  293. for (int j = 0; j < maxMaidCnt; j++)
  294. {
  295. if (selectList.Count > j && maidArray[j] != null && maidArray[j].IsBusy)
  296. {
  297. flag = true;
  298. }
  299. }
  300. if (!flag)
  301. {
  302. for (int k = 0; k < selectList.Count; k++)
  303. {
  304. if ((k == maxMaidCnt - 1 || (k < maxMaidCnt - 1 && maidArray[k + 1] == null)) && maidArray[k] == null)
  305. {
  306. if ((k != 0 || !(maidArray[k + 1] == null) || !(maidArray[k] == null))
  307. && (k <= 0 || !(maidArray[k - 1] != null) || maidArray[k - 1].IsBusy))
  308. {
  309. return;
  310. }
  311. if ((int)selectList[k] >= 12)
  312. {
  313. maidArray[k] = GameMain.Instance.CharacterMgr.GetStockMaid((int)selectList[k]);
  314. if (!maidArray[k].body0.isLoadedBody)
  315. {
  316. maidArray[k].DutPropAll();
  317. maidArray[k].AllProcPropSeqStart();
  318. }
  319. maidArray[k].Visible = true;
  320. }
  321. else if (sceneLevel != 5)
  322. {
  323. maidArray[k] =
  324. GameMain.Instance.CharacterMgr.Activate((int)selectList[k], (int)selectList[k], false, false);
  325. maidArray[k] = GameMain.Instance.CharacterMgr.CharaVisible((int)selectList[k], true, false);
  326. }
  327. else if (k == 0 && (int)selectList[k] == 0)
  328. {
  329. maidArray[k] =
  330. GameMain.Instance.CharacterMgr.Activate((int)selectList[k], (int)selectList[k], false, false);
  331. maidArray[k] = GameMain.Instance.CharacterMgr.CharaVisible((int)selectList[k], true, false);
  332. }
  333. else if (k == 0)
  334. {
  335. maidArray[k] = GameMain.Instance.CharacterMgr.Activate(0, (int)selectList[k], false, false);
  336. maidArray[k] = GameMain.Instance.CharacterMgr.CharaVisible(0, true, false);
  337. }
  338. else if ((int)selectList[k] + 1 == 12)
  339. {
  340. maidArray[k] = GameMain.Instance.CharacterMgr.GetStockMaid((int)selectList[k]);
  341. if (!maidArray[k].body0.isLoadedBody)
  342. {
  343. maidArray[k].DutPropAll();
  344. maidArray[k].AllProcPropSeqStart();
  345. }
  346. maidArray[k].Visible = true;
  347. }
  348. else
  349. {
  350. maidArray[k] =
  351. GameMain.Instance.CharacterMgr.Activate((int)selectList[k] + 1, (int)selectList[k], false, false);
  352. maidArray[k] = GameMain.Instance.CharacterMgr.CharaVisible((int)selectList[k] + 1, true, false);
  353. }
  354. if (maidArray[k] && maidArray[k].Visible)
  355. {
  356. maidArray[k].body0.boHeadToCam = true;
  357. maidArray[k].body0.boEyeToCam = true;
  358. }
  359. }
  360. }
  361. isHaiti = true;
  362. isYobidashi = false;
  363. }
  364. }
  365. if (sceneLevel == 5 && !isFadeOut && Input.GetKeyDown(KeyCode.F7) && getModKeyPressing(modKey.Shift))
  366. {
  367. if (!isF7S)
  368. {
  369. isF7S = true;
  370. isF7SInit = true;
  371. bGui = false;
  372. Preferences["config"]["shift_f7"].Value = "true";
  373. SaveConfig();
  374. GameMain.Instance.SoundMgr.PlaySe("se002.ogg", false);
  375. bgmCombo.selectedItemIndex = 2;
  376. }
  377. else
  378. {
  379. isF7S = false;
  380. Preferences["config"]["shift_f7"].Value = "false";
  381. SaveConfig();
  382. if (!isF7)
  383. {
  384. init2();
  385. okFlg = false;
  386. bGui = false;
  387. }
  388. GameMain.Instance.SoundMgr.PlaySe("se003.ogg", false);
  389. }
  390. }
  391. else if (sceneLevel == 5 && !isFadeOut && Input.GetKeyDown(KeyCode.F7))
  392. {
  393. if (isF7S && !isF7)
  394. {
  395. okFlg = true;
  396. faceFlg = false;
  397. poseFlg = false;
  398. sceneFlg = false;
  399. kankyoFlg = false;
  400. kankyo2Flg = false;
  401. bGui = true;
  402. isGuiInit = true;
  403. isF7 = true;
  404. bgmCombo.selectedItemIndex = 2;
  405. }
  406. else if (isF7S && isF7)
  407. {
  408. bGui = false;
  409. isF7 = false;
  410. }
  411. else if (!isF7)
  412. {
  413. init();
  414. okFlg = true;
  415. isGuiInit = true;
  416. comboBoxControl.selectedItemIndex = 0;
  417. comboBoxList = new GUIContent[11];
  418. comboBoxList[0] = new GUIContent("通常");
  419. comboBoxList[1] = new GUIContent("横一列");
  420. comboBoxList[2] = new GUIContent("縦一列");
  421. comboBoxList[3] = new GUIContent("斜め");
  422. comboBoxList[4] = new GUIContent("円(外向き)");
  423. comboBoxList[5] = new GUIContent("円(内向き)");
  424. comboBoxList[6] = new GUIContent("扇");
  425. comboBoxList[7] = new GUIContent("V");
  426. comboBoxList[8] = new GUIContent("^");
  427. comboBoxList[9] = new GUIContent("M");
  428. comboBoxList[10] = new GUIContent("W");
  429. listStyle.normal.textColor = Color.white;
  430. listStyle.normal.background = MakeTex(2, 2, new Color(0f, 0f, 0f, 0.5f));
  431. listStyle.onHover.background = listStyle.hover.background = new Texture2D(2, 2);
  432. listStyle.padding.left = listStyle.padding.right = listStyle.padding.top = listStyle.padding.bottom = 4;
  433. listStyle.fontSize = GetPix(13);
  434. isYobidashi = true;
  435. bGui = true;
  436. isFadeOut = true;
  437. if (!isF7S)
  438. {
  439. maidArray[0] = GameMain.Instance.CharacterMgr.GetMaid(0);
  440. }
  441. List<Maid> stockMaidList = GameMain.Instance.CharacterMgr.GetStockMaidList();
  442. for (int i = 0; i < stockMaidList.Count; i++)
  443. {
  444. if (maidArray[0] == stockMaidList[i])
  445. {
  446. editMaid = i;
  447. }
  448. }
  449. selectList = new ArrayList
  450. {
  451. editMaid
  452. };
  453. bgmCombo.selectedItemIndex = 2;
  454. try
  455. {
  456. shodaiFlg[(int)selectList[0]] = false;
  457. TMorph morph = maidArray[0].body0.Face.morph;
  458. float[] fieldValue = GetFieldValue<TMorph, float[]>(morph, "BlendValues");
  459. float num2 = fieldValue[(int)morph.hash["tangopen"]];
  460. }
  461. catch
  462. {
  463. shodaiFlg[(int)selectList[0]] = true;
  464. }
  465. if (!isVR)
  466. {
  467. eyeL[(int)selectList[0]] = maidArray[0].body0.quaDefEyeL.eulerAngles;
  468. eyeR[(int)selectList[0]] = maidArray[0].body0.quaDefEyeR.eulerAngles;
  469. }
  470. isF7 = true;
  471. }
  472. else
  473. {
  474. if (!isF7S)
  475. {
  476. init();
  477. maidArray[0] = GameMain.Instance.CharacterMgr.Activate(0, editMaid, false, false);
  478. maidArray[0] = GameMain.Instance.CharacterMgr.CharaVisible(0, true, false);
  479. okFlg = false;
  480. }
  481. else
  482. {
  483. isF7SInit = true;
  484. }
  485. bGui = false;
  486. isF7 = false;
  487. }
  488. }
  489. if (sceneLevel == 5 && isF7S && isF7SInit)
  490. {
  491. isF7SInit = false;
  492. init2();
  493. okFlg = true;
  494. ikMaid = 0;
  495. ikBui = 5;
  496. ikMode[0] = 0;
  497. bgmCombo.selectedItemIndex = 2;
  498. maidArray[0] = GameMain.Instance.CharacterMgr.GetMaid(0);
  499. List<Maid> stockMaidList = GameMain.Instance.CharacterMgr.GetStockMaidList();
  500. for (int i = 0; i < stockMaidList.Count; i++)
  501. {
  502. if (maidArray[0] == stockMaidList[i])
  503. {
  504. editMaid = i;
  505. }
  506. }
  507. selectList = new ArrayList
  508. {
  509. editMaid
  510. };
  511. listStyle.normal.textColor = Color.white;
  512. listStyle.normal.background = MakeTex(2, 2, new Color(0f, 0f, 0f, 0.5f));
  513. listStyle.onHover.background = listStyle.hover.background = new Texture2D(2, 2);
  514. listStyle.padding.left = listStyle.padding.right = listStyle.padding.top = listStyle.padding.bottom = 4;
  515. listStyle.fontSize = GetPix(13);
  516. try
  517. {
  518. shodaiFlg[(int)selectList[0]] = false;
  519. TMorph morph = maidArray[0].body0.Face.morph;
  520. float[] fieldValue = GetFieldValue<TMorph, float[]>(morph, "BlendValues");
  521. float num2 = fieldValue[(int)morph.hash["tangopen"]];
  522. }
  523. catch
  524. {
  525. shodaiFlg[(int)selectList[0]] = true;
  526. }
  527. if (!isVR)
  528. {
  529. eyeL[(int)selectList[0]] = maidArray[0].body0.quaDefEyeL.eulerAngles;
  530. eyeR[(int)selectList[0]] = maidArray[0].body0.quaDefEyeR.eulerAngles;
  531. }
  532. bGui = false;
  533. }
  534. if (sceneLevel == 3 && !isFadeOut && Input.GetKeyDown(KeyCode.F7))
  535. {
  536. GameObject gameObject = GameObject.Find("UI Root");
  537. GameObject gameObject2 = gameObject.transform.Find("DailyPanel").gameObject;
  538. if (!okFlg && !gameObject2.activeSelf)
  539. {
  540. return;
  541. }
  542. bool flag2 = GameMain.Instance.CharacterMgr.status.GetFlag("時間帯") == 3;
  543. CharacterMgr characterMgr = GameMain.Instance.CharacterMgr;
  544. for (int k = 0; k < characterMgr.GetStockMaidCount(); k++)
  545. {
  546. characterMgr.GetStockMaidList()[k].Visible = false;
  547. }
  548. if (isPanel)
  549. {
  550. init();
  551. okFlg = true;
  552. isF7 = true;
  553. isPanel = false;
  554. isGuiInit = true;
  555. comboBoxControl.selectedItemIndex = 0;
  556. comboBoxList = new GUIContent[11];
  557. comboBoxList[0] = new GUIContent("通常");
  558. comboBoxList[1] = new GUIContent("横一列");
  559. comboBoxList[2] = new GUIContent("縦一列");
  560. comboBoxList[3] = new GUIContent("斜め");
  561. comboBoxList[4] = new GUIContent("円(外向き)");
  562. comboBoxList[5] = new GUIContent("円(内向き)");
  563. comboBoxList[6] = new GUIContent("扇");
  564. comboBoxList[7] = new GUIContent("V");
  565. comboBoxList[8] = new GUIContent("^");
  566. comboBoxList[9] = new GUIContent("M");
  567. comboBoxList[10] = new GUIContent("W");
  568. listStyle.normal.textColor = Color.white;
  569. listStyle.normal.background = MakeTex(2, 2, new Color(0f, 0f, 0f, 0.5f));
  570. listStyle.onHover.background = listStyle.hover.background = new Texture2D(2, 2);
  571. listStyle.padding.left = listStyle.padding.right = listStyle.padding.top = listStyle.padding.bottom = 4;
  572. listStyle.fontSize = GetPix(13);
  573. GameMain.Instance.BgMgr.ChangeBg("Theater");
  574. bgIndex = bgCombo.selectedItemIndex = Array.FindIndex(bgArray, bg => bg == "Theater");
  575. if (!isVR)
  576. {
  577. GameMain.Instance.MainCamera.Reset(CameraMain.CameraType.Target, true);
  578. CameraMain cameraMain = GameMain.Instance.MainCamera;
  579. cameraMain.SetTargetPos(new Vector3(0f, 0.9f, 0f), true);
  580. cameraMain.SetDistance(3f, true);
  581. }
  582. isYobidashi = true;
  583. bGui = false;
  584. isFadeOut = true;
  585. GameMain.Instance.MainCamera.FadeOut(0f, false, null, true, default(Color));
  586. selectList = new ArrayList
  587. {
  588. 0
  589. };
  590. GameMain.Instance.SoundMgr.PlayBGM("BGM008.ogg", 0f, true);
  591. bgmCombo.selectedItemIndex = 0;
  592. }
  593. else
  594. {
  595. init();
  596. isPanel = true;
  597. isF7 = false;
  598. bGui = false;
  599. GameMain.Instance.SoundMgr.PlayBGM("BGM009.ogg", 1f, true);
  600. if (flag2)
  601. {
  602. GameMain.Instance.BgMgr.ChangeBg("ShinShitsumu_ChairRot_Night");
  603. }
  604. else
  605. {
  606. GameMain.Instance.BgMgr.ChangeBg("ShinShitsumu_ChairRot");
  607. }
  608. if (!isVR)
  609. {
  610. GameMain.Instance.MainCamera.Reset(CameraMain.CameraType.Target, true);
  611. GameMain.Instance.MainCamera.SetTargetPos(new Vector3(0.5609447f, 1.380762f, -1.382336f), true);
  612. GameMain.Instance.MainCamera.SetDistance(1.6f, true);
  613. GameMain.Instance.MainCamera.SetAroundAngle(new Vector2(245.5691f, 6.273283f), true);
  614. }
  615. }
  616. gameObject2.SetActive(isPanel);
  617. }
  618. if (!okFlg)
  619. {
  620. if (maidArray[0] && maidArray[0].Visible)
  621. {
  622. int num3 = (int)maidArray[0].transform.position.y;
  623. if (num3 == 100)
  624. {
  625. okFlg = true;
  626. Vector3 vector = Vector3.zero;
  627. maidArray[0].SetPos(vector);
  628. isScript = true;
  629. }
  630. }
  631. else if (maidArray[0] && !maidArray[0].Visible)
  632. {
  633. maidArray[0] = GameMain.Instance.CharacterMgr.GetMaid(0);
  634. }
  635. else if (!maidArray[0])
  636. {
  637. maidArray[0] = GameMain.Instance.CharacterMgr.GetMaid(0);
  638. }
  639. }
  640. if (okFlg)
  641. {
  642. hFlg = false;
  643. mFlg = false;
  644. fFlg = false;
  645. sFlg = false;
  646. atFlg = false;
  647. yFlg = false;
  648. escFlg = false;
  649. maidCnt = 0;
  650. if (!cameraObj && !isVR)
  651. {
  652. cameraObj = new GameObject("subCamera");
  653. subcamera = cameraObj.AddComponent<Camera>();
  654. subcamera.CopyFrom(Camera.main);
  655. cameraObj.SetActive(true);
  656. subcamera.clearFlags = CameraClearFlags.Depth;
  657. subcamera.cullingMask = 256;
  658. subcamera.depth = 1f;
  659. subcamera.transform.parent = mainCamera.transform;
  660. if (lightList.Count == 0)
  661. {
  662. float num2 = 2f;
  663. if (Application.unityVersion.StartsWith("4"))
  664. {
  665. num2 = 1f;
  666. }
  667. GameObject gameObject3 = new GameObject("Light");
  668. gameObject3.AddComponent<Light>();
  669. lightList.Add(gameObject3);
  670. lightColorR.Add(1f);
  671. lightColorG.Add(1f);
  672. lightColorB.Add(1f);
  673. lightIndex.Add(0);
  674. lightX.Add(40f);
  675. lightY.Add(180f);
  676. lightAkarusa.Add(num2);
  677. lightKage.Add(0.098f);
  678. lightRange.Add(50f);
  679. gameObject3.transform.position = GameMain.Instance.MainLight.transform.position;
  680. gameObject3.GetComponent<Light>().intensity = num2;
  681. gameObject3.GetComponent<Light>().spotAngle = 50f;
  682. gameObject3.GetComponent<Light>().range = 10f;
  683. gameObject3.GetComponent<Light>().type = LightType.Directional;
  684. gameObject3.GetComponent<Light>().color = new Color(0.5f, 1f, 0f);
  685. gameObject3.GetComponent<Light>().cullingMask = 256;
  686. // lightComboList = new GUIContent[lightList.Count];
  687. // lightComboList[0] = new GUIContent("メイン");
  688. // lightCombo.selectedItemIndex = 0;
  689. // selectLightIndex = 0;
  690. }
  691. }
  692. if (getModKeyPressing(modKey.Shift) && !getModKeyPressing(modKey.Ctrl) && !getModKeyPressing(modKey.Alt)
  693. && !Input.GetKey(KeyCode.Space) && !Input.GetKey(KeyCode.Z) && !Input.GetKey(KeyCode.X) && !Input.GetKey(KeyCode.W)
  694. && !Input.GetKey(KeyCode.Q) && !Input.GetKey(KeyCode.R) && !Input.GetKey(KeyCode.E) && !Input.GetKey(KeyCode.Y)
  695. && !Input.GetKey(KeyCode.V) && !Input.GetKey(KeyCode.C) && !Input.GetKey(KeyCode.D) && !Input.GetKey(KeyCode.S))
  696. {
  697. float axis = Input.GetAxis("Mouse ScrollWheel");
  698. if (axis > 0f)
  699. {
  700. mainCamera.SetDistance(mainCamera.GetDistance() - 0.5f, true);
  701. if (mainCamera.GetDistance() < 0.1f)
  702. {
  703. mainCamera.SetDistance(0.1f, true);
  704. }
  705. }
  706. else if (axis < 0f)
  707. {
  708. mainCamera.SetDistance(mainCamera.GetDistance() + 0.5f, true);
  709. if (mainCamera.GetDistance() > 25f)
  710. {
  711. mainCamera.SetDistance(25f, true);
  712. }
  713. }
  714. }
  715. for (int j = 0; j < maxMaidCnt; j++)
  716. {
  717. if (maidArray[j] && maidArray[j].Visible)
  718. {
  719. maidCnt++;
  720. }
  721. }
  722. if (maidArray[0] != null && maidArray[0].Visible)
  723. {
  724. if (getModKeyPressing(modKey.Shift))
  725. {
  726. speed = 5f * Time.deltaTime * 60f;
  727. }
  728. else
  729. {
  730. speed = 1f * Time.deltaTime * 60f;
  731. }
  732. Vector3 vector2 = mainCameraTransform.TransformDirection(Vector3.forward);
  733. Vector3 vector3 = mainCameraTransform.TransformDirection(Vector3.right);
  734. Vector3 vector4 = mainCameraTransform.TransformDirection(Vector3.up);
  735. if (!isVR || isVR2)
  736. {
  737. if (!isVR)
  738. {
  739. if (isBloom)
  740. {
  741. Bloom fieldValue2 = GetFieldValue<CameraMain, Bloom>(mainCamera, "m_gcBloom");
  742. fieldValue2.enabled = true;
  743. fieldValue2.bloomIntensity = bloom1;
  744. fieldValue2.bloomBlurIterations = (int)bloom2;
  745. fieldValue2.bloomThreshholdColor = new Color(1f - bloom3, 1f - bloom4, 1f - bloom5);
  746. if (isBloomA)
  747. {
  748. fieldValue2.hdr = Bloom.HDRBloomMode.On;
  749. }
  750. else
  751. {
  752. fieldValue2.hdr = Bloom.HDRBloomMode.Auto;
  753. }
  754. isBloom2 = true;
  755. }
  756. else if (isBloom2)
  757. {
  758. isBloom2 = false;
  759. Bloom fieldValue2 = GetFieldValue<CameraMain, Bloom>(mainCamera, "m_gcBloom");
  760. fieldValue2.enabled = true;
  761. fieldValue2.bloomIntensity = 2.85f;
  762. fieldValue2.hdr = Bloom.HDRBloomMode.Auto;
  763. fieldValue2.bloomThreshholdColor = new Color(1f, 1f, 1f);
  764. fieldValue2.bloomBlurIterations = 3;
  765. }
  766. if (isDepth)
  767. {
  768. depth_field_.enabled = true;
  769. depth_field_.focalLength = depth1;
  770. depth_field_.focalSize = depth2;
  771. depth_field_.aperture = depth3;
  772. depth_field_.maxBlurSize = depth4;
  773. if (isDepthA)
  774. {
  775. depth_field_.visualizeFocus = true;
  776. }
  777. else
  778. {
  779. depth_field_.visualizeFocus = false;
  780. }
  781. }
  782. else
  783. {
  784. if (depth_field_ == null)
  785. {
  786. depth_field_ = GameMain.Instance.MainCamera.gameObject.AddComponent<DepthOfFieldScatter>();
  787. if (depth_field_.dofHdrShader == null)
  788. {
  789. depth_field_.dofHdrShader = Shader.Find("Hidden/Dof/DepthOfFieldHdr");
  790. }
  791. if (depth_field_.dx11BokehShader == null)
  792. {
  793. depth_field_.dx11BokehShader = Shader.Find("Hidden/Dof/DX11Dof");
  794. }
  795. if (depth_field_.dx11BokehTexture == null)
  796. {
  797. depth_field_.dx11BokehTexture = Resources.Load("Textures/hexShape") as Texture2D;
  798. }
  799. }
  800. depth_field_.enabled = false;
  801. }
  802. if (isFog)
  803. {
  804. if (fog_.fogShader == null)
  805. {
  806. fog_.fogShader = Shader.Find("Hidden/GlobalFog");
  807. }
  808. fog_.enabled = true;
  809. fog_.startDistance = fog1;
  810. fog_.globalDensity = fog2;
  811. fog_.heightScale = fog3;
  812. fog_.height = fog4;
  813. fog_.globalFogColor.r = fog5;
  814. fog_.globalFogColor.g = fog6;
  815. fog_.globalFogColor.b = fog7;
  816. }
  817. else
  818. {
  819. if (fog_ == null)
  820. {
  821. fog_ = GameMain.Instance.MainCamera.gameObject.AddComponent<GlobalFog>();
  822. }
  823. fog_.enabled = false;
  824. }
  825. if (isSepia != isSepian)
  826. {
  827. isSepia = isSepian;
  828. if (isSepia)
  829. {
  830. if (sepia_tone_.shader == null)
  831. {
  832. sepia_tone_.shader = Shader.Find("Hidden/Sepiatone Effect");
  833. }
  834. sepia_tone_.enabled = true;
  835. }
  836. else
  837. {
  838. if (sepia_tone_ == null)
  839. {
  840. sepia_tone_ = GameMain.Instance.MainCamera.gameObject.AddComponent<SepiaToneEffect>();
  841. }
  842. sepia_tone_.enabled = false;
  843. }
  844. }
  845. if (bokashi > 0f)
  846. {
  847. Blur component = GameMain.Instance.MainCamera.gameObject.GetComponent<Blur>();
  848. component.enabled = true;
  849. component.blurSize = bokashi / 10f;
  850. component.blurIterations = 0;
  851. component.downsample = 0;
  852. if (bokashi > 3f)
  853. {
  854. component.blurSize -= 0.3f;
  855. component.blurIterations = 1;
  856. component.downsample = 1;
  857. }
  858. }
  859. else
  860. {
  861. Blur component = GameMain.Instance.MainCamera.gameObject.GetComponent<Blur>();
  862. component.enabled = false;
  863. }
  864. if (kamiyure > 0f)
  865. {
  866. for (int j = 0; j < maidCnt; j++)
  867. {
  868. Maid maid = maidArray[j];
  869. for (int l = 0; l < maid.body0.goSlot.Count; l++)
  870. {
  871. if (maid.body0.goSlot[l].obj != null)
  872. {
  873. DynamicBone component2 = maid.body0.goSlot[l].obj.GetComponent<DynamicBone>();
  874. if (component2 != null && component2.enabled)
  875. {
  876. component2.m_Gravity = new Vector3(softG.x * 5f, softG.y * 5f + kamiyure, softG.z * 5f);
  877. }
  878. }
  879. List<THair1> fieldValue3 =
  880. GetFieldValue<TBoneHair_, List<THair1>>(maid.body0.goSlot[l].bonehair, "hair1list");
  881. for (int k = 0; k < fieldValue3.Count; k++)
  882. {
  883. fieldValue3[k].SoftG = new Vector3(softG.x, softG.y + kamiyure, softG.z);
  884. }
  885. }
  886. }
  887. }
  888. if (isBlur)
  889. {
  890. Vignetting component3 = GameMain.Instance.MainCamera.gameObject.GetComponent<Vignetting>();
  891. component3.mode = Vignetting.AberrationMode.Simple;
  892. component3.intensity = blur1;
  893. component3.chromaticAberration = blur4;
  894. component3.blur = blur2;
  895. component3.blurSpread = blur3;
  896. component3.enabled = true;
  897. isBlur2 = true;
  898. }
  899. else if (isBlur2)
  900. {
  901. isBlur2 = false;
  902. Vignetting component3 = GameMain.Instance.MainCamera.gameObject.GetComponent<Vignetting>();
  903. component3.mode = Vignetting.AberrationMode.Simple;
  904. component3.intensity = -3.98f;
  905. component3.chromaticAberration = -0.75f;
  906. component3.axialAberration = 1.18f;
  907. component3.blurSpread = 4.19f;
  908. component3.luminanceDependency = 0.494f;
  909. component3.blurDistance = 1.71f;
  910. component3.enabled = false;
  911. }
  912. }
  913. if (Input.GetKey(KeyCode.R) && Input.GetKey(KeyCode.I))
  914. {
  915. GameMain.Instance.MainLight.transform.eulerAngles -= Vector3.right / 2f;
  916. lightX[0] = GameMain.Instance.MainLight.transform.eulerAngles.x;
  917. }
  918. else if (Input.GetKey(KeyCode.R) && Input.GetKey(KeyCode.K))
  919. {
  920. if (GameMain.Instance.MainLight.transform.eulerAngles.x < 85f)
  921. {
  922. GameMain.Instance.MainLight.transform.eulerAngles += Vector3.right / 2f;
  923. lightX[0] = GameMain.Instance.MainLight.transform.eulerAngles.x;
  924. }
  925. }
  926. else if (Input.GetKey(KeyCode.R) && Input.GetKey(KeyCode.J))
  927. {
  928. GameMain.Instance.MainLight.transform.eulerAngles -= Vector3.up / 1.5f;
  929. lightY[0] = GameMain.Instance.MainLight.transform.eulerAngles.y;
  930. }
  931. else if (Input.GetKey(KeyCode.R) && Input.GetKey(KeyCode.L))
  932. {
  933. GameMain.Instance.MainLight.transform.eulerAngles += Vector3.up / 1.5f;
  934. lightY[0] = GameMain.Instance.MainLight.transform.eulerAngles.y;
  935. }
  936. else if (Input.GetKey(KeyCode.R) && Input.GetKey(KeyCode.BackQuote))
  937. {
  938. GameMain.Instance.MainLight.Reset();
  939. GameMain.Instance.MainLight.SetIntensity(0.95f);
  940. GameMain.Instance.MainLight.GetComponent<Light>().type = LightType.Directional;
  941. lightIndex[0] = 0;
  942. lightColorR[0] = 1f;
  943. lightColorG[0] = 1f;
  944. lightColorB[0] = 1f;
  945. lightX[0] = 40f;
  946. lightY[0] = 180f;
  947. lightAkarusa[0] = 0.95f;
  948. lightKage[0] = 0.098f;
  949. lightRange[0] = 50f;
  950. bgObject.SetActive(true);
  951. mainCamera.GetComponent<Camera>().backgroundColor = new Color(0f, 0f, 0f);
  952. isIdx1 = false;
  953. isIdx2 = false;
  954. isIdx3 = false;
  955. isIdx4 = false;
  956. }
  957. else if (Input.GetKey(KeyCode.R) && Input.GetKey(KeyCode.Minus) && getModKeyPressing(modKey.Shift))
  958. {
  959. List<float> list;
  960. (list = lightColorR)[0] = list[0] + 0.01f;
  961. if (lightColorR[0] > 1f)
  962. {
  963. lightColorR[0] = 1f;
  964. }
  965. if (lightIndex[0] != 3)
  966. {
  967. GameMain.Instance.MainLight.GetComponent<Light>().color =
  968. new Color(lightColorR[0], lightColorG[0], lightColorB[0]);
  969. }
  970. else
  971. {
  972. mainCamera.GetComponent<Camera>().backgroundColor =
  973. new Color(lightColorR[0], lightColorG[0], lightColorB[0]);
  974. }
  975. }
  976. else if (Input.GetKey(KeyCode.R) && Input.GetKey(KeyCode.Quote) && getModKeyPressing(modKey.Shift))
  977. {
  978. List<float> list;
  979. (list = lightColorG)[0] = list[0] + 0.01f;
  980. if (lightColorG[0] > 1f)
  981. {
  982. lightColorG[0] = 1f;
  983. }
  984. if (lightIndex[0] != 3)
  985. {
  986. GameMain.Instance.MainLight.GetComponent<Light>().color =
  987. new Color(lightColorR[0], lightColorG[0], lightColorB[0]);
  988. }
  989. else
  990. {
  991. mainCamera.GetComponent<Camera>().backgroundColor =
  992. new Color(lightColorR[0], lightColorG[0], lightColorB[0]);
  993. }
  994. }
  995. else if (Input.GetKey(KeyCode.R) && Input.GetKey(KeyCode.LeftBracket) && getModKeyPressing(modKey.Shift))
  996. {
  997. List<float> list;
  998. (list = lightColorB)[0] = list[0] + 0.01f;
  999. if (lightColorB[0] > 1f)
  1000. {
  1001. lightColorB[0] = 1f;
  1002. }
  1003. if (lightIndex[0] != 3)
  1004. {
  1005. GameMain.Instance.MainLight.GetComponent<Light>().color =
  1006. new Color(lightColorR[0], lightColorG[0], lightColorB[0]);
  1007. }
  1008. else
  1009. {
  1010. mainCamera.GetComponent<Camera>().backgroundColor =
  1011. new Color(lightColorR[0], lightColorG[0], lightColorB[0]);
  1012. }
  1013. }
  1014. else if (Input.GetKey(KeyCode.R) && Input.GetKey(KeyCode.Minus))
  1015. {
  1016. List<float> list;
  1017. (list = lightColorR)[0] = list[0] - 0.01f;
  1018. if (lightColorR[0] < 0f)
  1019. {
  1020. lightColorR[0] = 0f;
  1021. }
  1022. if (lightIndex[0] != 3)
  1023. {
  1024. GameMain.Instance.MainLight.GetComponent<Light>().color =
  1025. new Color(lightColorR[0], lightColorG[0], lightColorB[0]);
  1026. }
  1027. else
  1028. {
  1029. mainCamera.GetComponent<Camera>().backgroundColor =
  1030. new Color(lightColorR[0], lightColorG[0], lightColorB[0]);
  1031. }
  1032. }
  1033. else if (Input.GetKey(KeyCode.R) && Input.GetKey(KeyCode.Quote))
  1034. {
  1035. List<float> list;
  1036. (list = lightColorG)[0] = list[0] - 0.01f;
  1037. if (lightColorG[0] < 0f)
  1038. {
  1039. lightColorG[0] = 0f;
  1040. }
  1041. if (lightIndex[0] != 3)
  1042. {
  1043. GameMain.Instance.MainLight.GetComponent<Light>().color =
  1044. new Color(lightColorR[0], lightColorG[0], lightColorB[0]);
  1045. }
  1046. else
  1047. {
  1048. mainCamera.GetComponent<Camera>().backgroundColor =
  1049. new Color(lightColorR[0], lightColorG[0], lightColorB[0]);
  1050. }
  1051. }
  1052. else if (Input.GetKey(KeyCode.R) && Input.GetKey(KeyCode.LeftBracket))
  1053. {
  1054. List<float> list;
  1055. (list = lightColorB)[0] = list[0] - 0.01f;
  1056. if (lightColorB[0] < 0f)
  1057. {
  1058. lightColorB[0] = 0f;
  1059. }
  1060. if (lightIndex[0] != 3)
  1061. {
  1062. GameMain.Instance.MainLight.GetComponent<Light>().color =
  1063. new Color(lightColorR[0], lightColorG[0], lightColorB[0]);
  1064. }
  1065. else
  1066. {
  1067. mainCamera.GetComponent<Camera>().backgroundColor =
  1068. new Color(lightColorR[0], lightColorG[0], lightColorB[0]);
  1069. }
  1070. }
  1071. else if (Input.GetKey(KeyCode.R) && Input.GetKey(KeyCode.Alpha0))
  1072. {
  1073. GameMain.Instance.MainLight.GetComponent<Light>().intensity += 0.12f * Time.deltaTime;
  1074. lightAkarusa[0] = GameMain.Instance.MainLight.GetComponent<Light>().intensity;
  1075. }
  1076. else if (Input.GetKey(KeyCode.R) && Input.GetKey(KeyCode.P))
  1077. {
  1078. GameMain.Instance.MainLight.GetComponent<Light>().intensity -= 0.12f * Time.deltaTime;
  1079. lightAkarusa[0] = GameMain.Instance.MainLight.GetComponent<Light>().intensity;
  1080. }
  1081. else if (Input.GetKey(KeyCode.R) && Input.GetKey(KeyCode.Alpha9))
  1082. {
  1083. GameMain.Instance.MainLight.GetComponent<Light>().spotAngle += 0.2f;
  1084. GameMain.Instance.MainLight.GetComponent<Light>().range += 0.2f;
  1085. lightRange[0] = GameMain.Instance.MainLight.GetComponent<Light>().spotAngle;
  1086. }
  1087. else if (Input.GetKey(KeyCode.R) && Input.GetKey(KeyCode.O))
  1088. {
  1089. GameMain.Instance.MainLight.GetComponent<Light>().spotAngle -= 0.2f;
  1090. GameMain.Instance.MainLight.GetComponent<Light>().range -= 0.2f;
  1091. lightRange[0] = GameMain.Instance.MainLight.GetComponent<Light>().spotAngle;
  1092. }
  1093. else if (Input.GetKey(KeyCode.R) && Input.GetKeyDown(KeyCode.U))
  1094. {
  1095. List<int> list2;
  1096. (list2 = lightIndex)[0] = list2[0] + 1;
  1097. if (lightIndex[0] == 4)
  1098. {
  1099. lightIndex[0] = 0;
  1100. }
  1101. lightColorR[0] = 1f;
  1102. lightColorG[0] = 1f;
  1103. lightColorB[0] = 1f;
  1104. lightX[0] = 40f;
  1105. lightY[0] = 180f;
  1106. lightAkarusa[0] = 0.95f;
  1107. lightKage[0] = 0.098f;
  1108. lightRange[0] = 50f;
  1109. GameMain.Instance.MainLight.Reset();
  1110. GameMain.Instance.MainLight.SetIntensity(0.95f);
  1111. GameMain.Instance.MainLight.GetComponent<Light>().spotAngle = 50f;
  1112. GameMain.Instance.MainLight.GetComponent<Light>().range = 10f;
  1113. GameMain.Instance.MainLight.gameObject.transform.position = new Vector3(0f, 2f, 0f);
  1114. if (lightIndex[0] == 0)
  1115. {
  1116. GameMain.Instance.MainLight.GetComponent<Light>().type = LightType.Directional;
  1117. bgObject.SetActive(true);
  1118. mainCamera.GetComponent<Camera>().backgroundColor = new Color(0f, 0f, 0f);
  1119. }
  1120. else if (lightIndex[0] == 1)
  1121. {
  1122. GameMain.Instance.MainLight.transform.eulerAngles += Vector3.right * 40f;
  1123. lightX[0] = GameMain.Instance.MainLight.transform.eulerAngles.x;
  1124. GameMain.Instance.MainLight.GetComponent<Light>().type = LightType.Spot;
  1125. }
  1126. else if (lightIndex[0] == 2)
  1127. {
  1128. GameMain.Instance.MainLight.GetComponent<Light>().type = LightType.Point;
  1129. }
  1130. else if (lightIndex[0] == 3)
  1131. {
  1132. GameMain.Instance.MainLight.GetComponent<Light>().type = LightType.Directional;
  1133. mainCamera.GetComponent<Camera>().backgroundColor =
  1134. new Color(lightColorR[0], lightColorG[0], lightColorB[0]);
  1135. bgObject.SetActive(false);
  1136. }
  1137. isIdx1 = false;
  1138. isIdx2 = false;
  1139. isIdx3 = false;
  1140. isIdx4 = false;
  1141. }
  1142. }
  1143. else if (Input.GetKey(KeyCode.R) && Input.GetKey(KeyCode.Insert))
  1144. {
  1145. GameMain.Instance.MainLight.transform.eulerAngles -= Vector3.right / 2f;
  1146. }
  1147. else if (Input.GetKey(KeyCode.R) && Input.GetKey(KeyCode.Delete))
  1148. {
  1149. if (GameMain.Instance.MainLight.transform.eulerAngles.x < 85f)
  1150. {
  1151. GameMain.Instance.MainLight.transform.eulerAngles += Vector3.right / 2f;
  1152. }
  1153. }
  1154. else if (Input.GetKey(KeyCode.R) && Input.GetKey(KeyCode.Home))
  1155. {
  1156. GameMain.Instance.MainLight.transform.eulerAngles -= Vector3.up / 1.5f;
  1157. }
  1158. else if (Input.GetKey(KeyCode.R) && Input.GetKey(KeyCode.End))
  1159. {
  1160. GameMain.Instance.MainLight.transform.eulerAngles += Vector3.up / 1.5f;
  1161. }
  1162. else if (Input.GetKey(KeyCode.R) && Input.GetKey(KeyCode.BackQuote))
  1163. {
  1164. GameMain.Instance.MainLight.Reset();
  1165. GameMain.Instance.MainLight.SetIntensity(0.95f);
  1166. }
  1167. else if (Input.GetKey(KeyCode.R) && Input.GetKey(KeyCode.PageUp))
  1168. {
  1169. GameMain.Instance.MainLight.GetComponent<Light>().intensity += 0.1f * Time.deltaTime;
  1170. }
  1171. else if (Input.GetKey(KeyCode.R) && Input.GetKey(KeyCode.PageDown))
  1172. {
  1173. GameMain.Instance.MainLight.GetComponent<Light>().intensity -= 0.1f * Time.deltaTime;
  1174. }
  1175. else if (Input.GetKey(KeyCode.R) && Input.GetKey(KeyCode.Quote))
  1176. {
  1177. if (lightIndex[0] == 1)
  1178. {
  1179. GameMain.Instance.MainLight.GetComponent<Light>().spotAngle += 0.2f;
  1180. }
  1181. else
  1182. {
  1183. GameMain.Instance.MainLight.GetComponent<Light>().range += 0.2f;
  1184. }
  1185. }
  1186. else if (Input.GetKey(KeyCode.R) && Input.GetKey(KeyCode.LeftBracket))
  1187. {
  1188. if (lightIndex[0] == 1)
  1189. {
  1190. GameMain.Instance.MainLight.GetComponent<Light>().spotAngle -= 0.2f;
  1191. }
  1192. else
  1193. {
  1194. GameMain.Instance.MainLight.GetComponent<Light>().range -= 0.2f;
  1195. }
  1196. }
  1197. else if (Input.GetKey(KeyCode.R) && Input.GetKeyDown(KeyCode.Minus))
  1198. {
  1199. List<int> list2;
  1200. (list2 = lightIndex)[0] = list2[0] + 1;
  1201. if (lightIndex[0] == 3)
  1202. {
  1203. lightIndex[0] = 0;
  1204. }
  1205. GameMain.Instance.MainLight.Reset();
  1206. GameMain.Instance.MainLight.SetIntensity(0.95f);
  1207. GameMain.Instance.MainLight.GetComponent<Light>().spotAngle = 50f;
  1208. GameMain.Instance.MainLight.GetComponent<Light>().range = 10f;
  1209. GameMain.Instance.MainLight.gameObject.transform.position = new Vector3(0f, 2f, 0f);
  1210. if (lightIndex[0] == 0)
  1211. {
  1212. GameMain.Instance.MainLight.GetComponent<Light>().type = LightType.Directional;
  1213. }
  1214. else if (lightIndex[0] == 1)
  1215. {
  1216. GameMain.Instance.MainLight.transform.eulerAngles += Vector3.right * 40f;
  1217. GameMain.Instance.MainLight.GetComponent<Light>().type = LightType.Spot;
  1218. }
  1219. else if (lightIndex[0] == 2)
  1220. {
  1221. GameMain.Instance.MainLight.GetComponent<Light>().type = LightType.Point;
  1222. }
  1223. }
  1224. int i;
  1225. for (i = 0; i < lightList.Count; i++)
  1226. {
  1227. if (i > 0)
  1228. {
  1229. lightList[i].GetComponent<Light>().color = new Color(lightColorR[i], lightColorG[i], lightColorB[i]);
  1230. lightList[i].GetComponent<Light>().intensity = lightAkarusa[i];
  1231. lightList[i].GetComponent<Light>().spotAngle = lightRange[i];
  1232. lightList[i].GetComponent<Light>().range = lightRange[i] / 5f;
  1233. if (!Input.GetKey(KeyCode.X) && (!Input.GetKey(KeyCode.Z) || !getModKeyPressing(modKey.Shift)))
  1234. {
  1235. lightList[i].transform.eulerAngles = new Vector3(lightX[i], lightY[i], 18f);
  1236. }
  1237. }
  1238. else
  1239. {
  1240. GameMain.Instance.MainLight.SetIntensity(lightAkarusa[0]);
  1241. GameMain.Instance.MainLight.GetComponent<Light>().shadowStrength = lightKage[0];
  1242. if (!Input.GetKey(KeyCode.X) && (!Input.GetKey(KeyCode.Z) || !getModKeyPressing(modKey.Shift)))
  1243. {
  1244. GameMain.Instance.MainLight.SetRotation(new Vector3(lightX[0], lightY[0], 18f));
  1245. }
  1246. GameMain.Instance.MainLight.GetComponent<Light>().spotAngle = lightRange[i];
  1247. GameMain.Instance.MainLight.GetComponent<Light>().range = lightRange[i] / 5f;
  1248. if (lightIndex[i] != 3)
  1249. {
  1250. GameMain.Instance.MainLight.GetComponent<Light>().color =
  1251. new Color(lightColorR[0], lightColorG[0], lightColorB[0]);
  1252. }
  1253. else
  1254. {
  1255. mainCamera.GetComponent<Camera>().backgroundColor =
  1256. new Color(lightColorR[0], lightColorG[0], lightColorB[0]);
  1257. }
  1258. }
  1259. }
  1260. bool flag3 = false;
  1261. if (sceneLevel == 5 && (Input.GetKeyDown(KeyCode.F12)
  1262. || (Input.GetKey(KeyCode.Q) && getModKeyPressing(modKey.Shift))))
  1263. {
  1264. for (i = 0; i < maidCnt; i++)
  1265. {
  1266. if (goSlot[(int)selectList[i]] != null)
  1267. {
  1268. maidArray[i].body0.goSlot = new List<TBodySkin>(goSlot[(int)selectList[i]]);
  1269. for (int l = 0; l < bodyHit[(int)selectList[i]].Count; l++)
  1270. {
  1271. maidArray[i].body0.goSlot[l].bonehair.bodyhit = bodyHit[(int)selectList[i]][l];
  1272. }
  1273. }
  1274. }
  1275. }
  1276. for (int j = 0; j < maidCnt; j++)
  1277. {
  1278. if (!isVR && sceneLevel == 5 && j == isEditNo)
  1279. {
  1280. bool flag4 = shodaiFlg[(int)selectList[j]];
  1281. shodaiFlg[(int)selectList[j]] = false;
  1282. try
  1283. {
  1284. TMorph morph = maidArray[j].body0.Face.morph;
  1285. float[] fieldValue = GetFieldValue<TMorph, float[]>(morph, "BlendValues");
  1286. float num2 = fieldValue[(int)morph.hash["tangopen"]];
  1287. }
  1288. catch
  1289. {
  1290. shodaiFlg[(int)selectList[j]] = true;
  1291. }
  1292. if (shodaiFlg[(int)selectList[j]] != flag4)
  1293. {
  1294. if (!isVR)
  1295. {
  1296. eyeL[(int)selectList[j]] = maidArray[j].body0.quaDefEyeL.eulerAngles;
  1297. eyeR[(int)selectList[j]] = maidArray[j].body0.quaDefEyeR.eulerAngles;
  1298. }
  1299. }
  1300. }
  1301. if (maidArray[j] && maidArray[j].Visible && isStop[j])
  1302. {
  1303. maidArray[j].body0.m_Bones.GetComponent<Animation>().Stop();
  1304. }
  1305. if (sceneLevel == 5)
  1306. {
  1307. if (editSelectMaid == maidArray[j])
  1308. {
  1309. flag3 = true;
  1310. }
  1311. }
  1312. Maid maid = maidArray[j];
  1313. }
  1314. if (sceneLevel == 5 && !flag3 && maidCnt > 0)
  1315. {
  1316. isEditNo = 0;
  1317. SceneEdit component4 = GameObject.Find("__SceneEdit__").GetComponent<SceneEdit>();
  1318. SetFieldValue<SceneEdit, Maid>(component4, "m_maid", maidArray[0]);
  1319. }
  1320. i = 0;
  1321. while (i < maidCnt)
  1322. {
  1323. Transform transform = maidArray[i].transform;
  1324. Maid maid = maidArray[i];
  1325. if (cafeFlg[i])
  1326. {
  1327. cafeCount[i]++;
  1328. if (cafeCount[i] > 1)
  1329. {
  1330. maid.DelProp(MPN.handitem, true);
  1331. maid.SetProp("handitem", "HandItemR_Etoile_Teacup_I_.menu", 0, true, false);
  1332. maid.AllProcPropSeqStart();
  1333. cafeFlg[i] = false;
  1334. cafeCount[i] = 0;
  1335. }
  1336. }
  1337. KeyCode key;
  1338. if (i >= 14)
  1339. {
  1340. bool flag5 = false;
  1341. bool flag6 = false;
  1342. for (int k = 0; k < keyArray.Length; k++)
  1343. {
  1344. if (Input.GetKey(keyArray[k]))
  1345. {
  1346. flag5 = true;
  1347. break;
  1348. }
  1349. if (Input.GetKeyUp(keyArray[k]))
  1350. {
  1351. flag6 = true;
  1352. break;
  1353. }
  1354. }
  1355. key = keyArray[6];
  1356. if (!flag5 || getModKeyPressing(modKey.Ctrl))
  1357. {
  1358. if (!flag6 || getModKeyPressing(modKey.Ctrl))
  1359. {
  1360. goto IL_49FE;
  1361. }
  1362. idoFlg[i - 7] = false;
  1363. }
  1364. }
  1365. else if (i >= 7)
  1366. {
  1367. bool flag5 = false;
  1368. bool flag6 = false;
  1369. for (int k = 0; k < keyArray.Length; k++)
  1370. {
  1371. if (Input.GetKey(keyArray[k]))
  1372. {
  1373. flag5 = true;
  1374. break;
  1375. }
  1376. if (Input.GetKeyUp(keyArray[k]))
  1377. {
  1378. flag6 = true;
  1379. break;
  1380. }
  1381. }
  1382. key = keyArray[i - 7];
  1383. if (!flag5 || getModKeyPressing(modKey.Ctrl))
  1384. {
  1385. if (!flag6 || getModKeyPressing(modKey.Ctrl))
  1386. {
  1387. goto IL_49FE;
  1388. }
  1389. idoFlg[i - 7] = false;
  1390. }
  1391. }
  1392. else
  1393. {
  1394. bool flag5 = false;
  1395. for (int k = 0; k < keyArray.Length; k++)
  1396. {
  1397. if (Input.GetKey(keyArray[k]))
  1398. {
  1399. flag5 = true;
  1400. break;
  1401. }
  1402. }
  1403. if (!flag5 || !getModKeyPressing(modKey.Ctrl))
  1404. {
  1405. key = keyArray[i];
  1406. goto IL_49FE;
  1407. }
  1408. }
  1409. IL_1688E:
  1410. i++;
  1411. continue;
  1412. IL_49FE:
  1413. if (xFlg[i])
  1414. {
  1415. if (!maid.AudioMan.audiosource.isPlaying)
  1416. {
  1417. if (maid.status.personal.uniqueName == "Pride")
  1418. {
  1419. string text = "s0_";
  1420. Random random = new Random();
  1421. int num4 = random.Next(10000);
  1422. bool flag7 = false;
  1423. for (int k = 0; k < tunArray.Length; k++)
  1424. {
  1425. if (tunArray[k] == num4)
  1426. {
  1427. flag7 = true;
  1428. break;
  1429. }
  1430. }
  1431. if (!flag7)
  1432. {
  1433. text = text + "0" + num4.ToString() + ".ogg";
  1434. if (GameUty.FileSystem.IsExistentFile(text))
  1435. {
  1436. maid.AudioMan.LoadPlay(text, 0f, false, false);
  1437. }
  1438. }
  1439. }
  1440. if (maid.status.personal.uniqueName == "Cool")
  1441. {
  1442. string text = "s1_";
  1443. Random random = new Random();
  1444. int num4 = random.Next(10000);
  1445. bool flag7 = false;
  1446. for (int k = 0; k < coolArray.Length; k++)
  1447. {
  1448. if (coolArray[k] == num4)
  1449. {
  1450. flag7 = true;
  1451. break;
  1452. }
  1453. }
  1454. if (!flag7)
  1455. {
  1456. text = text + "0" + num4.ToString() + ".ogg";
  1457. if (GameUty.FileSystem.IsExistentFile(text))
  1458. {
  1459. maid.AudioMan.LoadPlay(text, 0f, false, false);
  1460. }
  1461. }
  1462. }
  1463. if (maid.status.personal.uniqueName == "Pure")
  1464. {
  1465. string text = "s2_";
  1466. Random random = new Random();
  1467. int num4 = random.Next(10000);
  1468. bool flag7 = false;
  1469. for (int k = 0; k < pureArray.Length; k++)
  1470. {
  1471. if (pureArray[k] == num4)
  1472. {
  1473. flag7 = true;
  1474. break;
  1475. }
  1476. }
  1477. if (!flag7)
  1478. {
  1479. text = text + "0" + num4.ToString() + ".ogg";
  1480. if (GameUty.FileSystem.IsExistentFile(text))
  1481. {
  1482. maid.AudioMan.LoadPlay(text, 0f, false, false);
  1483. }
  1484. }
  1485. }
  1486. if (maid.status.personal.uniqueName == "Yandere")
  1487. {
  1488. string text = "s3_";
  1489. Random random = new Random();
  1490. int num4 = random.Next(10000);
  1491. bool flag7 = false;
  1492. for (int k = 0; k < yanArray.Length; k++)
  1493. {
  1494. if (yanArray[k] == num4)
  1495. {
  1496. flag7 = true;
  1497. break;
  1498. }
  1499. }
  1500. if (!flag7)
  1501. {
  1502. text = text + string.Format("{0:00000}", num4) + ".ogg";
  1503. if (GameUty.FileSystem.IsExistentFile(text))
  1504. {
  1505. maid.AudioMan.LoadPlay(text, 0f, false, false);
  1506. }
  1507. }
  1508. }
  1509. if (maid.status.personal.uniqueName == "Muku")
  1510. {
  1511. string text = "h0_";
  1512. Random random = new Random();
  1513. int num4 = random.Next(10000);
  1514. bool flag7 = false;
  1515. for (int k = 0; k < h0Array.Length; k++)
  1516. {
  1517. if (h0Array[k] == num4)
  1518. {
  1519. flag7 = true;
  1520. break;
  1521. }
  1522. }
  1523. if (flag7)
  1524. {
  1525. text = text + string.Format("{0:00000}", num4) + ".ogg";
  1526. if (GameUty.FileSystem.IsExistentFile(text))
  1527. {
  1528. maid.AudioMan.LoadPlay(text, 0f, false, false);
  1529. }
  1530. }
  1531. }
  1532. if (maid.status.personal.uniqueName == "Majime")
  1533. {
  1534. string text = "h1_";
  1535. Random random = new Random();
  1536. int num4 = random.Next(10000);
  1537. bool flag7 = false;
  1538. for (int k = 0; k < h1Array.Length; k++)
  1539. {
  1540. if (h1Array[k] == num4)
  1541. {
  1542. flag7 = true;
  1543. break;
  1544. }
  1545. }
  1546. if (flag7)
  1547. {
  1548. text = text + string.Format("{0:00000}", num4) + ".ogg";
  1549. if (GameUty.FileSystem.IsExistentFile(text))
  1550. {
  1551. maid.AudioMan.LoadPlay(text, 0f, false, false);
  1552. }
  1553. }
  1554. }
  1555. if (maid.status.personal.uniqueName == "Rindere")
  1556. {
  1557. string text = "h2_";
  1558. Random random = new Random();
  1559. int num4 = random.Next(10000);
  1560. bool flag7 = false;
  1561. for (int k = 0; k < h2Array.Length; k++)
  1562. {
  1563. if (h2Array[k] == num4)
  1564. {
  1565. flag7 = true;
  1566. break;
  1567. }
  1568. }
  1569. if (flag7)
  1570. {
  1571. text = text + string.Format("{0:00000}", num4) + ".ogg";
  1572. if (GameUty.FileSystem.IsExistentFile(text))
  1573. {
  1574. maid.AudioMan.LoadPlay(text, 0f, false, false);
  1575. }
  1576. }
  1577. }
  1578. }
  1579. }
  1580. if (zFlg[i])
  1581. {
  1582. if (!maid.AudioMan.audiosource.isPlaying)
  1583. {
  1584. string text = "";
  1585. if (maid.status.personal.uniqueName == "Pride")
  1586. {
  1587. text = "s0_";
  1588. Random random = new Random();
  1589. int num4 = random.Next(tunArray.Length);
  1590. object obj = text;
  1591. text = string.Concat(new object[] { obj, "0", tunArray[num4], ".ogg" });
  1592. }
  1593. if (maid.status.personal.uniqueName == "Cool")
  1594. {
  1595. text = "s1_";
  1596. Random random = new Random();
  1597. int num4 = random.Next(coolArray.Length);
  1598. object obj = text;
  1599. text = string.Concat(new object[] { obj, "0", coolArray[num4], ".ogg" });
  1600. }
  1601. if (maid.status.personal.uniqueName == "Pure")
  1602. {
  1603. text = "s2_";
  1604. Random random = new Random();
  1605. int num4 = random.Next(pureArray.Length);
  1606. object obj = text;
  1607. text = string.Concat(new object[] { obj, "0", pureArray[num4], ".ogg" });
  1608. }
  1609. if (maid.status.personal.uniqueName == "Yandere")
  1610. {
  1611. text = "s3_";
  1612. Random random = new Random();
  1613. int num4 = random.Next(yanArray.Length);
  1614. text = text + string.Format("{0:00000}", yanArray[num4]) + ".ogg";
  1615. }
  1616. if (maid.status.personal.uniqueName == "Muku")
  1617. {
  1618. text = "h0_";
  1619. Random random = new Random();
  1620. int num4 = random.Next(h0tArray.Length);
  1621. text = text + string.Format("{0:00000}", h0tArray[num4]) + ".ogg";
  1622. }
  1623. if (maid.status.personal.uniqueName == "Majime")
  1624. {
  1625. text = "h1_";
  1626. Random random = new Random();
  1627. int num4 = random.Next(h1tArray.Length);
  1628. text = text + string.Format("{0:00000}", h1tArray[num4]) + ".ogg";
  1629. }
  1630. if (maid.status.personal.uniqueName == "Rindere")
  1631. {
  1632. text = "h2_";
  1633. Random random = new Random();
  1634. int num4 = random.Next(h2tArray.Length);
  1635. text = text + string.Format("{0:00000}", h2tArray[num4]) + ".ogg";
  1636. }
  1637. maid.AudioMan.LoadPlay(text, 0f, false, false);
  1638. }
  1639. }
  1640. if (!isVR || isVR2)
  1641. {
  1642. if (Input.GetKey(key) && Input.GetKeyDown(KeyCode.Q))
  1643. {
  1644. ikMaid = i;
  1645. isIK[i] = true;
  1646. ikBui = 1;
  1647. ikMode[i] = 0;
  1648. SetIK(maid, i);
  1649. HandL = CMT.SearchObjName(maid.body0.m_Bones.transform, "Bip01 R Hand", true);
  1650. UpperArmL = CMT.SearchObjName(maid.body0.m_Bones.transform, "Bip01 R UpperArm", true);
  1651. ForearmL = CMT.SearchObjName(maid.body0.m_Bones.transform, "Bip01 R Forearm", true);
  1652. Clavicle = CMT.SearchObjName(maid.body0.m_Bones.transform, "Bip01 R Clavicle", true);
  1653. IK_hand = CMT.SearchObjName(maid.body0.m_Bones.transform, "_IK_handR", true);
  1654. idoFlg[i] = true;
  1655. if (i >= 7)
  1656. {
  1657. idoFlg[i - 7] = true;
  1658. }
  1659. qFlg = true;
  1660. }
  1661. else if (Input.GetKey(key) && Input.GetKeyDown(KeyCode.W))
  1662. {
  1663. ikMaid = i;
  1664. isIK[i] = true;
  1665. ikBui = 2;
  1666. ikMode[i] = 0;
  1667. SetIK(maid, i);
  1668. HandL = CMT.SearchObjName(maid.body0.m_Bones.transform, "Bip01 L Hand", true);
  1669. UpperArmL = CMT.SearchObjName(maid.body0.m_Bones.transform, "Bip01 L UpperArm", true);
  1670. ForearmL = CMT.SearchObjName(maid.body0.m_Bones.transform, "Bip01 L Forearm", true);
  1671. Clavicle = CMT.SearchObjName(maid.body0.m_Bones.transform, "Bip01 L Clavicle", true);
  1672. IK_hand = CMT.SearchObjName(maid.body0.m_Bones.transform, "_IK_handL", true);
  1673. idoFlg[i] = true;
  1674. if (i >= 7)
  1675. {
  1676. idoFlg[i - 7] = true;
  1677. }
  1678. }
  1679. else if (Input.GetKey(key) && Input.GetKeyDown(KeyCode.A))
  1680. {
  1681. ikMaid = i;
  1682. isIK[i] = true;
  1683. ikBui = 3;
  1684. ikMode[i] = 0;
  1685. SetIK(maid, i);
  1686. HandL = CMT.SearchObjName(maid.body0.m_Bones.transform, "Bip01 R Foot", true);
  1687. UpperArmL = CMT.SearchObjName(maid.body0.m_Bones.transform, "Bip01 R Thigh", true);
  1688. ForearmL = CMT.SearchObjName(maid.body0.m_Bones.transform, "Bip01 R Calf", true);
  1689. Clavicle = CMT.SearchObjName(maid.body0.m_Bones.transform, "Hip_L", true);
  1690. idoFlg[i] = true;
  1691. if (i >= 7)
  1692. {
  1693. idoFlg[i - 7] = true;
  1694. }
  1695. }
  1696. else if (Input.GetKey(key) && Input.GetKeyDown(KeyCode.S))
  1697. {
  1698. ikMaid = i;
  1699. isIK[i] = true;
  1700. ikBui = 4;
  1701. ikMode[i] = 0;
  1702. SetIK(maid, i);
  1703. HandL = CMT.SearchObjName(maid.body0.m_Bones.transform, "Bip01 L Foot", true);
  1704. UpperArmL = CMT.SearchObjName(maid.body0.m_Bones.transform, "Bip01 L Thigh", true);
  1705. ForearmL = CMT.SearchObjName(maid.body0.m_Bones.transform, "Bip01 L Calf", true);
  1706. Clavicle = CMT.SearchObjName(maid.body0.m_Bones.transform, "Hip_L", true);
  1707. idoFlg[i] = true;
  1708. if (i >= 7)
  1709. {
  1710. idoFlg[i - 7] = true;
  1711. }
  1712. sFlg = true;
  1713. }
  1714. else if (Input.GetKey(key) && Input.GetKey(KeyCode.U))
  1715. {
  1716. maid.body0.transform.localRotation =
  1717. Quaternion.Euler(maid.body0.transform.localEulerAngles) * Quaternion.AngleAxis(-1.5f, Vector3.up);
  1718. if (i >= 7)
  1719. {
  1720. idoFlg[i - 7] = true;
  1721. }
  1722. idoFlg[i] = true;
  1723. }
  1724. else if (Input.GetKey(key) && Input.GetKey(KeyCode.O))
  1725. {
  1726. maid.body0.transform.localRotation =
  1727. Quaternion.Euler(maid.body0.transform.localEulerAngles) * Quaternion.AngleAxis(1.5f, Vector3.up);
  1728. if (i >= 7)
  1729. {
  1730. idoFlg[i - 7] = true;
  1731. }
  1732. idoFlg[i] = true;
  1733. }
  1734. else if (Input.GetKey(key) && Input.GetKey(KeyCode.F))
  1735. {
  1736. bGui = true;
  1737. isPoseInit = true;
  1738. isGuiInit = true;
  1739. poseFlg = true;
  1740. faceFlg = false;
  1741. sceneFlg = false;
  1742. kankyoFlg = false;
  1743. kankyo2Flg = false;
  1744. fFlg = true;
  1745. for (int k = 0; k < maidCnt; k++)
  1746. {
  1747. if (maid == maidArray[k])
  1748. {
  1749. selectMaidIndex = k;
  1750. }
  1751. }
  1752. copyIndex = 0;
  1753. if (i >= 7)
  1754. {
  1755. idoFlg[i - 7] = true;
  1756. }
  1757. idoFlg[i] = true;
  1758. }
  1759. else if (Input.GetKey(key) && Input.GetKey(KeyCode.V))
  1760. {
  1761. bGui = true;
  1762. isFaceInit = true;
  1763. isGuiInit = true;
  1764. faceFlg = true;
  1765. poseFlg = false;
  1766. sceneFlg = false;
  1767. kankyoFlg = false;
  1768. kankyo2Flg = false;
  1769. maid.boMabataki = false;
  1770. for (int k = 0; k < maidCnt; k++)
  1771. {
  1772. if (maid == maidArray[k])
  1773. {
  1774. selectMaidIndex = k;
  1775. }
  1776. }
  1777. faceCombo.selectedItemIndex = faceIndex[selectMaidIndex];
  1778. if (i >= 7)
  1779. {
  1780. idoFlg[i - 7] = true;
  1781. }
  1782. idoFlg[i] = true;
  1783. }
  1784. else if (Input.GetKey(key) && getModKeyPressing(modKey.Shift)
  1785. && (Input.GetKeyDown(KeyCode.X) || (isVR && Input.GetKeyDown(KeyCode.UpArrow))))
  1786. {
  1787. if (!xFlg[i])
  1788. {
  1789. xFlg[i] = true;
  1790. zFlg[i] = false;
  1791. if (maid.status.personal.uniqueName == "Pride")
  1792. {
  1793. string text = "s0_";
  1794. Random random = new Random();
  1795. int num4 = random.Next(10000);
  1796. bool flag7 = false;
  1797. for (int k = 0; k < tunArray.Length; k++)
  1798. {
  1799. if (tunArray[k] == num4)
  1800. {
  1801. flag7 = true;
  1802. break;
  1803. }
  1804. }
  1805. if (!flag7)
  1806. {
  1807. text = text + "0" + num4.ToString() + ".ogg";
  1808. if (GameUty.FileSystem.IsExistentFile(text))
  1809. {
  1810. maid.AudioMan.LoadPlay(text, 0f, false, false);
  1811. }
  1812. }
  1813. }
  1814. if (maid.status.personal.uniqueName == "Cool")
  1815. {
  1816. string text = "s1_";
  1817. Random random = new Random();
  1818. int num4 = random.Next(10000);
  1819. bool flag7 = false;
  1820. for (int k = 0; k < coolArray.Length; k++)
  1821. {
  1822. if (coolArray[k] == num4)
  1823. {
  1824. flag7 = true;
  1825. break;
  1826. }
  1827. }
  1828. if (!flag7)
  1829. {
  1830. text = text + "0" + num4.ToString() + ".ogg";
  1831. if (GameUty.FileSystem.IsExistentFile(text))
  1832. {
  1833. maid.AudioMan.LoadPlay(text, 0f, false, false);
  1834. }
  1835. }
  1836. }
  1837. if (maid.status.personal.uniqueName == "Pure")
  1838. {
  1839. string text = "s2_";
  1840. Random random = new Random();
  1841. int num4 = random.Next(10000);
  1842. bool flag7 = false;
  1843. for (int k = 0; k < pureArray.Length; k++)
  1844. {
  1845. if (pureArray[k] == num4)
  1846. {
  1847. flag7 = true;
  1848. break;
  1849. }
  1850. }
  1851. if (!flag7)
  1852. {
  1853. text = text + "0" + num4.ToString() + ".ogg";
  1854. if (GameUty.FileSystem.IsExistentFile(text))
  1855. {
  1856. maid.AudioMan.LoadPlay(text, 0f, false, false);
  1857. }
  1858. }
  1859. }
  1860. if (maid.status.personal.uniqueName == "Yandere")
  1861. {
  1862. string text = "s3_";
  1863. Random random = new Random();
  1864. int num4 = random.Next(10000);
  1865. bool flag7 = false;
  1866. for (int k = 0; k < yanArray.Length; k++)
  1867. {
  1868. if (yanArray[k] == num4)
  1869. {
  1870. flag7 = true;
  1871. break;
  1872. }
  1873. }
  1874. if (!flag7)
  1875. {
  1876. text = text + string.Format("{0:00000}", num4) + ".ogg";
  1877. if (GameUty.FileSystem.IsExistentFile(text))
  1878. {
  1879. maid.AudioMan.LoadPlay(text, 0f, false, false);
  1880. }
  1881. }
  1882. }
  1883. if (maid.status.personal.uniqueName == "Muku")
  1884. {
  1885. string text = "h0_";
  1886. Random random = new Random();
  1887. int num4 = random.Next(10000);
  1888. bool flag7 = false;
  1889. for (int k = 0; k < h0Array.Length; k++)
  1890. {
  1891. if (h0Array[k] == num4)
  1892. {
  1893. flag7 = true;
  1894. break;
  1895. }
  1896. }
  1897. if (flag7)
  1898. {
  1899. text = text + string.Format("{0:00000}", num4) + ".ogg";
  1900. if (GameUty.FileSystem.IsExistentFile(text))
  1901. {
  1902. maid.AudioMan.LoadPlay(text, 0f, false, false);
  1903. }
  1904. }
  1905. }
  1906. if (maid.status.personal.uniqueName == "Majime")
  1907. {
  1908. string text = "h1_";
  1909. Random random = new Random();
  1910. int num4 = random.Next(10000);
  1911. bool flag7 = false;
  1912. for (int k = 0; k < h1Array.Length; k++)
  1913. {
  1914. if (h1Array[k] == num4)
  1915. {
  1916. flag7 = true;
  1917. break;
  1918. }
  1919. }
  1920. if (flag7)
  1921. {
  1922. text = text + string.Format("{0:00000}", num4) + ".ogg";
  1923. if (GameUty.FileSystem.IsExistentFile(text))
  1924. {
  1925. maid.AudioMan.LoadPlay(text, 0f, false, false);
  1926. }
  1927. }
  1928. }
  1929. if (maid.status.personal.uniqueName == "Rindere")
  1930. {
  1931. string text = "h2_";
  1932. Random random = new Random();
  1933. int num4 = random.Next(10000);
  1934. bool flag7 = false;
  1935. for (int k = 0; k < h2Array.Length; k++)
  1936. {
  1937. if (h2Array[k] == num4)
  1938. {
  1939. flag7 = true;
  1940. break;
  1941. }
  1942. }
  1943. if (flag7)
  1944. {
  1945. text = text + string.Format("{0:00000}", num4) + ".ogg";
  1946. if (GameUty.FileSystem.IsExistentFile(text))
  1947. {
  1948. maid.AudioMan.LoadPlay(text, 0f, false, false);
  1949. }
  1950. }
  1951. }
  1952. }
  1953. else
  1954. {
  1955. xFlg[i] = false;
  1956. maid.AudioMan.Clear();
  1957. }
  1958. idoFlg[i] = true;
  1959. if (i >= 7)
  1960. {
  1961. idoFlg[i - 7] = true;
  1962. }
  1963. }
  1964. else if (Input.GetKey(key) && getModKeyPressing(modKey.Shift)
  1965. && (Input.GetKeyDown(KeyCode.Z) || (isVR && Input.GetKeyDown(KeyCode.DownArrow))))
  1966. {
  1967. if (!zFlg[i])
  1968. {
  1969. zFlg[i] = true;
  1970. xFlg[i] = false;
  1971. string text = "";
  1972. if (maid.status.personal.uniqueName == "Pride")
  1973. {
  1974. text = "s0_";
  1975. Random random = new Random();
  1976. int num4 = random.Next(tunArray.Length);
  1977. object obj = text;
  1978. text = string.Concat(new object[] { obj, "0", tunArray[num4], ".ogg" });
  1979. }
  1980. if (maid.status.personal.uniqueName == "Cool")
  1981. {
  1982. text = "s1_";
  1983. Random random = new Random();
  1984. int num4 = random.Next(coolArray.Length);
  1985. object obj = text;
  1986. text = string.Concat(new object[] { obj, "0", coolArray[num4], ".ogg" });
  1987. }
  1988. if (maid.status.personal.uniqueName == "Pure")
  1989. {
  1990. text = "s2_";
  1991. Random random = new Random();
  1992. int num4 = random.Next(pureArray.Length);
  1993. object obj = text;
  1994. text = string.Concat(new object[] { obj, "0", pureArray[num4], ".ogg" });
  1995. }
  1996. if (maid.status.personal.uniqueName == "Yandere")
  1997. {
  1998. text = "s3_";
  1999. Random random = new Random();
  2000. int num4 = random.Next(yanArray.Length);
  2001. text = text + string.Format("{0:00000}", yanArray[num4]) + ".ogg";
  2002. }
  2003. if (maid.status.personal.uniqueName == "Muku")
  2004. {
  2005. text = "h0_";
  2006. Random random = new Random();
  2007. int num4 = random.Next(h0tArray.Length);
  2008. text = text + string.Format("{0:00000}", h0tArray[num4]) + ".ogg";
  2009. }
  2010. if (maid.status.personal.uniqueName == "Majime")
  2011. {
  2012. text = "h1_";
  2013. Random random = new Random();
  2014. int num4 = random.Next(h1tArray.Length);
  2015. text = text + string.Format("{0:00000}", h1tArray[num4]) + ".ogg";
  2016. }
  2017. if (maid.status.personal.uniqueName == "Rindere")
  2018. {
  2019. text = "h2_";
  2020. Random random = new Random();
  2021. int num4 = random.Next(h2tArray.Length);
  2022. text = text + string.Format("{0:00000}", h2tArray[num4]) + ".ogg";
  2023. }
  2024. maid.AudioMan.LoadPlay(text, 0f, false, false);
  2025. }
  2026. else
  2027. {
  2028. zFlg[i] = false;
  2029. maid.AudioMan.Clear();
  2030. }
  2031. idoFlg[i] = true;
  2032. if (i >= 7)
  2033. {
  2034. idoFlg[i - 7] = true;
  2035. }
  2036. }
  2037. else if (Input.GetKey(key) && (Input.GetKeyDown(KeyCode.Z) || (isVR && Input.GetKeyDown(KeyCode.DownArrow))))
  2038. {
  2039. string text = "";
  2040. if (maid.status.personal.uniqueName == "Pride")
  2041. {
  2042. text = "s0_";
  2043. Random random = new Random();
  2044. int num4 = random.Next(tunArray.Length);
  2045. object obj = text;
  2046. text = string.Concat(new object[] { obj, "0", tunArray[num4], ".ogg" });
  2047. }
  2048. if (maid.status.personal.uniqueName == "Cool")
  2049. {
  2050. text = "s1_";
  2051. Random random = new Random();
  2052. int num4 = random.Next(coolArray.Length);
  2053. object obj = text;
  2054. text = string.Concat(new object[] { obj, "0", coolArray[num4], ".ogg" });
  2055. }
  2056. if (maid.status.personal.uniqueName == "Pure")
  2057. {
  2058. text = "s2_";
  2059. Random random = new Random();
  2060. int num4 = random.Next(pureArray.Length);
  2061. object obj = text;
  2062. text = string.Concat(new object[] { obj, "0", pureArray[num4], ".ogg" });
  2063. }
  2064. if (maid.status.personal.uniqueName == "Yandere")
  2065. {
  2066. text = "s3_";
  2067. Random random = new Random();
  2068. int num4 = random.Next(yanArray.Length);
  2069. text = text + string.Format("{0:00000}", yanArray[num4]) + ".ogg";
  2070. }
  2071. if (maid.status.personal.uniqueName == "Muku")
  2072. {
  2073. text = "h0_";
  2074. Random random = new Random();
  2075. int num4 = random.Next(h0tArray.Length);
  2076. text = text + string.Format("{0:00000}", h0tArray[num4]) + ".ogg";
  2077. }
  2078. if (maid.status.personal.uniqueName == "Majime")
  2079. {
  2080. text = "h1_";
  2081. Random random = new Random();
  2082. int num4 = random.Next(h1tArray.Length);
  2083. text = text + string.Format("{0:00000}", h1tArray[num4]) + ".ogg";
  2084. }
  2085. if (maid.status.personal.uniqueName == "Rindere")
  2086. {
  2087. text = "h2_";
  2088. Random random = new Random();
  2089. int num4 = random.Next(h2tArray.Length);
  2090. text = text + string.Format("{0:00000}", h2tArray[num4]) + ".ogg";
  2091. }
  2092. maid.AudioMan.LoadPlay(text, 0f, false, false);
  2093. idoFlg[i] = true;
  2094. if (i >= 7)
  2095. {
  2096. idoFlg[i - 7] = true;
  2097. }
  2098. }
  2099. else if (Input.GetKey(key) && (Input.GetKeyDown(KeyCode.X) || (isVR && Input.GetKeyDown(KeyCode.UpArrow))))
  2100. {
  2101. if (maid.status.personal.uniqueName == "Pride")
  2102. {
  2103. string text = "s0_";
  2104. Random random = new Random();
  2105. int num4 = random.Next(10000);
  2106. bool flag7 = false;
  2107. for (int k = 0; k < tunArray.Length; k++)
  2108. {
  2109. if (tunArray[k] == num4)
  2110. {
  2111. flag7 = true;
  2112. break;
  2113. }
  2114. }
  2115. if (!flag7)
  2116. {
  2117. text = text + "0" + num4.ToString() + ".ogg";
  2118. if (GameUty.FileSystem.IsExistentFile(text))
  2119. {
  2120. maid.AudioMan.LoadPlay(text, 0f, false, false);
  2121. }
  2122. }
  2123. }
  2124. if (maid.status.personal.uniqueName == "Cool")
  2125. {
  2126. string text = "s1_";
  2127. Random random = new Random();
  2128. int num4 = random.Next(10000);
  2129. bool flag7 = false;
  2130. for (int k = 0; k < coolArray.Length; k++)
  2131. {
  2132. if (coolArray[k] == num4)
  2133. {
  2134. flag7 = true;
  2135. break;
  2136. }
  2137. }
  2138. if (!flag7)
  2139. {
  2140. text = text + "0" + num4.ToString() + ".ogg";
  2141. if (GameUty.FileSystem.IsExistentFile(text))
  2142. {
  2143. maid.AudioMan.LoadPlay(text, 0f, false, false);
  2144. }
  2145. }
  2146. }
  2147. if (maid.status.personal.uniqueName == "Pure")
  2148. {
  2149. string text = "s2_";
  2150. Random random = new Random();
  2151. int num4 = random.Next(10000);
  2152. bool flag7 = false;
  2153. for (int k = 0; k < pureArray.Length; k++)
  2154. {
  2155. if (pureArray[k] == num4)
  2156. {
  2157. flag7 = true;
  2158. break;
  2159. }
  2160. }
  2161. if (!flag7)
  2162. {
  2163. text = text + "0" + num4.ToString() + ".ogg";
  2164. if (GameUty.FileSystem.IsExistentFile(text))
  2165. {
  2166. maid.AudioMan.LoadPlay(text, 0f, false, false);
  2167. }
  2168. }
  2169. }
  2170. if (maid.status.personal.uniqueName == "Yandere")
  2171. {
  2172. string text = "s3_";
  2173. Random random = new Random();
  2174. int num4 = random.Next(10000);
  2175. bool flag7 = false;
  2176. for (int k = 0; k < yanArray.Length; k++)
  2177. {
  2178. if (yanArray[k] == num4)
  2179. {
  2180. flag7 = true;
  2181. break;
  2182. }
  2183. }
  2184. if (!flag7)
  2185. {
  2186. text = text + string.Format("{0:00000}", num4) + ".ogg";
  2187. if (GameUty.FileSystem.IsExistentFile(text))
  2188. {
  2189. maid.AudioMan.LoadPlay(text, 0f, false, false);
  2190. }
  2191. }
  2192. }
  2193. if (maid.status.personal.uniqueName == "Muku")
  2194. {
  2195. string text = "h0_";
  2196. Random random = new Random();
  2197. int num4 = random.Next(10000);
  2198. bool flag7 = false;
  2199. for (int k = 0; k < h0Array.Length; k++)
  2200. {
  2201. if (h0Array[k] == num4)
  2202. {
  2203. flag7 = true;
  2204. break;
  2205. }
  2206. }
  2207. if (flag7)
  2208. {
  2209. text = text + string.Format("{0:00000}", num4) + ".ogg";
  2210. if (GameUty.FileSystem.IsExistentFile(text))
  2211. {
  2212. maid.AudioMan.LoadPlay(text, 0f, false, false);
  2213. }
  2214. }
  2215. }
  2216. if (maid.status.personal.uniqueName == "Majime")
  2217. {
  2218. string text = "h1_";
  2219. Random random = new Random();
  2220. int num4 = random.Next(10000);
  2221. bool flag7 = false;
  2222. for (int k = 0; k < h1Array.Length; k++)
  2223. {
  2224. if (h1Array[k] == num4)
  2225. {
  2226. flag7 = true;
  2227. break;
  2228. }
  2229. }
  2230. if (flag7)
  2231. {
  2232. text = text + string.Format("{0:00000}", num4) + ".ogg";
  2233. if (GameUty.FileSystem.IsExistentFile(text))
  2234. {
  2235. maid.AudioMan.LoadPlay(text, 0f, false, false);
  2236. }
  2237. }
  2238. }
  2239. if (maid.status.personal.uniqueName == "Rindere")
  2240. {
  2241. string text = "h2_";
  2242. Random random = new Random();
  2243. int num4 = random.Next(10000);
  2244. bool flag7 = false;
  2245. for (int k = 0; k < h2Array.Length; k++)
  2246. {
  2247. if (h2Array[k] == num4)
  2248. {
  2249. flag7 = true;
  2250. break;
  2251. }
  2252. }
  2253. if (flag7)
  2254. {
  2255. text = text + string.Format("{0:00000}", num4) + ".ogg";
  2256. if (GameUty.FileSystem.IsExistentFile(text))
  2257. {
  2258. maid.AudioMan.LoadPlay(text, 0f, false, false);
  2259. }
  2260. }
  2261. }
  2262. idoFlg[i] = true;
  2263. if (i >= 7)
  2264. {
  2265. idoFlg[i - 7] = true;
  2266. }
  2267. }
  2268. else if (Input.GetKey(key) && Input.GetKeyDown(KeyCode.M))
  2269. {
  2270. delCount[i] = 20;
  2271. if (goSlot[(int)selectList[i]] != null)
  2272. {
  2273. maidArray[i].body0.goSlot = new List<TBodySkin>(goSlot[(int)selectList[i]]);
  2274. for (int l = 0; l < bodyHit[(int)selectList[i]].Count; l++)
  2275. {
  2276. maidArray[i].body0.goSlot[l].bonehair.bodyhit = bodyHit[(int)selectList[i]][l];
  2277. }
  2278. }
  2279. itemIndex[i]++;
  2280. if (itemIndex[i] == itemArray.Length - 1)
  2281. {
  2282. itemIndex[i] = 0;
  2283. }
  2284. string[] array = new string[2];
  2285. array = itemArray[itemIndex[i]].Split(new char[] { ',' });
  2286. if (itemIndex[i] > 13)
  2287. {
  2288. array = itemArray[itemIndex[i] + 1].Split(new char[] { ',' });
  2289. }
  2290. maid.DelProp(MPN.handitem, true);
  2291. maid.DelProp(MPN.accvag, true);
  2292. maid.DelProp(MPN.accanl, true);
  2293. bool flag8 = false;
  2294. if (itemIndex[i] == 12 || itemIndex[i] == 13)
  2295. {
  2296. flag8 = true;
  2297. }
  2298. if (!flag8)
  2299. {
  2300. maid.DelProp(MPN.kousoku_upper, true);
  2301. maid.DelProp(MPN.kousoku_lower, true);
  2302. }
  2303. if (array[0] != "")
  2304. {
  2305. maid.SetProp(array[0], array[1], 0, true, false);
  2306. }
  2307. if (itemIndex[i] == 13)
  2308. {
  2309. array = itemArray[itemIndex[i] + 1].Split(new char[] { ',' });
  2310. maid.SetProp(array[0], array[1], 0, true, false);
  2311. }
  2312. if (itemIndex[i] == 23)
  2313. {
  2314. array = itemArray[itemIndex[i]].Split(new char[] { ',' });
  2315. maid.SetProp(array[0], array[1], 0, true, false);
  2316. cafeFlg[i] = true;
  2317. }
  2318. maid.AllProcPropSeqStart();
  2319. idoFlg[i] = true;
  2320. if (i >= 7)
  2321. {
  2322. idoFlg[i - 7] = true;
  2323. }
  2324. mFlg = true;
  2325. }
  2326. else if (Input.GetKey(key) && (Input.GetKeyDown(KeyCode.LeftBracket)
  2327. || (Input.GetKeyDown(KeyCode.BackQuote) && getModKeyPressing(modKey.Alt))))
  2328. {
  2329. for (int k = 0; k < 10; k++)
  2330. {
  2331. maid.transform.RotateAround(maid.transform.position,
  2332. Vector3.right,
  2333. -maid.transform.rotation.eulerAngles.x);
  2334. maid.transform.RotateAround(maid.transform.position,
  2335. Vector3.forward,
  2336. -maid.transform.rotation.eulerAngles.z);
  2337. }
  2338. idoFlg[i] = true;
  2339. atFlg = true;
  2340. if (i >= 7)
  2341. {
  2342. idoFlg[i - 7] = true;
  2343. }
  2344. }
  2345. else if (Input.GetKey(key) && ((Input.GetKey(KeyCode.Minus) && getModKeyPressing(modKey.Shift))
  2346. || (Input.GetKey(KeyCode.I) && getModKeyPressing(modKey.Alt))))
  2347. {
  2348. maid.transform.RotateAround(maid.transform.position, new Vector3(vector3.x, 0f, vector3.z), 0.4f);
  2349. idoFlg[i] = true;
  2350. if (i >= 7)
  2351. {
  2352. idoFlg[i - 7] = true;
  2353. }
  2354. }
  2355. else if (Input.GetKey(key) && ((Input.GetKey(KeyCode.Quote) && getModKeyPressing(modKey.Shift))
  2356. || (Input.GetKey(KeyCode.K) && getModKeyPressing(modKey.Alt))))
  2357. {
  2358. maid.transform.RotateAround(maid.transform.position, new Vector3(vector3.x, 0f, vector3.z), -0.4f);
  2359. idoFlg[i] = true;
  2360. if (i >= 7)
  2361. {
  2362. idoFlg[i - 7] = true;
  2363. }
  2364. }
  2365. else if (Input.GetKey(key) && (Input.GetKey(KeyCode.Minus)
  2366. || (Input.GetKey(KeyCode.J) && getModKeyPressing(modKey.Alt))))
  2367. {
  2368. maid.transform.RotateAround(maid.transform.position, new Vector3(vector2.x, 0f, vector2.z), 0.4f);
  2369. idoFlg[i] = true;
  2370. if (i >= 7)
  2371. {
  2372. idoFlg[i - 7] = true;
  2373. }
  2374. }
  2375. else if (Input.GetKey(key) && (Input.GetKey(KeyCode.Quote)
  2376. || (Input.GetKey(KeyCode.L) && getModKeyPressing(modKey.Alt))))
  2377. {
  2378. maid.transform.RotateAround(maid.transform.position, new Vector3(vector2.x, 0f, vector2.z), -0.4f);
  2379. idoFlg[i] = true;
  2380. if (i >= 7)
  2381. {
  2382. idoFlg[i - 7] = true;
  2383. }
  2384. }
  2385. else if (Input.GetKey(key) && Input.GetKey(KeyCode.I) && Input.GetKey(KeyCode.J))
  2386. {
  2387. Vector3 vector = maid.transform.position;
  2388. vector += new Vector3(vector2.x, 0f, vector2.z) * 0.0075f * speed;
  2389. vector += new Vector3(vector3.x, 0f, vector3.z) * -0.0075f * speed;
  2390. maid.SetPos(vector);
  2391. idoFlg[i] = true;
  2392. if (i >= 7)
  2393. {
  2394. idoFlg[i - 7] = true;
  2395. }
  2396. }
  2397. else if (Input.GetKey(key) && Input.GetKey(KeyCode.I) && Input.GetKey(KeyCode.L))
  2398. {
  2399. Vector3 vector = maid.transform.position;
  2400. vector += new Vector3(vector2.x, 0f, vector2.z) * 0.0075f * speed;
  2401. vector += new Vector3(vector3.x, 0f, vector3.z) * 0.0075f * speed;
  2402. maid.SetPos(vector);
  2403. idoFlg[i] = true;
  2404. if (i >= 7)
  2405. {
  2406. idoFlg[i - 7] = true;
  2407. }
  2408. }
  2409. else if (Input.GetKey(key) && Input.GetKey(KeyCode.K) && Input.GetKey(KeyCode.J))
  2410. {
  2411. Vector3 vector = maid.transform.position;
  2412. vector += new Vector3(vector2.x, 0f, vector2.z) * -0.0075f * speed;
  2413. vector += new Vector3(vector3.x, 0f, vector3.z) * -0.0075f * speed;
  2414. maid.SetPos(vector);
  2415. idoFlg[i] = true;
  2416. if (i >= 7)
  2417. {
  2418. idoFlg[i - 7] = true;
  2419. }
  2420. }
  2421. else if (Input.GetKey(key) && Input.GetKey(KeyCode.K) && Input.GetKey(KeyCode.L))
  2422. {
  2423. Vector3 vector = maid.transform.position;
  2424. vector += new Vector3(vector2.x, 0f, vector2.z) * -0.0075f * speed;
  2425. vector += new Vector3(vector3.x, 0f, vector3.z) * 0.0075f * speed;
  2426. maid.SetPos(vector);
  2427. idoFlg[i] = true;
  2428. if (i >= 7)
  2429. {
  2430. idoFlg[i - 7] = true;
  2431. }
  2432. }
  2433. else if (Input.GetKey(key) && Input.GetKey(KeyCode.I))
  2434. {
  2435. Vector3 vector = maid.transform.position;
  2436. vector += new Vector3(vector2.x, 0f, vector2.z) * 0.0075f * speed;
  2437. maid.SetPos(vector);
  2438. idoFlg[i] = true;
  2439. if (i >= 7)
  2440. {
  2441. idoFlg[i - 7] = true;
  2442. }
  2443. }
  2444. else if (Input.GetKey(key) && Input.GetKey(KeyCode.K))
  2445. {
  2446. Vector3 vector = maid.transform.position;
  2447. vector += new Vector3(vector2.x, 0f, vector2.z) * -0.0075f * speed;
  2448. maid.SetPos(vector);
  2449. idoFlg[i] = true;
  2450. if (i >= 7)
  2451. {
  2452. idoFlg[i - 7] = true;
  2453. }
  2454. }
  2455. else if (Input.GetKey(key) && Input.GetKey(KeyCode.J))
  2456. {
  2457. Vector3 vector = maid.transform.position;
  2458. vector += new Vector3(vector3.x, 0f, vector3.z) * -0.0075f * speed;
  2459. maid.SetPos(vector);
  2460. idoFlg[i] = true;
  2461. if (i >= 7)
  2462. {
  2463. idoFlg[i - 7] = true;
  2464. }
  2465. }
  2466. else if (Input.GetKey(key) && Input.GetKey(KeyCode.L))
  2467. {
  2468. Vector3 vector = maid.transform.position;
  2469. vector += new Vector3(vector3.x, 0f, vector3.z) * 0.0075f * speed;
  2470. maid.SetPos(vector);
  2471. idoFlg[i] = true;
  2472. if (i >= 7)
  2473. {
  2474. idoFlg[i - 7] = true;
  2475. }
  2476. }
  2477. else if (Input.GetKey(key) && Input.GetKey(KeyCode.Alpha0))
  2478. {
  2479. Vector3 vector = maid.transform.position;
  2480. vector.y += 0.0075f * speed;
  2481. maid.SetPos(vector);
  2482. idoFlg[i] = true;
  2483. if (i >= 7)
  2484. {
  2485. idoFlg[i - 7] = true;
  2486. }
  2487. }
  2488. else if (Input.GetKey(key) && Input.GetKey(KeyCode.P))
  2489. {
  2490. Vector3 vector = maid.transform.position;
  2491. vector.y -= 0.0075f * speed;
  2492. maid.SetPos(vector);
  2493. idoFlg[i] = true;
  2494. if (i >= 7)
  2495. {
  2496. idoFlg[i - 7] = true;
  2497. }
  2498. }
  2499. else if (maid.boMabataki && Input.GetKey(key) && Input.GetKeyDown(KeyCode.Alpha8)
  2500. && getModKeyPressing(modKey.Shift))
  2501. {
  2502. faceIndex[i]--;
  2503. if (faceIndex[i] <= -1)
  2504. {
  2505. faceIndex[i] = faceArray.Length - 1;
  2506. }
  2507. maid.FaceAnime(faceArray[faceIndex[i]], 1f, 0);
  2508. idoFlg[i] = true;
  2509. if (i >= 7)
  2510. {
  2511. idoFlg[i - 7] = true;
  2512. }
  2513. }
  2514. else if (maid.boMabataki && Input.GetKey(key) && Input.GetKeyDown(KeyCode.Alpha8))
  2515. {
  2516. faceIndex[i]++;
  2517. if (faceIndex[i] == faceArray.Length)
  2518. {
  2519. faceIndex[i] = 0;
  2520. }
  2521. maid.FaceAnime(faceArray[faceIndex[i]], 1f, 0);
  2522. idoFlg[i] = true;
  2523. if (i >= 7)
  2524. {
  2525. idoFlg[i - 7] = true;
  2526. }
  2527. }
  2528. else if (Input.GetKey(key) && Input.GetKeyDown(KeyCode.Alpha9))
  2529. {
  2530. faceBlendIndex[i]++;
  2531. if (faceBlendIndex[i] == faceBlendArray.Length)
  2532. {
  2533. faceBlendIndex[i] = 0;
  2534. }
  2535. maid.FaceBlend(faceBlendArray[faceBlendIndex[i]]);
  2536. idoFlg[i] = true;
  2537. if (i >= 7)
  2538. {
  2539. idoFlg[i - 7] = true;
  2540. }
  2541. }
  2542. else if (Input.GetKey(key) && Input.GetKeyDown(KeyCode.Space))
  2543. {
  2544. string[] array = poseArray[poseIndex[i]].Split(new char[] { ',' });
  2545. isStop[i] = false;
  2546. poseCount[i] = 20;
  2547. if (array[0].Contains("_momi") || array[0].Contains("paizuri_"))
  2548. {
  2549. maid.body0.MuneYureL(0f);
  2550. maid.body0.MuneYureR(0f);
  2551. }
  2552. else
  2553. {
  2554. maid.body0.MuneYureL(1f);
  2555. maid.body0.MuneYureR(1f);
  2556. maid.body0.jbMuneL.enabled = true;
  2557. maid.body0.jbMuneR.enabled = true;
  2558. }
  2559. if (array[0].Contains("MultipleMaidsPose"))
  2560. {
  2561. string path = array[0].Split(new char[] { '/' })[1];
  2562. byte[] array2 = new byte[0];
  2563. try
  2564. {
  2565. using (FileStream fileStream = new FileStream(path, FileMode.Open, FileAccess.Read))
  2566. {
  2567. array2 = new byte[fileStream.Length];
  2568. fileStream.Read(array2, 0, array2.Length);
  2569. }
  2570. }
  2571. catch { }
  2572. if (0 < array2.Length)
  2573. {
  2574. string text = Path.GetFileName(path);
  2575. long num5 = text.GetHashCode();
  2576. maid.body0.CrossFade(num5.ToString(), array2, false, false, false, 0f, 1f);
  2577. Maid.AutoTwist[] array3 = new Maid.AutoTwist[]
  2578. {
  2579. Maid.AutoTwist.ShoulderL, Maid.AutoTwist.ShoulderR, Maid.AutoTwist.WristL,
  2580. Maid.AutoTwist.WristR, Maid.AutoTwist.ThighL, Maid.AutoTwist.ThighR
  2581. };
  2582. for (int m = 0; m < array3.Length; m++)
  2583. {
  2584. maid.SetAutoTwist(array3[m], true);
  2585. }
  2586. }
  2587. }
  2588. else if (array[0].StartsWith("p") && int.TryParse(array[0].Substring(1), out int num6))
  2589. {
  2590. loadPose[i] = array[0];
  2591. }
  2592. else if (!array[0].StartsWith("dance_"))
  2593. {
  2594. maidArray[i].CrossFade(array[0] + ".anm", false, true, false, 0f, 1f);
  2595. }
  2596. else
  2597. {
  2598. if (!maidArray[i].body0.m_Bones.GetComponent<Animation>().GetClip(array[0] + ".anm"))
  2599. {
  2600. maidArray[i].body0.LoadAnime(array[0] + ".anm",
  2601. GameUty.FileSystem,
  2602. array[0] + ".anm",
  2603. false,
  2604. false);
  2605. }
  2606. maidArray[i].body0.m_Bones.GetComponent<Animation>().Play(array[0] + ".anm");
  2607. }
  2608. if (array.Length > 1)
  2609. {
  2610. maidArray[i].body0.m_Bones.GetComponent<Animation>()[array[0] + ".anm"].time = float.Parse(array[1]);
  2611. isStop[i] = true;
  2612. if (array.Length > 2)
  2613. {
  2614. Transform transform2 = CMT.SearchObjName(maidArray[i].body0.m_Bones.transform, "Bip01", true);
  2615. isPoseIti[i] = true;
  2616. poseIti[i] = maidArray[i].transform.position;
  2617. maidArray[i].transform.position = new Vector3(100f, 100f, 100f);
  2618. }
  2619. }
  2620. isLock[i] = false;
  2621. idoFlg[i] = true;
  2622. mHandL[i].initFlg = false;
  2623. mHandR[i].initFlg = false;
  2624. mFootL[i].initFlg = false;
  2625. mFootR[i].initFlg = false;
  2626. pHandL[i] = 0;
  2627. pHandR[i] = 0;
  2628. muneIKL[i] = false;
  2629. muneIKR[i] = false;
  2630. if (!isVR)
  2631. {
  2632. maidArray[i].body0.quaDefEyeL.eulerAngles = eyeL[(int)selectList[i]];
  2633. maidArray[i].body0.quaDefEyeR.eulerAngles = eyeR[(int)selectList[i]];
  2634. }
  2635. if (i >= 7)
  2636. {
  2637. idoFlg[i - 7] = true;
  2638. }
  2639. }
  2640. else if (maid.body0.isLoadedBody)
  2641. {
  2642. if (muneIKL[i] && vIKMuneL[i].x != 0f)
  2643. {
  2644. IKMuneLSub[i].localEulerAngles = vIKMuneLSub[i];
  2645. IKMuneL[i].localEulerAngles = vIKMuneL[i];
  2646. }
  2647. if (muneIKR[i] && vIKMuneR[i].x != 0f)
  2648. {
  2649. IKMuneRSub[i].localEulerAngles = vIKMuneRSub[i];
  2650. IKMuneR[i].localEulerAngles = vIKMuneR[i];
  2651. }
  2652. if (!HandL1[i])
  2653. {
  2654. SetIKInit(i);
  2655. SetIK(maid, i);
  2656. ikBui = 5;
  2657. }
  2658. else
  2659. {
  2660. bool flag5 = false;
  2661. for (int k = 0; k < keyArray.Length; k++)
  2662. {
  2663. if (Input.GetKey(keyArray[k]))
  2664. {
  2665. flag5 = true;
  2666. break;
  2667. }
  2668. }
  2669. if ((!Input.GetKey(KeyCode.Space) && Input.GetKey(KeyCode.W)) || Input.GetKey(KeyCode.R)
  2670. || Input.GetKey(KeyCode.Y))
  2671. {
  2672. flag5 = true;
  2673. }
  2674. if (!flag5)
  2675. {
  2676. if (getModKeyPressing(modKey.Ctrl) && getModKeyPressing(modKey.Alt)
  2677. && getModKeyPressing(modKey.Shift))
  2678. {
  2679. ikMode[i] = 15;
  2680. }
  2681. else if (getModKeyPressing(modKey.Shift) && getModKeyPressing(modKey.Alt))
  2682. {
  2683. ikMode[i] = 5;
  2684. }
  2685. else if (getModKeyPressing(modKey.Shift) && Input.GetKey(KeyCode.Space))
  2686. {
  2687. ikMode[i] = 6;
  2688. }
  2689. else if (getModKeyPressing(modKey.Ctrl) && Input.GetKey(KeyCode.Space))
  2690. {
  2691. ikMode[i] = 7;
  2692. }
  2693. else if (Input.GetKey(KeyCode.Z) && getModKeyPressing(modKey.Shift))
  2694. {
  2695. ikMode[i] = 11;
  2696. }
  2697. else if (Input.GetKey(KeyCode.Z) && getModKeyPressing(modKey.Ctrl))
  2698. {
  2699. ikMode[i] = 12;
  2700. }
  2701. else if (Input.GetKey(KeyCode.X) && getModKeyPressing(modKey.Shift))
  2702. {
  2703. ikMode[i] = 14;
  2704. }
  2705. else if (getModKeyPressing(modKey.Shift))
  2706. {
  2707. ikMode[i] = 1;
  2708. }
  2709. else if (getModKeyPressing(modKey.Ctrl) && getModKeyPressing(modKey.Alt))
  2710. {
  2711. ikMode[i] = 8;
  2712. }
  2713. else if (getModKeyPressing(modKey.Ctrl))
  2714. {
  2715. ikMode[i] = 2;
  2716. }
  2717. else if (getModKeyPressing(modKey.Alt))
  2718. {
  2719. ikMode[i] = 3;
  2720. }
  2721. else if (Input.GetKey(KeyCode.Space))
  2722. {
  2723. ikMode[i] = 4;
  2724. }
  2725. else if (Input.GetKey(KeyCode.X))
  2726. {
  2727. ikMode[i] = 9;
  2728. }
  2729. else if (Input.GetKey(KeyCode.Z))
  2730. {
  2731. ikMode[i] = 10;
  2732. }
  2733. else if (Input.GetKey(KeyCode.C))
  2734. {
  2735. ikMode[i] = 13;
  2736. }
  2737. else if (Input.GetKey(KeyCode.A))
  2738. {
  2739. ikMode[i] = 16;
  2740. }
  2741. else
  2742. {
  2743. ikMode[i] = 0;
  2744. }
  2745. if (!isIK[i])
  2746. {
  2747. if (ikMode[i] < 9)
  2748. {
  2749. ikMode[i] = 0;
  2750. }
  2751. }
  2752. bool flag9 = false;
  2753. bool flag10 = false;
  2754. bool flag11 = false;
  2755. bool flag12 = false;
  2756. if (gFinger[i, 0])
  2757. {
  2758. for (int j = 0; j < 15; j++)
  2759. {
  2760. if (mFinger[i, j].isStop)
  2761. {
  2762. flag9 = true;
  2763. }
  2764. }
  2765. for (int j = 15; j < 30; j++)
  2766. {
  2767. if (mFinger[i, j].isStop)
  2768. {
  2769. flag10 = true;
  2770. }
  2771. }
  2772. for (int j = 0; j < 6; j++)
  2773. {
  2774. if (mFinger2[i, j].isStop)
  2775. {
  2776. flag11 = true;
  2777. }
  2778. }
  2779. for (int j = 6; j < 12; j++)
  2780. {
  2781. if (mFinger2[i, j].isStop)
  2782. {
  2783. flag12 = true;
  2784. }
  2785. }
  2786. }
  2787. if (gMaid[i] != null)
  2788. {
  2789. if (ikMode[i] >= 9 && ikMode[i] <= 14)
  2790. {
  2791. gMaid[i].SetActive(true);
  2792. if (isCube)
  2793. {
  2794. gMaidC[i].SetActive(true);
  2795. }
  2796. }
  2797. else
  2798. {
  2799. gMaid[i].SetActive(false);
  2800. gMaidC[i].SetActive(false);
  2801. }
  2802. }
  2803. if (flag10 || mHandR[i].isSelect || mArmR[i].isSelect || mClavicleR[i].isSelect
  2804. || (ikMode[i] == 4 && Input.GetKeyDown(KeyCode.Q)))
  2805. {
  2806. ikBui = 1;
  2807. if (ikMode[i] != 4 || !Input.GetKeyDown(KeyCode.Q))
  2808. {
  2809. ikMaid = i;
  2810. }
  2811. if (ikMaid == i)
  2812. {
  2813. SetIK(maid, i);
  2814. HandL = CMT.SearchObjName(maid.body0.m_Bones.transform, "Bip01 R Hand", true);
  2815. UpperArmL = CMT.SearchObjName(maid.body0.m_Bones.transform, "Bip01 R UpperArm", true);
  2816. ForearmL = CMT.SearchObjName(maid.body0.m_Bones.transform, "Bip01 R Forearm", true);
  2817. Clavicle = CMT.SearchObjName(maid.body0.m_Bones.transform, "Bip01 R Clavicle", true);
  2818. IK_hand = CMT.SearchObjName(maid.body0.m_Bones.transform, "_IK_handR", true);
  2819. }
  2820. if (Input.GetKeyDown(KeyCode.Q))
  2821. {
  2822. qFlg = true;
  2823. }
  2824. }
  2825. else if (flag9 || mHandL[i].isSelect || mArmL[i].isSelect || mClavicleL[i].isSelect
  2826. || (ikMode[i] == 4 && Input.GetKeyDown(KeyCode.W)))
  2827. {
  2828. ikBui = 2;
  2829. if (ikMode[i] != 4 || !Input.GetKeyDown(KeyCode.W))
  2830. {
  2831. ikMaid = i;
  2832. }
  2833. if (ikMaid == i)
  2834. {
  2835. SetIK(maid, i);
  2836. HandL = CMT.SearchObjName(maid.body0.m_Bones.transform, "Bip01 L Hand", true);
  2837. UpperArmL = CMT.SearchObjName(maid.body0.m_Bones.transform, "Bip01 L UpperArm", true);
  2838. ForearmL = CMT.SearchObjName(maid.body0.m_Bones.transform, "Bip01 L Forearm", true);
  2839. Clavicle = CMT.SearchObjName(maid.body0.m_Bones.transform, "Bip01 L Clavicle", true);
  2840. IK_hand = CMT.SearchObjName(maid.body0.m_Bones.transform, "_IK_handL", true);
  2841. }
  2842. if (Input.GetKeyDown(KeyCode.W))
  2843. {
  2844. wFlg = true;
  2845. }
  2846. }
  2847. else if (flag12 || mFootR[i].isSelect || mHizaR[i].isSelect
  2848. || (ikMode[i] == 4 && Input.GetKeyDown(KeyCode.A)))
  2849. {
  2850. ikBui = 3;
  2851. if (ikMode[i] != 4 || !Input.GetKeyDown(KeyCode.A))
  2852. {
  2853. ikMaid = i;
  2854. }
  2855. if (ikMaid == i)
  2856. {
  2857. SetIK(maid, i);
  2858. HandL = CMT.SearchObjName(maid.body0.m_Bones.transform, "Bip01 R Foot", true);
  2859. UpperArmL = CMT.SearchObjName(maid.body0.m_Bones.transform, "Bip01 R Thigh", true);
  2860. ForearmL = CMT.SearchObjName(maid.body0.m_Bones.transform, "Bip01 R Calf", true);
  2861. Clavicle = CMT.SearchObjName(maid.body0.m_Bones.transform, "Hip_L", true);
  2862. }
  2863. }
  2864. else if (flag11 || mFootL[i].isSelect || mHizaL[i].isSelect
  2865. || (ikMode[i] == 4 && Input.GetKeyDown(KeyCode.S)))
  2866. {
  2867. ikBui = 4;
  2868. if (ikMode[i] != 4 || !Input.GetKeyDown(KeyCode.S))
  2869. {
  2870. ikMaid = i;
  2871. }
  2872. if (ikMaid == i)
  2873. {
  2874. SetIK(maid, i);
  2875. HandL = CMT.SearchObjName(maid.body0.m_Bones.transform, "Bip01 L Foot", true);
  2876. UpperArmL = CMT.SearchObjName(maid.body0.m_Bones.transform, "Bip01 L Thigh", true);
  2877. ForearmL = CMT.SearchObjName(maid.body0.m_Bones.transform, "Bip01 L Calf", true);
  2878. Clavicle = CMT.SearchObjName(maid.body0.m_Bones.transform, "Hip_L", true);
  2879. }
  2880. if (Input.GetKeyDown(KeyCode.S))
  2881. {
  2882. sFlg = true;
  2883. }
  2884. }
  2885. mHandR[i].isSelect = false;
  2886. mArmR[i].isSelect = false;
  2887. mHandL[i].isSelect = false;
  2888. mArmL[i].isSelect = false;
  2889. mFootR[i].isSelect = false;
  2890. mHizaR[i].isSelect = false;
  2891. mFootL[i].isSelect = false;
  2892. mHizaL[i].isSelect = false;
  2893. mClavicleL[i].isSelect = false;
  2894. mClavicleR[i].isSelect = false;
  2895. if (ikMode[i] == 16)
  2896. {
  2897. if (!gHead2[i])
  2898. {
  2899. SetIKInit6(i);
  2900. }
  2901. if (mHead2[i].isClick)
  2902. {
  2903. mHead2[i].isClick = false;
  2904. bGui = true;
  2905. isFaceInit = true;
  2906. // isGuiInit = true;
  2907. faceFlg = true;
  2908. poseFlg = false;
  2909. sceneFlg = false;
  2910. kankyoFlg = false;
  2911. kankyo2Flg = false;
  2912. maid.boMabataki = false;
  2913. selectMaidIndex = mHead2[i].no;
  2914. faceCombo.selectedItemIndex = faceIndex[selectMaidIndex];
  2915. }
  2916. if (mMaid2[i].isClick)
  2917. {
  2918. mMaid2[i].isClick = false;
  2919. bGui = true;
  2920. isPoseInit = true;
  2921. // isGuiInit = true;
  2922. poseFlg = true;
  2923. faceFlg = false;
  2924. sceneFlg = false;
  2925. kankyoFlg = false;
  2926. kankyo2Flg = false;
  2927. selectMaidIndex = mMaid2[i].no;
  2928. copyIndex = 0;
  2929. }
  2930. gHead2[i].transform.position =
  2931. new Vector3(Head2[i].position.x,
  2932. (Head2[i].position.y * 1.2f + Head3[i].position.y * 0.8f) / 2f,
  2933. Head2[i].position.z);
  2934. gHead2[i].transform.eulerAngles =
  2935. new Vector3(Head2[i].transform.eulerAngles.x,
  2936. Head2[i].transform.eulerAngles.y,
  2937. Head2[i].transform.eulerAngles.z + 90f);
  2938. mHead2[i].no = i;
  2939. mHead2[i].maid = maid;
  2940. mHead2[i].ido = 1;
  2941. gMaid2[i].transform.position =
  2942. new Vector3((Pelvis2[i].position.x + Spine0a2[i].position.x) / 2f,
  2943. (Spine12[i].position.y + Spine0a2[i].position.y) / 2f,
  2944. (Spine0a2[i].position.z + Pelvis2[i].position.z) / 2f);
  2945. gMaid2[i].transform.eulerAngles =
  2946. new Vector3(Spine0a2[i].transform.eulerAngles.x,
  2947. Spine0a2[i].transform.eulerAngles.y,
  2948. Spine0a2[i].transform.eulerAngles.z + 90f);
  2949. mMaid2[i].no = i;
  2950. mMaid2[i].maid = maid;
  2951. mMaid2[i].ido = 2;
  2952. gArmL[i].SetActive(false);
  2953. gFootL[i].SetActive(false);
  2954. gHizaL[i].SetActive(false);
  2955. gHandR[i].SetActive(false);
  2956. gArmR[i].SetActive(false);
  2957. gFootR[i].SetActive(false);
  2958. gHizaR[i].SetActive(false);
  2959. gClavicleL[i].SetActive(false);
  2960. gClavicleR[i].SetActive(false);
  2961. gNeck[i].SetActive(false);
  2962. gSpine[i].SetActive(false);
  2963. gSpine0a[i].SetActive(false);
  2964. gSpine1a[i].SetActive(false);
  2965. gSpine1[i].SetActive(false);
  2966. gPelvis[i].SetActive(false);
  2967. }
  2968. else if (ikMode[i] == 8)
  2969. {
  2970. if (ikModeOld[i] == 15 && gIKHandL[i])
  2971. {
  2972. mIKHandL[i].ido = 1;
  2973. mIKHandL[i].reset = true;
  2974. mIKHandR[i].ido = 1;
  2975. mIKHandR[i].reset = true;
  2976. }
  2977. else if (ikModeOld[i] == 3 && gHead[i])
  2978. {
  2979. mHead[i].ido = 7;
  2980. mHead[i].reset = true;
  2981. }
  2982. else
  2983. {
  2984. if (!gIKHandL[i])
  2985. {
  2986. SetIKInit5(i);
  2987. }
  2988. gIKHandL[i].transform.position = IKHandL[i].position;
  2989. gIKHandL[i].transform.eulerAngles = IKHandL[i].eulerAngles;
  2990. mIKHandL[i].maid = maid;
  2991. mIKHandL[i].HandL = IKHandL[i];
  2992. mIKHandL[i].ido = 1;
  2993. gIKHandR[i].transform.position = IKHandR[i].position;
  2994. gIKHandR[i].transform.eulerAngles = IKHandR[i].eulerAngles;
  2995. mIKHandR[i].maid = maid;
  2996. mIKHandR[i].HandL = IKHandR[i];
  2997. mIKHandR[i].ido = 1;
  2998. if (!gIKMuneL[i])
  2999. {
  3000. SetIKInit7(i);
  3001. }
  3002. if (!gHead[i])
  3003. {
  3004. SetIKInit4(i);
  3005. }
  3006. mIKMuneL[i].maid = maid;
  3007. mIKMuneL[i].HandL = IKMuneLSub[i];
  3008. mIKMuneL[i].UpperArmL = IKMuneL[i];
  3009. mIKMuneL[i].ForearmL = IKMuneL[i];
  3010. gIKMuneL[i].transform.position = (IKMuneL[i].position + IKMuneLSub[i].position) / 2f;
  3011. mIKMuneR[i].maid = maid;
  3012. mIKMuneR[i].HandL = IKMuneRSub[i];
  3013. mIKMuneR[i].UpperArmL = IKMuneR[i];
  3014. mIKMuneR[i].ForearmL = IKMuneR[i];
  3015. gIKMuneR[i].transform.position = (IKMuneR[i].position + IKMuneRSub[i].position) / 2f;
  3016. gHead[i].transform.position =
  3017. new Vector3(Head2[i].position.x,
  3018. (Head2[i].position.y * 1.2f + Head3[i].position.y * 0.8f) / 2f,
  3019. Head2[i].position.z);
  3020. gHead[i].transform.eulerAngles =
  3021. new Vector3(Head2[i].transform.eulerAngles.x,
  3022. Head2[i].transform.eulerAngles.y,
  3023. Head2[i].transform.eulerAngles.z + 90f);
  3024. mHead[i].head = Head1[i];
  3025. mHead[i].maid = maid;
  3026. mHead[i].ido = 7;
  3027. mHead[i].shodaiFlg = shodaiFlg[(int)selectList[i]];
  3028. gHead[i].SetActive(true);
  3029. if (mHead[i].isClick)
  3030. {
  3031. mHead[i].isClick = false;
  3032. mHead[i].isClick2 = false;
  3033. maid.body0.quaDefEyeL.eulerAngles = eyeL[(int)selectList[i]];
  3034. maid.body0.quaDefEyeR.eulerAngles = eyeR[(int)selectList[i]];
  3035. }
  3036. if (mIKMuneL[i].isMouseUp && mIKMuneL[i].isMouseDrag)
  3037. {
  3038. IKMuneLSub[i].localEulerAngles = mIKMuneL[i].HandLangles;
  3039. IKMuneL[i].localEulerAngles = mIKMuneL[i].UpperArmLangles;
  3040. vIKMuneLSub[i] = new Vector3(IKMuneLSub[i].localEulerAngles.x,
  3041. IKMuneLSub[i].localEulerAngles.y,
  3042. IKMuneLSub[i].localEulerAngles.z);
  3043. vIKMuneL[i] = new Vector3(IKMuneL[i].localEulerAngles.x,
  3044. IKMuneL[i].localEulerAngles.y,
  3045. IKMuneL[i].localEulerAngles.z);
  3046. muneIKL[i] = true;
  3047. isStop[i] = true;
  3048. isLock[i] = true;
  3049. mIKMuneL[i].isMouseDrag = false;
  3050. }
  3051. if (mIKMuneL[i].isMouseDown)
  3052. {
  3053. maid.body0.MuneYureL(0f);
  3054. maid.body0.MuneYureR(0f);
  3055. maid.body0.jbMuneL.enabled = false;
  3056. maid.body0.jbMuneR.enabled = false;
  3057. muneIKL[i] = false;
  3058. mIKMuneL[i].isMouseUp = false;
  3059. }
  3060. if (mIKMuneR[i].isMouseUp && mIKMuneR[i].isMouseDrag)
  3061. {
  3062. IKMuneRSub[i].localEulerAngles = mIKMuneR[i].HandLangles;
  3063. IKMuneR[i].localEulerAngles = mIKMuneR[i].UpperArmLangles;
  3064. vIKMuneRSub[i] = new Vector3(IKMuneRSub[i].localEulerAngles.x,
  3065. IKMuneRSub[i].localEulerAngles.y,
  3066. IKMuneRSub[i].localEulerAngles.z);
  3067. vIKMuneR[i] = new Vector3(IKMuneR[i].localEulerAngles.x,
  3068. IKMuneR[i].localEulerAngles.y,
  3069. IKMuneR[i].localEulerAngles.z);
  3070. muneIKR[i] = true;
  3071. isStop[i] = true;
  3072. isLock[i] = true;
  3073. mIKMuneR[i].isMouseDrag = false;
  3074. }
  3075. if (mIKMuneR[i].isMouseDown)
  3076. {
  3077. maid.body0.MuneYureL(0f);
  3078. maid.body0.MuneYureR(0f);
  3079. maid.body0.jbMuneL.enabled = false;
  3080. maid.body0.jbMuneR.enabled = false;
  3081. muneIKR[i] = false;
  3082. mIKMuneL[i].isMouseUp = false;
  3083. }
  3084. if (mHead[i].isStop)
  3085. {
  3086. isStop[i] = true;
  3087. isLock[i] = true;
  3088. mHead[i].isStop = false;
  3089. }
  3090. gJotai[i].SetActive(false);
  3091. gKahuku[i].SetActive(false);
  3092. gHandL[i].SetActive(false);
  3093. gArmL[i].SetActive(false);
  3094. gFootL[i].SetActive(false);
  3095. gHizaL[i].SetActive(false);
  3096. gHandR[i].SetActive(false);
  3097. gArmR[i].SetActive(false);
  3098. gFootR[i].SetActive(false);
  3099. gHizaR[i].SetActive(false);
  3100. gClavicleL[i].SetActive(false);
  3101. gClavicleR[i].SetActive(false);
  3102. gNeck[i].SetActive(false);
  3103. gSpine[i].SetActive(false);
  3104. gSpine0a[i].SetActive(false);
  3105. gSpine1a[i].SetActive(false);
  3106. gSpine1[i].SetActive(false);
  3107. gPelvis[i].SetActive(false);
  3108. }
  3109. }
  3110. else if (ikMode[i] == 15)
  3111. {
  3112. if (ikModeOld[i] == 8 && gIKHandL[i])
  3113. {
  3114. mIKHandL[i].ido = 2;
  3115. mIKHandL[i].reset = true;
  3116. mIKHandR[i].ido = 2;
  3117. mIKHandR[i].reset = true;
  3118. }
  3119. else
  3120. {
  3121. if (!gIKHandL[i])
  3122. {
  3123. SetIKInit5(i);
  3124. }
  3125. gIKHandL[i].transform.position = IKHandL[i].position;
  3126. gIKHandL[i].transform.eulerAngles = IKHandL[i].eulerAngles;
  3127. mIKHandL[i].maid = maid;
  3128. mIKHandL[i].HandL = IKHandL[i];
  3129. mIKHandL[i].ido = 2;
  3130. gIKHandR[i].transform.position = IKHandR[i].position;
  3131. gIKHandR[i].transform.eulerAngles = IKHandR[i].eulerAngles;
  3132. mIKHandR[i].maid = maid;
  3133. mIKHandR[i].HandL = IKHandR[i];
  3134. mIKHandR[i].ido = 2;
  3135. Destroy(gHead[i]);
  3136. Destroy(gJotai[i]);
  3137. Destroy(gKahuku[i]);
  3138. gHandL[i].SetActive(false);
  3139. gArmL[i].SetActive(false);
  3140. gFootL[i].SetActive(false);
  3141. gHizaL[i].SetActive(false);
  3142. gHandR[i].SetActive(false);
  3143. gArmR[i].SetActive(false);
  3144. gFootR[i].SetActive(false);
  3145. gHizaR[i].SetActive(false);
  3146. gClavicleL[i].SetActive(false);
  3147. gClavicleR[i].SetActive(false);
  3148. gNeck[i].SetActive(false);
  3149. gSpine[i].SetActive(false);
  3150. gSpine0a[i].SetActive(false);
  3151. gSpine1a[i].SetActive(false);
  3152. gSpine1[i].SetActive(false);
  3153. gPelvis[i].SetActive(false);
  3154. }
  3155. }
  3156. else if (ikMode[i] == 1)
  3157. {
  3158. mHandL[i].ido = 10;
  3159. mHandR[i].ido = 10;
  3160. mFootL[i].ido = 10;
  3161. mFootR[i].ido = 10;
  3162. if (ikModeOld[i] == 0 && gNeck[i])
  3163. {
  3164. if (isBone[i])
  3165. {
  3166. mNeck[i].ido = 4;
  3167. mNeck[i].reset = true;
  3168. mSpine[i].ido = 4;
  3169. mSpine[i].reset = true;
  3170. mSpine0a[i].ido = 4;
  3171. mSpine0a[i].reset = true;
  3172. mSpine1a[i].ido = 4;
  3173. mSpine1a[i].reset = true;
  3174. mSpine1[i].ido = 4;
  3175. mSpine1[i].reset = true;
  3176. mPelvis[i].ido = 4;
  3177. mPelvis[i].reset = true;
  3178. mHizaL[i].ido = 5;
  3179. mHizaL[i].reset = true;
  3180. mHizaR[i].ido = 5;
  3181. mHizaR[i].reset = true;
  3182. }
  3183. }
  3184. else
  3185. {
  3186. gArmL[i].SetActive(false);
  3187. gArmR[i].SetActive(false);
  3188. if (!isBone[i])
  3189. {
  3190. gHizaL[i].SetActive(false);
  3191. gHizaR[i].SetActive(false);
  3192. }
  3193. gClavicleL[i].SetActive(false);
  3194. gClavicleR[i].SetActive(false);
  3195. if (isBone[i])
  3196. {
  3197. mNeck[i].maid = maid;
  3198. mNeck[i].head = Neck[i];
  3199. mNeck[i].no = i;
  3200. mNeck[i].ido = 4;
  3201. gNeck[i].transform.position = Neck[i].position;
  3202. gNeck[i].transform.localEulerAngles = Neck[i].localEulerAngles;
  3203. if (mNeck[i].isHead)
  3204. {
  3205. mNeck[i].isHead = false;
  3206. isLookn[i] = isLook[i];
  3207. isLook[i] = !isLook[i];
  3208. }
  3209. mSpine[i].maid = maid;
  3210. mSpine[i].head = Spine2[i];
  3211. mSpine[i].no = i;
  3212. mSpine[i].ido = 4;
  3213. gSpine[i].transform.position = Spine2[i].position;
  3214. gSpine[i].transform.localEulerAngles = Spine2[i].localEulerAngles;
  3215. mSpine0a[i].maid = maid;
  3216. mSpine0a[i].head = Spine0a2[i];
  3217. mSpine0a[i].no = i;
  3218. mSpine0a[i].ido = 4;
  3219. gSpine0a[i].transform.position = Spine0a2[i].position;
  3220. gSpine0a[i].transform.localEulerAngles = Spine0a2[i].localEulerAngles;
  3221. mSpine1a[i].maid = maid;
  3222. mSpine1a[i].head = Spine1a2[i];
  3223. mSpine1a[i].no = i;
  3224. mSpine1a[i].ido = 4;
  3225. gSpine1a[i].transform.position = Spine1a2[i].position;
  3226. gSpine1a[i].transform.localEulerAngles = Spine1a2[i].localEulerAngles;
  3227. mSpine1[i].maid = maid;
  3228. mSpine1[i].head = Spine12[i];
  3229. mSpine1[i].no = i;
  3230. mSpine1[i].ido = 4;
  3231. gSpine1[i].transform.position = Spine12[i].position;
  3232. gSpine1[i].transform.localEulerAngles = Spine12[i].localEulerAngles;
  3233. mPelvis[i].maid = maid;
  3234. mPelvis[i].head = Pelvis2[i];
  3235. mPelvis[i].no = i;
  3236. mPelvis[i].ido = 8;
  3237. gPelvis[i].transform.position = Pelvis2[i].position;
  3238. gPelvis[i].transform.localEulerAngles = Pelvis2[i].localEulerAngles;
  3239. mHizaL[i].ido = 5;
  3240. mHizaR[i].ido = 5;
  3241. }
  3242. }
  3243. }
  3244. else if (ikMode[i] == 2)
  3245. {
  3246. if (ikModeOld[i] == 0 && gPelvis[i])
  3247. {
  3248. mPelvis[i].ido = 9;
  3249. mPelvis[i].reset = true;
  3250. }
  3251. else
  3252. {
  3253. gArmL[i].SetActive(false);
  3254. gHizaL[i].SetActive(false);
  3255. gArmR[i].SetActive(false);
  3256. gHizaR[i].SetActive(false);
  3257. gClavicleL[i].SetActive(false);
  3258. gClavicleR[i].SetActive(false);
  3259. gNeck[i].SetActive(false);
  3260. gSpine[i].SetActive(false);
  3261. gSpine0a[i].SetActive(false);
  3262. gSpine1a[i].SetActive(false);
  3263. gSpine1[i].SetActive(false);
  3264. mPelvis[i].maid = maid;
  3265. mPelvis[i].head = Pelvis2[i];
  3266. mPelvis[i].no = i;
  3267. mPelvis[i].ido = 9;
  3268. gPelvis[i].transform.position = Pelvis2[i].position;
  3269. gPelvis[i].transform.localEulerAngles = Pelvis2[i].localEulerAngles;
  3270. }
  3271. }
  3272. else if (ikMode[i] == 3)
  3273. {
  3274. if ((ikModeOld[i] == 5 || ikModeOld[i] == 8) && gHead[i])
  3275. {
  3276. mHead[i].ido = 1;
  3277. mHead[i].reset = true;
  3278. mJotai[i].ido = 2;
  3279. mJotai[i].reset = true;
  3280. mKahuku[i].ido = 3;
  3281. mKahuku[i].reset = true;
  3282. mHandL[i].ido = 1;
  3283. mHandR[i].ido = 1;
  3284. mFootL[i].ido = 3;
  3285. mFootR[i].ido = 3;
  3286. mHizaL[i].ido = 5;
  3287. mHizaR[i].ido = 5;
  3288. mHandL[i].reset = true;
  3289. mHandR[i].reset = true;
  3290. mFootL[i].reset = true;
  3291. mFootR[i].reset = true;
  3292. mHizaL[i].reset = true;
  3293. mHizaR[i].reset = true;
  3294. }
  3295. else if (ikModeOld[i] == 0)
  3296. {
  3297. mHandL[i].ido = 1;
  3298. mHandR[i].ido = 1;
  3299. mFootL[i].ido = 3;
  3300. mFootR[i].ido = 3;
  3301. mHizaL[i].ido = 5;
  3302. mHizaR[i].ido = 5;
  3303. mHandL[i].reset = true;
  3304. mHandR[i].reset = true;
  3305. mFootL[i].reset = true;
  3306. mFootR[i].reset = true;
  3307. mHizaL[i].reset = true;
  3308. mHizaR[i].reset = true;
  3309. }
  3310. else
  3311. {
  3312. if (!gHead[i])
  3313. {
  3314. SetIKInit4(i);
  3315. }
  3316. if (mHead[i].isHead)
  3317. {
  3318. mHead[i].isHead = false;
  3319. isLookn[i] = isLook[i];
  3320. isLook[i] = !isLook[i];
  3321. }
  3322. gHead[i].transform.position =
  3323. new Vector3(Head2[i].position.x,
  3324. (Head2[i].position.y * 1.2f + Head3[i].position.y * 0.8f) / 2f,
  3325. Head2[i].position.z);
  3326. gHead[i].transform.eulerAngles =
  3327. new Vector3(Head2[i].transform.eulerAngles.x,
  3328. Head2[i].transform.eulerAngles.y,
  3329. Head2[i].transform.eulerAngles.z + 90f);
  3330. mHead[i].head = Head1[i];
  3331. mHead[i].maid = maid;
  3332. mHead[i].no = i;
  3333. mHead[i].ido = 1;
  3334. Transform spine0a = CMT.SearchObjName(maid.body0.m_Bones.transform, "Bip01 Spine0a", true);
  3335. Transform transform3 =
  3336. CMT.SearchObjName(maid.body0.m_Bones.transform, "Bip01 Spine1", true);
  3337. Transform transform4 =
  3338. CMT.SearchObjName(maid.body0.m_Bones.transform, "Bip01 Spine1a", true);
  3339. Transform transform5 = CMT.SearchObjName(maid.body0.m_Bones.transform, "Bip01 Spine", true);
  3340. Transform transform6 =
  3341. CMT.SearchObjName(maid.body0.m_Bones.transform, "Bip01 Pelvis", true);
  3342. gJotai[i].transform.position =
  3343. new Vector3(transform3.position.x,
  3344. (transform3.position.y * 0f + transform4.position.y * 2f) / 2f,
  3345. transform3.position.z);
  3346. gJotai[i].transform.eulerAngles =
  3347. new Vector3(transform3.transform.eulerAngles.x,
  3348. transform3.transform.eulerAngles.y,
  3349. transform3.transform.eulerAngles.z + 90f);
  3350. mJotai[i].Spine0a = spine0a;
  3351. mJotai[i].Spine1 = transform3;
  3352. mJotai[i].Spine1a = transform4;
  3353. mJotai[i].Spine = transform5;
  3354. mJotai[i].maid = maid;
  3355. mJotai[i].ido = 2;
  3356. gKahuku[i].transform.position =
  3357. new Vector3(transform6.position.x,
  3358. (transform6.position.y + transform5.position.y) / 2f,
  3359. transform6.position.z);
  3360. gKahuku[i].transform.eulerAngles =
  3361. new Vector3(transform6.transform.eulerAngles.x + 90f,
  3362. transform6.transform.eulerAngles.y + 90f,
  3363. transform6.transform.eulerAngles.z);
  3364. mKahuku[i].Pelvis = transform6;
  3365. mKahuku[i].maid = maid;
  3366. mKahuku[i].ido = 3;
  3367. mHandL[i].ido = 1;
  3368. mHandR[i].ido = 1;
  3369. mFootL[i].ido = 3;
  3370. mFootR[i].ido = 3;
  3371. mHizaL[i].ido = 5;
  3372. mHizaR[i].ido = 5;
  3373. gJotai[i].SetActive(true);
  3374. gKahuku[i].SetActive(true);
  3375. gHandL[i].SetActive(true);
  3376. gArmL[i].SetActive(false);
  3377. gFootL[i].SetActive(true);
  3378. gHizaL[i].SetActive(true);
  3379. gHandR[i].SetActive(true);
  3380. gArmR[i].SetActive(false);
  3381. gFootR[i].SetActive(true);
  3382. gHizaR[i].SetActive(true);
  3383. Destroy(gIKHandL[i]);
  3384. Destroy(gIKHandR[i]);
  3385. Destroy(gIKMuneL[i]);
  3386. Destroy(gIKMuneR[i]);
  3387. if (isBone[i])
  3388. {
  3389. gHizaL[i].SetActive(false);
  3390. gHizaR[i].SetActive(false);
  3391. gHead[i].SetActive(false);
  3392. gJotai[i].SetActive(false);
  3393. gKahuku[i].SetActive(false);
  3394. }
  3395. else
  3396. {
  3397. gHizaL[i].SetActive(true);
  3398. gHizaR[i].SetActive(true);
  3399. gHead[i].SetActive(true);
  3400. gJotai[i].SetActive(true);
  3401. gKahuku[i].SetActive(true);
  3402. }
  3403. gClavicleL[i].SetActive(false);
  3404. gClavicleR[i].SetActive(false);
  3405. gNeck[i].SetActive(false);
  3406. gSpine[i].SetActive(false);
  3407. gSpine0a[i].SetActive(false);
  3408. gSpine1a[i].SetActive(false);
  3409. gSpine1[i].SetActive(false);
  3410. gPelvis[i].SetActive(false);
  3411. if (mHead[i].isStop)
  3412. {
  3413. isStop[i] = true;
  3414. isLock[i] = true;
  3415. mHead[i].isStop = false;
  3416. }
  3417. if (mJotai[i].isStop)
  3418. {
  3419. isStop[i] = true;
  3420. isLock[i] = true;
  3421. mJotai[i].isStop = false;
  3422. }
  3423. if (mKahuku[i].isStop)
  3424. {
  3425. isStop[i] = true;
  3426. isLock[i] = true;
  3427. mKahuku[i].isStop = false;
  3428. }
  3429. if (mKahuku[i].isSelect)
  3430. {
  3431. mKahuku[i].isSelect = false;
  3432. if (ikMaid != i)
  3433. {
  3434. ikMaid = i;
  3435. ikBui = 5;
  3436. SetIK(maid, i);
  3437. }
  3438. }
  3439. if (mJotai[i].isSelect)
  3440. {
  3441. mJotai[i].isSelect = false;
  3442. if (ikMaid != i)
  3443. {
  3444. ikMaid = i;
  3445. ikBui = 5;
  3446. SetIK(maid, i);
  3447. }
  3448. }
  3449. if (mKahuku[i].isSelect)
  3450. {
  3451. mKahuku[i].isSelect = false;
  3452. if (ikMaid != i)
  3453. {
  3454. ikMaid = i;
  3455. ikBui = 5;
  3456. SetIK(maid, i);
  3457. }
  3458. }
  3459. }
  3460. }
  3461. else if (ikMode[i] == 5)
  3462. {
  3463. if (ikModeOld[i] == 3 && gHead[i])
  3464. {
  3465. mHead[i].ido = 4;
  3466. mHead[i].reset = true;
  3467. mJotai[i].ido = 5;
  3468. mJotai[i].reset = true;
  3469. mKahuku[i].ido = 6;
  3470. mKahuku[i].reset = true;
  3471. mHandL[i].ido = 2;
  3472. mHandR[i].ido = 2;
  3473. mFootL[i].ido = 4;
  3474. mFootR[i].ido = 4;
  3475. mHizaL[i].ido = 5;
  3476. mHizaR[i].ido = 5;
  3477. mHandL[i].reset = true;
  3478. mHandR[i].reset = true;
  3479. mFootL[i].reset = true;
  3480. mFootR[i].reset = true;
  3481. mHizaL[i].reset = true;
  3482. mHizaR[i].reset = true;
  3483. }
  3484. else if (ikModeOld[i] == 0)
  3485. {
  3486. mHandL[i].ido = 2;
  3487. mHandR[i].ido = 2;
  3488. mFootL[i].ido = 4;
  3489. mFootR[i].ido = 4;
  3490. mHizaL[i].ido = 5;
  3491. mHizaR[i].ido = 5;
  3492. mHandL[i].reset = true;
  3493. mHandR[i].reset = true;
  3494. mFootL[i].reset = true;
  3495. mFootR[i].reset = true;
  3496. mHizaL[i].reset = true;
  3497. mHizaR[i].reset = true;
  3498. }
  3499. else
  3500. {
  3501. if (!gHead[i])
  3502. {
  3503. SetIKInit4(i);
  3504. }
  3505. if (mHead[i].isHead)
  3506. {
  3507. mHead[i].isHead = false;
  3508. isLookn[i] = isLook[i];
  3509. isLook[i] = !isLook[i];
  3510. }
  3511. gHead[i].transform.position =
  3512. new Vector3(Head2[i].position.x,
  3513. (Head2[i].position.y * 1.2f + Head3[i].position.y * 0.8f) / 2f,
  3514. Head2[i].position.z);
  3515. gHead[i].transform.eulerAngles =
  3516. new Vector3(Head2[i].transform.eulerAngles.x,
  3517. Head2[i].transform.eulerAngles.y,
  3518. Head2[i].transform.eulerAngles.z + 90f);
  3519. mHead[i].head = Head1[i];
  3520. mHead[i].maid = maid;
  3521. mHead[i].ido = 4;
  3522. Transform spine0a = CMT.SearchObjName(maid.body0.m_Bones.transform, "Bip01 Spine0a", true);
  3523. Transform transform3 =
  3524. CMT.SearchObjName(maid.body0.m_Bones.transform, "Bip01 Spine1", true);
  3525. Transform transform4 =
  3526. CMT.SearchObjName(maid.body0.m_Bones.transform, "Bip01 Spine1a", true);
  3527. Transform transform5 = CMT.SearchObjName(maid.body0.m_Bones.transform, "Bip01 Spine", true);
  3528. Transform transform6 =
  3529. CMT.SearchObjName(maid.body0.m_Bones.transform, "Bip01 Pelvis", true);
  3530. gJotai[i].transform.position =
  3531. new Vector3(transform3.position.x,
  3532. (transform3.position.y * 0f + transform4.position.y * 2f) / 2f,
  3533. transform3.position.z);
  3534. gJotai[i].transform.eulerAngles =
  3535. new Vector3(transform3.transform.eulerAngles.x,
  3536. transform3.transform.eulerAngles.y,
  3537. transform3.transform.eulerAngles.z + 90f);
  3538. mJotai[i].Spine0a = spine0a;
  3539. mJotai[i].Spine1 = transform3;
  3540. mJotai[i].Spine1a = transform4;
  3541. mJotai[i].Spine = transform5;
  3542. mJotai[i].maid = maid;
  3543. mJotai[i].ido = 5;
  3544. gKahuku[i].transform.position =
  3545. new Vector3(transform6.position.x,
  3546. (transform6.position.y + transform5.position.y) / 2f,
  3547. transform6.position.z);
  3548. gKahuku[i].transform.eulerAngles =
  3549. new Vector3(transform6.transform.eulerAngles.x + 90f,
  3550. transform6.transform.eulerAngles.y + 90f,
  3551. transform6.transform.eulerAngles.z);
  3552. mKahuku[i].Pelvis = transform6;
  3553. mKahuku[i].maid = maid;
  3554. mKahuku[i].ido = 6;
  3555. mHandL[i].ido = 2;
  3556. mHandR[i].ido = 2;
  3557. mFootL[i].ido = 4;
  3558. mFootR[i].ido = 4;
  3559. mHizaL[i].ido = 5;
  3560. mHizaR[i].ido = 5;
  3561. gArmL[i].SetActive(false);
  3562. gArmR[i].SetActive(false);
  3563. gClavicleL[i].SetActive(false);
  3564. gClavicleR[i].SetActive(false);
  3565. gNeck[i].SetActive(false);
  3566. gSpine[i].SetActive(false);
  3567. gSpine0a[i].SetActive(false);
  3568. gSpine1a[i].SetActive(false);
  3569. gSpine1[i].SetActive(false);
  3570. gPelvis[i].SetActive(false);
  3571. if (isBone[i])
  3572. {
  3573. gHizaL[i].SetActive(false);
  3574. gHizaR[i].SetActive(false);
  3575. gHead[i].SetActive(false);
  3576. gJotai[i].SetActive(false);
  3577. gKahuku[i].SetActive(false);
  3578. }
  3579. else
  3580. {
  3581. gHizaL[i].SetActive(true);
  3582. gHizaR[i].SetActive(true);
  3583. gHead[i].SetActive(true);
  3584. gJotai[i].SetActive(true);
  3585. gKahuku[i].SetActive(true);
  3586. }
  3587. if (mHead[i].isStop)
  3588. {
  3589. isStop[i] = true;
  3590. isLock[i] = true;
  3591. mHead[i].isStop = false;
  3592. }
  3593. if (mJotai[i].isStop)
  3594. {
  3595. isStop[i] = true;
  3596. isLock[i] = true;
  3597. mJotai[i].isStop = false;
  3598. }
  3599. if (mKahuku[i].isStop)
  3600. {
  3601. isStop[i] = true;
  3602. isLock[i] = true;
  3603. mKahuku[i].isStop = false;
  3604. }
  3605. if (mHead[i].isSelect)
  3606. {
  3607. mHead[i].isSelect = false;
  3608. if (ikMaid != i)
  3609. {
  3610. ikMaid = i;
  3611. ikBui = 5;
  3612. SetIK(maid, i);
  3613. }
  3614. }
  3615. if (mJotai[i].isSelect)
  3616. {
  3617. mJotai[i].isSelect = false;
  3618. if (ikMaid != i)
  3619. {
  3620. ikMaid = i;
  3621. ikBui = 5;
  3622. SetIK(maid, i);
  3623. }
  3624. }
  3625. if (mKahuku[i].isSelect)
  3626. {
  3627. mKahuku[i].isSelect = false;
  3628. if (ikMaid != i)
  3629. {
  3630. ikMaid = i;
  3631. ikBui = 5;
  3632. SetIK(maid, i);
  3633. }
  3634. }
  3635. }
  3636. }
  3637. else if (ikMode[i] == 13)
  3638. {
  3639. if ((ikModeOld[i] == 0 || ikModeOld[i] >= 9) && ikModeOld[i] != 13 && gMaid[i])
  3640. {
  3641. mMaid[i].ido = 5;
  3642. mMaid[i].reset = true;
  3643. mMaidC[i].ido = 5;
  3644. mMaidC[i].reset = true;
  3645. gMaidC[i].GetComponent<Renderer>().material.color = new Color(0.7f, 0.7f, 0.3f);
  3646. }
  3647. else
  3648. {
  3649. if (!gMaid[i])
  3650. {
  3651. SetIKInit3(i);
  3652. }
  3653. gMaid[i].transform.position =
  3654. new Vector3((Pelvis2[i].position.x + Spine0a2[i].position.x) / 2f,
  3655. (Spine12[i].position.y + Spine0a2[i].position.y) / 2f,
  3656. (Spine0a2[i].position.z + Pelvis2[i].position.z) / 2f);
  3657. gMaid[i].transform.eulerAngles =
  3658. new Vector3(Spine0a2[i].transform.eulerAngles.x,
  3659. Spine0a2[i].transform.eulerAngles.y,
  3660. Spine0a2[i].transform.eulerAngles.z + 90f);
  3661. mMaid[i].maid = maid;
  3662. mMaid[i].ido = 5;
  3663. gMaidC[i].transform.position = maid.transform.position;
  3664. gMaidC[i].transform.eulerAngles = maid.transform.eulerAngles;
  3665. mMaidC[i].maid = maid;
  3666. mMaidC[i].ido = 5;
  3667. if (isCube)
  3668. {
  3669. gMaidC[i].GetComponent<Renderer>().material.color = new Color(0.7f, 0.7f, 0.3f);
  3670. gMaidC[i].SetActive(true);
  3671. }
  3672. else
  3673. {
  3674. gMaidC[i].SetActive(false);
  3675. }
  3676. gHandL[i].SetActive(false);
  3677. gArmL[i].SetActive(false);
  3678. gFootL[i].SetActive(false);
  3679. gHizaL[i].SetActive(false);
  3680. gHandR[i].SetActive(false);
  3681. gArmR[i].SetActive(false);
  3682. gFootR[i].SetActive(false);
  3683. gHizaR[i].SetActive(false);
  3684. gClavicleL[i].SetActive(false);
  3685. gClavicleR[i].SetActive(false);
  3686. gNeck[i].SetActive(false);
  3687. gSpine[i].SetActive(false);
  3688. gSpine0a[i].SetActive(false);
  3689. gSpine1a[i].SetActive(false);
  3690. gSpine1[i].SetActive(false);
  3691. gPelvis[i].SetActive(false);
  3692. }
  3693. if (mMaid[i].isSelect)
  3694. {
  3695. mMaid[i].isSelect = false;
  3696. if (ikMaid != i)
  3697. {
  3698. ikMaid = i;
  3699. ikBui = 5;
  3700. SetIK(maid, i);
  3701. }
  3702. }
  3703. }
  3704. else if (ikMode[i] == 11)
  3705. {
  3706. if ((ikModeOld[i] == 0 || ikModeOld[i] >= 9) && ikModeOld[i] != 11 && gMaid[i])
  3707. {
  3708. mMaid[i].ido = 3;
  3709. mMaid[i].reset = true;
  3710. mMaidC[i].ido = 3;
  3711. mMaidC[i].reset = true;
  3712. gMaidC[i].GetComponent<Renderer>().material.color = new Color(0.4f, 0.4f, 1f, 0.5f);
  3713. }
  3714. else
  3715. {
  3716. if (!gMaid[i])
  3717. {
  3718. SetIKInit3(i);
  3719. }
  3720. gMaid[i].transform.position =
  3721. new Vector3((Pelvis2[i].position.x + Spine0a2[i].position.x) / 2f,
  3722. (Spine12[i].position.y + Spine0a2[i].position.y) / 2f,
  3723. (Spine0a2[i].position.z + Pelvis2[i].position.z) / 2f);
  3724. gMaid[i].transform.eulerAngles =
  3725. new Vector3(Spine0a2[i].transform.eulerAngles.x,
  3726. Spine0a2[i].transform.eulerAngles.y,
  3727. Spine0a2[i].transform.eulerAngles.z + 90f);
  3728. mMaid[i].maid = maid;
  3729. mMaid[i].ido = 3;
  3730. gMaidC[i].transform.position = maid.transform.position;
  3731. gMaidC[i].transform.eulerAngles = maid.transform.eulerAngles;
  3732. mMaidC[i].maid = maid;
  3733. mMaidC[i].ido = 3;
  3734. if (isCube)
  3735. {
  3736. gMaidC[i].GetComponent<Renderer>().material.color = new Color(0.4f, 0.4f, 1f, 0.5f);
  3737. gMaidC[i].SetActive(true);
  3738. }
  3739. else
  3740. {
  3741. gMaidC[i].SetActive(false);
  3742. }
  3743. gHandL[i].SetActive(false);
  3744. gArmL[i].SetActive(false);
  3745. gFootL[i].SetActive(false);
  3746. gHizaL[i].SetActive(false);
  3747. gHandR[i].SetActive(false);
  3748. gArmR[i].SetActive(false);
  3749. gFootR[i].SetActive(false);
  3750. gHizaR[i].SetActive(false);
  3751. gClavicleL[i].SetActive(false);
  3752. gClavicleR[i].SetActive(false);
  3753. gNeck[i].SetActive(false);
  3754. gSpine[i].SetActive(false);
  3755. gSpine0a[i].SetActive(false);
  3756. gSpine1a[i].SetActive(false);
  3757. gSpine1[i].SetActive(false);
  3758. gPelvis[i].SetActive(false);
  3759. }
  3760. if (mMaid[i].isSelect)
  3761. {
  3762. mMaid[i].isSelect = false;
  3763. if (ikMaid != i)
  3764. {
  3765. ikMaid = i;
  3766. ikBui = 5;
  3767. SetIK(maid, i);
  3768. }
  3769. }
  3770. }
  3771. else if (ikMode[i] == 12)
  3772. {
  3773. if ((ikModeOld[i] == 0 || ikModeOld[i] >= 9) && ikModeOld[i] != 12 && gMaid[i])
  3774. {
  3775. mMaid[i].ido = 2;
  3776. mMaid[i].reset = true;
  3777. mMaidC[i].ido = 2;
  3778. mMaidC[i].reset = true;
  3779. gMaidC[i].GetComponent<Renderer>().material.color = new Color(0.4f, 0.4f, 1f, 0.5f);
  3780. }
  3781. else
  3782. {
  3783. if (!gMaid[i])
  3784. {
  3785. SetIKInit3(i);
  3786. }
  3787. gMaid[i].transform.position =
  3788. new Vector3((Pelvis2[i].position.x + Spine0a2[i].position.x) / 2f,
  3789. (Spine12[i].position.y + Spine0a2[i].position.y) / 2f,
  3790. (Spine0a2[i].position.z + Pelvis2[i].position.z) / 2f);
  3791. gMaid[i].transform.eulerAngles =
  3792. new Vector3(Spine0a2[i].transform.eulerAngles.x,
  3793. Spine0a2[i].transform.eulerAngles.y,
  3794. Spine0a2[i].transform.eulerAngles.z + 90f);
  3795. mMaid[i].maid = maid;
  3796. mMaid[i].ido = 2;
  3797. gMaidC[i].transform.position = maid.transform.position;
  3798. gMaidC[i].transform.eulerAngles = maid.transform.eulerAngles;
  3799. mMaidC[i].maid = maid;
  3800. mMaidC[i].ido = 2;
  3801. if (isCube)
  3802. {
  3803. gMaidC[i].GetComponent<Renderer>().material.color = new Color(0.4f, 0.4f, 1f, 0.5f);
  3804. gMaidC[i].SetActive(true);
  3805. }
  3806. else
  3807. {
  3808. gMaidC[i].SetActive(false);
  3809. }
  3810. gHandL[i].SetActive(false);
  3811. gArmL[i].SetActive(false);
  3812. gFootL[i].SetActive(false);
  3813. gHizaL[i].SetActive(false);
  3814. gHandR[i].SetActive(false);
  3815. gArmR[i].SetActive(false);
  3816. gFootR[i].SetActive(false);
  3817. gHizaR[i].SetActive(false);
  3818. gClavicleL[i].SetActive(false);
  3819. gClavicleR[i].SetActive(false);
  3820. gNeck[i].SetActive(false);
  3821. gSpine[i].SetActive(false);
  3822. gSpine0a[i].SetActive(false);
  3823. gSpine1a[i].SetActive(false);
  3824. gSpine1[i].SetActive(false);
  3825. gPelvis[i].SetActive(false);
  3826. }
  3827. if (mMaid[i].isSelect)
  3828. {
  3829. mMaid[i].isSelect = false;
  3830. if (ikMaid != i)
  3831. {
  3832. ikMaid = i;
  3833. ikBui = 5;
  3834. SetIK(maid, i);
  3835. }
  3836. }
  3837. }
  3838. else if (ikMode[i] == 10)
  3839. {
  3840. if ((ikModeOld[i] == 0 || ikModeOld[i] >= 9) && ikModeOld[i] != 10 && gMaid[i])
  3841. {
  3842. mMaid[i].ido = 1;
  3843. mMaid[i].reset = true;
  3844. mMaidC[i].ido = 1;
  3845. mMaidC[i].reset = true;
  3846. gMaidC[i].GetComponent<Renderer>().material.color = new Color(0.4f, 0.4f, 1f, 0.5f);
  3847. }
  3848. else
  3849. {
  3850. if (!gMaid[i])
  3851. {
  3852. SetIKInit3(i);
  3853. }
  3854. gMaid[i].transform.position =
  3855. new Vector3((Pelvis2[i].position.x + Spine0a2[i].position.x) / 2f,
  3856. (Spine12[i].position.y + Spine0a2[i].position.y) / 2f,
  3857. (Spine0a2[i].position.z + Pelvis2[i].position.z) / 2f);
  3858. gMaid[i].transform.eulerAngles =
  3859. new Vector3(Spine0a2[i].transform.eulerAngles.x,
  3860. Spine0a2[i].transform.eulerAngles.y,
  3861. Spine0a2[i].transform.eulerAngles.z + 90f);
  3862. mMaid[i].maid = maid;
  3863. mMaid[i].ido = 1;
  3864. gMaidC[i].transform.position = maid.transform.position;
  3865. gMaidC[i].transform.eulerAngles = maid.transform.eulerAngles;
  3866. mMaidC[i].maid = maid;
  3867. mMaidC[i].ido = 1;
  3868. if (isCube)
  3869. {
  3870. gMaidC[i].GetComponent<Renderer>().material.color = new Color(0.4f, 0.4f, 1f, 0.5f);
  3871. gMaidC[i].SetActive(true);
  3872. }
  3873. else
  3874. {
  3875. gMaidC[i].SetActive(false);
  3876. }
  3877. gHandL[i].SetActive(false);
  3878. gArmL[i].SetActive(false);
  3879. gFootL[i].SetActive(false);
  3880. gHizaL[i].SetActive(false);
  3881. gHandR[i].SetActive(false);
  3882. gArmR[i].SetActive(false);
  3883. gFootR[i].SetActive(false);
  3884. gHizaR[i].SetActive(false);
  3885. gClavicleL[i].SetActive(false);
  3886. gClavicleR[i].SetActive(false);
  3887. gNeck[i].SetActive(false);
  3888. gSpine[i].SetActive(false);
  3889. gSpine0a[i].SetActive(false);
  3890. gSpine1a[i].SetActive(false);
  3891. gSpine1[i].SetActive(false);
  3892. gPelvis[i].SetActive(false);
  3893. }
  3894. if (mMaid[i].isSelect)
  3895. {
  3896. mMaid[i].isSelect = false;
  3897. if (ikMaid != i)
  3898. {
  3899. ikMaid = i;
  3900. ikBui = 5;
  3901. SetIK(maid, i);
  3902. }
  3903. }
  3904. }
  3905. else if (ikMode[i] == 9)
  3906. {
  3907. if ((ikModeOld[i] == 0 || ikModeOld[i] >= 9) && ikModeOld[i] != 9 && gMaid[i])
  3908. {
  3909. mMaid[i].ido = 4;
  3910. mMaid[i].reset = true;
  3911. mMaidC[i].ido = 4;
  3912. mMaidC[i].reset = true;
  3913. gMaidC[i].GetComponent<Renderer>().material.color = new Color(0.3f, 0.7f, 0.3f);
  3914. }
  3915. else
  3916. {
  3917. if (!gMaid[i])
  3918. {
  3919. SetIKInit3(i);
  3920. }
  3921. gMaid[i].transform.position =
  3922. new Vector3((Pelvis2[i].position.x + Spine0a2[i].position.x) / 2f,
  3923. (Spine12[i].position.y + Spine0a2[i].position.y) / 2f,
  3924. (Spine0a2[i].position.z + Pelvis2[i].position.z) / 2f);
  3925. gMaid[i].transform.eulerAngles =
  3926. new Vector3(Spine0a2[i].transform.eulerAngles.x,
  3927. Spine0a2[i].transform.eulerAngles.y,
  3928. Spine0a2[i].transform.eulerAngles.z + 90f);
  3929. mMaid[i].maid = maid;
  3930. mMaid[i].ido = 4;
  3931. gMaidC[i].transform.position = maid.transform.position;
  3932. gMaidC[i].transform.eulerAngles = maid.transform.eulerAngles;
  3933. mMaidC[i].maid = maid;
  3934. mMaidC[i].ido = 4;
  3935. if (isCube)
  3936. {
  3937. gMaidC[i].GetComponent<Renderer>().material.color = new Color(0.3f, 0.7f, 0.3f);
  3938. gMaidC[i].SetActive(true);
  3939. }
  3940. else
  3941. {
  3942. gMaidC[i].SetActive(false);
  3943. }
  3944. gHandL[i].SetActive(false);
  3945. gArmL[i].SetActive(false);
  3946. gFootL[i].SetActive(false);
  3947. gHizaL[i].SetActive(false);
  3948. gHandR[i].SetActive(false);
  3949. gArmR[i].SetActive(false);
  3950. gFootR[i].SetActive(false);
  3951. gHizaR[i].SetActive(false);
  3952. gClavicleL[i].SetActive(false);
  3953. gClavicleR[i].SetActive(false);
  3954. gNeck[i].SetActive(false);
  3955. gSpine[i].SetActive(false);
  3956. gSpine0a[i].SetActive(false);
  3957. gSpine1a[i].SetActive(false);
  3958. gSpine1[i].SetActive(false);
  3959. gPelvis[i].SetActive(false);
  3960. }
  3961. if (mMaid[i].isSelect)
  3962. {
  3963. mMaid[i].isSelect = false;
  3964. if (ikMaid != i)
  3965. {
  3966. ikMaid = i;
  3967. ikBui = 5;
  3968. SetIK(maid, i);
  3969. }
  3970. }
  3971. }
  3972. else if (ikMode[i] == 14)
  3973. {
  3974. if ((ikModeOld[i] == 0 || ikModeOld[i] >= 9) && ikModeOld[i] != 14 && gMaid[i])
  3975. {
  3976. mMaid[i].ido = 6;
  3977. mMaid[i].reset = true;
  3978. mMaidC[i].ido = 6;
  3979. mMaidC[i].reset = true;
  3980. gMaidC[i].GetComponent<Renderer>().material.color = new Color(0.3f, 0.7f, 0.3f);
  3981. }
  3982. else
  3983. {
  3984. if (!gMaid[i])
  3985. {
  3986. SetIKInit3(i);
  3987. }
  3988. gMaid[i].transform.position =
  3989. new Vector3((Pelvis2[i].position.x + Spine0a2[i].position.x) / 2f,
  3990. (Spine12[i].position.y + Spine0a2[i].position.y) / 2f,
  3991. (Spine0a2[i].position.z + Pelvis2[i].position.z) / 2f);
  3992. gMaid[i].transform.eulerAngles =
  3993. new Vector3(Spine0a2[i].transform.eulerAngles.x,
  3994. Spine0a2[i].transform.eulerAngles.y,
  3995. Spine0a2[i].transform.eulerAngles.z + 90f);
  3996. mMaid[i].maid = maid;
  3997. mMaid[i].ido = 6;
  3998. gMaidC[i].transform.position = maid.transform.position;
  3999. gMaidC[i].transform.eulerAngles = maid.transform.eulerAngles;
  4000. mMaidC[i].maid = maid;
  4001. mMaidC[i].ido = 6;
  4002. if (isCube)
  4003. {
  4004. gMaidC[i].GetComponent<Renderer>().material.color = new Color(0.3f, 0.7f, 0.3f);
  4005. gMaidC[i].SetActive(true);
  4006. }
  4007. else
  4008. {
  4009. gMaidC[i].SetActive(false);
  4010. }
  4011. gHandL[i].SetActive(false);
  4012. gArmL[i].SetActive(false);
  4013. gFootL[i].SetActive(false);
  4014. gHizaL[i].SetActive(false);
  4015. gHandR[i].SetActive(false);
  4016. gArmR[i].SetActive(false);
  4017. gFootR[i].SetActive(false);
  4018. gHizaR[i].SetActive(false);
  4019. gClavicleL[i].SetActive(false);
  4020. gClavicleR[i].SetActive(false);
  4021. gNeck[i].SetActive(false);
  4022. gSpine[i].SetActive(false);
  4023. gSpine0a[i].SetActive(false);
  4024. gSpine1a[i].SetActive(false);
  4025. gSpine1[i].SetActive(false);
  4026. gPelvis[i].SetActive(false);
  4027. }
  4028. if (mMaid[i].isSelect)
  4029. {
  4030. mMaid[i].isSelect = false;
  4031. if (ikMaid != i)
  4032. {
  4033. ikMaid = i;
  4034. ikBui = 5;
  4035. SetIK(maid, i);
  4036. }
  4037. }
  4038. }
  4039. else if (ikMode[i] == 6)
  4040. {
  4041. if (!gFinger[i, 0])
  4042. {
  4043. SetIKInit2(i);
  4044. }
  4045. Destroy(gMaid[i]);
  4046. Destroy(gMaidC[i]);
  4047. Destroy(gHead[i]);
  4048. Destroy(gJotai[i]);
  4049. Destroy(gKahuku[i]);
  4050. gHandL[i].SetActive(false);
  4051. gArmL[i].SetActive(false);
  4052. gFootL[i].SetActive(false);
  4053. gHizaL[i].SetActive(false);
  4054. gHandR[i].SetActive(false);
  4055. gArmR[i].SetActive(false);
  4056. gFootR[i].SetActive(false);
  4057. gHizaR[i].SetActive(false);
  4058. gClavicleL[i].SetActive(false);
  4059. gClavicleR[i].SetActive(false);
  4060. gNeck[i].SetActive(false);
  4061. gSpine[i].SetActive(false);
  4062. gSpine0a[i].SetActive(false);
  4063. gSpine1a[i].SetActive(false);
  4064. gSpine1[i].SetActive(false);
  4065. gPelvis[i].SetActive(false);
  4066. for (int j = 0; j < 10; j++)
  4067. {
  4068. mFinger[i, j * 3 + 2].maid = maid;
  4069. mFinger[i, j * 3 + 2].HandL = Finger[i, j * 4 + 3];
  4070. mFinger[i, j * 3 + 2].UpperArmL = Finger[i, j * 4 + 2];
  4071. mFinger[i, j * 3 + 2].ForearmL = Finger[i, j * 4 + 2];
  4072. mFinger[i, j * 3 + 2].ido = 12;
  4073. if (j == 0 || j == 5)
  4074. {
  4075. mFinger[i, j * 3 + 2].ido = 15;
  4076. }
  4077. mFinger[i, j * 3 + 1].maid = maid;
  4078. mFinger[i, j * 3 + 1].HandL = Finger[i, j * 4 + 2];
  4079. mFinger[i, j * 3 + 1].UpperArmL = Finger[i, j * 4 + 1];
  4080. mFinger[i, j * 3 + 1].ForearmL = Finger[i, j * 4 + 1];
  4081. mFinger[i, j * 3 + 1].ido = 11;
  4082. if (j == 0 || j == 5)
  4083. {
  4084. mFinger[i, j * 3 + 1].ido = 14;
  4085. }
  4086. mFinger[i, j * 3].maid = maid;
  4087. mFinger[i, j * 3].HandL = Finger[i, j * 4 + 1];
  4088. mFinger[i, j * 3].UpperArmL = Finger[i, j * 4];
  4089. mFinger[i, j * 3].ForearmL = Finger[i, j * 4];
  4090. mFinger[i, j * 3].ido = 13;
  4091. if (j == 0 || j == 5)
  4092. {
  4093. mFinger[i, j * 3].ido = 0;
  4094. }
  4095. gFinger[i, j * 3 + 2].SetActive(false);
  4096. gFinger[i, j * 3 + 1].SetActive(false);
  4097. gFinger[i, j * 3].SetActive(true);
  4098. gFinger[i, j * 3].SetActive(true);
  4099. mFinger[i, j * 3].ido = 16;
  4100. if (ikModeOld[i] != 6)
  4101. {
  4102. mFinger[i, j * 3].reset = true;
  4103. }
  4104. gFinger[i, j * 3 + 2].transform.position =
  4105. (Finger[i, j * 4 + 3].position + Finger[i, j * 4 + 3].position
  4106. + Finger[i, j * 4 + 2].position) / 3f;
  4107. gFinger[i, j * 3 + 1].transform.position = Finger[i, j * 4 + 2].position;
  4108. gFinger[i, j * 3].transform.position = Finger[i, j * 4 + 1].position;
  4109. if (mFinger[i, j * 3 + 2].isStop)
  4110. {
  4111. isStop[i] = true;
  4112. isLock[i] = true;
  4113. mFinger[i, j * 3 + 2].isStop = false;
  4114. }
  4115. if (mFinger[i, j * 3 + 1].isStop)
  4116. {
  4117. isStop[i] = true;
  4118. isLock[i] = true;
  4119. mFinger[i, j * 3 + 1].isStop = false;
  4120. }
  4121. if (mFinger[i, j * 3].isStop)
  4122. {
  4123. isStop[i] = true;
  4124. isLock[i] = true;
  4125. mFinger[i, j * 3].isStop = false;
  4126. }
  4127. }
  4128. for (int j = 0; j < 6; j++)
  4129. {
  4130. mFinger2[i, j * 2 + 1].maid = maid;
  4131. mFinger2[i, j * 2 + 1].HandL = Finger2[i, j * 3 + 2];
  4132. mFinger2[i, j * 2 + 1].UpperArmL = Finger2[i, j * 3 + 1];
  4133. mFinger2[i, j * 2 + 1].ForearmL = Finger2[i, j * 3 + 1];
  4134. mFinger2[i, j * 2 + 1].ido = 0;
  4135. mFinger2[i, j * 2].maid = maid;
  4136. mFinger2[i, j * 2].HandL = Finger2[i, j * 3 + 1];
  4137. mFinger2[i, j * 2].UpperArmL = Finger2[i, j * 3];
  4138. mFinger2[i, j * 2].ForearmL = Finger2[i, j * 3];
  4139. mFinger2[i, j * 2].ido = 0;
  4140. gFinger2[i, j * 2 + 1].SetActive(false);
  4141. gFinger2[i, j * 2].SetActive(false);
  4142. gFinger2[i, j * 2 + 1].transform.position = Finger2[i, j * 3 + 2].position;
  4143. gFinger2[i, j * 2].transform.position = Finger2[i, j * 3 + 1].position;
  4144. if (mFinger2[i, j * 2 + 1].isStop)
  4145. {
  4146. isStop[i] = true;
  4147. isLock[i] = true;
  4148. mFinger2[i, j * 2 + 1].isStop = false;
  4149. }
  4150. if (mFinger2[i, j * 2].isStop)
  4151. {
  4152. isStop[i] = true;
  4153. isLock[i] = true;
  4154. mFinger2[i, j * 2].isStop = false;
  4155. }
  4156. }
  4157. }
  4158. else if (ikMode[i] == 4)
  4159. {
  4160. if (!gFinger[i, 0])
  4161. {
  4162. SetIKInit2(i);
  4163. }
  4164. Destroy(gMaid[i]);
  4165. Destroy(gMaidC[i]);
  4166. Destroy(gHead[i]);
  4167. Destroy(gJotai[i]);
  4168. Destroy(gKahuku[i]);
  4169. gHandL[i].SetActive(false);
  4170. gArmL[i].SetActive(false);
  4171. gFootL[i].SetActive(false);
  4172. gHizaL[i].SetActive(false);
  4173. gHandR[i].SetActive(false);
  4174. gArmR[i].SetActive(false);
  4175. gFootR[i].SetActive(false);
  4176. gHizaR[i].SetActive(false);
  4177. gClavicleL[i].SetActive(false);
  4178. gClavicleR[i].SetActive(false);
  4179. gNeck[i].SetActive(false);
  4180. gSpine[i].SetActive(false);
  4181. gSpine0a[i].SetActive(false);
  4182. gSpine1a[i].SetActive(false);
  4183. gSpine1[i].SetActive(false);
  4184. gPelvis[i].SetActive(false);
  4185. for (int j = 0; j < 10; j++)
  4186. {
  4187. mFinger[i, j * 3 + 2].maid = maid;
  4188. mFinger[i, j * 3 + 2].HandL = Finger[i, j * 4 + 3];
  4189. mFinger[i, j * 3 + 2].UpperArmL = Finger[i, j * 4 + 2];
  4190. mFinger[i, j * 3 + 2].ForearmL = Finger[i, j * 4 + 2];
  4191. mFinger[i, j * 3 + 2].ido = 12;
  4192. mFinger[i, j * 3 + 2].onFlg = true;
  4193. if (j == 0 || j == 5)
  4194. {
  4195. mFinger[i, j * 3 + 2].ido = 15;
  4196. }
  4197. mFinger[i, j * 3 + 1].maid = maid;
  4198. mFinger[i, j * 3 + 1].HandL = Finger[i, j * 4 + 2];
  4199. mFinger[i, j * 3 + 1].UpperArmL = Finger[i, j * 4 + 1];
  4200. mFinger[i, j * 3 + 1].ForearmL = Finger[i, j * 4 + 1];
  4201. mFinger[i, j * 3 + 1].ido = 11;
  4202. mFinger[i, j * 3 + 1].onFlg = true;
  4203. if (j == 0 || j == 5)
  4204. {
  4205. mFinger[i, j * 3 + 1].ido = 14;
  4206. }
  4207. mFinger[i, j * 3].maid = maid;
  4208. mFinger[i, j * 3].HandL = Finger[i, j * 4 + 1];
  4209. mFinger[i, j * 3].UpperArmL = Finger[i, j * 4];
  4210. mFinger[i, j * 3].ForearmL = Finger[i, j * 4];
  4211. mFinger[i, j * 3].ido = 13;
  4212. mFinger[i, j * 3].onFlg = true;
  4213. if (j == 0 || j == 5)
  4214. {
  4215. mFinger[i, j * 3].ido = 0;
  4216. }
  4217. if (ikModeOld[i] != 4)
  4218. {
  4219. mFinger[i, j * 3].reset = true;
  4220. }
  4221. gFinger[i, j * 3 + 2].SetActive(true);
  4222. gFinger[i, j * 3 + 1].SetActive(true);
  4223. gFinger[i, j * 3].SetActive(true);
  4224. gFinger[i, j * 3 + 2].transform.position =
  4225. (Finger[i, j * 4 + 3].position + Finger[i, j * 4 + 3].position
  4226. + Finger[i, j * 4 + 2].position) / 3f;
  4227. gFinger[i, j * 3 + 1].transform.position = Finger[i, j * 4 + 2].position;
  4228. gFinger[i, j * 3].transform.position = Finger[i, j * 4 + 1].position;
  4229. if (mFinger[i, j * 3 + 2].isStop)
  4230. {
  4231. isStop[i] = true;
  4232. isLock[i] = true;
  4233. mFinger[i, j * 3 + 2].isStop = false;
  4234. }
  4235. if (mFinger[i, j * 3 + 1].isStop)
  4236. {
  4237. isStop[i] = true;
  4238. isLock[i] = true;
  4239. mFinger[i, j * 3 + 1].isStop = false;
  4240. }
  4241. if (mFinger[i, j * 3].isStop)
  4242. {
  4243. isStop[i] = true;
  4244. isLock[i] = true;
  4245. mFinger[i, j * 3].isStop = false;
  4246. }
  4247. }
  4248. for (int j = 0; j < 6; j++)
  4249. {
  4250. mFinger2[i, j * 2 + 1].maid = maid;
  4251. mFinger2[i, j * 2 + 1].HandL = Finger2[i, j * 3 + 2];
  4252. mFinger2[i, j * 2 + 1].UpperArmL = Finger2[i, j * 3 + 1];
  4253. mFinger2[i, j * 2 + 1].ForearmL = Finger2[i, j * 3 + 1];
  4254. mFinger2[i, j * 2 + 1].ido = 17;
  4255. mFinger2[i, j * 2].maid = maid;
  4256. mFinger2[i, j * 2].HandL = Finger2[i, j * 3 + 1];
  4257. mFinger2[i, j * 2].UpperArmL = Finger2[i, j * 3];
  4258. mFinger2[i, j * 2].ForearmL = Finger2[i, j * 3];
  4259. mFinger2[i, j * 2].ido = 0;
  4260. gFinger2[i, j * 2 + 1].SetActive(true);
  4261. gFinger2[i, j * 2].SetActive(true);
  4262. gFinger2[i, j * 2 + 1].transform.position = Finger2[i, j * 3 + 2].position;
  4263. gFinger2[i, j * 2].transform.position = Finger2[i, j * 3 + 1].position;
  4264. if (mFinger2[i, j * 2 + 1].isStop)
  4265. {
  4266. isStop[i] = true;
  4267. isLock[i] = true;
  4268. mFinger2[i, j * 2 + 1].isStop = false;
  4269. }
  4270. if (mFinger2[i, j * 2].isStop)
  4271. {
  4272. isStop[i] = true;
  4273. isLock[i] = true;
  4274. mFinger2[i, j * 2].isStop = false;
  4275. }
  4276. }
  4277. }
  4278. else if (ikModeOld[i] == 1 || ikModeOld[i] == 3 || ikModeOld[i] == 5 || ikModeOld[i] == 8)
  4279. {
  4280. mHandL[i].ido = 0;
  4281. mHandR[i].ido = 0;
  4282. mFootL[i].ido = 0;
  4283. mFootR[i].ido = 0;
  4284. mHizaL[i].ido = 0;
  4285. mHizaR[i].ido = 0;
  4286. mHandL[i].reset = true;
  4287. mHandR[i].reset = true;
  4288. mFootL[i].reset = true;
  4289. mFootR[i].reset = true;
  4290. mHizaL[i].reset = true;
  4291. mHizaR[i].reset = true;
  4292. }
  4293. else
  4294. {
  4295. if (gFinger[i, 0])
  4296. {
  4297. for (int j = 0; j < 30; j++)
  4298. {
  4299. gFinger[i, j].SetActive(false);
  4300. }
  4301. for (int j = 0; j < 12; j++)
  4302. {
  4303. gFinger2[i, j].SetActive(false);
  4304. }
  4305. }
  4306. Destroy(gHead[i]);
  4307. Destroy(gJotai[i]);
  4308. Destroy(gKahuku[i]);
  4309. Destroy(gIKHandL[i]);
  4310. Destroy(gIKHandR[i]);
  4311. Destroy(gIKMuneL[i]);
  4312. Destroy(gIKMuneR[i]);
  4313. Destroy(gHead2[i]);
  4314. Destroy(gMaid2[i]);
  4315. gHandL[i].SetActive(true);
  4316. gArmL[i].SetActive(true);
  4317. gFootL[i].SetActive(true);
  4318. gHizaL[i].SetActive(true);
  4319. gHandR[i].SetActive(true);
  4320. gArmR[i].SetActive(true);
  4321. gFootR[i].SetActive(true);
  4322. gHizaR[i].SetActive(true);
  4323. mHandL[i].ido = 0;
  4324. mHandR[i].ido = 0;
  4325. mFootL[i].ido = 0;
  4326. mFootR[i].ido = 0;
  4327. gClavicleL[i].SetActive(true);
  4328. gClavicleR[i].SetActive(true);
  4329. }
  4330. if (!isIK[i])
  4331. {
  4332. gHandL[i].SetActive(false);
  4333. gArmL[i].SetActive(false);
  4334. gFootL[i].SetActive(false);
  4335. gHizaL[i].SetActive(false);
  4336. gHandR[i].SetActive(false);
  4337. gArmR[i].SetActive(false);
  4338. gFootR[i].SetActive(false);
  4339. gHizaR[i].SetActive(false);
  4340. gClavicleL[i].SetActive(false);
  4341. gClavicleR[i].SetActive(false);
  4342. gNeck[i].SetActive(false);
  4343. gSpine[i].SetActive(false);
  4344. gSpine0a[i].SetActive(false);
  4345. gSpine1a[i].SetActive(false);
  4346. gSpine1[i].SetActive(false);
  4347. gPelvis[i].SetActive(false);
  4348. }
  4349. if (isIK[i])
  4350. {
  4351. mHandL[i].maid = maid;
  4352. mHandL[i].HandL = HandL1[i];
  4353. if (ikMode[i] == 2)
  4354. {
  4355. mHandL[i].UpperArmL = ForearmL1[i];
  4356. }
  4357. else
  4358. {
  4359. mHandL[i].UpperArmL = UpperArmL1[i];
  4360. if (ikModeOld[i] == 2 && isLock[i])
  4361. {
  4362. mHandL[i].OnMouseDown();
  4363. mHandL[i].isSelect = false;
  4364. }
  4365. }
  4366. mHandL[i].ForearmL = ForearmL1[i];
  4367. mArmL[i].maid = maid;
  4368. mArmL[i].HandL = ForearmL1[i];
  4369. mArmL[i].UpperArmL = UpperArmL1[i];
  4370. mArmL[i].ForearmL = UpperArmL1[i];
  4371. mArmL[i].onFlg = true;
  4372. if (mArmL[i].onFlg2)
  4373. {
  4374. mArmL[i].onFlg2 = false;
  4375. mHandL[i].initFlg = false;
  4376. }
  4377. if (ikMode[i] == 2)
  4378. {
  4379. mHandL[i].initFlg = false;
  4380. mHandR[i].initFlg = false;
  4381. mFootL[i].initFlg = false;
  4382. mFootR[i].initFlg = false;
  4383. mHandL[i].onFlg = true;
  4384. mHandR[i].onFlg = true;
  4385. mFootL[i].onFlg = true;
  4386. mFootR[i].onFlg = true;
  4387. }
  4388. else
  4389. {
  4390. mHandL[i].onFlg = false;
  4391. mHandR[i].onFlg = false;
  4392. mFootL[i].onFlg = false;
  4393. mFootR[i].onFlg = false;
  4394. }
  4395. gHandL[i].transform.position = HandL1[i].position;
  4396. gArmL[i].transform.position = ForearmL1[i].position;
  4397. mClavicleL[i].maid = maid;
  4398. mClavicleL[i].HandL = UpperArmL1[i];
  4399. mClavicleL[i].UpperArmL = ClavicleL1[i];
  4400. mClavicleL[i].ForearmL = ClavicleL1[i];
  4401. gClavicleL[i].transform.position = UpperArmL1[i].position;
  4402. if (mHandL[i].isStop)
  4403. {
  4404. isStop[i] = true;
  4405. isLock[i] = true;
  4406. mHandL[i].isStop = false;
  4407. }
  4408. if (mArmL[i].isStop)
  4409. {
  4410. isStop[i] = true;
  4411. isLock[i] = true;
  4412. mArmL[i].isStop = false;
  4413. }
  4414. if (mClavicleL[i].isStop)
  4415. {
  4416. isStop[i] = true;
  4417. isLock[i] = true;
  4418. mClavicleL[i].isStop = false;
  4419. }
  4420. mHandR[i].maid = maid;
  4421. mHandR[i].HandL = HandR1[i];
  4422. if (ikMode[i] == 2)
  4423. {
  4424. mHandR[i].UpperArmL = ForearmR1[i];
  4425. }
  4426. else
  4427. {
  4428. mHandR[i].UpperArmL = UpperArmR1[i];
  4429. if (ikModeOld[i] == 2 && isLock[i])
  4430. {
  4431. mHandR[i].OnMouseDown();
  4432. mHandR[i].isSelect = false;
  4433. }
  4434. }
  4435. mHandR[i].ForearmL = ForearmR1[i];
  4436. mArmR[i].maid = maid;
  4437. mArmR[i].HandL = ForearmR1[i];
  4438. mArmR[i].UpperArmL = UpperArmR1[i];
  4439. mArmR[i].ForearmL = UpperArmR1[i];
  4440. mArmR[i].onFlg = true;
  4441. if (mArmR[i].onFlg2)
  4442. {
  4443. mArmR[i].onFlg2 = false;
  4444. mHandR[i].initFlg = false;
  4445. }
  4446. gHandR[i].transform.position = HandR1[i].position;
  4447. gArmR[i].transform.position = ForearmR1[i].position;
  4448. mClavicleR[i].maid = maid;
  4449. mClavicleR[i].HandL = UpperArmR1[i];
  4450. mClavicleR[i].UpperArmL = ClavicleR1[i];
  4451. mClavicleR[i].ForearmL = ClavicleR1[i];
  4452. gClavicleR[i].transform.position = UpperArmR1[i].position;
  4453. if (mHandR[i].isStop)
  4454. {
  4455. isStop[i] = true;
  4456. isLock[i] = true;
  4457. mHandR[i].isStop = false;
  4458. }
  4459. if (mArmR[i].isStop)
  4460. {
  4461. isStop[i] = true;
  4462. isLock[i] = true;
  4463. mArmR[i].isStop = false;
  4464. }
  4465. if (mClavicleL[i].isStop)
  4466. {
  4467. isStop[i] = true;
  4468. isLock[i] = true;
  4469. mClavicleL[i].isStop = false;
  4470. }
  4471. mFootL[i].maid = maid;
  4472. mFootL[i].HandL = HandL2[i];
  4473. if (ikMode[i] == 2)
  4474. {
  4475. mFootL[i].UpperArmL = ForearmL2[i];
  4476. }
  4477. else
  4478. {
  4479. mFootL[i].UpperArmL = UpperArmL2[i];
  4480. if (ikModeOld[i] == 2 && isLock[i])
  4481. {
  4482. mFootL[i].OnMouseDown();
  4483. mFootL[i].isSelect = false;
  4484. }
  4485. }
  4486. mFootL[i].ForearmL = ForearmL2[i];
  4487. mHizaL[i].maid = maid;
  4488. mHizaL[i].HandL = ForearmL2[i];
  4489. mHizaL[i].UpperArmL = UpperArmL2[i];
  4490. mHizaL[i].ForearmL = UpperArmL2[i];
  4491. mHizaL[i].onFlg = true;
  4492. if (mHizaL[i].onFlg2)
  4493. {
  4494. mHizaL[i].onFlg2 = false;
  4495. mFootL[i].initFlg = false;
  4496. }
  4497. gFootL[i].transform.position = HandL2[i].position;
  4498. gHizaL[i].transform.position = ForearmL2[i].position;
  4499. if (mFootL[i].isStop)
  4500. {
  4501. isStop[i] = true;
  4502. isLock[i] = true;
  4503. mFootL[i].isStop = false;
  4504. }
  4505. if (mHizaL[i].isStop)
  4506. {
  4507. isStop[i] = true;
  4508. isLock[i] = true;
  4509. mHizaL[i].isStop = false;
  4510. }
  4511. mFootR[i].maid = maid;
  4512. mFootR[i].HandL = HandR2[i];
  4513. if (ikMode[i] == 2)
  4514. {
  4515. mFootR[i].UpperArmL = ForearmR2[i];
  4516. }
  4517. else
  4518. {
  4519. mFootR[i].UpperArmL = UpperArmR2[i];
  4520. if (ikModeOld[i] == 2 && isLock[i])
  4521. {
  4522. mFootR[i].OnMouseDown();
  4523. mFootR[i].isSelect = false;
  4524. }
  4525. }
  4526. mFootR[i].ForearmL = ForearmR2[i];
  4527. mHizaR[i].maid = maid;
  4528. mHizaR[i].HandL = ForearmR2[i];
  4529. mHizaR[i].UpperArmL = UpperArmR2[i];
  4530. mHizaR[i].ForearmL = UpperArmR2[i];
  4531. mHizaR[i].onFlg = true;
  4532. if (mHizaR[i].onFlg2)
  4533. {
  4534. mHizaR[i].onFlg2 = false;
  4535. mFootR[i].initFlg = false;
  4536. }
  4537. gFootR[i].transform.position = HandR2[i].position;
  4538. gHizaR[i].transform.position = ForearmR2[i].position;
  4539. if (mFootR[i].isStop)
  4540. {
  4541. isStop[i] = true;
  4542. isLock[i] = true;
  4543. mFootR[i].isStop = false;
  4544. }
  4545. if (mHizaR[i].isStop)
  4546. {
  4547. isStop[i] = true;
  4548. isLock[i] = true;
  4549. mHizaR[i].isStop = false;
  4550. }
  4551. bool flag13 = false;
  4552. if (ikModeOld[i] == 9 || ikModeOld[i] == 10 || ikModeOld[i] == 11 || ikModeOld[i] == 12
  4553. || ikModeOld[i] == 14)
  4554. {
  4555. flag13 = true;
  4556. }
  4557. if (isBone[i])
  4558. {
  4559. if ((ikMode[i] != 3 && ikMode[i] != 5 && ikMode[i] != 8) || ikMode[i] != ikModeOld[i]
  4560. || isChange[i])
  4561. {
  4562. float gizmoSizeSpine = 0.2f;
  4563. gizmoNeck[i].Visible = false;
  4564. gizmoFootL[i].Visible = false;
  4565. gizmoHandR[i].Visible = false;
  4566. gizmoHandL[i].Visible = false;
  4567. gizmoFootR[i].Visible = false;
  4568. gizmoPelvis[i].Visible = false;
  4569. if (ikMode[i] == 2 || ikMode[i] == 1)
  4570. {
  4571. bool isDragging = GetFieldValue<GizmoRender, bool>(gizmoHandL[i], "is_drag_");
  4572. gizmoHandL[i].offsetScale = gizmoSizeSpine;
  4573. gizmoHandR[i].offsetScale = gizmoSizeSpine;
  4574. gizmoFootL[i].offsetScale = gizmoSizeSpine;
  4575. gizmoFootR[i].offsetScale = gizmoSizeSpine;
  4576. if (ikMode[i] == 2)
  4577. {
  4578. gizmoNeck[i].transform.position = Neck[i].transform.position;
  4579. gizmoHandL[i].transform.position = Spine1a2[i].transform.position;
  4580. gizmoHandR[i].transform.position = Spine12[i].transform.position;
  4581. gizmoFootL[i].transform.position = Spine0a2[i].transform.position;
  4582. gizmoFootR[i].transform.position = Spine2[i].transform.position;
  4583. if (isDragging)
  4584. {
  4585. Neck[i].transform.rotation = gizmoNeck[i].transform.rotation;
  4586. Spine1a2[i].transform.rotation = gizmoHandL[i].transform.rotation;
  4587. Spine12[i].transform.rotation = gizmoHandR[i].transform.rotation;
  4588. Spine0a2[i].transform.rotation = gizmoFootL[i].transform.rotation;
  4589. Spine2[i].transform.rotation = gizmoFootR[i].transform.rotation;
  4590. }
  4591. gizmoNeck[i].transform.rotation = Neck[i].transform.rotation;
  4592. gizmoHandL[i].transform.rotation = Spine1a2[i].transform.rotation;
  4593. gizmoHandR[i].transform.rotation = Spine12[i].transform.rotation;
  4594. gizmoFootL[i].transform.rotation = Spine0a2[i].transform.rotation;
  4595. gizmoFootR[i].transform.rotation = Spine2[i].transform.rotation;
  4596. gizmoNeck[i].Visible = true;
  4597. gizmoHandL[i].Visible = true;
  4598. gizmoHandR[i].Visible = true;
  4599. gizmoFootL[i].Visible = true;
  4600. gizmoFootR[i].Visible = true;
  4601. gNeck[i].SetActive(false);
  4602. gSpine[i].SetActive(false);
  4603. gSpine0a[i].SetActive(false);
  4604. gSpine1[i].SetActive(false);
  4605. gSpine1a[i].SetActive(false);
  4606. }
  4607. else
  4608. {
  4609. gizmoPelvis[i].transform.position = Pelvis2[i].transform.position;
  4610. if (isDragging)
  4611. {
  4612. Pelvis2[i].transform.rotation = gizmoPelvis[i].transform.rotation;
  4613. }
  4614. gizmoPelvis[i].transform.rotation = Pelvis2[i].transform.rotation;
  4615. gizmoPelvis[i].Visible = true;
  4616. gPelvis[i].SetActive(false);
  4617. }
  4618. if (!isLock[i])
  4619. {
  4620. if (isDragging)
  4621. {
  4622. isStop[i] = true;
  4623. isLock[i] = true;
  4624. }
  4625. }
  4626. }
  4627. }
  4628. else
  4629. {
  4630. float gizmoSizeLimb = 0.25f;
  4631. gizmoHandL[i].offsetScale = gizmoSizeLimb;
  4632. gizmoHandR[i].offsetScale = gizmoSizeLimb;
  4633. gizmoFootL[i].offsetScale = gizmoSizeLimb;
  4634. gizmoFootR[i].offsetScale = gizmoSizeLimb;
  4635. bool isDragging = GetFieldValue<GizmoRender, bool>(gizmoHandL[i], "is_drag_");
  4636. if (ikMode[i] == 3)
  4637. {
  4638. gizmoHandL[i].transform.position = HandL1[i].transform.position;
  4639. gizmoHandR[i].transform.position = HandR1[i].transform.position;
  4640. gizmoFootL[i].transform.position = HandL2[i].transform.position;
  4641. gizmoFootR[i].transform.position = HandR2[i].transform.position;
  4642. if (isDragging)
  4643. {
  4644. HandL1[i].transform.rotation = gizmoHandL[i].transform.rotation;
  4645. HandR1[i].transform.rotation = gizmoHandR[i].transform.rotation;
  4646. HandL2[i].transform.rotation = gizmoFootL[i].transform.rotation;
  4647. HandR2[i].transform.rotation = gizmoFootR[i].transform.rotation;
  4648. }
  4649. else
  4650. {
  4651. gizmoHandL[i].transform.rotation = HandL1[i].transform.rotation;
  4652. gizmoHandR[i].transform.rotation = HandR1[i].transform.rotation;
  4653. gizmoFootL[i].transform.rotation = HandL2[i].transform.rotation;
  4654. gizmoFootR[i].transform.rotation = HandR2[i].transform.rotation;
  4655. }
  4656. }
  4657. else if (ikMode[i] == 5)
  4658. {
  4659. gizmoHandL[i].transform.position = UpperArmL1[i].transform.position;
  4660. gizmoHandR[i].transform.position = UpperArmR1[i].transform.position;
  4661. gizmoFootL[i].transform.position = UpperArmL2[i].transform.position;
  4662. gizmoFootR[i].transform.position = UpperArmR2[i].transform.position;
  4663. if (isDragging)
  4664. {
  4665. UpperArmL1[i].transform.rotation = gizmoHandL[i].transform.rotation;
  4666. UpperArmR1[i].transform.rotation = gizmoHandR[i].transform.rotation;
  4667. UpperArmL2[i].transform.rotation = gizmoFootL[i].transform.rotation;
  4668. UpperArmR2[i].transform.rotation = gizmoFootR[i].transform.rotation;
  4669. flag13 = true;
  4670. }
  4671. else
  4672. {
  4673. gizmoHandL[i].transform.rotation = UpperArmL1[i].transform.rotation;
  4674. gizmoHandR[i].transform.rotation = UpperArmR1[i].transform.rotation;
  4675. gizmoFootL[i].transform.rotation = UpperArmL2[i].transform.rotation;
  4676. gizmoFootR[i].transform.rotation = UpperArmR2[i].transform.rotation;
  4677. }
  4678. }
  4679. else if (ikMode[i] == 8)
  4680. {
  4681. gizmoHandL[i].transform.position = ForearmL1[i].transform.position;
  4682. gizmoHandR[i].transform.position = ForearmR1[i].transform.position;
  4683. gizmoFootL[i].transform.position = ForearmL2[i].transform.position;
  4684. gizmoFootR[i].transform.position = ForearmR2[i].transform.position;
  4685. if (isDragging)
  4686. {
  4687. ForearmL1[i].transform.rotation = gizmoHandL[i].transform.rotation;
  4688. ForearmR1[i].transform.rotation = gizmoHandR[i].transform.rotation;
  4689. ForearmL2[i].transform.rotation = gizmoFootL[i].transform.rotation;
  4690. ForearmR2[i].transform.rotation = gizmoFootR[i].transform.rotation;
  4691. flag13 = true;
  4692. }
  4693. else
  4694. {
  4695. gizmoHandL[i].transform.rotation = ForearmL1[i].transform.rotation;
  4696. gizmoHandR[i].transform.rotation = ForearmR1[i].transform.rotation;
  4697. gizmoFootL[i].transform.rotation = ForearmL2[i].transform.rotation;
  4698. gizmoFootR[i].transform.rotation = ForearmR2[i].transform.rotation;
  4699. }
  4700. }
  4701. gizmoHandL[i].Visible = true;
  4702. gizmoHandR[i].Visible = true;
  4703. gizmoFootL[i].Visible = true;
  4704. gizmoFootR[i].Visible = true;
  4705. gHandL[i].SetActive(false);
  4706. gFootL[i].SetActive(false);
  4707. gHandR[i].SetActive(false);
  4708. gFootR[i].SetActive(false);
  4709. if (!isLock[i])
  4710. {
  4711. if (isDragging)
  4712. {
  4713. isStop[i] = true;
  4714. isLock[i] = true;
  4715. }
  4716. }
  4717. }
  4718. if (isChange[i])
  4719. {
  4720. isChange[i] = false;
  4721. gHandL[i].transform.localScale = new Vector3(0.07f, 0.07f, 0.07f);
  4722. gHandR[i].transform.localScale = new Vector3(0.07f, 0.07f, 0.07f);
  4723. gArmL[i].transform.localScale = new Vector3(0.07f, 0.07f, 0.07f);
  4724. gArmR[i].transform.localScale = new Vector3(0.07f, 0.07f, 0.07f);
  4725. gFootL[i].transform.localScale = new Vector3(0.07f, 0.07f, 0.07f);
  4726. gFootR[i].transform.localScale = new Vector3(0.07f, 0.07f, 0.07f);
  4727. gHizaL[i].transform.localScale = new Vector3(0.07f, 0.07f, 0.07f);
  4728. gHizaR[i].transform.localScale = new Vector3(0.07f, 0.07f, 0.07f);
  4729. gClavicleL[i].transform.localScale = new Vector3(0.07f, 0.07f, 0.07f);
  4730. gClavicleR[i].transform.localScale = new Vector3(0.07f, 0.07f, 0.07f);
  4731. gHandL[i].GetComponent<Renderer>().enabled = true;
  4732. gHandR[i].GetComponent<Renderer>().enabled = true;
  4733. gArmL[i].GetComponent<Renderer>().enabled = true;
  4734. gArmR[i].GetComponent<Renderer>().enabled = true;
  4735. gFootL[i].GetComponent<Renderer>().enabled = true;
  4736. gFootR[i].GetComponent<Renderer>().enabled = true;
  4737. gHizaL[i].GetComponent<Renderer>().enabled = true;
  4738. gHizaR[i].GetComponent<Renderer>().enabled = true;
  4739. gClavicleL[i].GetComponent<Renderer>().enabled = true;
  4740. gClavicleR[i].GetComponent<Renderer>().enabled = true;
  4741. gHandL[i].GetComponent<Renderer>().material = m_material2;
  4742. gHandR[i].GetComponent<Renderer>().material = m_material2;
  4743. gArmL[i].GetComponent<Renderer>().material = m_material2;
  4744. gArmR[i].GetComponent<Renderer>().material = m_material2;
  4745. gFootL[i].GetComponent<Renderer>().material = m_material2;
  4746. gFootR[i].GetComponent<Renderer>().material = m_material2;
  4747. gHizaL[i].GetComponent<Renderer>().material = m_material2;
  4748. gHizaR[i].GetComponent<Renderer>().material = m_material2;
  4749. gClavicleL[i].GetComponent<Renderer>().material = m_material2;
  4750. gClavicleR[i].GetComponent<Renderer>().material = m_material2;
  4751. }
  4752. if (ikMode[i] == 0 && (ikModeOld[i] == 1 || ikModeOld[i] == 2) && gNeck[i])
  4753. {
  4754. mNeck[i].ido = 1;
  4755. mNeck[i].reset = true;
  4756. mSpine[i].ido = 1;
  4757. mSpine[i].reset = true;
  4758. mSpine0a[i].ido = 1;
  4759. mSpine0a[i].reset = true;
  4760. mSpine1a[i].ido = 1;
  4761. mSpine1a[i].reset = true;
  4762. mSpine1[i].ido = 1;
  4763. mSpine1[i].reset = true;
  4764. mPelvis[i].ido = 1;
  4765. mPelvis[i].reset = true;
  4766. }
  4767. else if (ikMode[i] == 0)
  4768. {
  4769. gNeck[i].SetActive(true);
  4770. gSpine[i].SetActive(true);
  4771. gSpine0a[i].SetActive(true);
  4772. gSpine1a[i].SetActive(true);
  4773. gSpine1[i].SetActive(true);
  4774. gPelvis[i].SetActive(true);
  4775. if (mNeck[i].isHead)
  4776. {
  4777. mNeck[i].isHead = false;
  4778. isLookn[i] = isLook[i];
  4779. isLook[i] = !isLook[i];
  4780. }
  4781. mNeck[i].maid = maid;
  4782. mNeck[i].head = Neck[i];
  4783. mNeck[i].no = i;
  4784. mNeck[i].ido = 1;
  4785. gNeck[i].transform.position = Neck[i].position;
  4786. gNeck[i].transform.localEulerAngles = Neck[i].localEulerAngles;
  4787. mSpine[i].maid = maid;
  4788. mSpine[i].head = Spine2[i];
  4789. mSpine[i].no = i;
  4790. mSpine[i].ido = 1;
  4791. gSpine[i].transform.position = Spine2[i].position;
  4792. gSpine[i].transform.eulerAngles =
  4793. new Vector3(Spine2[i].localEulerAngles.z,
  4794. Spine2[i].localEulerAngles.y,
  4795. Spine2[i].localEulerAngles.x);
  4796. mSpine0a[i].maid = maid;
  4797. mSpine0a[i].head = Spine0a2[i];
  4798. mSpine0a[i].no = i;
  4799. mSpine0a[i].ido = 1;
  4800. gSpine0a[i].transform.position = Spine0a2[i].position;
  4801. gSpine0a[i].transform.eulerAngles =
  4802. new Vector3(-Spine0a2[i].localEulerAngles.z,
  4803. Spine0a2[i].localEulerAngles.x,
  4804. Spine0a2[i].localEulerAngles.y);
  4805. mSpine1a[i].maid = maid;
  4806. mSpine1a[i].head = Spine1a2[i];
  4807. mSpine1a[i].no = i;
  4808. mSpine1a[i].ido = 1;
  4809. gSpine1a[i].transform.position = Spine1a2[i].position;
  4810. gSpine1a[i].transform.localEulerAngles =
  4811. new Vector3(-Spine1a2[i].localEulerAngles.z,
  4812. Spine1a2[i].localEulerAngles.x,
  4813. Spine1a2[i].localEulerAngles.y);
  4814. mSpine1[i].maid = maid;
  4815. mSpine1[i].head = Spine12[i];
  4816. mSpine1[i].no = i;
  4817. mSpine1[i].ido = 1;
  4818. gSpine1[i].transform.position = Spine12[i].position;
  4819. gSpine1[i].transform.localEulerAngles =
  4820. new Vector3(-Spine12[i].localEulerAngles.z,
  4821. Spine12[i].localEulerAngles.x,
  4822. Spine12[i].localEulerAngles.y);
  4823. mPelvis[i].maid = maid;
  4824. mPelvis[i].head = Pelvis2[i];
  4825. mPelvis[i].no = i;
  4826. mPelvis[i].ido = 1;
  4827. gPelvis[i].transform.position = Pelvis2[i].position;
  4828. gPelvis[i].transform.localEulerAngles = Pelvis2[i].localEulerAngles;
  4829. if (mNeck[i].isIdo)
  4830. {
  4831. mNeck[i].isIdo = false;
  4832. isLock[i] = true;
  4833. }
  4834. if (mSpine[i].isIdo)
  4835. {
  4836. mSpine[i].isIdo = false;
  4837. flag13 = true;
  4838. isLock[i] = true;
  4839. }
  4840. if (mSpine0a[i].isIdo)
  4841. {
  4842. mSpine0a[i].isIdo = false;
  4843. flag13 = true;
  4844. isLock[i] = true;
  4845. }
  4846. if (mSpine1a[i].isIdo)
  4847. {
  4848. mSpine1a[i].isIdo = false;
  4849. flag13 = true;
  4850. isLock[i] = true;
  4851. }
  4852. if (mSpine1[i].isIdo)
  4853. {
  4854. mSpine1[i].isIdo = false;
  4855. flag13 = true;
  4856. isLock[i] = true;
  4857. }
  4858. if (mPelvis[i].isIdo)
  4859. {
  4860. mPelvis[i].isIdo = false;
  4861. flag13 = true;
  4862. isLock[i] = true;
  4863. }
  4864. if (mClavicleL[i].isIdo)
  4865. {
  4866. mClavicleL[i].isIdo = false;
  4867. flag13 = true;
  4868. isLock[i] = true;
  4869. }
  4870. if (mClavicleR[i].isIdo)
  4871. {
  4872. mClavicleR[i].isIdo = false;
  4873. flag13 = true;
  4874. isLock[i] = true;
  4875. }
  4876. }
  4877. }
  4878. else if (isChange[i])
  4879. {
  4880. isChange[i] = false;
  4881. gHandL[i].GetComponent<Renderer>().enabled = false;
  4882. gArmL[i].GetComponent<Renderer>().enabled = false;
  4883. gFootL[i].GetComponent<Renderer>().enabled = false;
  4884. gHizaL[i].GetComponent<Renderer>().enabled = false;
  4885. gHandR[i].GetComponent<Renderer>().enabled = false;
  4886. gArmR[i].GetComponent<Renderer>().enabled = false;
  4887. gFootR[i].GetComponent<Renderer>().enabled = false;
  4888. gHizaR[i].GetComponent<Renderer>().enabled = false;
  4889. gClavicleL[i].GetComponent<Renderer>().enabled = false;
  4890. gClavicleR[i].GetComponent<Renderer>().enabled = false;
  4891. gHandL[i].transform.localScale = new Vector3(0.12f, 0.12f, 0.12f);
  4892. gHandR[i].transform.localScale = new Vector3(0.12f, 0.12f, 0.12f);
  4893. gArmL[i].transform.localScale = new Vector3(0.12f, 0.12f, 0.12f);
  4894. gArmR[i].transform.localScale = new Vector3(0.12f, 0.12f, 0.12f);
  4895. gFootL[i].transform.localScale = new Vector3(0.15f, 0.15f, 0.15f);
  4896. gFootR[i].transform.localScale = new Vector3(0.15f, 0.15f, 0.15f);
  4897. gHizaL[i].transform.localScale = new Vector3(0.15f, 0.15f, 0.15f);
  4898. gHizaR[i].transform.localScale = new Vector3(0.15f, 0.15f, 0.15f);
  4899. gClavicleL[i].transform.localScale = new Vector3(0.13f, 0.13f, 0.13f);
  4900. mClavicleR[i].transform.localScale = new Vector3(0.13f, 0.13f, 0.13f);
  4901. gNeck[i].SetActive(false);
  4902. gSpine[i].SetActive(false);
  4903. gSpine0a[i].SetActive(false);
  4904. gSpine1a[i].SetActive(false);
  4905. gSpine1[i].SetActive(false);
  4906. gPelvis[i].SetActive(false);
  4907. gizmoHandL[i].Visible = false;
  4908. gizmoHandR[i].Visible = false;
  4909. gizmoFootL[i].Visible = false;
  4910. gizmoFootR[i].Visible = false;
  4911. gizmoNeck[i].Visible = false;
  4912. gizmoPelvis[i].Visible = false;
  4913. }
  4914. if (flag13)
  4915. {
  4916. mHandL[i].initFlg = false;
  4917. mHandR[i].initFlg = false;
  4918. mFootL[i].initFlg = false;
  4919. mFootR[i].initFlg = false;
  4920. }
  4921. }
  4922. ikModeOld[i] = ikMode[i];
  4923. bool flag14 = false;
  4924. if (!Input.GetKey(KeyCode.A) && !Input.GetKey(KeyCode.Q) && i == ikMaid)
  4925. {
  4926. if (Input.GetKey(KeyCode.X) && Input.GetKey(KeyCode.BackQuote))
  4927. {
  4928. for (int k = 0; k < 10; k++)
  4929. {
  4930. maid.transform.RotateAround(maid.transform.position,
  4931. Vector3.right,
  4932. -maid.transform.rotation.eulerAngles.x);
  4933. maid.transform.RotateAround(maid.transform.position,
  4934. Vector3.forward,
  4935. -maid.transform.rotation.eulerAngles.z);
  4936. }
  4937. flag14 = true;
  4938. }
  4939. else if (Input.GetKey(KeyCode.X) && Input.GetKey(KeyCode.I) && Input.GetKey(KeyCode.J))
  4940. {
  4941. maid.transform.RotateAround(maid.transform.position,
  4942. new Vector3(vector3.x, 0f, vector3.z),
  4943. 0.3f);
  4944. maid.transform.RotateAround(maid.transform.position,
  4945. new Vector3(vector2.x, 0f, vector2.z),
  4946. 0.3f);
  4947. flag14 = true;
  4948. }
  4949. else if (Input.GetKey(KeyCode.X) && Input.GetKey(KeyCode.I) && Input.GetKey(KeyCode.L))
  4950. {
  4951. maid.transform.RotateAround(maid.transform.position,
  4952. new Vector3(vector3.x, 0f, vector3.z),
  4953. 0.3f);
  4954. maid.transform.RotateAround(maid.transform.position,
  4955. new Vector3(vector2.x, 0f, vector2.z),
  4956. -0.3f);
  4957. flag14 = true;
  4958. }
  4959. else if (Input.GetKey(KeyCode.X) && Input.GetKey(KeyCode.K) && Input.GetKey(KeyCode.J))
  4960. {
  4961. maid.transform.RotateAround(maid.transform.position,
  4962. new Vector3(vector3.x, 0f, vector3.z),
  4963. -0.3f);
  4964. maid.transform.RotateAround(maid.transform.position,
  4965. new Vector3(vector2.x, 0f, vector2.z),
  4966. 0.3f);
  4967. flag14 = true;
  4968. }
  4969. else if (Input.GetKey(KeyCode.X) && Input.GetKey(KeyCode.K) && Input.GetKey(KeyCode.L))
  4970. {
  4971. maid.transform.RotateAround(maid.transform.position,
  4972. new Vector3(vector3.x, 0f, vector3.z),
  4973. -0.3f);
  4974. maid.transform.RotateAround(maid.transform.position,
  4975. new Vector3(vector2.x, 0f, vector2.z),
  4976. -0.3f);
  4977. flag14 = true;
  4978. }
  4979. else if (Input.GetKey(KeyCode.X) && Input.GetKey(KeyCode.I))
  4980. {
  4981. maid.transform.RotateAround(maid.transform.position,
  4982. new Vector3(vector3.x, 0f, vector3.z),
  4983. 0.4f);
  4984. flag14 = true;
  4985. }
  4986. else if (Input.GetKey(KeyCode.X) && Input.GetKey(KeyCode.K))
  4987. {
  4988. maid.transform.RotateAround(maid.transform.position,
  4989. new Vector3(vector3.x, 0f, vector3.z),
  4990. -0.4f);
  4991. flag14 = true;
  4992. }
  4993. else if (Input.GetKey(KeyCode.X) && Input.GetKey(KeyCode.J))
  4994. {
  4995. maid.transform.RotateAround(maid.transform.position,
  4996. new Vector3(vector2.x, 0f, vector2.z),
  4997. 0.4f);
  4998. flag14 = true;
  4999. }
  5000. else if (Input.GetKey(KeyCode.X) && Input.GetKey(KeyCode.L))
  5001. {
  5002. maid.transform.RotateAround(maid.transform.position,
  5003. new Vector3(vector2.x, 0f, vector2.z),
  5004. -0.4f);
  5005. flag14 = true;
  5006. }
  5007. else if (Input.GetKey(KeyCode.X) && Input.GetKey(KeyCode.U))
  5008. {
  5009. maid.body0.transform.localRotation =
  5010. Quaternion.Euler(maid.body0.transform.localEulerAngles)
  5011. * Quaternion.AngleAxis(-1.5f, Vector3.up);
  5012. flag14 = true;
  5013. }
  5014. else if (Input.GetKey(KeyCode.X) && Input.GetKey(KeyCode.O))
  5015. {
  5016. maid.body0.transform.localRotation =
  5017. Quaternion.Euler(maid.body0.transform.localEulerAngles)
  5018. * Quaternion.AngleAxis(1.5f, Vector3.up);
  5019. flag14 = true;
  5020. }
  5021. else if (Input.GetKey(KeyCode.Z) && Input.GetKey(KeyCode.U))
  5022. {
  5023. maid.body0.transform.RotateAround(maid.transform.position, Vector3.up, -1.5f);
  5024. flag14 = true;
  5025. }
  5026. else if (Input.GetKey(KeyCode.Z) && Input.GetKey(KeyCode.O))
  5027. {
  5028. maid.body0.transform.RotateAround(maid.transform.position, Vector3.up, 1.5f);
  5029. flag14 = true;
  5030. }
  5031. else if (Input.GetKey(KeyCode.Z) && Input.GetKey(KeyCode.I) && Input.GetKey(KeyCode.J))
  5032. {
  5033. Vector3 vector = maid.transform.position;
  5034. vector += new Vector3(vector2.x, 0f, vector2.z) * 0.0075f * speed;
  5035. vector += new Vector3(vector3.x, 0f, vector3.z) * -0.0075f * speed;
  5036. maid.SetPos(vector);
  5037. flag14 = true;
  5038. }
  5039. else if (Input.GetKey(KeyCode.Z) && Input.GetKey(KeyCode.I) && Input.GetKey(KeyCode.L))
  5040. {
  5041. Vector3 vector = maid.transform.position;
  5042. vector += new Vector3(vector2.x, 0f, vector2.z) * 0.0075f * speed;
  5043. vector += new Vector3(vector3.x, 0f, vector3.z) * 0.0075f * speed;
  5044. maid.SetPos(vector);
  5045. flag14 = true;
  5046. }
  5047. else if (Input.GetKey(KeyCode.Z) && Input.GetKey(KeyCode.K) && Input.GetKey(KeyCode.J))
  5048. {
  5049. Vector3 vector = maid.transform.position;
  5050. vector += new Vector3(vector2.x, 0f, vector2.z) * -0.0075f * speed;
  5051. vector += new Vector3(vector3.x, 0f, vector3.z) * -0.0075f * speed;
  5052. maid.SetPos(vector);
  5053. flag14 = true;
  5054. }
  5055. else if (Input.GetKey(KeyCode.Z) && Input.GetKey(KeyCode.K) && Input.GetKey(KeyCode.L))
  5056. {
  5057. Vector3 vector = maid.transform.position;
  5058. vector += new Vector3(vector2.x, 0f, vector2.z) * -0.0075f * speed;
  5059. vector += new Vector3(vector3.x, 0f, vector3.z) * 0.0075f * speed;
  5060. maid.SetPos(vector);
  5061. flag14 = true;
  5062. }
  5063. else if (Input.GetKey(KeyCode.Z) && Input.GetKey(KeyCode.I))
  5064. {
  5065. Vector3 vector = maid.transform.position;
  5066. vector += new Vector3(vector2.x, 0f, vector2.z) * 0.0075f * speed;
  5067. maid.SetPos(vector);
  5068. flag14 = true;
  5069. }
  5070. else if (Input.GetKey(KeyCode.Z) && Input.GetKey(KeyCode.K))
  5071. {
  5072. Vector3 vector = maid.transform.position;
  5073. vector += new Vector3(vector2.x, 0f, vector2.z) * -0.0075f * speed;
  5074. maid.SetPos(vector);
  5075. flag14 = true;
  5076. }
  5077. else if (Input.GetKey(KeyCode.Z) && Input.GetKey(KeyCode.J))
  5078. {
  5079. Vector3 vector = maid.transform.position;
  5080. vector += new Vector3(vector3.x, 0f, vector3.z) * -0.0075f * speed;
  5081. maid.SetPos(vector);
  5082. flag14 = true;
  5083. }
  5084. else if (Input.GetKey(KeyCode.Z) && Input.GetKey(KeyCode.L))
  5085. {
  5086. Vector3 vector = maid.transform.position;
  5087. vector += new Vector3(vector3.x, 0f, vector3.z) * 0.0075f * speed;
  5088. maid.SetPos(vector);
  5089. flag14 = true;
  5090. }
  5091. else if ((Input.GetKey(KeyCode.Z) || Input.GetKey(KeyCode.X)) && Input.GetKey(KeyCode.Alpha0))
  5092. {
  5093. Vector3 vector = maid.transform.position;
  5094. vector.y += 0.0075f * speed;
  5095. maid.SetPos(vector);
  5096. flag14 = true;
  5097. }
  5098. else if ((Input.GetKey(KeyCode.Z) || Input.GetKey(KeyCode.X)) && Input.GetKey(KeyCode.P))
  5099. {
  5100. Vector3 vector = maid.transform.position;
  5101. vector.y -= 0.0075f * speed;
  5102. maid.SetPos(vector);
  5103. flag14 = true;
  5104. }
  5105. else if (Input.GetKey(KeyCode.C) && Input.GetKey(KeyCode.I))
  5106. {
  5107. maid.transform.localScale =
  5108. new Vector3(maid.transform.localScale.x * 1.005f,
  5109. maid.transform.localScale.y * 1.005f,
  5110. maid.transform.localScale.z * 1.005f);
  5111. flag14 = true;
  5112. }
  5113. else if (Input.GetKey(KeyCode.C) && Input.GetKey(KeyCode.K))
  5114. {
  5115. maid.transform.localScale =
  5116. new Vector3(maid.transform.localScale.x * 0.995f,
  5117. maid.transform.localScale.y * 0.995f,
  5118. maid.transform.localScale.z * 0.995f);
  5119. flag14 = true;
  5120. }
  5121. else if (Input.GetKey(KeyCode.C) && Input.GetKey(KeyCode.BackQuote))
  5122. {
  5123. maid.transform.localScale = new Vector3(1f, 1f, 1f);
  5124. flag14 = true;
  5125. }
  5126. }
  5127. if (!flag14 && (ikBui != 5 || (ikBui == 5 && (ikMode[i] == 4 || ikMode[i] == 6 || ikMode[i] == 7)))
  5128. && !Input.GetKey(KeyCode.V) && !Input.GetKey(KeyCode.A) && !Input.GetKey(KeyCode.Q)
  5129. && i == ikMaid)
  5130. {
  5131. if (Input.GetKey(KeyCode.I))
  5132. {
  5133. if (ikMode[i] == 0)
  5134. {
  5135. Vector3 vector5 = HandL.position;
  5136. vector5 += new Vector3(vector2.x, 0f, vector2.z) * 0.004f;
  5137. ikLeftArm.Init(UpperArmL, ForearmL, HandL, maidArray[i].body0);
  5138. ikLeftArm.Porc(UpperArmL, ForearmL, HandL, vector5, default(Vector3));
  5139. }
  5140. else if (ikMode[i] == 2)
  5141. {
  5142. Vector3 vector5 = HandL.position;
  5143. vector5 += new Vector3(vector2.x, 0f, vector2.z) * 0.004f;
  5144. ikLeftArm.Init(ForearmL, ForearmL, HandL, maidArray[i].body0);
  5145. ikLeftArm.Porc(ForearmL, ForearmL, HandL, vector5, default(Vector3));
  5146. }
  5147. else if (ikMode[i] == 3)
  5148. {
  5149. if (ikBui == 1 || ikBui == 2)
  5150. {
  5151. HandL.RotateAround(HandL.position, new Vector3(vector3.x, 0f, vector3.z), 0.8f);
  5152. }
  5153. else
  5154. {
  5155. HandL.RotateAround(HandL.position, new Vector3(vector3.x, 0f, vector3.z), -0.8f);
  5156. }
  5157. }
  5158. else if (ikMode[i] == 4)
  5159. {
  5160. Head.RotateAround(Head.position, new Vector3(vector3.x, 0f, vector3.z), 0.4f);
  5161. }
  5162. else if (ikMode[i] == 8)
  5163. {
  5164. IK_hand.RotateAround(IK_hand.position, new Vector3(vector3.x, 0f, vector3.z), 0.6f);
  5165. }
  5166. else if (ikMode[i] == 6)
  5167. {
  5168. Spine1a.RotateAround(Spine1a.position, new Vector3(vector3.x, 0f, vector3.z), 0.03f);
  5169. Spine1.RotateAround(Spine1.position, new Vector3(vector3.x, 0f, vector3.z), 0.1f);
  5170. Spine0a.RotateAround(Spine0a.position, new Vector3(vector3.x, 0f, vector3.z), 0.09f);
  5171. Spine.RotateAround(Spine.position, new Vector3(vector3.x, 0f, vector3.z), 0.07f);
  5172. }
  5173. else if (ikMode[i] == 7)
  5174. {
  5175. Pelvis.RotateAround(Pelvis.position, new Vector3(vector3.x, 0f, vector3.z), -0.2f);
  5176. }
  5177. else if (ikMode[i] == 5)
  5178. {
  5179. Vector3 vector5 = ForearmL.position;
  5180. vector5 += new Vector3(vector2.x, 0f, vector2.z) * 0.0035f;
  5181. ikLeftArm.Init(Clavicle, UpperArmL, ForearmL, maidArray[i].body0);
  5182. ikLeftArm.Porc(Clavicle, UpperArmL, ForearmL, vector5, default(Vector3));
  5183. }
  5184. else
  5185. {
  5186. Vector3 vector5 = ForearmL.position;
  5187. vector5 += new Vector3(vector2.x, 0f, vector2.z) * 0.0035f;
  5188. ikLeftArm.Init(UpperArmL, UpperArmL, ForearmL, maidArray[i].body0);
  5189. ikLeftArm.Porc(UpperArmL, UpperArmL, ForearmL, vector5, default(Vector3));
  5190. }
  5191. isStop[i] = true;
  5192. isLock[i] = true;
  5193. }
  5194. else if (Input.GetKey(KeyCode.K))
  5195. {
  5196. if (ikMode[i] == 0)
  5197. {
  5198. Vector3 vector5 = HandL.position;
  5199. vector5 += new Vector3(vector2.x, 0f, vector2.z) * -0.004f;
  5200. ikLeftArm.Init(UpperArmL, ForearmL, HandL, maidArray[i].body0);
  5201. ikLeftArm.Porc(UpperArmL, ForearmL, HandL, vector5, default(Vector3));
  5202. }
  5203. else if (ikMode[i] == 2)
  5204. {
  5205. Vector3 vector5 = HandL.position;
  5206. vector5 += new Vector3(vector2.x, 0f, vector2.z) * -0.004f;
  5207. ikLeftArm.Init(ForearmL, ForearmL, HandL, maidArray[i].body0);
  5208. ikLeftArm.Porc(ForearmL, ForearmL, HandL, vector5, default(Vector3));
  5209. }
  5210. else if (ikMode[i] == 3)
  5211. {
  5212. if (ikBui == 1 || ikBui == 2)
  5213. {
  5214. HandL.RotateAround(HandL.position, new Vector3(vector3.x, 0f, vector3.z), -0.8f);
  5215. }
  5216. else
  5217. {
  5218. HandL.RotateAround(HandL.position, new Vector3(vector3.x, 0f, vector3.z), 0.8f);
  5219. }
  5220. }
  5221. else if (ikMode[i] == 4)
  5222. {
  5223. Head.RotateAround(Head.position, new Vector3(vector3.x, 0f, vector3.z), -0.4f);
  5224. }
  5225. else if (ikMode[i] == 8)
  5226. {
  5227. IK_hand.RotateAround(IK_hand.position, new Vector3(vector3.x, 0f, vector3.z), -0.6f);
  5228. }
  5229. else if (ikMode[i] == 6)
  5230. {
  5231. Spine1a.RotateAround(Spine1a.position, new Vector3(vector3.x, 0f, vector3.z), -0.03f);
  5232. Spine1.RotateAround(Spine1.position, new Vector3(vector3.x, 0f, vector3.z), -0.1f);
  5233. Spine0a.RotateAround(Spine0a.position, new Vector3(vector3.x, 0f, vector3.z), -0.09f);
  5234. Spine.RotateAround(Spine.position, new Vector3(vector3.x, 0f, vector3.z), -0.07f);
  5235. }
  5236. else if (ikMode[i] == 7)
  5237. {
  5238. Pelvis.RotateAround(Pelvis.position, new Vector3(vector3.x, 0f, vector3.z), 0.2f);
  5239. }
  5240. else if (ikMode[i] == 5)
  5241. {
  5242. Vector3 vector5 = ForearmL.position;
  5243. vector5 += new Vector3(vector2.x, 0f, vector2.z) * -0.0035f;
  5244. ikLeftArm.Init(Clavicle, UpperArmL, ForearmL, maidArray[i].body0);
  5245. ikLeftArm.Porc(Clavicle, UpperArmL, ForearmL, vector5, default(Vector3));
  5246. }
  5247. else
  5248. {
  5249. Vector3 vector5 = ForearmL.position;
  5250. vector5 += new Vector3(vector2.x, 0f, vector2.z) * -0.0035f;
  5251. ikLeftArm.Init(UpperArmL, UpperArmL, ForearmL, maidArray[i].body0);
  5252. ikLeftArm.Porc(UpperArmL, UpperArmL, ForearmL, vector5, default(Vector3));
  5253. }
  5254. isStop[i] = true;
  5255. isLock[i] = true;
  5256. }
  5257. else if (Input.GetKey(KeyCode.J))
  5258. {
  5259. if (ikMode[i] == 0)
  5260. {
  5261. Vector3 vector5 = HandL.position;
  5262. vector5 += new Vector3(vector3.x, 0f, vector3.z) * -0.004f;
  5263. ikLeftArm.Init(UpperArmL, ForearmL, HandL, maidArray[i].body0);
  5264. ikLeftArm.Porc(UpperArmL, ForearmL, HandL, vector5, default(Vector3));
  5265. }
  5266. else if (ikMode[i] == 2)
  5267. {
  5268. Vector3 vector5 = HandL.position;
  5269. vector5 += new Vector3(vector3.x, 0f, vector3.z) * -0.004f;
  5270. ikLeftArm.Init(ForearmL, ForearmL, HandL, maidArray[i].body0);
  5271. ikLeftArm.Porc(ForearmL, ForearmL, HandL, vector5, default(Vector3));
  5272. }
  5273. else if (ikMode[i] == 3)
  5274. {
  5275. if (ikBui == 1 || ikBui == 2)
  5276. {
  5277. HandL.RotateAround(HandL.position, new Vector3(vector2.x, 0f, vector2.z), 0.8f);
  5278. }
  5279. else
  5280. {
  5281. HandL.RotateAround(HandL.position, new Vector3(vector2.x, 0f, vector2.z), -0.8f);
  5282. }
  5283. }
  5284. else if (ikMode[i] == 4)
  5285. {
  5286. Head.RotateAround(Head.position, new Vector3(vector2.x, 0f, vector2.z), 0.4f);
  5287. }
  5288. else if (ikMode[i] == 8)
  5289. {
  5290. IK_hand.RotateAround(IK_hand.position, new Vector3(vector2.x, 0f, vector2.z), 0.6f);
  5291. }
  5292. else if (ikMode[i] == 6)
  5293. {
  5294. Spine1a.RotateAround(Spine1a.position, new Vector3(vector2.x, 0f, vector2.z), 0.03f);
  5295. Spine1.RotateAround(Spine1.position, new Vector3(vector2.x, 0f, vector2.z), 0.1f);
  5296. Spine0a.RotateAround(Spine0a.position, new Vector3(vector2.x, 0f, vector2.z), 0.09f);
  5297. Spine.RotateAround(Spine.position, new Vector3(vector2.x, 0f, vector2.z), 0.07f);
  5298. }
  5299. else if (ikMode[i] == 7)
  5300. {
  5301. Pelvis.RotateAround(Pelvis.position, new Vector3(vector2.x, 0f, vector2.z), -0.2f);
  5302. }
  5303. else if (ikMode[i] == 5)
  5304. {
  5305. Vector3 vector5 = ForearmL.position;
  5306. vector5 += new Vector3(vector3.x, 0f, vector3.z) * -0.0035f;
  5307. ikLeftArm.Init(Clavicle, UpperArmL, ForearmL, maidArray[i].body0);
  5308. ikLeftArm.Porc(Clavicle, UpperArmL, ForearmL, vector5, default(Vector3));
  5309. }
  5310. else
  5311. {
  5312. Vector3 vector5 = ForearmL.position;
  5313. vector5 += new Vector3(vector3.x, 0f, vector3.z) * -0.0035f;
  5314. ikLeftArm.Init(UpperArmL, UpperArmL, ForearmL, maidArray[i].body0);
  5315. ikLeftArm.Porc(UpperArmL, UpperArmL, ForearmL, vector5, default(Vector3));
  5316. }
  5317. isStop[i] = true;
  5318. isLock[i] = true;
  5319. }
  5320. else if (Input.GetKey(KeyCode.L))
  5321. {
  5322. if (ikMode[i] == 0)
  5323. {
  5324. Vector3 vector5 = HandL.position;
  5325. vector5 += new Vector3(vector3.x, 0f, vector3.z) * 0.004f;
  5326. ikLeftArm.Init(UpperArmL, ForearmL, HandL, maidArray[i].body0);
  5327. ikLeftArm.Porc(UpperArmL, ForearmL, HandL, vector5, default(Vector3));
  5328. }
  5329. else if (ikMode[i] == 2)
  5330. {
  5331. Vector3 vector5 = HandL.position;
  5332. vector5 += new Vector3(vector3.x, 0f, vector3.z) * 0.004f;
  5333. ikLeftArm.Init(ForearmL, ForearmL, HandL, maidArray[i].body0);
  5334. ikLeftArm.Porc(ForearmL, ForearmL, HandL, vector5, default(Vector3));
  5335. }
  5336. else if (ikMode[i] == 3)
  5337. {
  5338. if (ikBui == 1 || ikBui == 2)
  5339. {
  5340. HandL.RotateAround(HandL.position, new Vector3(vector2.x, 0f, vector2.z), -0.8f);
  5341. }
  5342. else
  5343. {
  5344. HandL.RotateAround(HandL.position, new Vector3(vector2.x, 0f, vector2.z), 0.8f);
  5345. }
  5346. }
  5347. else if (ikMode[i] == 4)
  5348. {
  5349. Head.RotateAround(Head.position, new Vector3(vector2.x, 0f, vector2.z), -0.4f);
  5350. }
  5351. else if (ikMode[i] == 8)
  5352. {
  5353. IK_hand.RotateAround(IK_hand.position, new Vector3(vector2.x, 0f, vector2.z), -0.6f);
  5354. }
  5355. else if (ikMode[i] == 6)
  5356. {
  5357. Spine1a.RotateAround(Spine1a.position, new Vector3(vector2.x, 0f, vector2.z), -0.03f);
  5358. Spine1.RotateAround(Spine1.position, new Vector3(vector2.x, 0f, vector2.z), -0.1f);
  5359. Spine0a.RotateAround(Spine0a.position, new Vector3(vector2.x, 0f, vector2.z), -0.09f);
  5360. Spine.RotateAround(Spine.position, new Vector3(vector2.x, 0f, vector2.z), -0.07f);
  5361. }
  5362. else if (ikMode[i] == 7)
  5363. {
  5364. Pelvis.RotateAround(Pelvis.position, new Vector3(vector2.x, 0f, vector2.z), 0.2f);
  5365. }
  5366. else if (ikMode[i] == 5)
  5367. {
  5368. Vector3 vector5 = ForearmL.position;
  5369. vector5 += new Vector3(vector3.x, 0f, vector3.z) * 0.0035f;
  5370. ikLeftArm.Init(Clavicle, UpperArmL, ForearmL, maidArray[i].body0);
  5371. ikLeftArm.Porc(Clavicle, UpperArmL, ForearmL, vector5, default(Vector3));
  5372. }
  5373. else
  5374. {
  5375. Vector3 vector5 = ForearmL.position;
  5376. vector5 += new Vector3(vector3.x, 0f, vector3.z) * 0.0035f;
  5377. ikLeftArm.Init(UpperArmL, UpperArmL, ForearmL, maidArray[i].body0);
  5378. ikLeftArm.Porc(UpperArmL, UpperArmL, ForearmL, vector5, default(Vector3));
  5379. }
  5380. isStop[i] = true;
  5381. isLock[i] = true;
  5382. }
  5383. else if (Input.GetKey(KeyCode.U))
  5384. {
  5385. if (ikMode[i] == 3)
  5386. {
  5387. HandL.localRotation =
  5388. Quaternion.Euler(HandL.localEulerAngles)
  5389. * Quaternion.AngleAxis(1f, Vector3.right);
  5390. isStop[i] = true;
  5391. isLock[i] = true;
  5392. }
  5393. else if (ikMode[i] == 4)
  5394. {
  5395. Head.RotateAround(Head.position, Vector3.up, -0.7f);
  5396. isStop[i] = true;
  5397. isLock[i] = true;
  5398. }
  5399. else if (ikMode[i] == 8)
  5400. {
  5401. IK_hand.RotateAround(IK_hand.position, Vector3.up, -0.7f);
  5402. isStop[i] = true;
  5403. isLock[i] = true;
  5404. }
  5405. else if (ikMode[i] == 6)
  5406. {
  5407. Spine1a.RotateAround(Spine1a.position, Vector3.up, -0.084f);
  5408. Spine0a.RotateAround(Spine0a.position, Vector3.up, -0.156f);
  5409. Spine.RotateAround(Spine.position, Vector3.up, -0.156f);
  5410. isStop[i] = true;
  5411. isLock[i] = true;
  5412. }
  5413. else if (ikMode[i] == 7)
  5414. {
  5415. Pelvis.RotateAround(Pelvis.position, Vector3.up, 0.4f);
  5416. isStop[i] = true;
  5417. isLock[i] = true;
  5418. }
  5419. else if ((ikMode[i] == 0 || ikMode[i] == 1 || ikMode[i] == 2) && (ikBui == 3 || ikBui == 4))
  5420. {
  5421. UpperArmL.localRotation =
  5422. Quaternion.Euler(UpperArmL.localEulerAngles)
  5423. * Quaternion.AngleAxis(0.5f, Vector3.right);
  5424. isStop[i] = true;
  5425. isLock[i] = true;
  5426. }
  5427. else if ((ikMode[i] == 0 || ikMode[i] == 1 || ikMode[i] == 2) && (ikBui == 1 || ikBui == 2))
  5428. {
  5429. UpperArmL.RotateAround(UpperArmL.position, Vector3.right, 0.5f);
  5430. isStop[i] = true;
  5431. isLock[i] = true;
  5432. }
  5433. }
  5434. else if (Input.GetKey(KeyCode.O))
  5435. {
  5436. if (ikMode[i] == 3)
  5437. {
  5438. HandL.localRotation =
  5439. Quaternion.Euler(HandL.localEulerAngles)
  5440. * Quaternion.AngleAxis(-1f, Vector3.right);
  5441. isStop[i] = true;
  5442. isLock[i] = true;
  5443. }
  5444. else if (ikMode[i] == 4)
  5445. {
  5446. Head.RotateAround(Head.position, Vector3.up, 0.7f);
  5447. isStop[i] = true;
  5448. isLock[i] = true;
  5449. }
  5450. else if (ikMode[i] == 8)
  5451. {
  5452. IK_hand.RotateAround(IK_hand.position, Vector3.up, 0.7f);
  5453. isStop[i] = true;
  5454. isLock[i] = true;
  5455. }
  5456. else if (ikMode[i] == 6)
  5457. {
  5458. Spine1a.RotateAround(Spine1a.position, Vector3.up, 0.084f);
  5459. Spine0a.RotateAround(Spine0a.position, Vector3.up, 0.156f);
  5460. Spine.RotateAround(Spine.position, Vector3.up, 0.156f);
  5461. isStop[i] = true;
  5462. isLock[i] = true;
  5463. }
  5464. else if (ikMode[i] == 7)
  5465. {
  5466. Pelvis.RotateAround(Pelvis.position, Vector3.up, -0.4f);
  5467. isStop[i] = true;
  5468. isLock[i] = true;
  5469. }
  5470. else if ((ikMode[i] == 0 || ikMode[i] == 1 || ikMode[i] == 2) && (ikBui == 3 || ikBui == 4))
  5471. {
  5472. UpperArmL.localRotation =
  5473. Quaternion.Euler(UpperArmL.localEulerAngles)
  5474. * Quaternion.AngleAxis(-0.5f, Vector3.right);
  5475. isStop[i] = true;
  5476. isLock[i] = true;
  5477. }
  5478. else if ((ikMode[i] == 0 || ikMode[i] == 1 || ikMode[i] == 2) && (ikBui == 1 || ikBui == 2))
  5479. {
  5480. UpperArmL.RotateAround(UpperArmL.position, Vector3.right, -0.5f);
  5481. isStop[i] = true;
  5482. isLock[i] = true;
  5483. }
  5484. }
  5485. else if (Input.GetKey(KeyCode.Alpha0))
  5486. {
  5487. if (ikMode[i] == 0)
  5488. {
  5489. Vector3 vector5 = HandL.position;
  5490. vector5.y += 0.005f;
  5491. ikLeftArm.Init(UpperArmL, HandL, HandL, maidArray[i].body0);
  5492. ikLeftArm.Porc(UpperArmL, HandL, HandL, vector5, default(Vector3));
  5493. }
  5494. else if (ikMode[i] == 2)
  5495. {
  5496. Vector3 vector5 = HandL.position;
  5497. vector5.y += 0.005f;
  5498. ikLeftArm.Init(ForearmL, ForearmL, HandL, maidArray[i].body0);
  5499. ikLeftArm.Porc(ForearmL, ForearmL, HandL, vector5, default(Vector3));
  5500. }
  5501. else if (ikMode[i] == 5)
  5502. {
  5503. Vector3 vector5 = ForearmL.position;
  5504. vector5.y += 0.0035f;
  5505. ikLeftArm.Init(Clavicle, UpperArmL, ForearmL, maidArray[i].body0);
  5506. ikLeftArm.Porc(Clavicle, UpperArmL, ForearmL, vector5, default(Vector3));
  5507. }
  5508. else
  5509. {
  5510. Vector3 vector5 = ForearmL.position;
  5511. vector5.y += 0.0035f;
  5512. ikLeftArm.Init(UpperArmL, UpperArmL, ForearmL, maidArray[i].body0);
  5513. ikLeftArm.Porc(UpperArmL, UpperArmL, ForearmL, vector5, default(Vector3));
  5514. }
  5515. isStop[i] = true;
  5516. isLock[i] = true;
  5517. }
  5518. else if (Input.GetKey(KeyCode.P))
  5519. {
  5520. if (ikMode[i] == 0)
  5521. {
  5522. Vector3 vector5 = HandL.position;
  5523. vector5.y -= 0.005f;
  5524. ikLeftArm.Init(UpperArmL, HandL, HandL, maidArray[i].body0);
  5525. ikLeftArm.Porc(UpperArmL, HandL, HandL, vector5, default(Vector3));
  5526. }
  5527. else if (ikMode[i] == 2)
  5528. {
  5529. Vector3 vector5 = HandL.position;
  5530. vector5.y -= 0.005f;
  5531. ikLeftArm.Init(ForearmL, ForearmL, HandL, maidArray[i].body0);
  5532. ikLeftArm.Porc(ForearmL, ForearmL, HandL, vector5, default(Vector3));
  5533. }
  5534. else if (ikMode[i] == 5)
  5535. {
  5536. Vector3 vector5 = ForearmL.position;
  5537. vector5.y -= 0.0035f;
  5538. ikLeftArm.Init(Clavicle, UpperArmL, ForearmL, maidArray[i].body0);
  5539. ikLeftArm.Porc(Clavicle, UpperArmL, ForearmL, vector5, default(Vector3));
  5540. }
  5541. else
  5542. {
  5543. Vector3 vector5 = ForearmL.position;
  5544. vector5.y -= 0.0035f;
  5545. ikLeftArm.Init(UpperArmL, UpperArmL, ForearmL, maidArray[i].body0);
  5546. ikLeftArm.Porc(UpperArmL, UpperArmL, ForearmL, vector5, default(Vector3));
  5547. }
  5548. isStop[i] = true;
  5549. isLock[i] = true;
  5550. }
  5551. }
  5552. }
  5553. }
  5554. }
  5555. }
  5556. else if (Input.GetKey(key) && Input.GetKey(KeyCode.LeftBracket) && getModKeyPressing(modKey.Shift))
  5557. {
  5558. maid.transform.RotateAround(maid.transform.position, Vector3.up, -0.75f);
  5559. idoFlg[i] = true;
  5560. }
  5561. else if (Input.GetKey(key) && Input.GetKey(KeyCode.LeftBracket))
  5562. {
  5563. maid.transform.RotateAround(maid.transform.position, Vector3.up, 0.75f);
  5564. idoFlg[i] = true;
  5565. }
  5566. else if (Input.GetKey(key) && Input.GetKeyDown(KeyCode.DownArrow) && getModKeyPressing(modKey.Shift))
  5567. {
  5568. if (!xFlg[i])
  5569. {
  5570. xFlg[i] = true;
  5571. zFlg[i] = false;
  5572. if (maid.status.personal.uniqueName == "Pride")
  5573. {
  5574. string text = "s0_";
  5575. Random random = new Random();
  5576. int num4 = random.Next(10000);
  5577. bool flag7 = false;
  5578. for (int k = 0; k < tunArray.Length; k++)
  5579. {
  5580. if (tunArray[k] == num4)
  5581. {
  5582. flag7 = true;
  5583. break;
  5584. }
  5585. }
  5586. if (!flag7)
  5587. {
  5588. text = text + "0" + num4.ToString() + ".ogg";
  5589. if (GameUty.FileSystem.IsExistentFile(text))
  5590. {
  5591. maid.AudioMan.LoadPlay(text, 0f, false, false);
  5592. }
  5593. }
  5594. }
  5595. if (maid.status.personal.uniqueName == "Cool")
  5596. {
  5597. string text = "s1_";
  5598. Random random = new Random();
  5599. int num4 = random.Next(10000);
  5600. bool flag7 = false;
  5601. for (int k = 0; k < coolArray.Length; k++)
  5602. {
  5603. if (coolArray[k] == num4)
  5604. {
  5605. flag7 = true;
  5606. break;
  5607. }
  5608. }
  5609. if (!flag7)
  5610. {
  5611. text = text + "0" + num4.ToString() + ".ogg";
  5612. if (GameUty.FileSystem.IsExistentFile(text))
  5613. {
  5614. maid.AudioMan.LoadPlay(text, 0f, false, false);
  5615. }
  5616. }
  5617. }
  5618. if (maid.status.personal.uniqueName == "Pure")
  5619. {
  5620. string text = "s2_";
  5621. Random random = new Random();
  5622. int num4 = random.Next(10000);
  5623. bool flag7 = false;
  5624. for (int k = 0; k < pureArray.Length; k++)
  5625. {
  5626. if (pureArray[k] == num4)
  5627. {
  5628. flag7 = true;
  5629. break;
  5630. }
  5631. }
  5632. if (!flag7)
  5633. {
  5634. text = text + "0" + num4.ToString() + ".ogg";
  5635. if (GameUty.FileSystem.IsExistentFile(text))
  5636. {
  5637. maid.AudioMan.LoadPlay(text, 0f, false, false);
  5638. }
  5639. }
  5640. }
  5641. if (maid.status.personal.uniqueName == "Yandere")
  5642. {
  5643. string text = "s3_";
  5644. Random random = new Random();
  5645. int num4 = random.Next(10000);
  5646. bool flag7 = false;
  5647. for (int k = 0; k < yanArray.Length; k++)
  5648. {
  5649. if (yanArray[k] == num4)
  5650. {
  5651. flag7 = true;
  5652. break;
  5653. }
  5654. }
  5655. if (!flag7)
  5656. {
  5657. text = text + string.Format("{0:00000}", num4) + ".ogg";
  5658. if (GameUty.FileSystem.IsExistentFile(text))
  5659. {
  5660. maid.AudioMan.LoadPlay(text, 0f, false, false);
  5661. }
  5662. }
  5663. }
  5664. if (maid.status.personal.uniqueName == "Muku")
  5665. {
  5666. string text = "h0_";
  5667. Random random = new Random();
  5668. int num4 = random.Next(10000);
  5669. bool flag7 = false;
  5670. for (int k = 0; k < h0Array.Length; k++)
  5671. {
  5672. if (h0Array[k] == num4)
  5673. {
  5674. flag7 = true;
  5675. break;
  5676. }
  5677. }
  5678. if (flag7)
  5679. {
  5680. text = text + string.Format("{0:00000}", num4) + ".ogg";
  5681. if (GameUty.FileSystem.IsExistentFile(text))
  5682. {
  5683. maid.AudioMan.LoadPlay(text, 0f, false, false);
  5684. }
  5685. }
  5686. }
  5687. if (maid.status.personal.uniqueName == "Majime")
  5688. {
  5689. string text = "h1_";
  5690. Random random = new Random();
  5691. int num4 = random.Next(10000);
  5692. bool flag7 = false;
  5693. for (int k = 0; k < h1Array.Length; k++)
  5694. {
  5695. if (h1Array[k] == num4)
  5696. {
  5697. flag7 = true;
  5698. break;
  5699. }
  5700. }
  5701. if (flag7)
  5702. {
  5703. text = text + string.Format("{0:00000}", num4) + ".ogg";
  5704. if (GameUty.FileSystem.IsExistentFile(text))
  5705. {
  5706. maid.AudioMan.LoadPlay(text, 0f, false, false);
  5707. }
  5708. }
  5709. }
  5710. if (maid.status.personal.uniqueName == "Rindere")
  5711. {
  5712. string text = "h2_";
  5713. Random random = new Random();
  5714. int num4 = random.Next(10000);
  5715. bool flag7 = false;
  5716. for (int k = 0; k < h2Array.Length; k++)
  5717. {
  5718. if (h2Array[k] == num4)
  5719. {
  5720. flag7 = true;
  5721. break;
  5722. }
  5723. }
  5724. if (flag7)
  5725. {
  5726. text = text + string.Format("{0:00000}", num4) + ".ogg";
  5727. if (GameUty.FileSystem.IsExistentFile(text))
  5728. {
  5729. maid.AudioMan.LoadPlay(text, 0f, false, false);
  5730. }
  5731. }
  5732. }
  5733. }
  5734. else
  5735. {
  5736. xFlg[i] = false;
  5737. maid.AudioMan.Clear();
  5738. }
  5739. idoFlg[i] = true;
  5740. }
  5741. else if (Input.GetKey(key) && Input.GetKeyDown(KeyCode.UpArrow) && getModKeyPressing(modKey.Shift))
  5742. {
  5743. if (!zFlg[i])
  5744. {
  5745. zFlg[i] = true;
  5746. xFlg[i] = false;
  5747. string text = "";
  5748. if (maid.status.personal.uniqueName == "Pride")
  5749. {
  5750. text = "s0_";
  5751. Random random = new Random();
  5752. int num4 = random.Next(tunArray.Length);
  5753. object obj = text;
  5754. text = string.Concat(new object[] { obj, "0", tunArray[num4], ".ogg" });
  5755. }
  5756. if (maid.status.personal.uniqueName == "Cool")
  5757. {
  5758. text = "s1_";
  5759. Random random = new Random();
  5760. int num4 = random.Next(coolArray.Length);
  5761. object obj = text;
  5762. text = string.Concat(new object[] { obj, "0", coolArray[num4], ".ogg" });
  5763. }
  5764. if (maid.status.personal.uniqueName == "Pure")
  5765. {
  5766. text = "s2_";
  5767. Random random = new Random();
  5768. int num4 = random.Next(pureArray.Length);
  5769. object obj = text;
  5770. text = string.Concat(new object[] { obj, "0", pureArray[num4], ".ogg" });
  5771. }
  5772. if (maid.status.personal.uniqueName == "Yandere")
  5773. {
  5774. text = "s3_";
  5775. Random random = new Random();
  5776. int num4 = random.Next(yanArray.Length);
  5777. text = text + string.Format("{0:00000}", yanArray[num4]) + ".ogg";
  5778. }
  5779. if (maid.status.personal.uniqueName == "Muku")
  5780. {
  5781. text = "h0_";
  5782. Random random = new Random();
  5783. int num4 = random.Next(h0tArray.Length);
  5784. text = text + string.Format("{0:00000}", h0tArray[num4]) + ".ogg";
  5785. }
  5786. if (maid.status.personal.uniqueName == "Majime")
  5787. {
  5788. text = "h1_";
  5789. Random random = new Random();
  5790. int num4 = random.Next(h1tArray.Length);
  5791. text = text + string.Format("{0:00000}", h1tArray[num4]) + ".ogg";
  5792. }
  5793. if (maid.status.personal.uniqueName == "Rindere")
  5794. {
  5795. text = "h2_";
  5796. Random random = new Random();
  5797. int num4 = random.Next(h2tArray.Length);
  5798. text = text + string.Format("{0:00000}", h2tArray[num4]) + ".ogg";
  5799. }
  5800. maid.AudioMan.LoadPlay(text, 0f, false, false);
  5801. }
  5802. else
  5803. {
  5804. zFlg[i] = false;
  5805. maid.AudioMan.Clear();
  5806. }
  5807. idoFlg[i] = true;
  5808. }
  5809. else if (Input.GetKey(key) && Input.GetKeyDown(KeyCode.UpArrow))
  5810. {
  5811. string text = "";
  5812. if (maid.status.personal.uniqueName == "Pride")
  5813. {
  5814. text = "s0_";
  5815. Random random = new Random();
  5816. int num4 = random.Next(tunArray.Length);
  5817. object obj = text;
  5818. text = string.Concat(new object[] { obj, "0", tunArray[num4], ".ogg" });
  5819. }
  5820. if (maid.status.personal.uniqueName == "Cool")
  5821. {
  5822. text = "s1_";
  5823. Random random = new Random();
  5824. int num4 = random.Next(coolArray.Length);
  5825. object obj = text;
  5826. text = string.Concat(new object[] { obj, "0", coolArray[num4], ".ogg" });
  5827. }
  5828. if (maid.status.personal.uniqueName == "Pure")
  5829. {
  5830. text = "s2_";
  5831. Random random = new Random();
  5832. int num4 = random.Next(pureArray.Length);
  5833. object obj = text;
  5834. text = string.Concat(new object[] { obj, "0", pureArray[num4], ".ogg" });
  5835. }
  5836. if (maid.status.personal.uniqueName == "Yandere")
  5837. {
  5838. text = "s3_";
  5839. Random random = new Random();
  5840. int num4 = random.Next(yanArray.Length);
  5841. text = text + string.Format("{0:00000}", yanArray[num4]) + ".ogg";
  5842. }
  5843. if (maid.status.personal.uniqueName == "Muku")
  5844. {
  5845. text = "h0_";
  5846. Random random = new Random();
  5847. int num4 = random.Next(h0tArray.Length);
  5848. text = text + string.Format("{0:00000}", h0tArray[num4]) + ".ogg";
  5849. }
  5850. if (maid.status.personal.uniqueName == "Majime")
  5851. {
  5852. text = "h1_";
  5853. Random random = new Random();
  5854. int num4 = random.Next(h1tArray.Length);
  5855. text = text + string.Format("{0:00000}", h1tArray[num4]) + ".ogg";
  5856. }
  5857. if (maid.status.personal.uniqueName == "Rindere")
  5858. {
  5859. text = "h2_";
  5860. Random random = new Random();
  5861. int num4 = random.Next(h2tArray.Length);
  5862. text = text + string.Format("{0:00000}", h2tArray[num4]) + ".ogg";
  5863. }
  5864. maid.AudioMan.LoadPlay(text, 0f, false, false);
  5865. idoFlg[i] = true;
  5866. }
  5867. else if (Input.GetKey(key) && Input.GetKey(KeyCode.DownArrow))
  5868. {
  5869. if (maid.status.personal.uniqueName == "Pride")
  5870. {
  5871. string text = "s0_";
  5872. Random random = new Random();
  5873. int num4 = random.Next(10000);
  5874. bool flag7 = false;
  5875. for (int k = 0; k < tunArray.Length; k++)
  5876. {
  5877. if (tunArray[k] == num4)
  5878. {
  5879. flag7 = true;
  5880. break;
  5881. }
  5882. }
  5883. if (!flag7)
  5884. {
  5885. text = text + "0" + num4.ToString() + ".ogg";
  5886. if (GameUty.FileSystem.IsExistentFile(text))
  5887. {
  5888. maid.AudioMan.LoadPlay(text, 0f, false, false);
  5889. }
  5890. }
  5891. }
  5892. if (maid.status.personal.uniqueName == "Cool")
  5893. {
  5894. string text = "s1_";
  5895. Random random = new Random();
  5896. int num4 = random.Next(10000);
  5897. bool flag7 = false;
  5898. for (int k = 0; k < coolArray.Length; k++)
  5899. {
  5900. if (coolArray[k] == num4)
  5901. {
  5902. flag7 = true;
  5903. break;
  5904. }
  5905. }
  5906. if (!flag7)
  5907. {
  5908. text = text + "0" + num4.ToString() + ".ogg";
  5909. if (GameUty.FileSystem.IsExistentFile(text))
  5910. {
  5911. maid.AudioMan.LoadPlay(text, 0f, false, false);
  5912. }
  5913. }
  5914. }
  5915. if (maid.status.personal.uniqueName == "Pure")
  5916. {
  5917. string text = "s2_";
  5918. Random random = new Random();
  5919. int num4 = random.Next(10000);
  5920. bool flag7 = false;
  5921. for (int k = 0; k < pureArray.Length; k++)
  5922. {
  5923. if (pureArray[k] == num4)
  5924. {
  5925. flag7 = true;
  5926. break;
  5927. }
  5928. }
  5929. if (!flag7)
  5930. {
  5931. text = text + "0" + num4.ToString() + ".ogg";
  5932. if (GameUty.FileSystem.IsExistentFile(text))
  5933. {
  5934. maid.AudioMan.LoadPlay(text, 0f, false, false);
  5935. }
  5936. }
  5937. }
  5938. if (maid.status.personal.uniqueName == "Yandere")
  5939. {
  5940. string text = "s3_";
  5941. Random random = new Random();
  5942. int num4 = random.Next(10000);
  5943. bool flag7 = false;
  5944. for (int k = 0; k < yanArray.Length; k++)
  5945. {
  5946. if (yanArray[k] == num4)
  5947. {
  5948. flag7 = true;
  5949. break;
  5950. }
  5951. }
  5952. if (!flag7)
  5953. {
  5954. text = text + string.Format("{0:00000}", num4) + ".ogg";
  5955. if (GameUty.FileSystem.IsExistentFile(text))
  5956. {
  5957. maid.AudioMan.LoadPlay(text, 0f, false, false);
  5958. }
  5959. }
  5960. }
  5961. if (maid.status.personal.uniqueName == "Muku")
  5962. {
  5963. string text = "h0_";
  5964. Random random = new Random();
  5965. int num4 = random.Next(10000);
  5966. bool flag7 = false;
  5967. for (int k = 0; k < h0Array.Length; k++)
  5968. {
  5969. if (h0Array[k] == num4)
  5970. {
  5971. flag7 = true;
  5972. break;
  5973. }
  5974. }
  5975. if (flag7)
  5976. {
  5977. text = text + string.Format("{0:00000}", num4) + ".ogg";
  5978. if (GameUty.FileSystem.IsExistentFile(text))
  5979. {
  5980. maid.AudioMan.LoadPlay(text, 0f, false, false);
  5981. }
  5982. }
  5983. }
  5984. if (maid.status.personal.uniqueName == "Majime")
  5985. {
  5986. string text = "h1_";
  5987. Random random = new Random();
  5988. int num4 = random.Next(10000);
  5989. bool flag7 = false;
  5990. for (int k = 0; k < h1Array.Length; k++)
  5991. {
  5992. if (h1Array[k] == num4)
  5993. {
  5994. flag7 = true;
  5995. break;
  5996. }
  5997. }
  5998. if (flag7)
  5999. {
  6000. text = text + string.Format("{0:00000}", num4) + ".ogg";
  6001. if (GameUty.FileSystem.IsExistentFile(text))
  6002. {
  6003. maid.AudioMan.LoadPlay(text, 0f, false, false);
  6004. }
  6005. }
  6006. }
  6007. if (maid.status.personal.uniqueName == "Rindere")
  6008. {
  6009. string text = "h2_";
  6010. Random random = new Random();
  6011. int num4 = random.Next(10000);
  6012. bool flag7 = false;
  6013. for (int k = 0; k < h2Array.Length; k++)
  6014. {
  6015. if (h2Array[k] == num4)
  6016. {
  6017. flag7 = true;
  6018. break;
  6019. }
  6020. }
  6021. if (flag7)
  6022. {
  6023. text = text + string.Format("{0:00000}", num4) + ".ogg";
  6024. if (GameUty.FileSystem.IsExistentFile(text))
  6025. {
  6026. maid.AudioMan.LoadPlay(text, 0f, false, false);
  6027. }
  6028. }
  6029. }
  6030. idoFlg[i] = true;
  6031. }
  6032. else if (Input.GetKey(key) && Input.GetKey(KeyCode.Insert) && Input.GetKey(KeyCode.Home))
  6033. {
  6034. Vector3 vector = maid.transform.position;
  6035. vector += new Vector3(vector2.x, 0f, vector2.z) * 0.0075f * speed;
  6036. vector += new Vector3(vector3.x, 0f, vector3.z) * -0.0075f * speed;
  6037. maid.SetPos(vector);
  6038. idoFlg[i] = true;
  6039. }
  6040. else if (Input.GetKey(key) && Input.GetKey(KeyCode.Insert) && Input.GetKey(KeyCode.End))
  6041. {
  6042. Vector3 vector = maid.transform.position;
  6043. vector += new Vector3(vector2.x, 0f, vector2.z) * 0.0075f * speed;
  6044. vector += new Vector3(vector3.x, 0f, vector3.z) * 0.0075f * speed;
  6045. maid.SetPos(vector);
  6046. idoFlg[i] = true;
  6047. }
  6048. else if (Input.GetKey(key) && Input.GetKey(KeyCode.Delete) && Input.GetKey(KeyCode.Home))
  6049. {
  6050. Vector3 vector = maid.transform.position;
  6051. vector += new Vector3(vector2.x, 0f, vector2.z) * -0.0075f * speed;
  6052. vector += new Vector3(vector3.x, 0f, vector3.z) * -0.0075f * speed;
  6053. maid.SetPos(vector);
  6054. idoFlg[i] = true;
  6055. }
  6056. else if (Input.GetKey(key) && Input.GetKey(KeyCode.Delete) && Input.GetKey(KeyCode.End))
  6057. {
  6058. Vector3 vector = maid.transform.position;
  6059. vector += new Vector3(vector2.x, 0f, vector2.z) * -0.0075f * speed;
  6060. vector += new Vector3(vector3.x, 0f, vector3.z) * 0.0075f * speed;
  6061. maid.SetPos(vector);
  6062. idoFlg[i] = true;
  6063. }
  6064. else if (Input.GetKey(key) && Input.GetKey(KeyCode.Insert))
  6065. {
  6066. Vector3 vector = maid.transform.position;
  6067. vector += new Vector3(vector2.x, 0f, vector2.z) * 0.0075f * speed;
  6068. maid.SetPos(vector);
  6069. idoFlg[i] = true;
  6070. }
  6071. else if (Input.GetKey(key) && Input.GetKey(KeyCode.Delete))
  6072. {
  6073. Vector3 vector = maid.transform.position;
  6074. vector += new Vector3(vector2.x, 0f, vector2.z) * -0.0075f * speed;
  6075. maid.SetPos(vector);
  6076. idoFlg[i] = true;
  6077. }
  6078. else if (Input.GetKey(key) && Input.GetKey(KeyCode.Home))
  6079. {
  6080. Vector3 vector = maid.transform.position;
  6081. vector += new Vector3(vector3.x, 0f, vector3.z) * -0.0075f * speed;
  6082. maid.SetPos(vector);
  6083. idoFlg[i] = true;
  6084. }
  6085. else if (Input.GetKey(key) && Input.GetKey(KeyCode.End))
  6086. {
  6087. Vector3 vector = maid.transform.position;
  6088. vector += new Vector3(vector3.x, 0f, vector3.z) * 0.0075f * speed;
  6089. maid.SetPos(vector);
  6090. idoFlg[i] = true;
  6091. }
  6092. else if (Input.GetKey(key) && Input.GetKey(KeyCode.PageUp))
  6093. {
  6094. Vector3 vector = maid.transform.position;
  6095. vector.y += 0.0075f * speed;
  6096. maid.SetPos(vector);
  6097. idoFlg[i] = true;
  6098. }
  6099. else if (Input.GetKey(key) && Input.GetKey(KeyCode.PageDown))
  6100. {
  6101. Vector3 vector = maid.transform.position;
  6102. vector.y -= 0.0075f * speed;
  6103. maid.SetPos(vector);
  6104. idoFlg[i] = true;
  6105. }
  6106. else if (Input.GetKey(key) && Input.GetKeyDown(KeyCode.Minus) && getModKeyPressing(modKey.Shift))
  6107. {
  6108. faceIndex[i]--;
  6109. if (faceIndex[i] <= -1)
  6110. {
  6111. faceIndex[i] = faceArray.Length - 1;
  6112. }
  6113. maid.FaceAnime(faceArray[faceIndex[i]], 1f, 0);
  6114. idoFlg[i] = true;
  6115. }
  6116. else if (Input.GetKey(key) && Input.GetKeyDown(KeyCode.Minus))
  6117. {
  6118. faceIndex[i]++;
  6119. if (faceIndex[i] == faceArray.Length)
  6120. {
  6121. faceIndex[i] = 0;
  6122. }
  6123. maid.FaceAnime(faceArray[faceIndex[i]], 1f, 0);
  6124. idoFlg[i] = true;
  6125. }
  6126. else if (Input.GetKey(key) && Input.GetKeyDown(KeyCode.Quote))
  6127. {
  6128. faceBlendIndex[i]++;
  6129. if (faceBlendIndex[i] == faceBlendArray.Length)
  6130. {
  6131. faceBlendIndex[i] = 0;
  6132. }
  6133. maid.FaceBlend(faceBlendArray[faceBlendIndex[i]]);
  6134. idoFlg[i] = true;
  6135. }
  6136. if (Input.GetKey(key) && Input.GetKey(KeyCode.E))
  6137. {
  6138. idoFlg[i] = true;
  6139. if (i >= 7)
  6140. {
  6141. idoFlg[i - 7] = true;
  6142. }
  6143. maid.transform.localScale = new Vector3(maid.transform.localScale.x * 1.005f,
  6144. maid.transform.localScale.y * 1.005f,
  6145. maid.transform.localScale.z * 1.005f);
  6146. }
  6147. else if (Input.GetKey(key) && Input.GetKey(KeyCode.D))
  6148. {
  6149. idoFlg[i] = true;
  6150. if (i >= 7)
  6151. {
  6152. idoFlg[i - 7] = true;
  6153. }
  6154. maid.transform.localScale = new Vector3(maid.transform.localScale.x * 0.995f,
  6155. maid.transform.localScale.y * 0.995f,
  6156. maid.transform.localScale.z * 0.995f);
  6157. }
  6158. else if (Input.GetKey(key) && Input.GetKeyDown(KeyCode.C))
  6159. {
  6160. idoFlg[i] = true;
  6161. if (i >= 7)
  6162. {
  6163. idoFlg[i - 7] = true;
  6164. }
  6165. maid.transform.localScale = new Vector3(1f, 1f, 1f);
  6166. }
  6167. else if (Input.GetKey(key) && Input.GetKeyDown(KeyCode.H))
  6168. {
  6169. if (!isVR)
  6170. {
  6171. if (goSlot[(int)selectList[i]] != null)
  6172. {
  6173. maidArray[i].body0.goSlot = new List<TBodySkin>(goSlot[(int)selectList[i]]);
  6174. for (int l = 0; l < bodyHit[(int)selectList[i]].Count; l++)
  6175. {
  6176. maidArray[i].body0.goSlot[l].bonehair.bodyhit = bodyHit[(int)selectList[i]][l];
  6177. }
  6178. }
  6179. }
  6180. maid.body0.SetMask(TBody.SlotID.wear, true);
  6181. maid.body0.SetMask(TBody.SlotID.skirt, true);
  6182. maid.body0.SetMask(TBody.SlotID.bra, true);
  6183. maid.body0.SetMask(TBody.SlotID.panz, true);
  6184. maid.body0.SetMask(TBody.SlotID.mizugi, true);
  6185. maid.body0.SetMask(TBody.SlotID.onepiece, true);
  6186. isWear = true;
  6187. isSkirt = true;
  6188. isBra = true;
  6189. isPanz = true;
  6190. Random random = new Random();
  6191. int num4 = random.Next(2);
  6192. if (num4 == 1)
  6193. {
  6194. maid.body0.SetMask(TBody.SlotID.wear, false);
  6195. }
  6196. if (num4 == 1)
  6197. {
  6198. isWear = false;
  6199. }
  6200. num4 = random.Next(2);
  6201. if (num4 == 1)
  6202. {
  6203. maid.body0.SetMask(TBody.SlotID.skirt, false);
  6204. }
  6205. if (num4 == 1)
  6206. {
  6207. isSkirt = false;
  6208. }
  6209. num4 = random.Next(2);
  6210. if (num4 == 1)
  6211. {
  6212. maid.body0.SetMask(TBody.SlotID.bra, false);
  6213. }
  6214. if (num4 == 1)
  6215. {
  6216. isBra = false;
  6217. }
  6218. num4 = random.Next(2);
  6219. if (num4 == 1)
  6220. {
  6221. maid.body0.SetMask(TBody.SlotID.panz, false);
  6222. }
  6223. if (num4 == 1)
  6224. {
  6225. isPanz = false;
  6226. }
  6227. num4 = random.Next(2);
  6228. if (num4 == 1)
  6229. {
  6230. maid.body0.SetMask(TBody.SlotID.mizugi, false);
  6231. }
  6232. num4 = random.Next(2);
  6233. if (num4 == 1)
  6234. {
  6235. maid.body0.SetMask(TBody.SlotID.onepiece, false);
  6236. }
  6237. hFlg = true;
  6238. idoFlg[i] = true;
  6239. if (i >= 7)
  6240. {
  6241. idoFlg[i - 7] = true;
  6242. }
  6243. }
  6244. else if (Input.GetKeyDown(key) && Input.GetKey(KeyCode.LeftShift) && !isLock[i])
  6245. {
  6246. poseIndex[i]--;
  6247. if (poseIndex[i] <= -1)
  6248. {
  6249. poseIndex[i] = poseArray.Length - 1;
  6250. }
  6251. if (maid && maid.Visible)
  6252. {
  6253. string[] array = poseArray[poseIndex[i]].Split(new char[] { ',' });
  6254. isStop[i] = false;
  6255. poseCount[i] = 20;
  6256. if (array[0].Contains("_momi") || array[0].Contains("paizuri_"))
  6257. {
  6258. maid.body0.MuneYureL(0f);
  6259. maid.body0.MuneYureR(0f);
  6260. }
  6261. else
  6262. {
  6263. maid.body0.MuneYureL(1f);
  6264. maid.body0.MuneYureR(1f);
  6265. }
  6266. if (array[0].Contains("MultipleMaidsPose"))
  6267. {
  6268. string path = array[0].Split(new char[] { '/' })[1];
  6269. byte[] array2 = new byte[0];
  6270. try
  6271. {
  6272. using (FileStream fileStream = new FileStream(path, FileMode.Open, FileAccess.Read))
  6273. {
  6274. array2 = new byte[fileStream.Length];
  6275. fileStream.Read(array2, 0, array2.Length);
  6276. }
  6277. }
  6278. catch { }
  6279. if (0 < array2.Length)
  6280. {
  6281. string text = Path.GetFileName(path);
  6282. long num5 = text.GetHashCode();
  6283. maid.body0.CrossFade(num5.ToString(), array2, false, false, false, 0f, 1f);
  6284. Maid.AutoTwist[] array3 = new Maid.AutoTwist[]
  6285. {
  6286. Maid.AutoTwist.ShoulderL, Maid.AutoTwist.ShoulderR, Maid.AutoTwist.WristL,
  6287. Maid.AutoTwist.WristR, Maid.AutoTwist.ThighL, Maid.AutoTwist.ThighR
  6288. };
  6289. for (int m = 0; m < array3.Length; m++)
  6290. {
  6291. maid.SetAutoTwist(array3[m], true);
  6292. }
  6293. }
  6294. }
  6295. else if (array[0].StartsWith("p") && int.TryParse(array[0].Substring(1), out int num6))
  6296. {
  6297. loadPose[i] = array[0];
  6298. }
  6299. else if (!array[0].StartsWith("dance_"))
  6300. {
  6301. maidArray[i].CrossFade(array[0] + ".anm", false, true, false, 0f, 1f);
  6302. }
  6303. else
  6304. {
  6305. if (!maid.body0.m_Bones.GetComponent<Animation>().GetClip(array[0] + ".anm"))
  6306. {
  6307. maid.body0.LoadAnime(array[0] + ".anm", GameUty.FileSystem, array[0] + ".anm", false, false);
  6308. }
  6309. maid.body0.m_Bones.GetComponent<Animation>().Play(array[0] + ".anm");
  6310. }
  6311. if (array.Length > 1)
  6312. {
  6313. maid.body0.m_Bones.GetComponent<Animation>()[array[0] + ".anm"].time = float.Parse(array[1]);
  6314. isStop[i] = true;
  6315. if (array.Length > 2)
  6316. {
  6317. Transform transform2 = CMT.SearchObjName(maidArray[i].body0.m_Bones.transform, "Bip01", true);
  6318. isPoseIti[i] = true;
  6319. poseIti[i] = maidArray[i].transform.position;
  6320. maidArray[i].transform.position = new Vector3(100f, 100f, 100f);
  6321. }
  6322. }
  6323. }
  6324. idoFlg[i] = true;
  6325. if (i >= 7)
  6326. {
  6327. idoFlg[i - 7] = true;
  6328. }
  6329. }
  6330. else if (Input.GetKeyDown(key) && Input.GetKey(KeyCode.RightAlt) && !isLock[i])
  6331. {
  6332. int num7 = poseIndex[i];
  6333. for (int k = 0; k < groupList.Count; k++)
  6334. {
  6335. if (poseIndex[i] < (int)groupList[k])
  6336. {
  6337. poseIndex[i] = (int)groupList[k];
  6338. break;
  6339. }
  6340. }
  6341. if (num7 == poseIndex[i] && poseIndex[i] >= (int)groupList[groupList.Count - 1])
  6342. {
  6343. poseIndex[i] = 0;
  6344. }
  6345. if (maid && maid.Visible)
  6346. {
  6347. string[] array = poseArray[poseIndex[i]].Split(new char[] { ',' });
  6348. isStop[i] = false;
  6349. poseCount[i] = 20;
  6350. if (array[0].Contains("_momi") || array[0].Contains("paizuri_"))
  6351. {
  6352. maid.body0.MuneYureL(0f);
  6353. maid.body0.MuneYureR(0f);
  6354. }
  6355. else
  6356. {
  6357. maid.body0.MuneYureL(1f);
  6358. maid.body0.MuneYureR(1f);
  6359. }
  6360. if (array[0].Contains("MultipleMaidsPose"))
  6361. {
  6362. string path = array[0].Split(new char[] { '/' })[1];
  6363. byte[] array2 = new byte[0];
  6364. try
  6365. {
  6366. using (FileStream fileStream = new FileStream(path, FileMode.Open, FileAccess.Read))
  6367. {
  6368. array2 = new byte[fileStream.Length];
  6369. fileStream.Read(array2, 0, array2.Length);
  6370. }
  6371. }
  6372. catch { }
  6373. if (0 < array2.Length)
  6374. {
  6375. string text = Path.GetFileName(path);
  6376. long num5 = text.GetHashCode();
  6377. maid.body0.CrossFade(num5.ToString(), array2, false, false, false, 0f, 1f);
  6378. Maid.AutoTwist[] array3 = new Maid.AutoTwist[]
  6379. {
  6380. Maid.AutoTwist.ShoulderL, Maid.AutoTwist.ShoulderR, Maid.AutoTwist.WristL,
  6381. Maid.AutoTwist.WristR, Maid.AutoTwist.ThighL, Maid.AutoTwist.ThighR
  6382. };
  6383. for (int m = 0; m < array3.Length; m++)
  6384. {
  6385. maid.SetAutoTwist(array3[m], true);
  6386. }
  6387. }
  6388. }
  6389. else if (array[0].StartsWith("p") && int.TryParse(array[0].Substring(1), out int num6))
  6390. {
  6391. loadPose[i] = array[0];
  6392. }
  6393. else if (!array[0].StartsWith("dance_"))
  6394. {
  6395. maid.CrossFade(array[0] + ".anm", false, true, false, 0f, 1f);
  6396. }
  6397. else
  6398. {
  6399. if (!maid.body0.m_Bones.GetComponent<Animation>().GetClip(array[0] + ".anm"))
  6400. {
  6401. maid.body0.LoadAnime(array[0] + ".anm", GameUty.FileSystem, array[0] + ".anm", false, false);
  6402. }
  6403. maid.body0.m_Bones.GetComponent<Animation>().Play(array[0] + ".anm");
  6404. }
  6405. if (array.Length > 1)
  6406. {
  6407. maid.body0.m_Bones.GetComponent<Animation>()[array[0] + ".anm"].time = float.Parse(array[1]);
  6408. isStop[i] = true;
  6409. if (array.Length > 2)
  6410. {
  6411. Transform transform2 = CMT.SearchObjName(maidArray[i].body0.m_Bones.transform, "Bip01", true);
  6412. isPoseIti[i] = true;
  6413. poseIti[i] = maidArray[i].transform.position;
  6414. maidArray[i].transform.position = new Vector3(100f, 100f, 100f);
  6415. }
  6416. }
  6417. }
  6418. idoFlg[i] = true;
  6419. if (i >= 7)
  6420. {
  6421. idoFlg[i - 7] = true;
  6422. }
  6423. }
  6424. else if (Input.GetKeyDown(key) && Input.GetKey(KeyCode.LeftAlt) && !isLock[i])
  6425. {
  6426. for (int k = 0; k < groupList.Count; k++)
  6427. {
  6428. if (k == 0 && poseIndex[i] <= (int)groupList[k])
  6429. {
  6430. if (poseIndex[i] == 0)
  6431. {
  6432. poseIndex[i] = (int)groupList[groupList.Count - 1];
  6433. }
  6434. else
  6435. {
  6436. poseIndex[i] = 0;
  6437. }
  6438. break;
  6439. }
  6440. if (k > 0 && poseIndex[i] > (int)groupList[k - 1] && poseIndex[i] <= (int)groupList[k])
  6441. {
  6442. poseIndex[i] = (int)groupList[k - 1];
  6443. break;
  6444. }
  6445. }
  6446. if (poseIndex[i] > (int)groupList[groupList.Count - 1])
  6447. {
  6448. poseIndex[i] = (int)groupList[groupList.Count - 1];
  6449. }
  6450. if (maid && maid.Visible)
  6451. {
  6452. string[] array = poseArray[poseIndex[i]].Split(new char[] { ',' });
  6453. isStop[i] = false;
  6454. poseCount[i] = 20;
  6455. if (array[0].Contains("_momi") || array[0].Contains("paizuri_"))
  6456. {
  6457. maid.body0.MuneYureL(0f);
  6458. maid.body0.MuneYureR(0f);
  6459. }
  6460. else
  6461. {
  6462. maid.body0.MuneYureL(1f);
  6463. maid.body0.MuneYureR(1f);
  6464. }
  6465. if (array[0].Contains("MultipleMaidsPose"))
  6466. {
  6467. string path = array[0].Split(new char[] { '/' })[1];
  6468. byte[] array2 = new byte[0];
  6469. try
  6470. {
  6471. using (FileStream fileStream = new FileStream(path, FileMode.Open, FileAccess.Read))
  6472. {
  6473. array2 = new byte[fileStream.Length];
  6474. fileStream.Read(array2, 0, array2.Length);
  6475. }
  6476. }
  6477. catch { }
  6478. if (0 < array2.Length)
  6479. {
  6480. string text = Path.GetFileName(path);
  6481. long num5 = text.GetHashCode();
  6482. maid.body0.CrossFade(num5.ToString(), array2, false, false, false, 0f, 1f);
  6483. Maid.AutoTwist[] array3 = new Maid.AutoTwist[]
  6484. {
  6485. Maid.AutoTwist.ShoulderL, Maid.AutoTwist.ShoulderR, Maid.AutoTwist.WristL,
  6486. Maid.AutoTwist.WristR, Maid.AutoTwist.ThighL, Maid.AutoTwist.ThighR
  6487. };
  6488. for (int m = 0; m < array3.Length; m++)
  6489. {
  6490. maid.SetAutoTwist(array3[m], true);
  6491. }
  6492. }
  6493. }
  6494. else if (array[0].StartsWith("p") && int.TryParse(array[0].Substring(1), out int num6))
  6495. {
  6496. loadPose[i] = array[0];
  6497. }
  6498. else if (!array[0].StartsWith("dance_"))
  6499. {
  6500. maid.CrossFade(array[0] + ".anm", false, true, false, 0f, 1f);
  6501. }
  6502. else
  6503. {
  6504. if (!maid.body0.m_Bones.GetComponent<Animation>().GetClip(array[0] + ".anm"))
  6505. {
  6506. maid.body0.LoadAnime(array[0] + ".anm", GameUty.FileSystem, array[0] + ".anm", false, false);
  6507. }
  6508. maid.body0.m_Bones.GetComponent<Animation>().Play(array[0] + ".anm");
  6509. }
  6510. if (array.Length > 1)
  6511. {
  6512. maid.body0.m_Bones.GetComponent<Animation>()[array[0] + ".anm"].time = float.Parse(array[1]);
  6513. isStop[i] = true;
  6514. if (array.Length > 2)
  6515. {
  6516. Transform transform2 = CMT.SearchObjName(maidArray[i].body0.m_Bones.transform, "Bip01", true);
  6517. isPoseIti[i] = true;
  6518. poseIti[i] = maidArray[i].transform.position;
  6519. maidArray[i].transform.position = new Vector3(100f, 100f, 100f);
  6520. }
  6521. }
  6522. }
  6523. idoFlg[i] = true;
  6524. if (i >= 7)
  6525. {
  6526. idoFlg[i - 7] = true;
  6527. }
  6528. }
  6529. else if (Input.GetKey(key) && Input.GetKeyDown(KeyCode.BackQuote) && !atFlg)
  6530. {
  6531. headEyeIndex[i]++;
  6532. if (headEyeIndex[i] == headEyeArray.Length)
  6533. {
  6534. headEyeIndex[i] = 0;
  6535. }
  6536. maid.body0.trsLookTarget = GameMain.Instance.MainCamera.transform;
  6537. maid.body0.boHeadToCam = true;
  6538. maid.body0.boEyeToCam = true;
  6539. if (headEyeIndex[i] == 0)
  6540. {
  6541. maid.body0.trsLookTarget = GameMain.Instance.MainCamera.transform;
  6542. maid.body0.boHeadToCam = true;
  6543. maid.body0.boEyeToCam = true;
  6544. }
  6545. else
  6546. {
  6547. maid.body0.trsLookTarget = null;
  6548. CameraMain cameraMain = GameMain.Instance.MainCamera;
  6549. if (headEyeIndex[i] == 1)
  6550. {
  6551. maid.body0.offsetLookTarget = new Vector3(-0.35f, 1f, -0.3f);
  6552. }
  6553. if (headEyeIndex[i] == 2)
  6554. {
  6555. maid.body0.offsetLookTarget = new Vector3(-0.4f, 1f, 0f);
  6556. }
  6557. if (headEyeIndex[i] == 3)
  6558. {
  6559. maid.body0.offsetLookTarget = new Vector3(-0.35f, 1f, 0.3f);
  6560. }
  6561. if (headEyeIndex[i] == 4)
  6562. {
  6563. maid.body0.offsetLookTarget = new Vector3(0f, 1f, -0.4f);
  6564. }
  6565. if (headEyeIndex[i] == 5)
  6566. {
  6567. maid.body0.offsetLookTarget = new Vector3(0f, 1f, 0f);
  6568. }
  6569. if (headEyeIndex[i] == 6)
  6570. {
  6571. maid.body0.offsetLookTarget = new Vector3(0f, 1f, 0.4f);
  6572. }
  6573. if (headEyeIndex[i] == 7)
  6574. {
  6575. maid.body0.offsetLookTarget = new Vector3(0.4f, 1f, -0.4f);
  6576. }
  6577. if (headEyeIndex[i] == 8)
  6578. {
  6579. maid.body0.offsetLookTarget = new Vector3(0.4f, 1f, 0f);
  6580. }
  6581. if (headEyeIndex[i] == 9)
  6582. {
  6583. maid.body0.offsetLookTarget = new Vector3(0.4f, 1f, 0.4f);
  6584. }
  6585. }
  6586. idoFlg[i] = true;
  6587. if (i >= 7)
  6588. {
  6589. idoFlg[i - 7] = true;
  6590. }
  6591. }
  6592. else if (Input.GetKey(key) && Input.GetKey(KeyCode.Return))
  6593. {
  6594. idoFlg[i] = true;
  6595. if (i >= 7)
  6596. {
  6597. idoFlg[i - 7] = true;
  6598. }
  6599. }
  6600. else if (Input.GetKeyUp(key))
  6601. {
  6602. if (idoFlg[i])
  6603. {
  6604. idoFlg[i] = false;
  6605. }
  6606. else if (!getModKeyPressing(modKey.Ctrl) || i >= 7)
  6607. {
  6608. if (!isLock[i])
  6609. {
  6610. poseIndex[i]++;
  6611. if (poseIndex[i] == poseArray.Length)
  6612. {
  6613. poseIndex[i] = 0;
  6614. }
  6615. if (maid && maid.Visible)
  6616. {
  6617. string[] array = poseArray[poseIndex[i]].Split(new char[] { ',' });
  6618. isStop[i] = false;
  6619. poseCount[i] = 20;
  6620. if (array[0].Contains("_momi") || array[0].Contains("paizuri_"))
  6621. {
  6622. maid.body0.MuneYureL(0f);
  6623. maid.body0.MuneYureR(0f);
  6624. }
  6625. else
  6626. {
  6627. maid.body0.MuneYureL(1f);
  6628. maid.body0.MuneYureR(1f);
  6629. }
  6630. if (array[0].Contains("MultipleMaidsPose"))
  6631. {
  6632. string path = array[0].Split(new char[] { '/' })[1];
  6633. byte[] array2 = new byte[0];
  6634. try
  6635. {
  6636. using (FileStream fileStream = new FileStream(path, FileMode.Open, FileAccess.Read))
  6637. {
  6638. array2 = new byte[fileStream.Length];
  6639. fileStream.Read(array2, 0, array2.Length);
  6640. }
  6641. }
  6642. catch { }
  6643. if (0 < array2.Length)
  6644. {
  6645. string text = Path.GetFileName(path);
  6646. long num5 = text.GetHashCode();
  6647. maid.body0.CrossFade(num5.ToString(), array2, false, false, false, 0f, 1f);
  6648. Maid.AutoTwist[] array3 = new Maid.AutoTwist[]
  6649. {
  6650. Maid.AutoTwist.ShoulderL, Maid.AutoTwist.ShoulderR, Maid.AutoTwist.WristL,
  6651. Maid.AutoTwist.WristR, Maid.AutoTwist.ThighL, Maid.AutoTwist.ThighR
  6652. };
  6653. for (int m = 0; m < array3.Length; m++)
  6654. {
  6655. maid.SetAutoTwist(array3[m], true);
  6656. }
  6657. }
  6658. }
  6659. else if (array[0].StartsWith("p") && int.TryParse(array[0].Substring(1), out int num6))
  6660. {
  6661. loadPose[i] = array[0];
  6662. }
  6663. else if (!array[0].StartsWith("dance_"))
  6664. {
  6665. maidArray[i].CrossFade(array[0] + ".anm", false, true, false, 0f, 1f);
  6666. }
  6667. else
  6668. {
  6669. if (!maid.body0.m_Bones.GetComponent<Animation>().GetClip(array[0] + ".anm"))
  6670. {
  6671. maid.body0.LoadAnime(array[0] + ".anm",
  6672. GameUty.FileSystem,
  6673. array[0] + ".anm",
  6674. false,
  6675. false);
  6676. }
  6677. maid.body0.m_Bones.GetComponent<Animation>().Play(array[0] + ".anm");
  6678. }
  6679. if (array.Length > 1)
  6680. {
  6681. maid.body0.m_Bones.GetComponent<Animation>()[array[0] + ".anm"].time = float.Parse(array[1]);
  6682. isStop[i] = true;
  6683. if (array.Length > 2)
  6684. {
  6685. Transform transform2 =
  6686. CMT.SearchObjName(maidArray[i].body0.m_Bones.transform, "Bip01", true);
  6687. isPoseIti[i] = true;
  6688. poseIti[i] = maidArray[i].transform.position;
  6689. maidArray[i].transform.position = new Vector3(100f, 100f, 100f);
  6690. }
  6691. }
  6692. }
  6693. }
  6694. }
  6695. }
  6696. goto IL_1688E;
  6697. }
  6698. }
  6699. if (Input.GetKeyDown(KeyCode.E)) { }
  6700. if (!isVR && Input.GetKeyDown(KeyCode.F8) && sceneFlg && bGui)
  6701. {
  6702. bGui = false;
  6703. }
  6704. else if (!isVR && Input.GetKeyDown(KeyCode.F8))
  6705. {
  6706. sceneFlg = true;
  6707. faceFlg = false;
  6708. poseFlg = false;
  6709. kankyoFlg = false;
  6710. kankyo2Flg = false;
  6711. bGui = true;
  6712. for (int i = 0; i < 10; i++)
  6713. {
  6714. date[i] = "未保存";
  6715. ninzu[i] = "";
  6716. IniKey iniKey = Preferences["scene"]["s" + (page * 10 + i + 1)];
  6717. if (iniKey.Value != null && iniKey.Value.ToString() != "")
  6718. {
  6719. string[] array4 = iniKey.Value.Split(new char[] { '_' });
  6720. if (array4.Length >= 2)
  6721. {
  6722. string[] array5 = array4[0].Split(new char[] { ',' });
  6723. date[i] = array5[0];
  6724. ninzu[i] = array5[1] + "人";
  6725. }
  6726. }
  6727. }
  6728. }
  6729. if (Input.GetKeyDown(KeyCode.F) && getModKeyPressing(modKey.Shift) && !fFlg)
  6730. {
  6731. bgmIndex--;
  6732. if (bgmIndex <= -1)
  6733. {
  6734. bgmIndex = bgmArray.Length - 1;
  6735. }
  6736. GameMain.Instance.SoundMgr.PlayBGM(bgmArray[bgmIndex] + ".ogg", 0f, true);
  6737. bgmCombo.selectedItemIndex = bgmIndex;
  6738. }
  6739. else if (Input.GetKeyDown(KeyCode.F) && !fFlg)
  6740. {
  6741. bgmIndex++;
  6742. if (bgmIndex == bgmArray.Length)
  6743. {
  6744. bgmIndex = 0;
  6745. }
  6746. GameMain.Instance.SoundMgr.PlayBGM(bgmArray[bgmIndex] + ".ogg", 0f, true);
  6747. bgmCombo.selectedItemIndex = bgmIndex;
  6748. }
  6749. if (!isVR && Input.GetKeyDown(KeyCode.M) && !mFlg)
  6750. {
  6751. GameObject gameObject4 = GameObject.Find("__GameMain__/SystemUI Root");
  6752. GameObject gameObject5 = gameObject4.transform.Find("MessageWindowPanel").gameObject;
  6753. MessageWindowMgr messageWindowMgr = GameMain.Instance.ScriptMgr.adv_kag.MessageWindowMgr;
  6754. if (isMessage)
  6755. {
  6756. isMessage = false;
  6757. messageWindowMgr.CloseMessageWindowPanel();
  6758. }
  6759. else if (!bGuiMessage)
  6760. {
  6761. bGuiMessage = true;
  6762. }
  6763. else
  6764. {
  6765. bGuiMessage = false;
  6766. isMessage = false;
  6767. messageWindowMgr.CloseMessageWindowPanel();
  6768. }
  6769. }
  6770. if (isDanceChu && Input.GetKey(KeyCode.Return) && Input.GetKeyDown(KeyCode.Escape))
  6771. {
  6772. escFlg = true;
  6773. for (int j = 0; j < maidCnt; j++)
  6774. {
  6775. if (maidArray[j] && maidArray[j].Visible)
  6776. {
  6777. maidArray[j].StopKuchipakuPattern();
  6778. if (isDanceStart7V)
  6779. {
  6780. maidArray[j].SetPos(dancePos[j]);
  6781. maidArray[j].body0.transform.localRotation = danceRot[j];
  6782. }
  6783. if (isDanceStart8V)
  6784. {
  6785. maidArray[j].SetPos(dancePos[j]);
  6786. maidArray[j].body0.transform.localRotation = danceRot[j];
  6787. }
  6788. if (isDanceStart11V)
  6789. {
  6790. maidArray[j].SetPos(dancePos[j]);
  6791. maidArray[j].body0.transform.localRotation = danceRot[j];
  6792. }
  6793. if (isDanceStart1K || isDanceStart3K || isDanceStart4K || isDanceStart5K || isDanceStart6K || isDanceStart9K
  6794. || isDanceStart13K)
  6795. {
  6796. maidArray[j].SetPos(dancePos[j]);
  6797. maidArray[j].body0.transform.localRotation = danceRot[j];
  6798. int i = j;
  6799. if (!isVR)
  6800. {
  6801. delCount[i] = 20;
  6802. if (goSlot[(int)selectList[i]] != null)
  6803. {
  6804. maidArray[i].body0.goSlot = new List<TBodySkin>(goSlot[(int)selectList[i]]);
  6805. for (int l = 0; l < bodyHit[(int)selectList[i]].Count; l++)
  6806. {
  6807. maidArray[i].body0.goSlot[l].bonehair.bodyhit = bodyHit[(int)selectList[i]][l];
  6808. }
  6809. }
  6810. }
  6811. Maid maid = maidArray[j];
  6812. maid.DelProp(MPN.handitem, true);
  6813. maid.DelProp(MPN.accvag, true);
  6814. maid.DelProp(MPN.accanl, true);
  6815. maid.DelProp(MPN.kousoku_upper, true);
  6816. maid.DelProp(MPN.kousoku_lower, true);
  6817. maid.AllProcPropSeqStart();
  6818. }
  6819. if (isDanceStart14V)
  6820. {
  6821. maidArray[j].SetPos(dancePos[j]);
  6822. maidArray[j].body0.transform.localRotation = danceRot[j];
  6823. }
  6824. if (isDanceStart15V)
  6825. {
  6826. maidArray[j].SetPos(dancePos[j]);
  6827. maidArray[j].body0.transform.localRotation = danceRot[j];
  6828. }
  6829. }
  6830. }
  6831. isDanceStart1F = false;
  6832. isDanceStart1K = false;
  6833. isDanceStart2F = false;
  6834. isDanceStart3F = false;
  6835. isDanceStart3K = false;
  6836. isDanceStart4F = false;
  6837. isDanceStart4K = false;
  6838. isDanceStart5F = false;
  6839. isDanceStart5K = false;
  6840. isDanceStart6F = false;
  6841. isDanceStart6K = false;
  6842. isDanceStart7F = false;
  6843. isDanceStart7V = false;
  6844. isDanceStart8F = false;
  6845. isDanceStart8V = false;
  6846. isDanceStart8P = false;
  6847. isDanceStart9F = false;
  6848. isDanceStart9K = false;
  6849. isDanceStart10F = false;
  6850. isDanceStart11F = false;
  6851. isDanceStart11V = false;
  6852. isDanceStart12F = false;
  6853. isDanceStart13F = false;
  6854. isDanceStart13K = false;
  6855. isDanceStart14F = false;
  6856. isDanceStart14V = false;
  6857. isDanceStart15F = false;
  6858. isDanceStart15V = false;
  6859. for (int j = 0; j < maidCnt; j++)
  6860. {
  6861. danceFace[j] = 0f;
  6862. maidArray[j].CrossFade(poseArray[0] + ".anm", false, true, false, 0f, 1f);
  6863. maidArray[j].SetAutoTwistAll(true);
  6864. }
  6865. danceCheckIndex = 0;
  6866. for (int k = 0; k < danceCheck.Length; k++)
  6867. {
  6868. danceCheck[danceCheckIndex] = 1f;
  6869. }
  6870. isDance = false;
  6871. isDanceChu = false;
  6872. if (maidArray[1] && maidArray[1].Visible)
  6873. {
  6874. if (maidArray[0].transform.position == maidArray[1].transform.position)
  6875. {
  6876. Vector3 vector = Vector3.zero;
  6877. vector.x = 0.6f;
  6878. maidArray[1].SetPos(vector);
  6879. if (maidArray[2] && maidArray[2].Visible)
  6880. {
  6881. vector.x = -0.6f;
  6882. maidArray[2].SetPos(vector);
  6883. }
  6884. if (maidArray[3] && maidArray[3].Visible)
  6885. {
  6886. vector.x = 1.2f;
  6887. maidArray[3].SetPos(vector);
  6888. }
  6889. if (maidArray[4] && maidArray[4].Visible)
  6890. {
  6891. vector.x = -1.2f;
  6892. maidArray[4].SetPos(vector);
  6893. }
  6894. if (maidArray[5] && maidArray[5].Visible)
  6895. {
  6896. vector.x = 1.8f;
  6897. maidArray[5].SetPos(vector);
  6898. }
  6899. if (maidArray[6] && maidArray[6].Visible)
  6900. {
  6901. vector.x = -1.8f;
  6902. maidArray[6].SetPos(vector);
  6903. }
  6904. if (maidArray[7] && maidArray[7].Visible)
  6905. {
  6906. vector.x = 2.4f;
  6907. maidArray[7].SetPos(vector);
  6908. }
  6909. if (maidArray[8] && maidArray[8].Visible)
  6910. {
  6911. vector.x = -2.4f;
  6912. maidArray[8].SetPos(vector);
  6913. }
  6914. if (maidArray[9] && maidArray[9].Visible)
  6915. {
  6916. vector.x = 3f;
  6917. maidArray[9].SetPos(vector);
  6918. }
  6919. if (maidArray[10] && maidArray[10].Visible)
  6920. {
  6921. vector.x = -3f;
  6922. maidArray[10].SetPos(vector);
  6923. }
  6924. if (maidArray[11] && maidArray[11].Visible)
  6925. {
  6926. vector.x = 3.6f;
  6927. maidArray[11].SetPos(vector);
  6928. }
  6929. if (maidArray[12] && maidArray[12].Visible)
  6930. {
  6931. vector.x = -3.6f;
  6932. maidArray[12].SetPos(vector);
  6933. }
  6934. if (maidArray[13] && maidArray[13].Visible)
  6935. {
  6936. vector.x = 4.2f;
  6937. maidArray[13].SetPos(vector);
  6938. }
  6939. }
  6940. }
  6941. GameMain.Instance.SoundMgr.PlayBGM(bgmArray[bgmIndex] + ".ogg", 0f, true);
  6942. }
  6943. if (Input.GetKeyDown(KeyCode.Tab) || (!escFlg && Input.GetKeyDown(KeyCode.Escape)))
  6944. {
  6945. if (isScript)
  6946. {
  6947. GameObject gameObject4 = GameObject.Find("__GameMain__/SystemUI Root");
  6948. GameObject gameObject5 = gameObject4.transform.Find("MessageWindowPanel").gameObject;
  6949. if (isPanel)
  6950. {
  6951. isPanel = false;
  6952. }
  6953. else
  6954. {
  6955. isPanel = true;
  6956. }
  6957. gameObject5.SetActive(isPanel);
  6958. }
  6959. else
  6960. {
  6961. bGui = !bGui;
  6962. }
  6963. }
  6964. if (Input.GetKeyDown(KeyCode.Y) && getModKeyPressing(modKey.Shift))
  6965. {
  6966. keyFlg = true;
  6967. bgIndex--;
  6968. if (bgIndex <= -1)
  6969. {
  6970. bgIndex = bgArray.Length - 1;
  6971. }
  6972. if (!moveBg)
  6973. {
  6974. bg.localScale = new Vector3(1f, 1f, 1f);
  6975. if (bgArray[bgIndex].Length == 36)
  6976. {
  6977. GameMain.Instance.BgMgr.ChangeBgMyRoom(bgArray[bgIndex]);
  6978. }
  6979. else
  6980. {
  6981. GameMain.Instance.BgMgr.ChangeBg(bgArray[bgIndex]);
  6982. }
  6983. bgCombo.selectedItemIndex = bgIndex;
  6984. if (bgArray[bgIndex] == "karaokeroom")
  6985. {
  6986. bg.transform.position = bgObject.transform.position;
  6987. Vector3 vector = Vector3.zero;
  6988. Vector3 zero3 = Vector3.zero;
  6989. zero3.y = 90f;
  6990. vector.z = 4f;
  6991. vector.x = 1f;
  6992. bg.transform.localPosition = vector;
  6993. bg.transform.localRotation = Quaternion.Euler(zero3);
  6994. }
  6995. }
  6996. }
  6997. else if (Input.GetKey(KeyCode.Y) && Input.GetKey(KeyCode.E))
  6998. {
  6999. keyFlg = true;
  7000. bg.localScale = new Vector3(bg.localScale.x * 1.005f, bg.localScale.y * 1.005f, bg.localScale.z * 1.005f);
  7001. }
  7002. else if (Input.GetKey(KeyCode.Y) && Input.GetKey(KeyCode.D))
  7003. {
  7004. keyFlg = true;
  7005. bg.localScale = new Vector3(bg.localScale.x * 0.995f, bg.localScale.y * 0.995f, bg.localScale.z * 0.995f);
  7006. }
  7007. else if (Input.GetKey(KeyCode.Y) && Input.GetKeyDown(KeyCode.C))
  7008. {
  7009. keyFlg = true;
  7010. bg.localScale = new Vector3(1f, 1f, 1f);
  7011. }
  7012. else if ((Input.GetKey(KeyCode.Y) || Input.GetKey(KeyCode.V)) && Input.GetKey(KeyCode.I) && Input.GetKey(KeyCode.J))
  7013. {
  7014. Vector3 vector2 = mainCameraTransform.TransformDirection(Vector3.forward);
  7015. Vector3 vector3 = mainCameraTransform.TransformDirection(Vector3.right);
  7016. Vector3 vector4 = mainCameraTransform.TransformDirection(Vector3.up);
  7017. Vector3 vector = bg.position;
  7018. vector += new Vector3(vector2.x, 0f, vector2.z) * -0.025f * speed;
  7019. vector += new Vector3(vector3.x, 0f, vector3.z) * 0.025f * speed;
  7020. bg.localPosition = vector;
  7021. if (Input.GetKey(KeyCode.Y))
  7022. {
  7023. keyFlg = true;
  7024. }
  7025. }
  7026. else if ((Input.GetKey(KeyCode.Y) || Input.GetKey(KeyCode.V)) && Input.GetKey(KeyCode.I) && Input.GetKey(KeyCode.L))
  7027. {
  7028. Vector3 vector2 = mainCameraTransform.TransformDirection(Vector3.forward);
  7029. Vector3 vector3 = mainCameraTransform.TransformDirection(Vector3.right);
  7030. Vector3 vector4 = mainCameraTransform.TransformDirection(Vector3.up);
  7031. Vector3 vector = bg.position;
  7032. vector += new Vector3(vector2.x, 0f, vector2.z) * -0.025f * speed;
  7033. vector += new Vector3(vector3.x, 0f, vector3.z) * -0.025f * speed;
  7034. bg.localPosition = vector;
  7035. if (Input.GetKey(KeyCode.Y))
  7036. {
  7037. keyFlg = true;
  7038. }
  7039. }
  7040. else if ((Input.GetKey(KeyCode.Y) || Input.GetKey(KeyCode.V)) && Input.GetKey(KeyCode.K) && Input.GetKey(KeyCode.J))
  7041. {
  7042. Vector3 vector2 = mainCameraTransform.TransformDirection(Vector3.forward);
  7043. Vector3 vector3 = mainCameraTransform.TransformDirection(Vector3.right);
  7044. Vector3 vector4 = mainCameraTransform.TransformDirection(Vector3.up);
  7045. Vector3 vector = bg.position;
  7046. vector += new Vector3(vector2.x, 0f, vector2.z) * 0.025f * speed;
  7047. vector += new Vector3(vector3.x, 0f, vector3.z) * 0.025f * speed;
  7048. bg.localPosition = vector;
  7049. if (Input.GetKey(KeyCode.Y))
  7050. {
  7051. keyFlg = true;
  7052. }
  7053. }
  7054. else if ((Input.GetKey(KeyCode.Y) || Input.GetKey(KeyCode.V)) && Input.GetKey(KeyCode.K) && Input.GetKey(KeyCode.L))
  7055. {
  7056. Vector3 vector2 = mainCameraTransform.TransformDirection(Vector3.forward);
  7057. Vector3 vector3 = mainCameraTransform.TransformDirection(Vector3.right);
  7058. Vector3 vector4 = mainCameraTransform.TransformDirection(Vector3.up);
  7059. Vector3 vector = bg.position;
  7060. vector += new Vector3(vector2.x, 0f, vector2.z) * 0.025f * speed;
  7061. vector += new Vector3(vector3.x, 0f, vector3.z) * -0.025f * speed;
  7062. bg.localPosition = vector;
  7063. if (Input.GetKey(KeyCode.Y))
  7064. {
  7065. keyFlg = true;
  7066. }
  7067. }
  7068. else if ((Input.GetKey(KeyCode.Y) || Input.GetKey(KeyCode.V)) && Input.GetKey(KeyCode.I))
  7069. {
  7070. Vector3 vector2 = mainCameraTransform.TransformDirection(Vector3.forward);
  7071. Vector3 vector3 = mainCameraTransform.TransformDirection(Vector3.right);
  7072. Vector3 vector4 = mainCameraTransform.TransformDirection(Vector3.up);
  7073. Vector3 vector = bg.position;
  7074. vector += new Vector3(vector2.x, 0f, vector2.z) * -0.025f * speed;
  7075. bg.localPosition = vector;
  7076. if (Input.GetKey(KeyCode.Y))
  7077. {
  7078. keyFlg = true;
  7079. }
  7080. }
  7081. else if ((Input.GetKey(KeyCode.Y) || Input.GetKey(KeyCode.V)) && Input.GetKey(KeyCode.K))
  7082. {
  7083. Vector3 vector2 = mainCameraTransform.TransformDirection(Vector3.forward);
  7084. Vector3 vector3 = mainCameraTransform.TransformDirection(Vector3.right);
  7085. Vector3 vector4 = mainCameraTransform.TransformDirection(Vector3.up);
  7086. Vector3 vector = bg.position;
  7087. vector += new Vector3(vector2.x, 0f, vector2.z) * 0.025f * speed;
  7088. bg.localPosition = vector;
  7089. if (Input.GetKey(KeyCode.Y))
  7090. {
  7091. keyFlg = true;
  7092. }
  7093. }
  7094. else if ((Input.GetKey(KeyCode.Y) || Input.GetKey(KeyCode.V)) && Input.GetKey(KeyCode.J))
  7095. {
  7096. Vector3 vector2 = mainCameraTransform.TransformDirection(Vector3.forward);
  7097. Vector3 vector3 = mainCameraTransform.TransformDirection(Vector3.right);
  7098. Vector3 vector4 = mainCameraTransform.TransformDirection(Vector3.up);
  7099. Vector3 vector = bg.position;
  7100. vector += new Vector3(vector3.x, 0f, vector3.z) * 0.025f * speed;
  7101. bg.localPosition = vector;
  7102. if (Input.GetKey(KeyCode.Y))
  7103. {
  7104. keyFlg = true;
  7105. }
  7106. }
  7107. else if ((Input.GetKey(KeyCode.Y) || Input.GetKey(KeyCode.V)) && Input.GetKey(KeyCode.L))
  7108. {
  7109. Vector3 vector2 = mainCameraTransform.TransformDirection(Vector3.forward);
  7110. Vector3 vector3 = mainCameraTransform.TransformDirection(Vector3.right);
  7111. Vector3 vector4 = mainCameraTransform.TransformDirection(Vector3.up);
  7112. Vector3 vector = bg.position;
  7113. vector += new Vector3(vector3.x, 0f, vector3.z) * -0.025f * speed;
  7114. bg.localPosition = vector;
  7115. if (Input.GetKey(KeyCode.Y))
  7116. {
  7117. keyFlg = true;
  7118. }
  7119. }
  7120. else if ((Input.GetKey(KeyCode.Y) || Input.GetKey(KeyCode.V)) && Input.GetKey(KeyCode.Alpha0))
  7121. {
  7122. Vector3 vector = bg.position;
  7123. vector.y -= 0.015f * speed;
  7124. bg.localPosition = vector;
  7125. if (Input.GetKey(KeyCode.Y))
  7126. {
  7127. keyFlg = true;
  7128. }
  7129. }
  7130. else if ((Input.GetKey(KeyCode.Y) || Input.GetKey(KeyCode.V)) && Input.GetKey(KeyCode.P))
  7131. {
  7132. Vector3 vector = bg.position;
  7133. vector.y += 0.015f * speed;
  7134. bg.localPosition = vector;
  7135. if (Input.GetKey(KeyCode.Y))
  7136. {
  7137. keyFlg = true;
  7138. }
  7139. }
  7140. else if ((Input.GetKey(KeyCode.Y) || Input.GetKey(KeyCode.V)) && Input.GetKey(KeyCode.U))
  7141. {
  7142. bg.RotateAround(maidArray[0].transform.position, Vector3.up, 0.7f);
  7143. if (Input.GetKey(KeyCode.Y))
  7144. {
  7145. keyFlg = true;
  7146. }
  7147. }
  7148. else if ((Input.GetKey(KeyCode.Y) || Input.GetKey(KeyCode.V)) && Input.GetKey(KeyCode.O))
  7149. {
  7150. bg.RotateAround(maidArray[0].transform.position, Vector3.up, -0.7f);
  7151. if (Input.GetKey(KeyCode.Y))
  7152. {
  7153. keyFlg = true;
  7154. }
  7155. }
  7156. else if (Input.GetKeyDown(KeyCode.Y) && Input.GetKey(KeyCode.Return))
  7157. {
  7158. if (Input.GetKey(KeyCode.Y))
  7159. {
  7160. keyFlg = true;
  7161. }
  7162. }
  7163. else if (Input.GetKeyUp(KeyCode.Y) && !yFlg)
  7164. {
  7165. if (keyFlg)
  7166. {
  7167. keyFlg = false;
  7168. }
  7169. else
  7170. {
  7171. bgIndex++;
  7172. if (bgIndex == bgArray.Length)
  7173. {
  7174. bgIndex = 0;
  7175. }
  7176. if (!moveBg)
  7177. {
  7178. bg.localScale = new Vector3(1f, 1f, 1f);
  7179. if (bgArray[bgIndex].Length == 36)
  7180. {
  7181. GameMain.Instance.BgMgr.ChangeBgMyRoom(bgArray[bgIndex]);
  7182. }
  7183. else
  7184. {
  7185. GameMain.Instance.BgMgr.ChangeBg(bgArray[bgIndex]);
  7186. }
  7187. bgCombo.selectedItemIndex = bgIndex;
  7188. if (bgArray[bgIndex] == "karaokeroom")
  7189. {
  7190. bg.transform.position = bgObject.transform.position;
  7191. Vector3 vector = Vector3.zero;
  7192. Vector3 zero3 = Vector3.zero;
  7193. zero3.y = 90f;
  7194. vector.z = 4f;
  7195. vector.x = 1f;
  7196. bg.transform.localPosition = vector;
  7197. bg.transform.localRotation = Quaternion.Euler(zero3);
  7198. }
  7199. }
  7200. }
  7201. }
  7202. if (maidArray[0] != null && maidArray[0].Visible)
  7203. {
  7204. if (Input.GetKeyDown(KeyCode.Comma) && getModKeyPressing(modKey.Shift))
  7205. {
  7206. int[] array6 = new int[1];
  7207. int[] array7 = array6;
  7208. if (maidCnt == 2)
  7209. {
  7210. array7 = new int[] { 0, 1 };
  7211. }
  7212. if (maidCnt == 3)
  7213. {
  7214. array7 = new int[] { 0, 1, 2 };
  7215. }
  7216. if (maidCnt == 4)
  7217. {
  7218. array7 = new int[] { 0, 1, 2, 3 };
  7219. }
  7220. if (maidCnt == 5)
  7221. {
  7222. array7 = new int[] { 0, 1, 2, 3, 4 };
  7223. }
  7224. if (maidCnt == 6)
  7225. {
  7226. array7 = new int[] { 0, 1, 2, 3, 4, 5 };
  7227. }
  7228. if (maidCnt == 7)
  7229. {
  7230. array7 = new int[] { 0, 1, 2, 3, 4, 5, 6 };
  7231. }
  7232. if (maidCnt == 8)
  7233. {
  7234. array7 = new int[] { 0, 1, 2, 3, 4, 5, 6, 7 };
  7235. }
  7236. if (maidCnt == 9)
  7237. {
  7238. array7 = new int[] { 0, 1, 2, 3, 4, 5, 6, 7, 8 };
  7239. }
  7240. if (maidCnt == 10)
  7241. {
  7242. array7 = new int[] { 0, 1, 2, 3, 4, 5, 6, 7, 8, 9 };
  7243. }
  7244. if (maidCnt == 11)
  7245. {
  7246. array7 = new int[] { 0, 1, 2, 3, 4, 5, 6, 7, 8, 9, 10 };
  7247. }
  7248. if (maidCnt == 12)
  7249. {
  7250. array7 = new int[] { 0, 1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11 };
  7251. }
  7252. Random random = new Random();
  7253. int n = array7.Length;
  7254. while (n > 1)
  7255. {
  7256. n--;
  7257. int j = random.Next(n + 1);
  7258. int num8 = array7[j];
  7259. array7[j] = array7[n];
  7260. array7[n] = num8;
  7261. }
  7262. int[] array8 = new int[maidCnt];
  7263. Vector3[] array9 = new Vector3[maidCnt];
  7264. Vector3[] array10 = new Vector3[maidCnt];
  7265. int[] array11 = new int[maidCnt];
  7266. for (int i = 0; i < maidCnt; i++)
  7267. {
  7268. array8[array7[i]] = poseIndex[array7[i]];
  7269. array9[array7[i]] = maidArray[array7[i]].transform.localRotation.eulerAngles;
  7270. array10[array7[i]] = maidArray[array7[i]].transform.position;
  7271. array11[array7[i]] = headEyeIndex[array7[i]];
  7272. }
  7273. for (int i = 0; i < maidCnt; i++)
  7274. {
  7275. if (maidArray[i] && maidArray[i].Visible && !isLock[i])
  7276. {
  7277. string[] array12 = poseArray[array8[array7[i]]].Split(new char[] { ',' });
  7278. isStop[i] = false;
  7279. poseCount[i] = 20;
  7280. Maid maid = maidArray[i];
  7281. if (array12[0].Contains("_momi") || array12[0].Contains("paizuri_"))
  7282. {
  7283. maid.body0.MuneYureL(0f);
  7284. maid.body0.MuneYureR(0f);
  7285. }
  7286. else
  7287. {
  7288. maid.body0.MuneYureL(1f);
  7289. maid.body0.MuneYureR(1f);
  7290. }
  7291. if (array12[0].Contains("MultipleMaidsPose"))
  7292. {
  7293. string path = array12[0].Split(new char[] { '/' })[1];
  7294. byte[] array2 = new byte[0];
  7295. try
  7296. {
  7297. using (FileStream fileStream = new FileStream(path, FileMode.Open, FileAccess.Read))
  7298. {
  7299. array2 = new byte[fileStream.Length];
  7300. fileStream.Read(array2, 0, array2.Length);
  7301. }
  7302. }
  7303. catch { }
  7304. if (0 < array2.Length)
  7305. {
  7306. string text = Path.GetFileName(path);
  7307. long num5 = text.GetHashCode();
  7308. maid.body0.CrossFade(num5.ToString(), array2, false, false, false, 0f, 1f);
  7309. Maid.AutoTwist[] array3 = new Maid.AutoTwist[]
  7310. {
  7311. Maid.AutoTwist.ShoulderL, Maid.AutoTwist.ShoulderR, Maid.AutoTwist.WristL,
  7312. Maid.AutoTwist.WristR, Maid.AutoTwist.ThighL, Maid.AutoTwist.ThighR
  7313. };
  7314. for (int m = 0; m < array3.Length; m++)
  7315. {
  7316. maid.SetAutoTwist(array3[m], true);
  7317. }
  7318. }
  7319. }
  7320. else if (array12[0].StartsWith("p") && int.TryParse(array12[0].Substring(1), out int num6))
  7321. {
  7322. loadPose[i] = array12[0];
  7323. }
  7324. else if (!array12[0].StartsWith("dance_"))
  7325. {
  7326. maidArray[i].CrossFade(array12[0] + ".anm", false, true, false, 0f, 1f);
  7327. }
  7328. else
  7329. {
  7330. if (!maidArray[i].body0.m_Bones.GetComponent<Animation>().GetClip(array12[0] + ".anm"))
  7331. {
  7332. maidArray[i].body0.LoadAnime(array12[0] + ".anm",
  7333. GameUty.FileSystem,
  7334. array12[0] + ".anm",
  7335. false,
  7336. false);
  7337. }
  7338. maidArray[i].body0.m_Bones.GetComponent<Animation>().Play(array12[0] + ".anm");
  7339. }
  7340. if (array12.Length > 1)
  7341. {
  7342. maidArray[i].body0.m_Bones.GetComponent<Animation>()[array12[0] + ".anm"].time =
  7343. float.Parse(array12[1]);
  7344. isStop[i] = true;
  7345. if (array12.Length > 2)
  7346. {
  7347. Transform transform2 = CMT.SearchObjName(maidArray[i].body0.m_Bones.transform, "Bip01", true);
  7348. isPoseIti[i] = true;
  7349. poseIti[i] = maidArray[i].transform.position;
  7350. maidArray[i].transform.position = new Vector3(100f, 100f, 100f);
  7351. }
  7352. }
  7353. }
  7354. poseIndex[i] = array8[array7[i]];
  7355. maidArray[i].SetRot(array9[array7[i]]);
  7356. maidArray[i].SetPos(array10[array7[i]]);
  7357. headEyeIndex[i] = array11[array7[i]];
  7358. maidArray[i].body0.trsLookTarget = GameMain.Instance.MainCamera.transform;
  7359. maidArray[i].body0.boHeadToCam = true;
  7360. maidArray[i].body0.boEyeToCam = true;
  7361. if (headEyeIndex[i] == 0)
  7362. {
  7363. maidArray[i].body0.trsLookTarget = GameMain.Instance.MainCamera.transform;
  7364. maidArray[i].body0.boHeadToCam = true;
  7365. maidArray[i].body0.boEyeToCam = true;
  7366. }
  7367. else
  7368. {
  7369. maidArray[i].body0.trsLookTarget = null;
  7370. if (headEyeIndex[i] == 1)
  7371. {
  7372. maidArray[i].body0.offsetLookTarget = new Vector3(-0.7f, 1f, -0.6f);
  7373. }
  7374. if (headEyeIndex[i] == 2)
  7375. {
  7376. maidArray[i].body0.offsetLookTarget = new Vector3(-0.6f, 1f, 0f);
  7377. }
  7378. if (headEyeIndex[i] == 3)
  7379. {
  7380. maidArray[i].body0.offsetLookTarget = new Vector3(-0.7f, 1f, 0.6f);
  7381. }
  7382. if (headEyeIndex[i] == 4)
  7383. {
  7384. maidArray[i].body0.offsetLookTarget = new Vector3(-0.1f, 1f, -0.4f);
  7385. }
  7386. if (headEyeIndex[i] == 5)
  7387. {
  7388. maidArray[i].body0.offsetLookTarget = new Vector3(0f, 1f, 0f);
  7389. }
  7390. if (headEyeIndex[i] == 6)
  7391. {
  7392. maidArray[i].body0.offsetLookTarget = new Vector3(-0.1f, 1f, 0.4f);
  7393. }
  7394. if (headEyeIndex[i] == 7)
  7395. {
  7396. maidArray[i].body0.offsetLookTarget = new Vector3(0.4f, 1f, -0.5f);
  7397. }
  7398. if (headEyeIndex[i] == 8)
  7399. {
  7400. maidArray[i].body0.offsetLookTarget = new Vector3(0.3f, 1f, 0f);
  7401. }
  7402. if (headEyeIndex[i] == 9)
  7403. {
  7404. maidArray[i].body0.offsetLookTarget = new Vector3(0.4f, 1f, 0.5f);
  7405. }
  7406. }
  7407. }
  7408. }
  7409. else if (Input.GetKeyDown(KeyCode.Comma))
  7410. {
  7411. int[] array8 = new int[maidCnt];
  7412. Vector3[] array9 = new Vector3[maidCnt];
  7413. Vector3[] array10 = new Vector3[maidCnt];
  7414. int[] array11 = new int[maidCnt];
  7415. for (int i = 0; i < maidCnt; i++)
  7416. {
  7417. array8[i] = poseIndex[i];
  7418. array9[i] = maidArray[i].transform.localRotation.eulerAngles;
  7419. array10[i] = maidArray[i].transform.position;
  7420. array11[i] = headEyeIndex[i];
  7421. }
  7422. for (int i = 0; i < maidCnt; i++)
  7423. {
  7424. if (i == 0)
  7425. {
  7426. if (!isLock[i])
  7427. {
  7428. if (maidArray[i] && maidArray[i].Visible)
  7429. {
  7430. string[] array12 = poseArray[array8[maidCnt - i - 1]].Split(new char[] { ',' });
  7431. isStop[i] = false;
  7432. poseCount[i] = 20;
  7433. Maid maid = maidArray[i];
  7434. if (array12[0].Contains("_momi") || array12[0].Contains("paizuri_"))
  7435. {
  7436. maid.body0.MuneYureL(0f);
  7437. maid.body0.MuneYureR(0f);
  7438. }
  7439. else
  7440. {
  7441. maid.body0.MuneYureL(1f);
  7442. maid.body0.MuneYureR(1f);
  7443. }
  7444. if (array12[0].Contains("MultipleMaidsPose"))
  7445. {
  7446. string path = array12[0].Split(new char[] { '/' })[1];
  7447. byte[] array2 = new byte[0];
  7448. try
  7449. {
  7450. using (FileStream fileStream = new FileStream(path, FileMode.Open, FileAccess.Read))
  7451. {
  7452. array2 = new byte[fileStream.Length];
  7453. fileStream.Read(array2, 0, array2.Length);
  7454. }
  7455. }
  7456. catch { }
  7457. if (0 < array2.Length)
  7458. {
  7459. string text = Path.GetFileName(path);
  7460. long num5 = text.GetHashCode();
  7461. maid.body0.CrossFade(num5.ToString(), array2, false, false, false, 0f, 1f);
  7462. Maid.AutoTwist[] array3 = new Maid.AutoTwist[]
  7463. {
  7464. Maid.AutoTwist.ShoulderL, Maid.AutoTwist.ShoulderR, Maid.AutoTwist.WristL,
  7465. Maid.AutoTwist.WristR, Maid.AutoTwist.ThighL, Maid.AutoTwist.ThighR
  7466. };
  7467. for (int m = 0; m < array3.Length; m++)
  7468. {
  7469. maid.SetAutoTwist(array3[m], true);
  7470. }
  7471. }
  7472. }
  7473. else if (array12[0].StartsWith("p") && int.TryParse(array12[0].Substring(1), out int num6))
  7474. {
  7475. loadPose[i] = array12[0];
  7476. }
  7477. else if (!array12[0].StartsWith("dance_"))
  7478. {
  7479. maidArray[i].CrossFade(array12[0] + ".anm", false, true, false, 0f, 1f);
  7480. }
  7481. else
  7482. {
  7483. if (!maidArray[i].body0.m_Bones.GetComponent<Animation>().GetClip(array12[0] + ".anm"))
  7484. {
  7485. maidArray[i].body0.LoadAnime(array12[0] + ".anm",
  7486. GameUty.FileSystem,
  7487. array12[0] + ".anm",
  7488. false,
  7489. false);
  7490. }
  7491. maidArray[i].body0.m_Bones.GetComponent<Animation>().Play(array12[0] + ".anm");
  7492. }
  7493. if (array12.Length > 1)
  7494. {
  7495. maidArray[i].body0.m_Bones.GetComponent<Animation>()[array12[0] + ".anm"].time =
  7496. float.Parse(array12[1]);
  7497. isStop[i] = true;
  7498. if (array12.Length > 2)
  7499. {
  7500. Transform transform2 =
  7501. CMT.SearchObjName(maidArray[i].body0.m_Bones.transform, "Bip01", true);
  7502. isPoseIti[i] = true;
  7503. poseIti[i] = maidArray[i].transform.position;
  7504. maidArray[i].transform.position = new Vector3(100f, 100f, 100f);
  7505. }
  7506. }
  7507. }
  7508. }
  7509. poseIndex[i] = array8[maidCnt - i - 1];
  7510. headEyeIndex[i] = array11[maidCnt - i - 1];
  7511. }
  7512. else
  7513. {
  7514. if (!isLock[i])
  7515. {
  7516. if (maidArray[i] && maidArray[i].Visible)
  7517. {
  7518. string[] array12 = poseArray[array8[i - 1]].Split(new char[] { ',' });
  7519. isStop[i] = false;
  7520. poseCount[i] = 20;
  7521. Maid maid = maidArray[i];
  7522. if (array12[0].Contains("_momi") || array12[0].Contains("paizuri_"))
  7523. {
  7524. maid.body0.MuneYureL(0f);
  7525. maid.body0.MuneYureR(0f);
  7526. }
  7527. else
  7528. {
  7529. maid.body0.MuneYureL(1f);
  7530. maid.body0.MuneYureR(1f);
  7531. }
  7532. if (array12[0].Contains("MultipleMaidsPose"))
  7533. {
  7534. string path = array12[0].Split(new char[] { '/' })[1];
  7535. byte[] array2 = new byte[0];
  7536. try
  7537. {
  7538. using (FileStream fileStream = new FileStream(path, FileMode.Open, FileAccess.Read))
  7539. {
  7540. array2 = new byte[fileStream.Length];
  7541. fileStream.Read(array2, 0, array2.Length);
  7542. }
  7543. }
  7544. catch { }
  7545. if (0 < array2.Length)
  7546. {
  7547. string text = Path.GetFileName(path);
  7548. long num5 = text.GetHashCode();
  7549. maid.body0.CrossFade(num5.ToString(), array2, false, false, false, 0f, 1f);
  7550. Maid.AutoTwist[] array3 = new Maid.AutoTwist[]
  7551. {
  7552. Maid.AutoTwist.ShoulderL, Maid.AutoTwist.ShoulderR, Maid.AutoTwist.WristL,
  7553. Maid.AutoTwist.WristR, Maid.AutoTwist.ThighL, Maid.AutoTwist.ThighR
  7554. };
  7555. for (int m = 0; m < array3.Length; m++)
  7556. {
  7557. maid.SetAutoTwist(array3[m], true);
  7558. }
  7559. }
  7560. }
  7561. else if (array12[0].StartsWith("p") && int.TryParse(array12[0].Substring(1), out int num6))
  7562. {
  7563. loadPose[i] = array12[0];
  7564. }
  7565. else if (!array12[0].StartsWith("dance_"))
  7566. {
  7567. maidArray[i].CrossFade(array12[0] + ".anm", false, true, false, 0f, 1f);
  7568. }
  7569. else
  7570. {
  7571. if (!maidArray[i].body0.m_Bones.GetComponent<Animation>().GetClip(array12[0] + ".anm"))
  7572. {
  7573. maidArray[i].body0.LoadAnime(array12[0] + ".anm",
  7574. GameUty.FileSystem,
  7575. array12[0] + ".anm",
  7576. false,
  7577. false);
  7578. }
  7579. maidArray[i].body0.m_Bones.GetComponent<Animation>().Play(array12[0] + ".anm");
  7580. }
  7581. if (array12.Length > 1)
  7582. {
  7583. maidArray[i].body0.m_Bones.GetComponent<Animation>()[array12[0] + ".anm"].time =
  7584. float.Parse(array12[1]);
  7585. isStop[i] = true;
  7586. if (array12.Length > 2)
  7587. {
  7588. Transform transform2 =
  7589. CMT.SearchObjName(maidArray[i].body0.m_Bones.transform, "Bip01", true);
  7590. isPoseIti[i] = true;
  7591. poseIti[i] = maidArray[i].transform.position;
  7592. maidArray[i].transform.position = new Vector3(100f, 100f, 100f);
  7593. }
  7594. }
  7595. }
  7596. }
  7597. poseIndex[i] = array8[i - 1];
  7598. headEyeIndex[i] = array11[i - 1];
  7599. }
  7600. maidArray[i].body0.trsLookTarget = GameMain.Instance.MainCamera.transform;
  7601. maidArray[i].body0.boHeadToCam = true;
  7602. maidArray[i].body0.boEyeToCam = true;
  7603. if (headEyeIndex[i] == 0)
  7604. {
  7605. maidArray[i].body0.trsLookTarget = GameMain.Instance.MainCamera.transform;
  7606. maidArray[i].body0.boHeadToCam = true;
  7607. maidArray[i].body0.boEyeToCam = true;
  7608. }
  7609. else
  7610. {
  7611. maidArray[i].body0.trsLookTarget = null;
  7612. if (headEyeIndex[i] == 1)
  7613. {
  7614. maidArray[i].body0.offsetLookTarget = new Vector3(-0.7f, 1f, -0.6f);
  7615. }
  7616. if (headEyeIndex[i] == 2)
  7617. {
  7618. maidArray[i].body0.offsetLookTarget = new Vector3(-0.6f, 1f, 0f);
  7619. }
  7620. if (headEyeIndex[i] == 3)
  7621. {
  7622. maidArray[i].body0.offsetLookTarget = new Vector3(-0.7f, 1f, 0.6f);
  7623. }
  7624. if (headEyeIndex[i] == 4)
  7625. {
  7626. maidArray[i].body0.offsetLookTarget = new Vector3(-0.1f, 1f, -0.4f);
  7627. }
  7628. if (headEyeIndex[i] == 5)
  7629. {
  7630. maidArray[i].body0.offsetLookTarget = new Vector3(0f, 1f, 0f);
  7631. }
  7632. if (headEyeIndex[i] == 6)
  7633. {
  7634. maidArray[i].body0.offsetLookTarget = new Vector3(-0.1f, 1f, 0.4f);
  7635. }
  7636. if (headEyeIndex[i] == 7)
  7637. {
  7638. maidArray[i].body0.offsetLookTarget = new Vector3(0.4f, 1f, -0.5f);
  7639. }
  7640. if (headEyeIndex[i] == 8)
  7641. {
  7642. maidArray[i].body0.offsetLookTarget = new Vector3(0.3f, 1f, 0f);
  7643. }
  7644. if (headEyeIndex[i] == 9)
  7645. {
  7646. maidArray[i].body0.offsetLookTarget = new Vector3(0.4f, 1f, 0.5f);
  7647. }
  7648. }
  7649. if (i == 0)
  7650. {
  7651. maidArray[i].SetRot(array9[maidCnt - i - 1]);
  7652. maidArray[i].SetPos(array10[maidCnt - i - 1]);
  7653. }
  7654. else
  7655. {
  7656. maidArray[i].SetRot(array9[i - 1]);
  7657. maidArray[i].SetPos(array10[i - 1]);
  7658. }
  7659. }
  7660. }
  7661. for (int i = 0; i < maidCnt; i++)
  7662. {
  7663. if (Input.GetKey(KeyCode.B) && getModKeyPressing(modKey.Shift))
  7664. {
  7665. if (maidArray[i] && maidArray[i].Visible)
  7666. {
  7667. maidArray[i].body0.transform.localRotation =
  7668. Quaternion.Euler(maidArray[i].body0.transform.localEulerAngles)
  7669. * Quaternion.AngleAxis(-1.5f, Vector3.up);
  7670. }
  7671. }
  7672. else if (Input.GetKey(KeyCode.B))
  7673. {
  7674. if (maidArray[i] && maidArray[i].Visible)
  7675. {
  7676. maidArray[i].body0.transform.localRotation =
  7677. Quaternion.Euler(maidArray[i].body0.transform.localEulerAngles)
  7678. * Quaternion.AngleAxis(1.5f, Vector3.up);
  7679. }
  7680. }
  7681. if (Input.GetKeyDown(KeyCode.N) && Input.GetKey(KeyCode.LeftAlt) && !isLock[i])
  7682. {
  7683. if (maidArray[1] && maidArray[1].Visible)
  7684. {
  7685. if (maidArray[0].transform.position == maidArray[1].transform.position
  7686. || (maidArray[2] && maidArray[0].transform.position == maidArray[2].transform.position))
  7687. {
  7688. Vector3 vector = Vector3.zero;
  7689. vector.x = 0.6f;
  7690. maidArray[1].SetPos(vector);
  7691. if (maidArray[2] && maidArray[2].Visible)
  7692. {
  7693. vector.x = -0.6f;
  7694. maidArray[2].SetPos(vector);
  7695. }
  7696. if (maidArray[3] && maidArray[3].Visible)
  7697. {
  7698. vector.x = 1.2f;
  7699. maidArray[3].SetPos(vector);
  7700. }
  7701. if (maidArray[4] && maidArray[4].Visible)
  7702. {
  7703. vector.x = -1.2f;
  7704. maidArray[4].SetPos(vector);
  7705. }
  7706. if (maidArray[5] && maidArray[5].Visible)
  7707. {
  7708. vector.x = 1.8f;
  7709. maidArray[5].SetPos(vector);
  7710. }
  7711. if (maidArray[6] && maidArray[6].Visible)
  7712. {
  7713. vector.x = -1.8f;
  7714. maidArray[6].SetPos(vector);
  7715. }
  7716. if (maidArray[7] && maidArray[7].Visible)
  7717. {
  7718. vector.x = 2.4f;
  7719. maidArray[7].SetPos(vector);
  7720. }
  7721. if (maidArray[8] && maidArray[8].Visible)
  7722. {
  7723. vector.x = -2.4f;
  7724. maidArray[8].SetPos(vector);
  7725. }
  7726. if (maidArray[9] && maidArray[9].Visible)
  7727. {
  7728. vector.x = 3f;
  7729. maidArray[9].SetPos(vector);
  7730. }
  7731. if (maidArray[10] && maidArray[10].Visible)
  7732. {
  7733. vector.x = -3f;
  7734. maidArray[10].SetPos(vector);
  7735. }
  7736. if (maidArray[11] && maidArray[11].Visible)
  7737. {
  7738. vector.x = 3.6f;
  7739. maidArray[11].SetPos(vector);
  7740. }
  7741. if (maidArray[12] && maidArray[12].Visible)
  7742. {
  7743. vector.x = -3.6f;
  7744. maidArray[12].SetPos(vector);
  7745. }
  7746. if (maidArray[13] && maidArray[13].Visible)
  7747. {
  7748. vector.x = 4.2f;
  7749. maidArray[13].SetPos(vector);
  7750. }
  7751. }
  7752. }
  7753. for (int k = 0; k < groupList.Count; k++)
  7754. {
  7755. if (k == 0 && poseIndex[i] <= (int)groupList[k])
  7756. {
  7757. if (poseIndex[i] == 0)
  7758. {
  7759. poseIndex[i] = (int)groupList[groupList.Count - 1];
  7760. }
  7761. else
  7762. {
  7763. poseIndex[i] = 0;
  7764. }
  7765. break;
  7766. }
  7767. if (k > 0 && poseIndex[i] > (int)groupList[k - 1] && poseIndex[i] <= (int)groupList[k])
  7768. {
  7769. poseIndex[i] = (int)groupList[k - 1];
  7770. break;
  7771. }
  7772. }
  7773. if (poseIndex[i] > (int)groupList[groupList.Count - 1])
  7774. {
  7775. poseIndex[i] = (int)groupList[groupList.Count - 1];
  7776. }
  7777. if (maidArray[i] && maidArray[i].Visible)
  7778. {
  7779. string[] array = poseArray[poseIndex[i]].Split(new char[] { ',' });
  7780. isStop[i] = false;
  7781. poseCount[i] = 20;
  7782. Maid maid = maidArray[i];
  7783. if (array[0].Contains("_momi") || array[0].Contains("paizuri_"))
  7784. {
  7785. maid.body0.MuneYureL(0f);
  7786. maid.body0.MuneYureR(0f);
  7787. }
  7788. else
  7789. {
  7790. maid.body0.MuneYureL(1f);
  7791. maid.body0.MuneYureR(1f);
  7792. }
  7793. if (array[0].Contains("MultipleMaidsPose"))
  7794. {
  7795. string path = array[0].Split(new char[] { '/' })[1];
  7796. byte[] array2 = new byte[0];
  7797. try
  7798. {
  7799. using (FileStream fileStream = new FileStream(path, FileMode.Open, FileAccess.Read))
  7800. {
  7801. array2 = new byte[fileStream.Length];
  7802. fileStream.Read(array2, 0, array2.Length);
  7803. }
  7804. }
  7805. catch { }
  7806. if (0 < array2.Length)
  7807. {
  7808. string text = Path.GetFileName(path);
  7809. long num5 = text.GetHashCode();
  7810. maid.body0.CrossFade(num5.ToString(), array2, false, false, false, 0f, 1f);
  7811. Maid.AutoTwist[] array3 = new Maid.AutoTwist[]
  7812. {
  7813. Maid.AutoTwist.ShoulderL, Maid.AutoTwist.ShoulderR, Maid.AutoTwist.WristL,
  7814. Maid.AutoTwist.WristR, Maid.AutoTwist.ThighL, Maid.AutoTwist.ThighR
  7815. };
  7816. for (int m = 0; m < array3.Length; m++)
  7817. {
  7818. maid.SetAutoTwist(array3[m], true);
  7819. }
  7820. }
  7821. }
  7822. else if (array[0].StartsWith("p") && int.TryParse(array[0].Substring(1), out int num6))
  7823. {
  7824. loadPose[i] = array[0];
  7825. }
  7826. else if (!array[0].StartsWith("dance_"))
  7827. {
  7828. maidArray[i].CrossFade(array[0] + ".anm", false, true, false, 0f, 1f);
  7829. }
  7830. else
  7831. {
  7832. if (!maidArray[i].body0.m_Bones.GetComponent<Animation>().GetClip(array[0] + ".anm"))
  7833. {
  7834. maidArray[i].body0.LoadAnime(array[0] + ".anm",
  7835. GameUty.FileSystem,
  7836. array[0] + ".anm",
  7837. false,
  7838. false);
  7839. }
  7840. maidArray[i].body0.m_Bones.GetComponent<Animation>().Play(array[0] + ".anm");
  7841. }
  7842. if (array.Length > 1)
  7843. {
  7844. maidArray[i].body0.m_Bones.GetComponent<Animation>()[array[0] + ".anm"].time = float.Parse(array[1]);
  7845. isStop[i] = true;
  7846. if (array.Length > 2)
  7847. {
  7848. Transform transform2 = CMT.SearchObjName(maidArray[i].body0.m_Bones.transform, "Bip01", true);
  7849. isPoseIti[i] = true;
  7850. poseIti[i] = maidArray[i].transform.position;
  7851. maidArray[i].transform.position = new Vector3(100f, 100f, 100f);
  7852. }
  7853. }
  7854. }
  7855. }
  7856. else if (Input.GetKeyDown(KeyCode.N) && Input.GetKey(KeyCode.RightAlt) && !isLock[i])
  7857. {
  7858. if (maidArray[1] && maidArray[1].Visible)
  7859. {
  7860. if (maidArray[0].transform.position == maidArray[1].transform.position
  7861. || (maidArray[2] && maidArray[0].transform.position == maidArray[2].transform.position))
  7862. {
  7863. Vector3 vector = Vector3.zero;
  7864. vector.x = 0.6f;
  7865. maidArray[1].SetPos(vector);
  7866. if (maidArray[2] && maidArray[2].Visible)
  7867. {
  7868. vector.x = -0.6f;
  7869. maidArray[2].SetPos(vector);
  7870. }
  7871. if (maidArray[3] && maidArray[3].Visible)
  7872. {
  7873. vector.x = 1.2f;
  7874. maidArray[3].SetPos(vector);
  7875. }
  7876. if (maidArray[4] && maidArray[4].Visible)
  7877. {
  7878. vector.x = -1.2f;
  7879. maidArray[4].SetPos(vector);
  7880. }
  7881. if (maidArray[5] && maidArray[5].Visible)
  7882. {
  7883. vector.x = 1.8f;
  7884. maidArray[5].SetPos(vector);
  7885. }
  7886. if (maidArray[6] && maidArray[6].Visible)
  7887. {
  7888. vector.x = -1.8f;
  7889. maidArray[6].SetPos(vector);
  7890. }
  7891. if (maidArray[7] && maidArray[7].Visible)
  7892. {
  7893. vector.x = 2.4f;
  7894. maidArray[7].SetPos(vector);
  7895. }
  7896. if (maidArray[8] && maidArray[8].Visible)
  7897. {
  7898. vector.x = -2.4f;
  7899. maidArray[8].SetPos(vector);
  7900. }
  7901. if (maidArray[9] && maidArray[9].Visible)
  7902. {
  7903. vector.x = 3f;
  7904. maidArray[9].SetPos(vector);
  7905. }
  7906. if (maidArray[10] && maidArray[10].Visible)
  7907. {
  7908. vector.x = -3f;
  7909. maidArray[10].SetPos(vector);
  7910. }
  7911. if (maidArray[11] && maidArray[11].Visible)
  7912. {
  7913. vector.x = 3.6f;
  7914. maidArray[11].SetPos(vector);
  7915. }
  7916. if (maidArray[12] && maidArray[12].Visible)
  7917. {
  7918. vector.x = -3.6f;
  7919. maidArray[12].SetPos(vector);
  7920. }
  7921. if (maidArray[13] && maidArray[13].Visible)
  7922. {
  7923. vector.x = 4.2f;
  7924. maidArray[13].SetPos(vector);
  7925. }
  7926. }
  7927. }
  7928. int num7 = poseIndex[i];
  7929. for (int k = 0; k < groupList.Count; k++)
  7930. {
  7931. if (poseIndex[i] < (int)groupList[k])
  7932. {
  7933. poseIndex[i] = (int)groupList[k];
  7934. break;
  7935. }
  7936. }
  7937. if (num7 == poseIndex[i] && poseIndex[i] >= (int)groupList[groupList.Count - 1])
  7938. {
  7939. poseIndex[i] = 0;
  7940. }
  7941. if (maidArray[i] && maidArray[i].Visible)
  7942. {
  7943. string[] array = poseArray[poseIndex[i]].Split(new char[] { ',' });
  7944. isStop[i] = false;
  7945. poseCount[i] = 20;
  7946. Maid maid = maidArray[i];
  7947. if (array[0].Contains("_momi") || array[0].Contains("paizuri_"))
  7948. {
  7949. maid.body0.MuneYureL(0f);
  7950. maid.body0.MuneYureR(0f);
  7951. }
  7952. else
  7953. {
  7954. maid.body0.MuneYureL(1f);
  7955. maid.body0.MuneYureR(1f);
  7956. }
  7957. if (array[0].Contains("MultipleMaidsPose"))
  7958. {
  7959. string path = array[0].Split(new char[] { '/' })[1];
  7960. byte[] array2 = new byte[0];
  7961. try
  7962. {
  7963. using (FileStream fileStream = new FileStream(path, FileMode.Open, FileAccess.Read))
  7964. {
  7965. array2 = new byte[fileStream.Length];
  7966. fileStream.Read(array2, 0, array2.Length);
  7967. }
  7968. }
  7969. catch { }
  7970. if (0 < array2.Length)
  7971. {
  7972. string text = Path.GetFileName(path);
  7973. long num5 = text.GetHashCode();
  7974. maid.body0.CrossFade(num5.ToString(), array2, false, false, false, 0f, 1f);
  7975. Maid.AutoTwist[] array3 = new Maid.AutoTwist[]
  7976. {
  7977. Maid.AutoTwist.ShoulderL, Maid.AutoTwist.ShoulderR, Maid.AutoTwist.WristL,
  7978. Maid.AutoTwist.WristR, Maid.AutoTwist.ThighL, Maid.AutoTwist.ThighR
  7979. };
  7980. for (int m = 0; m < array3.Length; m++)
  7981. {
  7982. maid.SetAutoTwist(array3[m], true);
  7983. }
  7984. }
  7985. }
  7986. else if (array[0].StartsWith("p") && int.TryParse(array[0].Substring(1), out int num6))
  7987. {
  7988. loadPose[i] = array[0];
  7989. }
  7990. else if (!array[0].StartsWith("dance_"))
  7991. {
  7992. maidArray[i].CrossFade(array[0] + ".anm", false, true, false, 0f, 1f);
  7993. }
  7994. else
  7995. {
  7996. if (!maidArray[i].body0.m_Bones.GetComponent<Animation>().GetClip(array[0] + ".anm"))
  7997. {
  7998. maidArray[i].body0.LoadAnime(array[0] + ".anm",
  7999. GameUty.FileSystem,
  8000. array[0] + ".anm",
  8001. false,
  8002. false);
  8003. }
  8004. maidArray[i].body0.m_Bones.GetComponent<Animation>().Play(array[0] + ".anm");
  8005. }
  8006. if (array.Length > 1)
  8007. {
  8008. maidArray[i].body0.m_Bones.GetComponent<Animation>()[array[0] + ".anm"].time = float.Parse(array[1]);
  8009. isStop[i] = true;
  8010. if (array.Length > 2)
  8011. {
  8012. Transform transform2 = CMT.SearchObjName(maidArray[i].body0.m_Bones.transform, "Bip01", true);
  8013. isPoseIti[i] = true;
  8014. poseIti[i] = maidArray[i].transform.position;
  8015. maidArray[i].transform.position = new Vector3(100f, 100f, 100f);
  8016. }
  8017. }
  8018. }
  8019. }
  8020. else if (Input.GetKeyDown(KeyCode.N) && getModKeyPressing(modKey.Shift) && !isLock[i])
  8021. {
  8022. if (maidArray[1] && maidArray[1].Visible)
  8023. {
  8024. if (maidArray[0].transform.position == maidArray[1].transform.position
  8025. || (maidArray[2] && maidArray[0].transform.position == maidArray[2].transform.position))
  8026. {
  8027. Vector3 vector = Vector3.zero;
  8028. vector.x = 0.6f;
  8029. maidArray[1].SetPos(vector);
  8030. if (maidArray[2] && maidArray[2].Visible)
  8031. {
  8032. vector.x = -0.6f;
  8033. maidArray[2].SetPos(vector);
  8034. }
  8035. if (maidArray[3] && maidArray[3].Visible)
  8036. {
  8037. vector.x = 1.2f;
  8038. maidArray[3].SetPos(vector);
  8039. }
  8040. if (maidArray[4] && maidArray[4].Visible)
  8041. {
  8042. vector.x = -1.2f;
  8043. maidArray[4].SetPos(vector);
  8044. }
  8045. if (maidArray[5] && maidArray[5].Visible)
  8046. {
  8047. vector.x = 1.8f;
  8048. maidArray[5].SetPos(vector);
  8049. }
  8050. if (maidArray[6] && maidArray[6].Visible)
  8051. {
  8052. vector.x = -1.8f;
  8053. maidArray[6].SetPos(vector);
  8054. }
  8055. if (maidArray[7] && maidArray[7].Visible)
  8056. {
  8057. vector.x = 2.4f;
  8058. maidArray[7].SetPos(vector);
  8059. }
  8060. if (maidArray[8] && maidArray[8].Visible)
  8061. {
  8062. vector.x = -2.4f;
  8063. maidArray[8].SetPos(vector);
  8064. }
  8065. if (maidArray[9] && maidArray[9].Visible)
  8066. {
  8067. vector.x = 3f;
  8068. maidArray[9].SetPos(vector);
  8069. }
  8070. if (maidArray[10] && maidArray[10].Visible)
  8071. {
  8072. vector.x = -3f;
  8073. maidArray[10].SetPos(vector);
  8074. }
  8075. if (maidArray[11] && maidArray[11].Visible)
  8076. {
  8077. vector.x = 3.6f;
  8078. maidArray[11].SetPos(vector);
  8079. }
  8080. if (maidArray[12] && maidArray[12].Visible)
  8081. {
  8082. vector.x = -3.6f;
  8083. maidArray[12].SetPos(vector);
  8084. }
  8085. if (maidArray[13] && maidArray[13].Visible)
  8086. {
  8087. vector.x = 4.2f;
  8088. maidArray[13].SetPos(vector);
  8089. }
  8090. }
  8091. }
  8092. poseIndex[i]--;
  8093. if (poseIndex[i] <= -1)
  8094. {
  8095. poseIndex[i] = poseArray.Length - 1;
  8096. }
  8097. if (maidArray[i] && maidArray[i].Visible)
  8098. {
  8099. string[] array = poseArray[poseIndex[i]].Split(new char[] { ',' });
  8100. isStop[i] = false;
  8101. poseCount[i] = 20;
  8102. Maid maid = maidArray[i];
  8103. if (array[0].Contains("_momi") || array[0].Contains("paizuri_"))
  8104. {
  8105. maid.body0.MuneYureL(0f);
  8106. maid.body0.MuneYureR(0f);
  8107. }
  8108. else
  8109. {
  8110. maid.body0.MuneYureL(1f);
  8111. maid.body0.MuneYureR(1f);
  8112. }
  8113. if (array[0].Contains("MultipleMaidsPose"))
  8114. {
  8115. string path = array[0].Split(new char[] { '/' })[1];
  8116. byte[] array2 = new byte[0];
  8117. try
  8118. {
  8119. using (FileStream fileStream = new FileStream(path, FileMode.Open, FileAccess.Read))
  8120. {
  8121. array2 = new byte[fileStream.Length];
  8122. fileStream.Read(array2, 0, array2.Length);
  8123. }
  8124. }
  8125. catch { }
  8126. if (0 < array2.Length)
  8127. {
  8128. string text = Path.GetFileName(path);
  8129. long num5 = text.GetHashCode();
  8130. maid.body0.CrossFade(num5.ToString(), array2, false, false, false, 0f, 1f);
  8131. Maid.AutoTwist[] array3 = new Maid.AutoTwist[]
  8132. {
  8133. Maid.AutoTwist.ShoulderL, Maid.AutoTwist.ShoulderR, Maid.AutoTwist.WristL,
  8134. Maid.AutoTwist.WristR, Maid.AutoTwist.ThighL, Maid.AutoTwist.ThighR
  8135. };
  8136. for (int m = 0; m < array3.Length; m++)
  8137. {
  8138. maid.SetAutoTwist(array3[m], true);
  8139. }
  8140. }
  8141. }
  8142. else if (array[0].StartsWith("p") && int.TryParse(array[0].Substring(1), out int num6))
  8143. {
  8144. loadPose[i] = array[0];
  8145. }
  8146. else if (!array[0].StartsWith("dance_"))
  8147. {
  8148. maidArray[i].CrossFade(array[0] + ".anm", false, true, false, 0f, 1f);
  8149. }
  8150. else
  8151. {
  8152. if (!maidArray[i].body0.m_Bones.GetComponent<Animation>().GetClip(array[0] + ".anm"))
  8153. {
  8154. maidArray[i].body0.LoadAnime(array[0] + ".anm",
  8155. GameUty.FileSystem,
  8156. array[0] + ".anm",
  8157. false,
  8158. false);
  8159. }
  8160. maidArray[i].body0.m_Bones.GetComponent<Animation>().Play(array[0] + ".anm");
  8161. }
  8162. if (array.Length > 1)
  8163. {
  8164. maidArray[i].body0.m_Bones.GetComponent<Animation>()[array[0] + ".anm"].time = float.Parse(array[1]);
  8165. isStop[i] = true;
  8166. if (array.Length > 2)
  8167. {
  8168. Transform transform2 = CMT.SearchObjName(maidArray[i].body0.m_Bones.transform, "Bip01", true);
  8169. isPoseIti[i] = true;
  8170. poseIti[i] = maidArray[i].transform.position;
  8171. maidArray[i].transform.position = new Vector3(100f, 100f, 100f);
  8172. }
  8173. }
  8174. }
  8175. }
  8176. else if (Input.GetKeyDown(KeyCode.N) && !isLock[i])
  8177. {
  8178. if (maidArray[1] && maidArray[1].Visible)
  8179. {
  8180. if (maidArray[0].transform.position == maidArray[1].transform.position
  8181. || (maidArray[2] && maidArray[0].transform.position == maidArray[2].transform.position))
  8182. {
  8183. Vector3 vector = Vector3.zero;
  8184. vector.x = 0.6f;
  8185. maidArray[1].SetPos(vector);
  8186. if (maidArray[2] && maidArray[2].Visible)
  8187. {
  8188. vector.x = -0.6f;
  8189. maidArray[2].SetPos(vector);
  8190. }
  8191. if (maidArray[3] && maidArray[3].Visible)
  8192. {
  8193. vector.x = 1.2f;
  8194. maidArray[3].SetPos(vector);
  8195. }
  8196. if (maidArray[4] && maidArray[4].Visible)
  8197. {
  8198. vector.x = -1.2f;
  8199. maidArray[4].SetPos(vector);
  8200. }
  8201. if (maidArray[5] && maidArray[5].Visible)
  8202. {
  8203. vector.x = 1.8f;
  8204. maidArray[5].SetPos(vector);
  8205. }
  8206. if (maidArray[6] && maidArray[6].Visible)
  8207. {
  8208. vector.x = -1.8f;
  8209. maidArray[6].SetPos(vector);
  8210. }
  8211. if (maidArray[7] && maidArray[7].Visible)
  8212. {
  8213. vector.x = 2.4f;
  8214. maidArray[7].SetPos(vector);
  8215. }
  8216. if (maidArray[8] && maidArray[8].Visible)
  8217. {
  8218. vector.x = -2.4f;
  8219. maidArray[8].SetPos(vector);
  8220. }
  8221. if (maidArray[9] && maidArray[9].Visible)
  8222. {
  8223. vector.x = 3f;
  8224. maidArray[9].SetPos(vector);
  8225. }
  8226. if (maidArray[10] && maidArray[10].Visible)
  8227. {
  8228. vector.x = -3f;
  8229. maidArray[10].SetPos(vector);
  8230. }
  8231. if (maidArray[11] && maidArray[11].Visible)
  8232. {
  8233. vector.x = 3.6f;
  8234. maidArray[11].SetPos(vector);
  8235. }
  8236. if (maidArray[12] && maidArray[12].Visible)
  8237. {
  8238. vector.x = -3.6f;
  8239. maidArray[12].SetPos(vector);
  8240. }
  8241. if (maidArray[13] && maidArray[13].Visible)
  8242. {
  8243. vector.x = 4.2f;
  8244. maidArray[13].SetPos(vector);
  8245. }
  8246. }
  8247. }
  8248. poseIndex[i]++;
  8249. if (poseIndex[i] == poseArray.Length)
  8250. {
  8251. poseIndex[i] = 0;
  8252. }
  8253. if (maidArray[i] && maidArray[i].Visible)
  8254. {
  8255. string[] array = poseArray[poseIndex[i]].Split(new char[] { ',' });
  8256. isStop[i] = false;
  8257. poseCount[i] = 20;
  8258. Maid maid = maidArray[i];
  8259. if (array[0].Contains("_momi") || array[0].Contains("paizuri_"))
  8260. {
  8261. maid.body0.MuneYureL(0f);
  8262. maid.body0.MuneYureR(0f);
  8263. }
  8264. else
  8265. {
  8266. maid.body0.MuneYureL(1f);
  8267. maid.body0.MuneYureR(1f);
  8268. }
  8269. if (array[0].Contains("MultipleMaidsPose"))
  8270. {
  8271. string path = array[0].Split(new char[] { '/' })[1];
  8272. byte[] array2 = new byte[0];
  8273. try
  8274. {
  8275. using (FileStream fileStream = new FileStream(path, FileMode.Open, FileAccess.Read))
  8276. {
  8277. array2 = new byte[fileStream.Length];
  8278. fileStream.Read(array2, 0, array2.Length);
  8279. }
  8280. }
  8281. catch { }
  8282. if (0 < array2.Length)
  8283. {
  8284. string text = Path.GetFileName(path);
  8285. long num5 = text.GetHashCode();
  8286. maid.body0.CrossFade(num5.ToString(), array2, false, false, false, 0f, 1f);
  8287. Maid.AutoTwist[] array3 = new Maid.AutoTwist[]
  8288. {
  8289. Maid.AutoTwist.ShoulderL, Maid.AutoTwist.ShoulderR, Maid.AutoTwist.WristL,
  8290. Maid.AutoTwist.WristR, Maid.AutoTwist.ThighL, Maid.AutoTwist.ThighR
  8291. };
  8292. for (int m = 0; m < array3.Length; m++)
  8293. {
  8294. maid.SetAutoTwist(array3[m], true);
  8295. }
  8296. }
  8297. }
  8298. else if (array[0].StartsWith("p") && int.TryParse(array[0].Substring(1), out int num6))
  8299. {
  8300. loadPose[i] = array[0];
  8301. }
  8302. else if (!array[0].StartsWith("dance_"))
  8303. {
  8304. maidArray[i].CrossFade(array[0] + ".anm", false, true, false, 0f, 1f);
  8305. }
  8306. else
  8307. {
  8308. if (!maidArray[i].body0.m_Bones.GetComponent<Animation>().GetClip(array[0] + ".anm"))
  8309. {
  8310. maidArray[i].body0.LoadAnime(array[0] + ".anm",
  8311. GameUty.FileSystem,
  8312. array[0] + ".anm",
  8313. false,
  8314. false);
  8315. }
  8316. maidArray[i].body0.m_Bones.GetComponent<Animation>().Play(array[0] + ".anm");
  8317. }
  8318. if (array.Length > 1)
  8319. {
  8320. maidArray[i].body0.m_Bones.GetComponent<Animation>()[array[0] + ".anm"].time = float.Parse(array[1]);
  8321. isStop[i] = true;
  8322. if (array.Length > 2)
  8323. {
  8324. Transform transform2 = CMT.SearchObjName(maidArray[i].body0.m_Bones.transform, "Bip01", true);
  8325. isPoseIti[i] = true;
  8326. poseIti[i] = maidArray[i].transform.position;
  8327. maidArray[i].transform.position = new Vector3(100f, 100f, 100f);
  8328. }
  8329. }
  8330. }
  8331. }
  8332. }
  8333. }
  8334. if (isDanceChu)
  8335. {
  8336. for (int j = 0; j < maidCnt; j++)
  8337. {
  8338. if (maidArray[j] && maidArray[j].Visible)
  8339. {
  8340. string text2 = danceName[j];
  8341. float num = 0f;
  8342. if (text2 == "dance_cmo_002_sd_f1.anm" || text2 == "dance_cmo_002_sd_f2.anm"
  8343. || text2 == "dance_cm3d_004_kano_f1.anm")
  8344. {
  8345. num = 0.166666f;
  8346. }
  8347. if (text2 == "dance_cm3d21_kara_001_nmf_f1.anm")
  8348. {
  8349. num = -0.35f;
  8350. }
  8351. if (text2 != null)
  8352. {
  8353. if (danceCount > 0)
  8354. {
  8355. danceCount--;
  8356. maidArray[j].body0.m_Bones.GetComponent<Animation>()[text2].time = audioSourceBgm.time - 0.03333f - num;
  8357. }
  8358. if (maidArray[j].body0.m_Bones.GetComponent<Animation>()[text2].time + num < audioSourceBgm.time - 0.1f)
  8359. {
  8360. danceCount = 20;
  8361. }
  8362. }
  8363. }
  8364. }
  8365. }
  8366. if (isDanceStart1)
  8367. {
  8368. for (int j = 0; j < maidCnt; j++)
  8369. {
  8370. if (maidArray[j] && maidArray[j].Visible)
  8371. {
  8372. maidArray[j].CrossFade(poseArray[0] + ".anm", false, true, false, 0f, 1f);
  8373. if (!isShift)
  8374. {
  8375. if (j == 0)
  8376. {
  8377. maidArray[j].body0.m_Bones.GetComponent<Animation>().Play("dance_cm3d2_001_f1.anm");
  8378. maidArray[j].body0.m_Bones.GetComponent<Animation>()["dance_cm3d2_001_f1.anm"].time = 0f;
  8379. danceName[j] = "dance_cm3d2_001_f1.anm";
  8380. }
  8381. else if (j == 1 || j == 3 || j == 5 || j == 7 || j == 9 || j == 11 || j == 13)
  8382. {
  8383. maidArray[j].body0.m_Bones.GetComponent<Animation>().Play("dance_cm3d2_001_f2.anm");
  8384. maidArray[j].body0.m_Bones.GetComponent<Animation>()["dance_cm3d2_001_f2.anm"].time = 0f;
  8385. danceName[j] = "dance_cm3d2_001_f2.anm";
  8386. }
  8387. else
  8388. {
  8389. maidArray[j].body0.m_Bones.GetComponent<Animation>().Play("dance_cm3d2_001_f3.anm");
  8390. maidArray[j].body0.m_Bones.GetComponent<Animation>()["dance_cm3d2_001_f3.anm"].time = 0f;
  8391. danceName[j] = "dance_cm3d2_001_f3.anm";
  8392. }
  8393. }
  8394. else
  8395. {
  8396. maidArray[j].body0.m_Bones.GetComponent<Animation>().Play("dance_cm3d2_kara_003_ddfl_f1.anm");
  8397. maidArray[j].body0.m_Bones.GetComponent<Animation>()["dance_cm3d2_kara_003_ddfl_f1.anm"].time = 0f;
  8398. danceName[j] = "dance_cm3d2_kara_003_ddfl_f1.anm";
  8399. }
  8400. }
  8401. }
  8402. isDanceStart1 = false;
  8403. isDanceStart1F = true;
  8404. isShift = false;
  8405. }
  8406. if (isDanceStart2)
  8407. {
  8408. for (int j = 0; j < maidCnt; j++)
  8409. {
  8410. if (maidArray[j] && maidArray[j].Visible)
  8411. {
  8412. maidArray[j].CrossFade(poseArray[0] + ".anm", false, true, false, 0f, 1f);
  8413. maidArray[j].body0.m_Bones.GetComponent<Animation>().Play("dance_cm3d_001_f1.anm");
  8414. maidArray[j].body0.m_Bones.GetComponent<Animation>()["dance_cm3d_001_f1.anm"].time = 0f;
  8415. danceName[j] = "dance_cm3d_001_f1.anm";
  8416. }
  8417. }
  8418. isDanceStart2 = false;
  8419. isDanceStart2F = true;
  8420. }
  8421. if (isDanceStart3)
  8422. {
  8423. for (int j = 0; j < maidCnt; j++)
  8424. {
  8425. if (maidArray[j] && maidArray[j].Visible)
  8426. {
  8427. maidArray[j].CrossFade(poseArray[0] + ".anm", false, true, false, 0f, 1f);
  8428. if (!isShift)
  8429. {
  8430. maidArray[j].body0.m_Bones.GetComponent<Animation>().Play("dance_cm3d_002_end_f1.anm");
  8431. maidArray[j].body0.m_Bones.GetComponent<Animation>()["dance_cm3d_002_end_f1.anm"].time = 0f;
  8432. danceName[j] = "dance_cm3d_002_end_f1.anm";
  8433. }
  8434. else
  8435. {
  8436. maidArray[j].body0.m_Bones.GetComponent<Animation>().Play("dance_cm3d2_kara_001_sl_f1.anm");
  8437. maidArray[j].body0.m_Bones.GetComponent<Animation>()["dance_cm3d2_kara_001_sl_f1.anm"].time = 0f;
  8438. danceName[j] = "dance_cm3d2_kara_001_sl_f1.anm";
  8439. }
  8440. }
  8441. }
  8442. isDanceStart3 = false;
  8443. isDanceStart3F = true;
  8444. isShift = false;
  8445. }
  8446. if (isDanceStart4)
  8447. {
  8448. for (int j = 0; j < maidCnt; j++)
  8449. {
  8450. if (maidArray[j] && maidArray[j].Visible)
  8451. {
  8452. maidArray[j].CrossFade(poseArray[0] + ".anm", false, true, false, 0f, 1f);
  8453. if (!isShift)
  8454. {
  8455. maidArray[j].body0.m_Bones.GetComponent<Animation>().Play("dance_cm3d2_002_smt_f.anm");
  8456. maidArray[j].body0.m_Bones.GetComponent<Animation>()["dance_cm3d2_002_smt_f.anm"].time = 0f;
  8457. danceName[j] = "dance_cm3d2_002_smt_f.anm";
  8458. }
  8459. else
  8460. {
  8461. maidArray[j].body0.m_Bones.GetComponent<Animation>().Play("dance_cm3d2_kara02_001_smt_f1.anm");
  8462. maidArray[j].body0.m_Bones.GetComponent<Animation>()["dance_cm3d2_kara02_001_smt_f1.anm"].time = 0f;
  8463. danceName[j] = "dance_cm3d2_kara02_001_smt_f1.anm";
  8464. }
  8465. }
  8466. }
  8467. isDanceStart4 = false;
  8468. isDanceStart4F = true;
  8469. isShift = false;
  8470. }
  8471. if (isDanceStart5)
  8472. {
  8473. for (int j = 0; j < maidCnt; j++)
  8474. {
  8475. if (maidArray[j] && maidArray[j].Visible)
  8476. {
  8477. maidArray[j].CrossFade(poseArray[0] + ".anm", false, true, false, 0f, 1f);
  8478. if (!isShift)
  8479. {
  8480. maidArray[j].body0.m_Bones.GetComponent<Animation>().Play("dance_cm3d_003_sp2_f1.anm");
  8481. maidArray[j].body0.m_Bones.GetComponent<Animation>()["dance_cm3d_003_sp2_f1.anm"].time = 0f;
  8482. danceName[j] = "dance_cm3d_003_sp2_f1.anm";
  8483. }
  8484. else
  8485. {
  8486. maidArray[j].body0.m_Bones.GetComponent<Animation>().Play("dance_cm3d2_kara02_002_rty_f1.anm");
  8487. maidArray[j].body0.m_Bones.GetComponent<Animation>()["dance_cm3d2_kara02_002_rty_f1.anm"].time = 0f;
  8488. danceName[j] = "dance_cm3d2_kara02_002_rty_f1.anm";
  8489. }
  8490. }
  8491. }
  8492. isDanceStart5 = false;
  8493. isDanceStart5F = true;
  8494. isShift = false;
  8495. }
  8496. if (isDanceStart6)
  8497. {
  8498. for (int j = 0; j < maidCnt; j++)
  8499. {
  8500. if (maidArray[j] && maidArray[j].Visible)
  8501. {
  8502. maidArray[j].CrossFade(poseArray[0] + ".anm", false, true, false, 0f, 1f);
  8503. if (!isShift)
  8504. {
  8505. maidArray[j].body0.m_Bones.GetComponent<Animation>().Play("dance_cm3d2_003_hs_f1.anm");
  8506. maidArray[j].body0.m_Bones.GetComponent<Animation>()["dance_cm3d2_003_hs_f1.anm"].time = 0f;
  8507. danceName[j] = "dance_cm3d2_003_hs_f1.anm";
  8508. }
  8509. else
  8510. {
  8511. maidArray[j].body0.m_Bones.GetComponent<Animation>().Play("dance_cm3d2_kara02_003_hs_f1.anm");
  8512. maidArray[j].body0.m_Bones.GetComponent<Animation>()["dance_cm3d2_kara02_003_hs_f1.anm"].time = 0f;
  8513. danceName[j] = "dance_cm3d2_kara02_003_hs_f1.anm";
  8514. }
  8515. }
  8516. }
  8517. isDanceStart6 = false;
  8518. isDanceStart6F = true;
  8519. isShift = false;
  8520. }
  8521. if (isDanceStart7)
  8522. {
  8523. for (int j = 0; j < maidCnt; j++)
  8524. {
  8525. if (maidArray[j] && maidArray[j].Visible)
  8526. {
  8527. maidArray[j].CrossFade(poseArray[0] + ".anm", false, true, false, 0f, 1f);
  8528. if (j == 1 || j == 3 || j == 5 || j == 7 || j == 9 || j == 11 || j == 13)
  8529. {
  8530. maidArray[j].body0.m_Bones.GetComponent<Animation>().Play("dance_cm3d2_003_hs_f2.anm");
  8531. maidArray[j].body0.m_Bones.GetComponent<Animation>()["dance_cm3d2_003_hs_f2.anm"].time = 0f;
  8532. danceName[j] = "dance_cm3d2_003_hs_f2.anm";
  8533. }
  8534. else
  8535. {
  8536. maidArray[j].body0.m_Bones.GetComponent<Animation>().Play("dance_cm3d2_003_hs_f1.anm");
  8537. maidArray[j].body0.m_Bones.GetComponent<Animation>()["dance_cm3d2_003_hs_f1.anm"].time = 0f;
  8538. danceName[j] = "dance_cm3d2_003_hs_f1.anm";
  8539. }
  8540. }
  8541. }
  8542. isDanceStart7 = false;
  8543. isDanceStart7V = true;
  8544. isDanceStart7F = true;
  8545. }
  8546. if (isDanceStart8)
  8547. {
  8548. for (int j = 0; j < maidCnt; j++)
  8549. {
  8550. if (maidArray[j] && maidArray[j].Visible)
  8551. {
  8552. maidArray[j].CrossFade(poseArray[0] + ".anm", false, true, false, 0f, 1f);
  8553. if (j == 0 || j == 4 || j == 8 || j == 12)
  8554. {
  8555. maidArray[j].body0.m_Bones.GetComponent<Animation>().Play("dance_cm3d2_003_hs_f1.anm");
  8556. maidArray[j].body0.m_Bones.GetComponent<Animation>()["dance_cm3d2_003_hs_f1.anm"].time = 0f;
  8557. danceName[j] = "dance_cm3d2_003_hs_f1.anm";
  8558. }
  8559. else if (j == 1 || j == 5 || j == 9 || j == 13)
  8560. {
  8561. maidArray[j].body0.m_Bones.GetComponent<Animation>().Play("dance_cm3d2_003_hs_f2.anm");
  8562. maidArray[j].body0.m_Bones.GetComponent<Animation>()["dance_cm3d2_003_hs_f2.anm"].time = 0f;
  8563. danceName[j] = "dance_cm3d2_003_hs_f2.anm";
  8564. }
  8565. else if (j == 2 || j == 6 || j == 10)
  8566. {
  8567. maidArray[j].body0.m_Bones.GetComponent<Animation>().Play("dance_cm3d2_003_hs_f3.anm");
  8568. maidArray[j].body0.m_Bones.GetComponent<Animation>()["dance_cm3d2_003_hs_f3.anm"].time = 0f;
  8569. danceName[j] = "dance_cm3d2_003_hs_f3.anm";
  8570. }
  8571. else
  8572. {
  8573. maidArray[j].body0.m_Bones.GetComponent<Animation>().Play("dance_cm3d2_003_hs_f4.anm");
  8574. maidArray[j].body0.m_Bones.GetComponent<Animation>()["dance_cm3d2_003_hs_f4.anm"].time = 0f;
  8575. danceName[j] = "dance_cm3d2_003_hs_f4.anm";
  8576. }
  8577. }
  8578. }
  8579. isDanceStart8 = false;
  8580. isDanceStart8V = true;
  8581. isDanceStart8F = true;
  8582. }
  8583. if (isDanceStart9)
  8584. {
  8585. isDanceStart9Count++;
  8586. if (isShift)
  8587. {
  8588. for (int j = 0; j < maidCnt; j++)
  8589. {
  8590. if (maidArray[j] && maidArray[j].Visible)
  8591. {
  8592. maidArray[j].CrossFade(poseArray[0] + ".anm", false, true, false, 0f, 1f);
  8593. maidArray[j].body0.m_Bones.GetComponent<Animation>().Play("dance_cm3d2_kara_002_cktc_f1.anm");
  8594. maidArray[j].body0.m_Bones.GetComponent<Animation>()["dance_cm3d2_kara_002_cktc_f1.anm"].time = 0f;
  8595. danceName[j] = "dance_cm3d2_kara_002_cktc_f1.anm";
  8596. }
  8597. }
  8598. isDanceStart9 = false;
  8599. isDanceStart9F = true;
  8600. isDanceStart9Count = 0;
  8601. isShift = false;
  8602. }
  8603. if (isDanceStart9Count == 10)
  8604. {
  8605. for (int j = 0; j < maidCnt; j++)
  8606. {
  8607. if (maidArray[j] && maidArray[j].Visible)
  8608. {
  8609. maidArray[j].CrossFade(poseArray[0] + ".anm", false, true, false, 0f, 1f);
  8610. maidArray[j].body0.m_Bones.GetComponent<Animation>().Play("dance_cm3d_004_kano_f1.anm");
  8611. maidArray[j].body0.m_Bones.GetComponent<Animation>()["dance_cm3d_004_kano_f1.anm"].time = 0f;
  8612. danceName[j] = "dance_cm3d_004_kano_f1.anm";
  8613. }
  8614. }
  8615. isDanceStart9 = false;
  8616. isDanceStart9F = true;
  8617. isDanceStart9Count = 0;
  8618. }
  8619. }
  8620. if (isDanceStart10)
  8621. {
  8622. for (int j = 0; j < maidCnt; j++)
  8623. {
  8624. if (maidArray[j] && maidArray[j].Visible)
  8625. {
  8626. maidArray[j].CrossFade(poseArray[0] + ".anm", false, true, false, 0f, 1f);
  8627. maidArray[j].body0.m_Bones.GetComponent<Animation>().Play("dance_cm3d2_004_sse_f1.anm");
  8628. maidArray[j].body0.m_Bones.GetComponent<Animation>()["dance_cm3d2_004_sse_f1.anm"].time = 0f;
  8629. danceName[j] = "dance_cm3d2_004_sse_f1.anm";
  8630. }
  8631. }
  8632. isDanceStart10 = false;
  8633. isDanceStart10F = true;
  8634. }
  8635. if (isDanceStart11)
  8636. {
  8637. for (int j = 0; j < maidCnt; j++)
  8638. {
  8639. if (maidArray[j] && maidArray[j].Visible)
  8640. {
  8641. maidArray[j].CrossFade(poseArray[0] + ".anm", false, true, false, 0f, 1f);
  8642. if (j == 1 || j == 4 || j == 7 || j == 10 || j == 13)
  8643. {
  8644. maidArray[j].body0.m_Bones.GetComponent<Animation>().Play(nameA + danceNo2 + ".anm");
  8645. maidArray[j].body0.m_Bones.GetComponent<Animation>()[nameA + danceNo2 + ".anm"].time = 0f;
  8646. danceName[j] = nameA + danceNo2 + ".anm";
  8647. }
  8648. else if (j == 2 || j == 5 || j == 8 || j == 11)
  8649. {
  8650. maidArray[j].body0.m_Bones.GetComponent<Animation>().Play(nameA + danceNo3 + ".anm");
  8651. maidArray[j].body0.m_Bones.GetComponent<Animation>()[nameA + danceNo3 + ".anm"].time = 0f;
  8652. danceName[j] = nameA + danceNo3 + ".anm";
  8653. }
  8654. else
  8655. {
  8656. maidArray[j].body0.m_Bones.GetComponent<Animation>().Play(nameA + danceNo1 + ".anm");
  8657. maidArray[j].body0.m_Bones.GetComponent<Animation>()[nameA + danceNo1 + ".anm"].time = 0f;
  8658. danceName[j] = nameA + danceNo1 + ".anm";
  8659. }
  8660. }
  8661. }
  8662. isDanceStart11 = false;
  8663. isDanceStart11V = true;
  8664. isDanceStart11F = true;
  8665. }
  8666. if (isDanceStart12)
  8667. {
  8668. for (int j = 0; j < maidCnt; j++)
  8669. {
  8670. if (maidArray[j] && maidArray[j].Visible)
  8671. {
  8672. maidArray[j].CrossFade(poseArray[0] + ".anm", false, true, false, 0f, 1f);
  8673. maidArray[j].body0.m_Bones.GetComponent<Animation>().Play("dance_cm3d2_005_khg_f.anm");
  8674. maidArray[j].body0.m_Bones.GetComponent<Animation>()["dance_cm3d2_005_khg_f.anm"].time = 0f;
  8675. danceName[j] = "dance_cm3d2_005_khg_f.anm";
  8676. }
  8677. }
  8678. isDanceStart12 = false;
  8679. isDanceStart12F = true;
  8680. }
  8681. if (isDanceStart13)
  8682. {
  8683. for (int j = 0; j < maidCnt; j++)
  8684. {
  8685. if (maidArray[j] && maidArray[j].Visible)
  8686. {
  8687. maidArray[j].CrossFade(poseArray[0] + ".anm", false, true, false, 0f, 1f);
  8688. if (!isShift)
  8689. {
  8690. maidArray[j].body0.m_Bones.GetComponent<Animation>().Play("dance_cm3d2_006_ssn_f1.anm");
  8691. maidArray[j].body0.m_Bones.GetComponent<Animation>()["dance_cm3d2_006_ssn_f1.anm"].time = 0f;
  8692. danceName[j] = "dance_cm3d2_006_ssn_f1.anm";
  8693. }
  8694. else
  8695. {
  8696. maidArray[j].body0.m_Bones.GetComponent<Animation>().Play("dance_cm3d21_kara_001_nmf_f1.anm");
  8697. maidArray[j].body0.m_Bones.GetComponent<Animation>()["dance_cm3d21_kara_001_nmf_f1.anm"].time = 0f;
  8698. danceName[j] = "dance_cm3d21_kara_001_nmf_f1.anm";
  8699. }
  8700. }
  8701. }
  8702. isDanceStart13 = false;
  8703. isDanceStart13F = true;
  8704. isShift = false;
  8705. }
  8706. if (isDanceStart14)
  8707. {
  8708. for (int j = 0; j < maidCnt; j++)
  8709. {
  8710. if (maidArray[j] && maidArray[j].Visible)
  8711. {
  8712. maidArray[j].CrossFade(poseArray[0] + ".anm", false, true, false, 0f, 1f);
  8713. if (j == 1 || j == 4 || j == 7 || j == 10 || j == 13)
  8714. {
  8715. maidArray[j].body0.m_Bones.GetComponent<Animation>().Play("dance_cm3d2_006_ssn_f2.anm");
  8716. maidArray[j].body0.m_Bones.GetComponent<Animation>()["dance_cm3d2_006_ssn_f2.anm"].time = 0f;
  8717. danceName[j] = "dance_cm3d2_006_ssn_f2.anm";
  8718. }
  8719. else if (j == 2 || j == 5 || j == 8 || j == 11)
  8720. {
  8721. maidArray[j].body0.m_Bones.GetComponent<Animation>().Play("dance_cm3d2_006_ssn_f3.anm");
  8722. maidArray[j].body0.m_Bones.GetComponent<Animation>()["dance_cm3d2_006_ssn_f3.anm"].time = 0f;
  8723. danceName[j] = "dance_cm3d2_006_ssn_f3.anm";
  8724. }
  8725. else
  8726. {
  8727. maidArray[j].body0.m_Bones.GetComponent<Animation>().Play("dance_cm3d2_006_ssn_f1.anm");
  8728. maidArray[j].body0.m_Bones.GetComponent<Animation>()["dance_cm3d2_006_ssn_f1.anm"].time = 0f;
  8729. danceName[j] = "dance_cm3d2_006_ssn_f1.anm";
  8730. }
  8731. }
  8732. }
  8733. isDanceStart14 = false;
  8734. isDanceStart14V = true;
  8735. isDanceStart14F = true;
  8736. }
  8737. if (isDanceStart15)
  8738. {
  8739. isDanceStart15Count++;
  8740. }
  8741. if (isDanceStart15Count == 10)
  8742. {
  8743. for (int j = 0; j < maidCnt; j++)
  8744. {
  8745. if (maidArray[j] && maidArray[j].Visible)
  8746. {
  8747. maidArray[j].CrossFade(poseArray[0] + ".anm", false, true, false, 0f, 1f);
  8748. if (j == 1 || j == 3 || j == 5 || j == 7 || j == 9 || j == 11 || j == 13)
  8749. {
  8750. maidArray[j].body0.m_Bones.GetComponent<Animation>().Play("dance_cmo_002_sd_f2.anm");
  8751. maidArray[j].body0.m_Bones.GetComponent<Animation>()["dance_cmo_002_sd_f2.anm"].time = 0f;
  8752. danceName[j] = "dance_cmo_002_sd_f2.anm";
  8753. }
  8754. else
  8755. {
  8756. maidArray[j].body0.m_Bones.GetComponent<Animation>().Play("dance_cmo_002_sd_f1.anm");
  8757. maidArray[j].body0.m_Bones.GetComponent<Animation>()["dance_cmo_002_sd_f1.anm"].time = 0f;
  8758. danceName[j] = "dance_cmo_002_sd_f1.anm";
  8759. }
  8760. }
  8761. }
  8762. isDanceStart15 = false;
  8763. isDanceStart15V = true;
  8764. isDanceStart15F = true;
  8765. isDanceStart15Count = 0;
  8766. }
  8767. if (isDance)
  8768. {
  8769. for (int j = 0; j < maidCnt; j++)
  8770. {
  8771. if (maidArray[j].Visible)
  8772. {
  8773. if (isDanceStart1F)
  8774. {
  8775. if (isDanceStart1K)
  8776. {
  8777. foreach (string text3 in dance1KArray)
  8778. {
  8779. string[] array = text3.Split(new char[] { ',' });
  8780. float num10 = float.Parse(array[0]);
  8781. if (danceFace[j] < num10 && num10 < audioSourceBgm.time)
  8782. {
  8783. danceFace[j] = num10;
  8784. FaceName[j] = FaceName2[j];
  8785. FaceName2[j] = array[1];
  8786. FaceName3[j] = array[2];
  8787. FaceTime[j] = 0.0166666675f;
  8788. break;
  8789. }
  8790. }
  8791. }
  8792. else if (j == 0)
  8793. {
  8794. foreach (string text3 in dance1Array)
  8795. {
  8796. string[] array = text3.Split(new char[] { ',' });
  8797. float num10 = float.Parse(array[0]);
  8798. if (danceFace[j] < num10 && num10 < audioSourceBgm.time)
  8799. {
  8800. danceFace[j] = num10;
  8801. FaceName[j] = FaceName2[j];
  8802. FaceName2[j] = array[1];
  8803. FaceName3[j] = array[2];
  8804. FaceTime[j] = 0.0166666675f;
  8805. break;
  8806. }
  8807. }
  8808. }
  8809. else if (j == 1 || j == 3 || j == 5 || j == 7 || j == 9 || j == 11 || j == 13)
  8810. {
  8811. foreach (string text3 in dance1BArray)
  8812. {
  8813. string[] array = text3.Split(new char[] { ',' });
  8814. float num10 = float.Parse(array[0]);
  8815. if (danceFace[j] < num10 && num10 < audioSourceBgm.time)
  8816. {
  8817. danceFace[j] = num10;
  8818. FaceName[j] = FaceName2[j];
  8819. FaceName2[j] = array[1];
  8820. FaceName3[j] = array[2];
  8821. FaceTime[j] = 0.0166666675f;
  8822. break;
  8823. }
  8824. }
  8825. }
  8826. else
  8827. {
  8828. foreach (string text3 in dance1CArray)
  8829. {
  8830. string[] array = text3.Split(new char[] { ',' });
  8831. float num10 = float.Parse(array[0]);
  8832. if (danceFace[j] < num10 && num10 < audioSourceBgm.time)
  8833. {
  8834. danceFace[j] = num10;
  8835. FaceName[j] = FaceName2[j];
  8836. FaceName2[j] = array[1];
  8837. FaceName3[j] = array[2];
  8838. FaceTime[j] = 0.0166666675f;
  8839. break;
  8840. }
  8841. }
  8842. }
  8843. }
  8844. if (isDanceStart2F)
  8845. {
  8846. foreach (string text3 in dance2Array)
  8847. {
  8848. string[] array = text3.Split(new char[] { ',' });
  8849. float num10 = float.Parse(array[0]);
  8850. if (danceFace[j] < num10 && num10 < audioSourceBgm.time)
  8851. {
  8852. danceFace[j] = num10;
  8853. FaceName[j] = FaceName2[j];
  8854. FaceName2[j] = array[1];
  8855. FaceName3[j] = array[2];
  8856. FaceTime[j] = 0.0166666675f;
  8857. break;
  8858. }
  8859. }
  8860. }
  8861. if (isDanceStart3F)
  8862. {
  8863. if (isDanceStart3K)
  8864. {
  8865. foreach (string text3 in dance3KArray)
  8866. {
  8867. string[] array = text3.Split(new char[] { ',' });
  8868. float num10 = float.Parse(array[0]);
  8869. if (danceFace[j] < num10 && num10 < audioSourceBgm.time)
  8870. {
  8871. danceFace[j] = num10;
  8872. FaceName[j] = FaceName2[j];
  8873. FaceName2[j] = array[1];
  8874. FaceName3[j] = array[2];
  8875. FaceTime[j] = 0.0166666675f;
  8876. break;
  8877. }
  8878. }
  8879. }
  8880. else
  8881. {
  8882. foreach (string text3 in dance3Array)
  8883. {
  8884. string[] array = text3.Split(new char[] { ',' });
  8885. float num10 = float.Parse(array[0]);
  8886. if (danceFace[j] < num10 && num10 < audioSourceBgm.time)
  8887. {
  8888. danceFace[j] = num10;
  8889. FaceName[j] = FaceName2[j];
  8890. FaceName2[j] = array[1];
  8891. FaceName3[j] = array[2];
  8892. FaceTime[j] = 0.0166666675f;
  8893. break;
  8894. }
  8895. }
  8896. }
  8897. }
  8898. if (isDanceStart4F)
  8899. {
  8900. if (isDanceStart4K)
  8901. {
  8902. foreach (string text3 in dance4KArray)
  8903. {
  8904. string[] array = text3.Split(new char[] { ',' });
  8905. float num10 = float.Parse(array[0]);
  8906. if (danceFace[j] < num10 && num10 < audioSourceBgm.time)
  8907. {
  8908. danceFace[j] = num10;
  8909. FaceName[j] = FaceName2[j];
  8910. FaceName2[j] = array[1];
  8911. FaceName3[j] = array[2];
  8912. FaceTime[j] = 0.0166666675f;
  8913. break;
  8914. }
  8915. }
  8916. }
  8917. else
  8918. {
  8919. foreach (string text3 in dance4Array)
  8920. {
  8921. string[] array = text3.Split(new char[] { ',' });
  8922. float num10 = float.Parse(array[0]);
  8923. if (danceFace[j] < num10 && num10 < audioSourceBgm.time)
  8924. {
  8925. danceFace[j] = num10;
  8926. FaceName[j] = FaceName2[j];
  8927. FaceName2[j] = array[1];
  8928. FaceName3[j] = array[2];
  8929. FaceTime[j] = 0.0166666675f;
  8930. break;
  8931. }
  8932. }
  8933. }
  8934. }
  8935. if (isDanceStart5F)
  8936. {
  8937. if (isDanceStart5K)
  8938. {
  8939. foreach (string text3 in dance5KArray)
  8940. {
  8941. string[] array = text3.Split(new char[] { ',' });
  8942. float num10 = float.Parse(array[0]);
  8943. if (danceFace[j] < num10 && num10 < audioSourceBgm.time)
  8944. {
  8945. danceFace[j] = num10;
  8946. FaceName[j] = FaceName2[j];
  8947. FaceName2[j] = array[1];
  8948. FaceName3[j] = array[2];
  8949. FaceTime[j] = 0.0166666675f;
  8950. break;
  8951. }
  8952. }
  8953. }
  8954. else
  8955. {
  8956. foreach (string text3 in dance5Array)
  8957. {
  8958. string[] array = text3.Split(new char[] { ',' });
  8959. float num10 = float.Parse(array[0]);
  8960. if (danceFace[j] < num10 && num10 < audioSourceBgm.time)
  8961. {
  8962. danceFace[j] = num10;
  8963. FaceName[j] = FaceName2[j];
  8964. FaceName2[j] = array[1];
  8965. FaceName3[j] = array[2];
  8966. FaceTime[j] = 0.0166666675f;
  8967. break;
  8968. }
  8969. }
  8970. }
  8971. }
  8972. if (isDanceStart6F)
  8973. {
  8974. if (isDanceStart6K)
  8975. {
  8976. foreach (string text3 in dance6KArray)
  8977. {
  8978. string[] array = text3.Split(new char[] { ',' });
  8979. float num10 = float.Parse(array[0]);
  8980. if (danceFace[j] < num10 && num10 < audioSourceBgm.time)
  8981. {
  8982. danceFace[j] = num10;
  8983. FaceName[j] = FaceName2[j];
  8984. FaceName2[j] = array[1];
  8985. FaceName3[j] = array[2];
  8986. FaceTime[j] = 0.0166666675f;
  8987. break;
  8988. }
  8989. }
  8990. }
  8991. else
  8992. {
  8993. foreach (string text3 in dance6Array)
  8994. {
  8995. string[] array = text3.Split(new char[] { ',' });
  8996. float num10 = float.Parse(array[0]);
  8997. if (danceFace[j] < num10 && num10 < audioSourceBgm.time)
  8998. {
  8999. danceFace[j] = num10;
  9000. FaceName[j] = FaceName2[j];
  9001. FaceName2[j] = array[1];
  9002. FaceName3[j] = array[2];
  9003. FaceTime[j] = 0.0166666675f;
  9004. break;
  9005. }
  9006. }
  9007. }
  9008. }
  9009. if (isDanceStart7F)
  9010. {
  9011. if (j == 1 || j == 3 || j == 5 || j == 7 || j == 9 || j == 11 || j == 13)
  9012. {
  9013. foreach (string text3 in dance6BArray)
  9014. {
  9015. string[] array = text3.Split(new char[] { ',' });
  9016. float num10 = float.Parse(array[0]);
  9017. if (danceFace[j] < num10 && num10 < audioSourceBgm.time)
  9018. {
  9019. danceFace[j] = num10;
  9020. FaceName[j] = FaceName2[j];
  9021. FaceName2[j] = array[1];
  9022. FaceName3[j] = array[2];
  9023. FaceTime[j] = 0.0166666675f;
  9024. break;
  9025. }
  9026. }
  9027. }
  9028. else
  9029. {
  9030. foreach (string text3 in dance6Array)
  9031. {
  9032. string[] array = text3.Split(new char[] { ',' });
  9033. float num10 = float.Parse(array[0]);
  9034. if (danceFace[j] < num10 && num10 < audioSourceBgm.time)
  9035. {
  9036. danceFace[j] = num10;
  9037. FaceName[j] = FaceName2[j];
  9038. FaceName2[j] = array[1];
  9039. FaceName3[j] = array[2];
  9040. FaceTime[j] = 0.0166666675f;
  9041. break;
  9042. }
  9043. }
  9044. }
  9045. }
  9046. if (isDanceStart7V && (j == 1 || j == 3 || j == 5 || j == 7 || j == 9 || j == 11 || j == 13))
  9047. {
  9048. if (audioSourceBgm.time > 42f && audioSourceBgm.time < 43f)
  9049. {
  9050. maidArray[j].SetPos(maidArray[j - 1].transform.position);
  9051. }
  9052. if (audioSourceBgm.time > 58.17f && audioSourceBgm.time < 60f)
  9053. {
  9054. maidArray[j].SetPos(new Vector3(maidArray[j - 1].transform.position.x,
  9055. 100f,
  9056. maidArray[j - 1].transform.position.z));
  9057. }
  9058. }
  9059. if (isDanceStart8F)
  9060. {
  9061. if (j == 1 || j == 5 || j == 9 || j == 13)
  9062. {
  9063. foreach (string text3 in dance6BArray)
  9064. {
  9065. string[] array = text3.Split(new char[] { ',' });
  9066. float num10 = float.Parse(array[0]);
  9067. if (danceFace[j] < num10 && num10 < audioSourceBgm.time)
  9068. {
  9069. danceFace[j] = num10;
  9070. FaceName[j] = FaceName2[j];
  9071. FaceName2[j] = array[1];
  9072. FaceName3[j] = array[2];
  9073. FaceTime[j] = 0.0166666675f;
  9074. break;
  9075. }
  9076. }
  9077. }
  9078. else if (j == 2 || j == 6 || j == 10)
  9079. {
  9080. foreach (string text3 in dance6CArray)
  9081. {
  9082. string[] array = text3.Split(new char[] { ',' });
  9083. float num10 = float.Parse(array[0]);
  9084. if (danceFace[j] < num10 && num10 < audioSourceBgm.time)
  9085. {
  9086. danceFace[j] = num10;
  9087. FaceName[j] = FaceName2[j];
  9088. FaceName2[j] = array[1];
  9089. FaceName3[j] = array[2];
  9090. FaceTime[j] = 0.0166666675f;
  9091. break;
  9092. }
  9093. }
  9094. }
  9095. else if (j == 3 || j == 9 || j == 11)
  9096. {
  9097. foreach (string text3 in dance6DArray)
  9098. {
  9099. string[] array = text3.Split(new char[] { ',' });
  9100. float num10 = float.Parse(array[0]);
  9101. if (danceFace[j] < num10 && num10 < audioSourceBgm.time)
  9102. {
  9103. danceFace[j] = num10;
  9104. FaceName[j] = FaceName2[j];
  9105. FaceName2[j] = array[1];
  9106. FaceName3[j] = array[2];
  9107. FaceTime[j] = 0.0166666675f;
  9108. break;
  9109. }
  9110. }
  9111. }
  9112. else
  9113. {
  9114. foreach (string text3 in dance6Array)
  9115. {
  9116. string[] array = text3.Split(new char[] { ',' });
  9117. float num10 = float.Parse(array[0]);
  9118. if (danceFace[j] < num10 && num10 < audioSourceBgm.time)
  9119. {
  9120. danceFace[j] = num10;
  9121. FaceName[j] = FaceName2[j];
  9122. FaceName2[j] = array[1];
  9123. FaceName3[j] = array[2];
  9124. FaceTime[j] = 0.0166666675f;
  9125. break;
  9126. }
  9127. }
  9128. }
  9129. }
  9130. if (isDanceStart8V && (j == 1 || j == 5 || j == 9 || j == 13))
  9131. {
  9132. if (audioSourceBgm.time > 42f && audioSourceBgm.time < 43f)
  9133. {
  9134. maidArray[j].SetPos(maidArray[j - 1].transform.position);
  9135. }
  9136. if (audioSourceBgm.time > 58.17f && audioSourceBgm.time < 60f)
  9137. {
  9138. maidArray[j].SetPos(new Vector3(maidArray[j - 1].transform.position.x,
  9139. 100f,
  9140. maidArray[j - 1].transform.position.z));
  9141. }
  9142. }
  9143. if (isDanceStart8V)
  9144. {
  9145. if (!isDanceStart8P && audioSourceBgm.time > 40f && audioSourceBgm.time < 41f)
  9146. {
  9147. isDanceStart8P = true;
  9148. for (int num11 = 0; num11 < maidCnt; num11++)
  9149. {
  9150. if (maidArray[num11].Visible)
  9151. {
  9152. if (num11 == 0 || num11 == 4 || num11 == 8 || num11 == 12)
  9153. {
  9154. Object @object = Resources.Load("Prefab/Particle/pHeart01");
  9155. GameObject gameObject6 = Instantiate(@object) as GameObject;
  9156. gameObject6.transform.position =
  9157. CMT.SearchObjName(maidArray[num11].body0.m_Bones.transform, "Bip01 Spine", true)
  9158. .position;
  9159. }
  9160. }
  9161. }
  9162. }
  9163. }
  9164. if (isDanceStart9F)
  9165. {
  9166. if (isDanceStart9K)
  9167. {
  9168. foreach (string text3 in dance9KArray)
  9169. {
  9170. string[] array = text3.Split(new char[] { ',' });
  9171. float num10 = float.Parse(array[0]);
  9172. if (danceFace[j] < num10 && num10 < audioSourceBgm.time)
  9173. {
  9174. danceFace[j] = num10;
  9175. FaceName[j] = FaceName2[j];
  9176. FaceName2[j] = array[1];
  9177. FaceName3[j] = array[2];
  9178. FaceTime[j] = 0.0166666675f;
  9179. break;
  9180. }
  9181. }
  9182. }
  9183. else
  9184. {
  9185. foreach (string text3 in dance7Array)
  9186. {
  9187. string[] array = text3.Split(new char[] { ',' });
  9188. float num10 = float.Parse(array[0]);
  9189. if (danceFace[j] < num10 && num10 < audioSourceBgm.time)
  9190. {
  9191. danceFace[j] = num10;
  9192. FaceName[j] = FaceName2[j];
  9193. FaceName2[j] = array[1];
  9194. FaceName3[j] = array[2];
  9195. FaceTime[j] = 0.0166666675f;
  9196. break;
  9197. }
  9198. }
  9199. }
  9200. }
  9201. if (isDanceStart10F)
  9202. {
  9203. foreach (string text3 in danceO1Array)
  9204. {
  9205. string[] array = text3.Split(new char[] { ',' });
  9206. float num10 = float.Parse(array[0]);
  9207. if (danceFace[j] < num10 && num10 < audioSourceBgm.time)
  9208. {
  9209. danceFace[j] = num10;
  9210. FaceName[j] = FaceName2[j];
  9211. FaceName2[j] = array[1];
  9212. FaceName3[j] = array[2];
  9213. FaceTime[j] = 0.0166666675f;
  9214. break;
  9215. }
  9216. }
  9217. }
  9218. if (isDanceStart11F)
  9219. {
  9220. string[] array14 = null;
  9221. string[] array12 = null;
  9222. string[] array15 = null;
  9223. if (isSS1)
  9224. {
  9225. array14 = danceO1Array;
  9226. array12 = danceO1CArray;
  9227. array15 = danceO1BArray;
  9228. }
  9229. if (isSS2)
  9230. {
  9231. array14 = danceO2Array;
  9232. array12 = danceO2BArray;
  9233. array15 = danceO2CArray;
  9234. }
  9235. if (isSS3)
  9236. {
  9237. array14 = danceO3CArray;
  9238. array12 = danceO3Array;
  9239. array15 = danceO3BArray;
  9240. }
  9241. if (isSS4)
  9242. {
  9243. array14 = danceO5BArray;
  9244. array12 = danceO5Array;
  9245. array15 = danceO5CArray;
  9246. }
  9247. if (isSS5)
  9248. {
  9249. array14 = danceO4Array;
  9250. array12 = danceO4BArray;
  9251. array15 = danceO4CArray;
  9252. }
  9253. if (j == 1 || j == 4 || j == 7 || j == 10 || j == 13)
  9254. {
  9255. foreach (string text3 in array12)
  9256. {
  9257. string[] array = text3.Split(new char[] { ',' });
  9258. float num10 = float.Parse(array[0]) - 0.03f;
  9259. if (danceFace[j] < num10 && num10 < audioSourceBgm.time)
  9260. {
  9261. danceFace[j] = num10;
  9262. FaceName[j] = FaceName2[j];
  9263. FaceName2[j] = array[1];
  9264. FaceName3[j] = array[2];
  9265. FaceTime[j] = 0.0166666675f;
  9266. break;
  9267. }
  9268. }
  9269. }
  9270. else if (j == 2 || j == 5 || j == 8 || j == 11)
  9271. {
  9272. foreach (string text3 in array15)
  9273. {
  9274. string[] array = text3.Split(new char[] { ',' });
  9275. float num10 = float.Parse(array[0]) - 0.03f;
  9276. if (danceFace[j] < num10 && num10 < audioSourceBgm.time)
  9277. {
  9278. danceFace[j] = num10;
  9279. FaceName[j] = FaceName2[j];
  9280. FaceName2[j] = array[1];
  9281. FaceName3[j] = array[2];
  9282. FaceTime[j] = 0.0166666675f;
  9283. break;
  9284. }
  9285. }
  9286. }
  9287. else
  9288. {
  9289. foreach (string text3 in array14)
  9290. {
  9291. string[] array = text3.Split(new char[] { ',' });
  9292. float num10 = float.Parse(array[0]) - 0.03f;
  9293. if (danceFace[j] < num10 && num10 < audioSourceBgm.time)
  9294. {
  9295. danceFace[j] = num10;
  9296. FaceName[j] = FaceName2[j];
  9297. FaceName2[j] = array[1];
  9298. FaceName3[j] = array[2];
  9299. FaceTime[j] = 0.0166666675f;
  9300. break;
  9301. }
  9302. }
  9303. }
  9304. }
  9305. if (isDanceStart12F)
  9306. {
  9307. foreach (string text3 in dance12Array)
  9308. {
  9309. string[] array = text3.Split(new char[] { ',' });
  9310. float num10 = float.Parse(array[0]);
  9311. if (danceFace[j] < num10 && num10 < audioSourceBgm.time)
  9312. {
  9313. danceFace[j] = num10;
  9314. FaceName[j] = FaceName2[j];
  9315. FaceName2[j] = array[1];
  9316. FaceName3[j] = array[2];
  9317. FaceTime[j] = 0.0166666675f;
  9318. break;
  9319. }
  9320. }
  9321. }
  9322. if (isDanceStart13F)
  9323. {
  9324. if (!isDanceStart13K)
  9325. {
  9326. foreach (string text3 in dance13Array)
  9327. {
  9328. string[] array = text3.Split(new char[] { ',' });
  9329. float num10 = float.Parse(array[0]);
  9330. if (danceFace[j] < num10 && num10 < audioSourceBgm.time)
  9331. {
  9332. danceFace[j] = num10;
  9333. FaceName[j] = FaceName2[j];
  9334. FaceName2[j] = array[1];
  9335. FaceName3[j] = array[2];
  9336. FaceTime[j] = 0.0166666675f;
  9337. break;
  9338. }
  9339. }
  9340. }
  9341. }
  9342. if (isDanceStart14F)
  9343. {
  9344. if (j == 1 || j == 4 || j == 7 || j == 10 || j == 13)
  9345. {
  9346. foreach (string text3 in dance13BArray)
  9347. {
  9348. string[] array = text3.Split(new char[] { ',' });
  9349. float num10 = float.Parse(array[0]);
  9350. if (danceFace[j] < num10 && num10 < audioSourceBgm.time)
  9351. {
  9352. danceFace[j] = num10;
  9353. FaceName[j] = FaceName2[j];
  9354. FaceName2[j] = array[1];
  9355. FaceName3[j] = array[2];
  9356. FaceTime[j] = 0.0166666675f;
  9357. break;
  9358. }
  9359. }
  9360. }
  9361. else if (j == 2 || j == 5 || j == 8 || j == 11)
  9362. {
  9363. foreach (string text3 in dance13CArray)
  9364. {
  9365. string[] array = text3.Split(new char[] { ',' });
  9366. float num10 = float.Parse(array[0]);
  9367. if (danceFace[j] < num10 && num10 < audioSourceBgm.time)
  9368. {
  9369. danceFace[j] = num10;
  9370. FaceName[j] = FaceName2[j];
  9371. FaceName2[j] = array[1];
  9372. FaceName3[j] = array[2];
  9373. FaceTime[j] = 0.0166666675f;
  9374. break;
  9375. }
  9376. }
  9377. }
  9378. else
  9379. {
  9380. foreach (string text3 in dance13Array)
  9381. {
  9382. string[] array = text3.Split(new char[] { ',' });
  9383. float num10 = float.Parse(array[0]);
  9384. if (danceFace[j] < num10 && num10 < audioSourceBgm.time)
  9385. {
  9386. danceFace[j] = num10;
  9387. FaceName[j] = FaceName2[j];
  9388. FaceName2[j] = array[1];
  9389. FaceName3[j] = array[2];
  9390. FaceTime[j] = 0.0166666675f;
  9391. break;
  9392. }
  9393. }
  9394. }
  9395. }
  9396. if (isDanceStart15F)
  9397. {
  9398. if (j == 1 || j == 3 || j == 5 || j == 7 || j == 9 || j == 11 || j == 13)
  9399. {
  9400. foreach (string text3 in dance15BArray)
  9401. {
  9402. string[] array = text3.Split(new char[] { ',' });
  9403. float num10 = float.Parse(array[0]);
  9404. if (danceFace[j] < num10 && num10 < audioSourceBgm.time)
  9405. {
  9406. danceFace[j] = num10;
  9407. FaceName[j] = FaceName2[j];
  9408. FaceName2[j] = array[1];
  9409. FaceName3[j] = array[2];
  9410. FaceTime[j] = 0.0166666675f;
  9411. break;
  9412. }
  9413. }
  9414. }
  9415. else
  9416. {
  9417. foreach (string text3 in dance15Array)
  9418. {
  9419. string[] array = text3.Split(new char[] { ',' });
  9420. float num10 = float.Parse(array[0]);
  9421. if (danceFace[j] < num10 && num10 < audioSourceBgm.time)
  9422. {
  9423. danceFace[j] = num10;
  9424. FaceName[j] = FaceName2[j];
  9425. FaceName2[j] = array[1];
  9426. FaceName3[j] = array[2];
  9427. FaceTime[j] = 0.0166666675f;
  9428. break;
  9429. }
  9430. }
  9431. }
  9432. }
  9433. if (!isFadeOut)
  9434. {
  9435. Maid maid = maidArray[j];
  9436. if (maid && maid.Visible)
  9437. {
  9438. if (maid.transform.position.y != 100f)
  9439. {
  9440. FaceTime[j] += Time.deltaTime;
  9441. if (FaceTime[j] < 1f)
  9442. {
  9443. TMorph morph = maid.body0.Face.morph;
  9444. maid.boMabataki = false;
  9445. maid.body0.Face.morph.EyeMabataki = 0f;
  9446. if (FaceName[j] != string.Empty)
  9447. {
  9448. maid.body0.Face.morph.MulBlendValues(FaceName[j], 1f);
  9449. }
  9450. if (FaceName2[j] != "")
  9451. {
  9452. maid.body0.Face.morph.MulBlendValues(FaceName2[j],
  9453. UTY.COSS2(Mathf.Pow(FaceTime[j], 0.4f), 4f));
  9454. }
  9455. if (FaceName3[j] != string.Empty)
  9456. {
  9457. maid.body0.Face.morph.AddBlendValues(FaceName3[j], 1f);
  9458. }
  9459. maid.body0.Face.morph.FixBlendValues_Face();
  9460. }
  9461. else
  9462. {
  9463. FaceName[j] = FaceName2[j];
  9464. }
  9465. if (isHenkou)
  9466. {
  9467. TMorph morph = maid.body0.Face.morph;
  9468. float[] fieldValue = GetFieldValue<TMorph, float[]>(morph, "BlendValues");
  9469. maid.boMabataki = false;
  9470. if (isNamidaH)
  9471. {
  9472. fieldValue[(int)morph.hash["namida"]] = 1f;
  9473. }
  9474. else
  9475. {
  9476. fieldValue[(int)morph.hash["namida"]] = 0f;
  9477. }
  9478. if (isSekimenH)
  9479. {
  9480. fieldValue[(int)morph.hash["hohol"]] = 1f;
  9481. }
  9482. else
  9483. {
  9484. fieldValue[(int)morph.hash["hohol"]] = 0f;
  9485. }
  9486. if (isHohoH)
  9487. {
  9488. fieldValue[(int)morph.hash["hoho2"]] = 1f;
  9489. }
  9490. else
  9491. {
  9492. fieldValue[(int)morph.hash["hoho2"]] = 0f;
  9493. }
  9494. maid.body0.Face.morph.FixBlendValues_Face();
  9495. }
  9496. }
  9497. }
  9498. }
  9499. FoceKuchipakuUpdate2(audioSourceBgm.time, maidArray[j], j);
  9500. }
  9501. }
  9502. if (Input.GetKey(KeyCode.H) || isVR)
  9503. {
  9504. if (Input.GetKeyDown(KeyCode.KeypadPeriod))
  9505. {
  9506. h2Flg = true;
  9507. isNamidaH = !isNamidaH;
  9508. isHenkou = true;
  9509. }
  9510. if (Input.GetKeyDown(KeyCode.KeypadPlus))
  9511. {
  9512. h2Flg = true;
  9513. isSekimenH = !isSekimenH;
  9514. isHenkou = true;
  9515. }
  9516. if (Input.GetKeyDown(KeyCode.KeypadEnter))
  9517. {
  9518. h2Flg = true;
  9519. isHohoH = !isHohoH;
  9520. isHenkou = true;
  9521. }
  9522. }
  9523. danceCheckIndex++;
  9524. if (danceCheckIndex == 10)
  9525. {
  9526. danceCheckIndex = 0;
  9527. }
  9528. danceCheck[danceCheckIndex] = audioSourceBgm.time;
  9529. isDanceChu = false;
  9530. for (int k = 0; k < danceCheck.Length; k++)
  9531. {
  9532. if (danceCheck[k] > 0f)
  9533. {
  9534. isDanceChu = true;
  9535. break;
  9536. }
  9537. }
  9538. if (!isDanceChu)
  9539. {
  9540. danceWait--;
  9541. if (danceWait > 0)
  9542. {
  9543. isDanceChu = true;
  9544. }
  9545. }
  9546. if (!isDanceChu)
  9547. {
  9548. for (int j = 0; j < maidCnt; j++)
  9549. {
  9550. if (maidArray[j] && maidArray[j].Visible)
  9551. {
  9552. maidArray[j].StopKuchipakuPattern();
  9553. if (isDanceStart7V)
  9554. {
  9555. maidArray[j].SetPos(dancePos[j]);
  9556. maidArray[j].body0.transform.localRotation = danceRot[j];
  9557. }
  9558. if (isDanceStart8V && (j == 1 || j == 5 || j == 9 || j == 13))
  9559. {
  9560. maidArray[j].SetPos(dancePos[j]);
  9561. maidArray[j].body0.transform.localRotation = danceRot[j];
  9562. }
  9563. if (isDanceStart11V)
  9564. {
  9565. maidArray[j].SetPos(dancePos[j]);
  9566. maidArray[j].body0.transform.localRotation = danceRot[j];
  9567. }
  9568. if (isDanceStart1K || isDanceStart3K || isDanceStart4K || isDanceStart5K || isDanceStart6K || isDanceStart9K
  9569. || isDanceStart13K)
  9570. {
  9571. maidArray[j].SetPos(dancePos[j]);
  9572. maidArray[j].body0.transform.localRotation = danceRot[j];
  9573. int i = j;
  9574. if (!isVR)
  9575. {
  9576. delCount[i] = 20;
  9577. if (goSlot[(int)selectList[i]] != null)
  9578. {
  9579. maidArray[i].body0.goSlot = new List<TBodySkin>(goSlot[(int)selectList[i]]);
  9580. for (int l = 0; l < bodyHit[(int)selectList[i]].Count; l++)
  9581. {
  9582. maidArray[i].body0.goSlot[l].bonehair.bodyhit = bodyHit[(int)selectList[i]][l];
  9583. }
  9584. }
  9585. }
  9586. Maid maid = maidArray[j];
  9587. maid.DelProp(MPN.handitem, true);
  9588. maid.DelProp(MPN.accvag, true);
  9589. maid.DelProp(MPN.accanl, true);
  9590. maid.DelProp(MPN.kousoku_upper, true);
  9591. maid.DelProp(MPN.kousoku_lower, true);
  9592. maid.AllProcPropSeqStart();
  9593. isStop[i] = true;
  9594. Transform transform2 = CMT.SearchObjName(maidArray[i].body0.m_Bones.transform, "Bip01", true);
  9595. isPoseIti[i] = true;
  9596. poseIti[i] = maidArray[i].transform.position;
  9597. maidArray[i].transform.position = new Vector3(100f, 100f, 100f);
  9598. }
  9599. if (isDanceStart14V)
  9600. {
  9601. maidArray[j].SetPos(dancePos[j]);
  9602. maidArray[j].body0.transform.localRotation = danceRot[j];
  9603. }
  9604. if (isDanceStart15V)
  9605. {
  9606. maidArray[j].SetPos(dancePos[j]);
  9607. maidArray[j].body0.transform.localRotation = danceRot[j];
  9608. }
  9609. }
  9610. }
  9611. isDanceStart1F = false;
  9612. isDanceStart1K = false;
  9613. isDanceStart2F = false;
  9614. isDanceStart3F = false;
  9615. isDanceStart3K = false;
  9616. isDanceStart4F = false;
  9617. isDanceStart4K = false;
  9618. isDanceStart5F = false;
  9619. isDanceStart5K = false;
  9620. isDanceStart6F = false;
  9621. isDanceStart6K = false;
  9622. isDanceStart7F = false;
  9623. isDanceStart7V = false;
  9624. isDanceStart8F = false;
  9625. isDanceStart8V = false;
  9626. isDanceStart8P = false;
  9627. isDanceStart9F = false;
  9628. isDanceStart9K = false;
  9629. isDanceStart10F = false;
  9630. isDanceStart11F = false;
  9631. isDanceStart11V = false;
  9632. isDanceStart12F = false;
  9633. isDanceStart13F = false;
  9634. isDanceStart13K = false;
  9635. isDanceStart14F = false;
  9636. isDanceStart14V = false;
  9637. isDanceStart15F = false;
  9638. isDanceStart15V = false;
  9639. for (int j = 0; j < maidCnt; j++)
  9640. {
  9641. danceFace[j] = 0f;
  9642. }
  9643. danceCheckIndex = 0;
  9644. for (int k = 0; k < danceCheck.Length; k++)
  9645. {
  9646. danceCheck[danceCheckIndex] = 1f;
  9647. }
  9648. isDance = false;
  9649. }
  9650. }
  9651. if ((Input.GetKey(KeyCode.Return) && Input.GetKeyDown(KeyCode.Alpha1))
  9652. || (Input.GetKey(KeyCode.KeypadEnter) && Input.GetKeyDown(KeyCode.Keypad1)))
  9653. {
  9654. if (getModKeyPressing(modKey.Shift))
  9655. {
  9656. isShift = true;
  9657. }
  9658. TextAsset textAsset = Resources.Load("SceneDance/dance_kp_m0") as TextAsset;
  9659. string text4 = Regex.Replace(textAsset.text, "(\\r|\\n| )", string.Empty);
  9660. audioSourceBgm = GameMain.Instance.SoundMgr.GetAudioSourceBgm();
  9661. GameMain.Instance.SoundMgr.PlayBGM("se002.ogg", 0f, false);
  9662. if (!isShift)
  9663. {
  9664. GameMain.Instance.CharacterMgr.ResetCharaPosAll();
  9665. }
  9666. for (int j = 0; j < maidCnt; j++)
  9667. {
  9668. string text5 = "dance_cm3d2_001_f1.anm";
  9669. switch (j)
  9670. {
  9671. case 1:
  9672. case 3:
  9673. case 5:
  9674. case 7:
  9675. case 9:
  9676. case 11:
  9677. case 13:
  9678. text5 = "dance_cm3d2_001_f2.anm";
  9679. break;
  9680. case 2:
  9681. case 4:
  9682. case 6:
  9683. case 8:
  9684. case 10:
  9685. case 12:
  9686. text5 = "dance_cm3d2_001_f3.anm";
  9687. break;
  9688. }
  9689. if (!isShift)
  9690. {
  9691. if (!maidArray[j].body0.m_Bones.GetComponent<Animation>().GetClip(text5))
  9692. {
  9693. maidArray[j].body0.LoadAnime(text5, GameUty.FileSystem, text5, false, false);
  9694. }
  9695. }
  9696. else
  9697. {
  9698. if (!maidArray[j].body0.m_Bones.GetComponent<Animation>().GetClip("dance_cm3d2_kara_003_ddfl_f1.anm"))
  9699. {
  9700. maidArray[j].body0.LoadAnime("dance_cm3d2_kara_003_ddfl_f1.anm",
  9701. GameUty.FileSystem,
  9702. "dance_cm3d2_kara_003_ddfl_f1.anm",
  9703. false,
  9704. false);
  9705. }
  9706. textAsset = Resources.Load("SceneDance/DDF_kara_voice_2") as TextAsset;
  9707. text4 = textAsset.text;
  9708. text4 = Regex.Replace(text4, "(\\r|\\n| )", string.Empty);
  9709. if (!isDanceStart1K && !isDanceStart3K && !isDanceStart4K && !isDanceStart5K && !isDanceStart6K
  9710. && !isDanceStart9K && !isDanceStart13K)
  9711. {
  9712. dancePos[j] = maidArray[j].transform.position;
  9713. danceRot[j] = maidArray[j].transform.localRotation;
  9714. }
  9715. }
  9716. m_baKuchipakuPattern[j] = Convert.FromBase64String(text4);
  9717. }
  9718. if (!isShift)
  9719. {
  9720. GameMain.Instance.SoundMgr.PlayDanceBGM("dokidokifallinlove_short.ogg", 0f, false);
  9721. sw = new Stopwatch();
  9722. sw.Start();
  9723. }
  9724. else if (getModKeyPressing(modKey.Ctrl))
  9725. {
  9726. GameMain.Instance.SoundMgr.PlayDanceBGM("dokidokifallinlove_short_sasaki_kara.ogg", 0f, false);
  9727. }
  9728. else
  9729. {
  9730. GameMain.Instance.SoundMgr.PlayDanceBGM("dokidokifallinlove_short_nao_kara.ogg", 0f, false);
  9731. }
  9732. for (int j = 0; j < maidCnt; j++)
  9733. {
  9734. maidArray[j].StartKuchipakuPattern(0f, text4, true);
  9735. Vector3 vector = Vector3.zero;
  9736. switch (j)
  9737. {
  9738. case 3:
  9739. vector.x = 1f;
  9740. break;
  9741. case 4:
  9742. vector.x = -1f;
  9743. break;
  9744. case 5:
  9745. vector.x = 2f;
  9746. break;
  9747. case 6:
  9748. vector.x = -2f;
  9749. break;
  9750. case 7:
  9751. vector.x = 3f;
  9752. break;
  9753. case 8:
  9754. vector.x = -3f;
  9755. break;
  9756. case 9:
  9757. vector.x = 4f;
  9758. break;
  9759. case 10:
  9760. vector.x = -4f;
  9761. break;
  9762. case 11:
  9763. vector.x = 5f;
  9764. break;
  9765. case 12:
  9766. vector.x = -5f;
  9767. break;
  9768. case 13:
  9769. vector.x = 6f;
  9770. break;
  9771. }
  9772. if (!isShift)
  9773. {
  9774. maidArray[j].SetPos(vector);
  9775. }
  9776. isStop[j] = false;
  9777. isLock[j] = false;
  9778. pHandL[j] = 0;
  9779. pHandR[j] = 0;
  9780. muneIKL[j] = false;
  9781. muneIKR[j] = false;
  9782. if (!isVR)
  9783. {
  9784. maidArray[j].body0.quaDefEyeL.eulerAngles = eyeL[(int)selectList[j]];
  9785. maidArray[j].body0.quaDefEyeR.eulerAngles = eyeR[(int)selectList[j]];
  9786. }
  9787. }
  9788. ikBui = 5;
  9789. isDanceStart1F = false;
  9790. isDanceStart2F = false;
  9791. isDanceStart3F = false;
  9792. isDanceStart4F = false;
  9793. isDanceStart5F = false;
  9794. isDanceStart6F = false;
  9795. isDanceStart7F = false;
  9796. isDanceStart8F = false;
  9797. isDanceStart9F = false;
  9798. isDanceStart10F = false;
  9799. isDanceStart11F = false;
  9800. isDanceStart12F = false;
  9801. isDanceStart13F = false;
  9802. isDanceStart14F = false;
  9803. isDanceStart15F = false;
  9804. for (int j = 0; j < maidCnt; j++)
  9805. {
  9806. danceFace[j] = 0f;
  9807. }
  9808. if (isDanceStart7V)
  9809. {
  9810. for (int j = 0; j < maidCnt; j++)
  9811. {
  9812. if (maidArray[j] && maidArray[j].Visible)
  9813. {
  9814. if (isDanceStart7V)
  9815. {
  9816. maidArray[j].SetPos(dancePos[j]);
  9817. maidArray[j].body0.transform.localRotation = danceRot[j];
  9818. }
  9819. }
  9820. }
  9821. isDanceStart7V = false;
  9822. }
  9823. if (isDanceStart8V)
  9824. {
  9825. for (int j = 0; j < maidCnt; j++)
  9826. {
  9827. if (maidArray[j] && maidArray[j].Visible)
  9828. {
  9829. if (isDanceStart8V)
  9830. {
  9831. maidArray[j].SetPos(dancePos[j]);
  9832. maidArray[j].body0.transform.localRotation = danceRot[j];
  9833. }
  9834. }
  9835. }
  9836. isDanceStart8V = false;
  9837. isDanceStart8P = false;
  9838. }
  9839. if (isDanceStart11V)
  9840. {
  9841. for (int j = 0; j < maidCnt; j++)
  9842. {
  9843. if (maidArray[j] && maidArray[j].Visible)
  9844. {
  9845. if (isDanceStart11V)
  9846. {
  9847. maidArray[j].SetPos(dancePos[j]);
  9848. maidArray[j].body0.transform.localRotation = danceRot[j];
  9849. }
  9850. }
  9851. }
  9852. isDanceStart11V = false;
  9853. }
  9854. if (isDanceStart1K || isDanceStart3K || isDanceStart4K || isDanceStart5K || isDanceStart6K || isDanceStart9K
  9855. || isDanceStart13K)
  9856. {
  9857. for (int j = 0; j < maidCnt; j++)
  9858. {
  9859. if (maidArray[j] && maidArray[j].Visible)
  9860. {
  9861. if (isDanceStart1K || isDanceStart3K || isDanceStart4K || isDanceStart5K || isDanceStart6K || isDanceStart9K
  9862. || isDanceStart13K)
  9863. {
  9864. maidArray[j].SetPos(dancePos[j]);
  9865. maidArray[j].body0.transform.localRotation = danceRot[j];
  9866. int i = j;
  9867. if (!isVR)
  9868. {
  9869. delCount[i] = 20;
  9870. if (goSlot[(int)selectList[i]] != null)
  9871. {
  9872. maidArray[i].body0.goSlot = new List<TBodySkin>(goSlot[(int)selectList[i]]);
  9873. for (int l = 0; l < bodyHit[(int)selectList[i]].Count; l++)
  9874. {
  9875. maidArray[i].body0.goSlot[l].bonehair.bodyhit = bodyHit[(int)selectList[i]][l];
  9876. }
  9877. }
  9878. }
  9879. Maid maid = maidArray[j];
  9880. maid.DelProp(MPN.handitem, true);
  9881. maid.DelProp(MPN.accvag, true);
  9882. maid.DelProp(MPN.accanl, true);
  9883. maid.DelProp(MPN.kousoku_upper, true);
  9884. maid.DelProp(MPN.kousoku_lower, true);
  9885. maid.AllProcPropSeqStart();
  9886. }
  9887. }
  9888. }
  9889. isDanceStart1K = false;
  9890. isDanceStart3K = false;
  9891. isDanceStart4K = false;
  9892. isDanceStart5K = false;
  9893. isDanceStart6K = false;
  9894. isDanceStart9K = false;
  9895. isDanceStart13K = false;
  9896. }
  9897. if (isDanceStart14V)
  9898. {
  9899. for (int j = 0; j < maidCnt; j++)
  9900. {
  9901. if (maidArray[j] && maidArray[j].Visible)
  9902. {
  9903. if (isDanceStart14V)
  9904. {
  9905. maidArray[j].SetPos(dancePos[j]);
  9906. maidArray[j].body0.transform.localRotation = danceRot[j];
  9907. }
  9908. }
  9909. }
  9910. isDanceStart14V = false;
  9911. }
  9912. if (isDanceStart15V)
  9913. {
  9914. for (int j = 0; j < maidCnt; j++)
  9915. {
  9916. if (maidArray[j] && maidArray[j].Visible)
  9917. {
  9918. if (isDanceStart15V)
  9919. {
  9920. maidArray[j].SetPos(dancePos[j]);
  9921. maidArray[j].body0.transform.localRotation = danceRot[j];
  9922. }
  9923. }
  9924. }
  9925. isDanceStart15V = false;
  9926. }
  9927. if (isShift)
  9928. {
  9929. if (maidArray[1] && maidArray[1].Visible)
  9930. {
  9931. if (maidArray[0].transform.position == maidArray[1].transform.position)
  9932. {
  9933. Vector3 vector = Vector3.zero;
  9934. vector.x = 0.6f;
  9935. maidArray[1].SetPos(vector);
  9936. if (maidArray[2] && maidArray[2].Visible)
  9937. {
  9938. vector.x = -0.6f;
  9939. maidArray[2].SetPos(vector);
  9940. }
  9941. if (maidArray[3] && maidArray[3].Visible)
  9942. {
  9943. vector.x = 1.2f;
  9944. maidArray[3].SetPos(vector);
  9945. }
  9946. if (maidArray[4] && maidArray[4].Visible)
  9947. {
  9948. vector.x = -1.2f;
  9949. maidArray[4].SetPos(vector);
  9950. }
  9951. if (maidArray[5] && maidArray[5].Visible)
  9952. {
  9953. vector.x = 1.8f;
  9954. maidArray[5].SetPos(vector);
  9955. }
  9956. if (maidArray[6] && maidArray[6].Visible)
  9957. {
  9958. vector.x = -1.8f;
  9959. maidArray[6].SetPos(vector);
  9960. }
  9961. if (maidArray[7] && maidArray[7].Visible)
  9962. {
  9963. vector.x = 2.4f;
  9964. maidArray[7].SetPos(vector);
  9965. }
  9966. if (maidArray[8] && maidArray[8].Visible)
  9967. {
  9968. vector.x = -2.4f;
  9969. maidArray[8].SetPos(vector);
  9970. }
  9971. if (maidArray[9] && maidArray[9].Visible)
  9972. {
  9973. vector.x = 3f;
  9974. maidArray[9].SetPos(vector);
  9975. }
  9976. if (maidArray[10] && maidArray[10].Visible)
  9977. {
  9978. vector.x = -3f;
  9979. maidArray[10].SetPos(vector);
  9980. }
  9981. if (maidArray[11] && maidArray[11].Visible)
  9982. {
  9983. vector.x = 3.6f;
  9984. maidArray[11].SetPos(vector);
  9985. }
  9986. if (maidArray[12] && maidArray[12].Visible)
  9987. {
  9988. vector.x = -3.6f;
  9989. maidArray[12].SetPos(vector);
  9990. }
  9991. if (maidArray[13] && maidArray[13].Visible)
  9992. {
  9993. vector.x = 4.2f;
  9994. maidArray[13].SetPos(vector);
  9995. }
  9996. }
  9997. }
  9998. isDanceStart1K = true;
  9999. for (int j = 0; j < maidCnt; j++)
  10000. {
  10001. maidArray[j].SetRot(new Vector3(maidArray[j].body0.transform.localRotation.x,
  10002. maidArray[j].body0.transform.localRotation.y + 90f,
  10003. maidArray[j].body0.transform.localRotation.z));
  10004. maidArray[j].SetPos(new Vector3(maidArray[j].body0.transform.position.x + 1f,
  10005. maidArray[j].body0.transform.position.y,
  10006. maidArray[j].body0.transform.position.z + 4f));
  10007. string text2 = "handitem,HanditemL_Karaoke_Mike_I_.menu";
  10008. int i = j;
  10009. Maid maid = maidArray[j];
  10010. if (!isVR)
  10011. {
  10012. delCount[i] = 20;
  10013. if (goSlot[(int)selectList[i]] != null)
  10014. {
  10015. maidArray[i].body0.goSlot = new List<TBodySkin>(goSlot[(int)selectList[i]]);
  10016. for (int l = 0; l < bodyHit[(int)selectList[i]].Count; l++)
  10017. {
  10018. maidArray[i].body0.goSlot[l].bonehair.bodyhit = bodyHit[(int)selectList[i]][l];
  10019. }
  10020. }
  10021. }
  10022. string[] array = new string[2];
  10023. array = text2.Split(new char[] { ',' });
  10024. maid.DelProp(MPN.handitem, true);
  10025. maid.DelProp(MPN.accvag, true);
  10026. maid.DelProp(MPN.accanl, true);
  10027. maid.DelProp(MPN.kousoku_upper, true);
  10028. maid.DelProp(MPN.kousoku_lower, true);
  10029. if (array[0] != "")
  10030. {
  10031. maid.SetProp(array[0], array[1], 0, true, false);
  10032. }
  10033. maid.AllProcPropSeqStart();
  10034. }
  10035. }
  10036. isDance = true;
  10037. isDanceStart1 = true;
  10038. }
  10039. if (isF2)
  10040. {
  10041. TextAsset textAsset = Resources.Load("SceneDance/dance_EtY_m0") as TextAsset;
  10042. string text4 = textAsset.text;
  10043. text4 = Regex.Replace(text4, "(\\r|\\n| )", string.Empty);
  10044. audioSourceBgm = GameMain.Instance.SoundMgr.GetAudioSourceBgm();
  10045. GameMain.Instance.SoundMgr.PlayBGM("se002.ogg", 0f, false);
  10046. for (int j = 0; j < maidCnt; j++)
  10047. {
  10048. if (!maidArray[j].body0.m_Bones.GetComponent<Animation>().GetClip("dance_cm3d_001_f1.anm"))
  10049. {
  10050. maidArray[j].body0.LoadAnime("dance_cm3d_001_f1.anm",
  10051. GameUty.FileSystem,
  10052. "dance_cm3d_001_f1.anm",
  10053. false,
  10054. false);
  10055. }
  10056. m_baKuchipakuPattern[j] = Convert.FromBase64String(text4);
  10057. }
  10058. GameMain.Instance.SoundMgr.PlayDanceBGM("entrancetoyou_short.ogg", 0f, false);
  10059. for (int j = 0; j < maidCnt; j++)
  10060. {
  10061. maidArray[j].StartKuchipakuPattern(0f, text4, true);
  10062. isStop[j] = false;
  10063. isLock[j] = false;
  10064. pHandL[j] = 0;
  10065. pHandR[j] = 0;
  10066. muneIKL[j] = false;
  10067. muneIKR[j] = false;
  10068. if (!isVR)
  10069. {
  10070. maidArray[j].body0.quaDefEyeL.eulerAngles = eyeL[(int)selectList[j]];
  10071. maidArray[j].body0.quaDefEyeR.eulerAngles = eyeR[(int)selectList[j]];
  10072. }
  10073. }
  10074. ikBui = 5;
  10075. isDanceStart1F = false;
  10076. isDanceStart2F = false;
  10077. isDanceStart3F = false;
  10078. isDanceStart4F = false;
  10079. isDanceStart5F = false;
  10080. isDanceStart6F = false;
  10081. isDanceStart7F = false;
  10082. isDanceStart8F = false;
  10083. isDanceStart9F = false;
  10084. isDanceStart10F = false;
  10085. isDanceStart11F = false;
  10086. isDanceStart12F = false;
  10087. isDanceStart13F = false;
  10088. isDanceStart14F = false;
  10089. isDanceStart15F = false;
  10090. for (int j = 0; j < maidCnt; j++)
  10091. {
  10092. danceFace[j] = 0f;
  10093. }
  10094. if (isDanceStart7V)
  10095. {
  10096. for (int j = 0; j < maidCnt; j++)
  10097. {
  10098. if (maidArray[j] && maidArray[j].Visible)
  10099. {
  10100. if (isDanceStart7V)
  10101. {
  10102. maidArray[j].SetPos(dancePos[j]);
  10103. maidArray[j].body0.transform.localRotation = danceRot[j];
  10104. }
  10105. }
  10106. }
  10107. isDanceStart7V = false;
  10108. }
  10109. if (isDanceStart8V)
  10110. {
  10111. for (int j = 0; j < maidCnt; j++)
  10112. {
  10113. if (maidArray[j] && maidArray[j].Visible)
  10114. {
  10115. if (isDanceStart8V)
  10116. {
  10117. maidArray[j].SetPos(dancePos[j]);
  10118. maidArray[j].body0.transform.localRotation = danceRot[j];
  10119. }
  10120. }
  10121. }
  10122. isDanceStart8V = false;
  10123. isDanceStart8P = false;
  10124. }
  10125. if (isDanceStart11V)
  10126. {
  10127. for (int j = 0; j < maidCnt; j++)
  10128. {
  10129. if (maidArray[j] && maidArray[j].Visible)
  10130. {
  10131. if (isDanceStart11V)
  10132. {
  10133. maidArray[j].SetPos(dancePos[j]);
  10134. maidArray[j].body0.transform.localRotation = danceRot[j];
  10135. }
  10136. }
  10137. }
  10138. isDanceStart11V = false;
  10139. }
  10140. if (isDanceStart1K || isDanceStart3K || isDanceStart4K || isDanceStart5K || isDanceStart6K || isDanceStart9K
  10141. || isDanceStart13K)
  10142. {
  10143. for (int j = 0; j < maidCnt; j++)
  10144. {
  10145. if (maidArray[j] && maidArray[j].Visible)
  10146. {
  10147. if (isDanceStart1K || isDanceStart3K || isDanceStart4K || isDanceStart5K || isDanceStart6K || isDanceStart9K
  10148. || isDanceStart13K)
  10149. {
  10150. maidArray[j].SetPos(dancePos[j]);
  10151. maidArray[j].body0.transform.localRotation = danceRot[j];
  10152. int i = j;
  10153. if (!isVR)
  10154. {
  10155. delCount[i] = 20;
  10156. if (goSlot[(int)selectList[i]] != null)
  10157. {
  10158. maidArray[i].body0.goSlot = new List<TBodySkin>(goSlot[(int)selectList[i]]);
  10159. for (int l = 0; l < bodyHit[(int)selectList[i]].Count; l++)
  10160. {
  10161. maidArray[i].body0.goSlot[l].bonehair.bodyhit = bodyHit[(int)selectList[i]][l];
  10162. }
  10163. }
  10164. }
  10165. Maid maid = maidArray[j];
  10166. maid.DelProp(MPN.handitem, true);
  10167. maid.DelProp(MPN.accvag, true);
  10168. maid.DelProp(MPN.accanl, true);
  10169. maid.DelProp(MPN.kousoku_upper, true);
  10170. maid.DelProp(MPN.kousoku_lower, true);
  10171. maid.AllProcPropSeqStart();
  10172. }
  10173. }
  10174. }
  10175. isDanceStart1K = false;
  10176. isDanceStart3K = false;
  10177. isDanceStart4K = false;
  10178. isDanceStart5K = false;
  10179. isDanceStart6K = false;
  10180. isDanceStart9K = false;
  10181. isDanceStart13K = false;
  10182. }
  10183. if (isDanceStart14V)
  10184. {
  10185. for (int j = 0; j < maidCnt; j++)
  10186. {
  10187. if (maidArray[j] && maidArray[j].Visible)
  10188. {
  10189. if (isDanceStart14V)
  10190. {
  10191. maidArray[j].SetPos(dancePos[j]);
  10192. maidArray[j].body0.transform.localRotation = danceRot[j];
  10193. }
  10194. }
  10195. }
  10196. isDanceStart14V = false;
  10197. }
  10198. if (isDanceStart15V)
  10199. {
  10200. for (int j = 0; j < maidCnt; j++)
  10201. {
  10202. if (maidArray[j] && maidArray[j].Visible)
  10203. {
  10204. if (isDanceStart15V)
  10205. {
  10206. maidArray[j].SetPos(dancePos[j]);
  10207. maidArray[j].body0.transform.localRotation = danceRot[j];
  10208. }
  10209. }
  10210. }
  10211. isDanceStart15V = false;
  10212. }
  10213. if (maidArray[1] && maidArray[1].Visible)
  10214. {
  10215. if (maidArray[0].transform.position == maidArray[1].transform.position)
  10216. {
  10217. Vector3 vector = Vector3.zero;
  10218. vector.x = 0.6f;
  10219. maidArray[1].SetPos(vector);
  10220. if (maidArray[2] && maidArray[2].Visible)
  10221. {
  10222. vector.x = -0.6f;
  10223. maidArray[2].SetPos(vector);
  10224. }
  10225. if (maidArray[3] && maidArray[3].Visible)
  10226. {
  10227. vector.x = 1.2f;
  10228. maidArray[3].SetPos(vector);
  10229. }
  10230. if (maidArray[4] && maidArray[4].Visible)
  10231. {
  10232. vector.x = -1.2f;
  10233. maidArray[4].SetPos(vector);
  10234. }
  10235. if (maidArray[5] && maidArray[5].Visible)
  10236. {
  10237. vector.x = 1.8f;
  10238. maidArray[5].SetPos(vector);
  10239. }
  10240. if (maidArray[6] && maidArray[6].Visible)
  10241. {
  10242. vector.x = -1.8f;
  10243. maidArray[6].SetPos(vector);
  10244. }
  10245. if (maidArray[7] && maidArray[7].Visible)
  10246. {
  10247. vector.x = 2.4f;
  10248. maidArray[7].SetPos(vector);
  10249. }
  10250. if (maidArray[8] && maidArray[8].Visible)
  10251. {
  10252. vector.x = -2.4f;
  10253. maidArray[8].SetPos(vector);
  10254. }
  10255. if (maidArray[9] && maidArray[9].Visible)
  10256. {
  10257. vector.x = 3f;
  10258. maidArray[9].SetPos(vector);
  10259. }
  10260. if (maidArray[10] && maidArray[10].Visible)
  10261. {
  10262. vector.x = -3f;
  10263. maidArray[10].SetPos(vector);
  10264. }
  10265. if (maidArray[11] && maidArray[11].Visible)
  10266. {
  10267. vector.x = 3.6f;
  10268. maidArray[11].SetPos(vector);
  10269. }
  10270. if (maidArray[12] && maidArray[12].Visible)
  10271. {
  10272. vector.x = -3.6f;
  10273. maidArray[12].SetPos(vector);
  10274. }
  10275. if (maidArray[13] && maidArray[13].Visible)
  10276. {
  10277. vector.x = 4.2f;
  10278. maidArray[13].SetPos(vector);
  10279. }
  10280. }
  10281. }
  10282. isDance = true;
  10283. isDanceStart2 = true;
  10284. isF2 = false;
  10285. }
  10286. if ((Input.GetKey(KeyCode.Return) && Input.GetKeyDown(KeyCode.Alpha2))
  10287. || (Input.GetKey(KeyCode.KeypadEnter) && Input.GetKeyDown(KeyCode.Keypad2)))
  10288. {
  10289. GameMain.Instance.SoundMgr.StopBGM(0f);
  10290. isF2 = true;
  10291. }
  10292. if (isF3)
  10293. {
  10294. TextAsset textAsset = Resources.Load("SceneDance/dance_Scl_m0") as TextAsset;
  10295. string text4 = textAsset.text;
  10296. text4 = Regex.Replace(text4, "(\\r|\\n| )", string.Empty);
  10297. audioSourceBgm = GameMain.Instance.SoundMgr.GetAudioSourceBgm();
  10298. GameMain.Instance.SoundMgr.PlayBGM("se002.ogg", 0f, false);
  10299. for (int j = 0; j < maidCnt; j++)
  10300. {
  10301. if (!isShift)
  10302. {
  10303. if (!maidArray[j].body0.m_Bones.GetComponent<Animation>().GetClip("dance_cm3d_002_end_f1.anm"))
  10304. {
  10305. maidArray[j].body0.LoadAnime("dance_cm3d_002_end_f1.anm",
  10306. GameUty.FileSystem,
  10307. "dance_cm3d_002_end_f1.anm",
  10308. false,
  10309. false);
  10310. }
  10311. }
  10312. else
  10313. {
  10314. if (!maidArray[j].body0.m_Bones.GetComponent<Animation>().GetClip("dance_cm3d2_kara_001_sl_f1.anm"))
  10315. {
  10316. maidArray[j].body0.LoadAnime("dance_cm3d2_kara_001_sl_f1.anm",
  10317. GameUty.FileSystem,
  10318. "dance_cm3d2_kara_001_sl_f1.anm",
  10319. false,
  10320. false);
  10321. }
  10322. textAsset = Resources.Load("SceneDance/scaret_kara_voice_2") as TextAsset;
  10323. text4 = textAsset.text;
  10324. text4 = Regex.Replace(text4, "(\\r|\\n| )", string.Empty);
  10325. if (!isDanceStart1K && !isDanceStart3K && !isDanceStart4K && !isDanceStart5K && !isDanceStart6K
  10326. && !isDanceStart9K && !isDanceStart13K)
  10327. {
  10328. dancePos[j] = maidArray[j].transform.position;
  10329. danceRot[j] = maidArray[j].transform.localRotation;
  10330. }
  10331. }
  10332. m_baKuchipakuPattern[j] = Convert.FromBase64String(text4);
  10333. }
  10334. if (!isShift)
  10335. {
  10336. GameMain.Instance.SoundMgr.PlayDanceBGM("scarlet leap_short.ogg", 0f, false);
  10337. }
  10338. else
  10339. {
  10340. GameMain.Instance.SoundMgr.PlayDanceBGM("scarlet leap_short_kara_1.ogg", 0f, false);
  10341. }
  10342. for (int j = 0; j < maidCnt; j++)
  10343. {
  10344. maidArray[j].StartKuchipakuPattern(0f, text4, true);
  10345. isStop[j] = false;
  10346. isLock[j] = false;
  10347. pHandL[j] = 0;
  10348. pHandR[j] = 0;
  10349. muneIKL[j] = false;
  10350. muneIKR[j] = false;
  10351. if (!isVR)
  10352. {
  10353. maidArray[j].body0.quaDefEyeL.eulerAngles = eyeL[(int)selectList[j]];
  10354. maidArray[j].body0.quaDefEyeR.eulerAngles = eyeR[(int)selectList[j]];
  10355. }
  10356. }
  10357. ikBui = 5;
  10358. isDanceStart1F = false;
  10359. isDanceStart2F = false;
  10360. isDanceStart3F = false;
  10361. isDanceStart4F = false;
  10362. isDanceStart5F = false;
  10363. isDanceStart6F = false;
  10364. isDanceStart7F = false;
  10365. isDanceStart8F = false;
  10366. isDanceStart9F = false;
  10367. isDanceStart10F = false;
  10368. isDanceStart11F = false;
  10369. isDanceStart12F = false;
  10370. isDanceStart13F = false;
  10371. isDanceStart14F = false;
  10372. isDanceStart15F = false;
  10373. for (int j = 0; j < maidCnt; j++)
  10374. {
  10375. danceFace[j] = 0f;
  10376. }
  10377. if (isDanceStart7V)
  10378. {
  10379. for (int j = 0; j < maidCnt; j++)
  10380. {
  10381. if (maidArray[j] && maidArray[j].Visible)
  10382. {
  10383. if (isDanceStart7V)
  10384. {
  10385. maidArray[j].SetPos(dancePos[j]);
  10386. maidArray[j].body0.transform.localRotation = danceRot[j];
  10387. }
  10388. }
  10389. }
  10390. isDanceStart7V = false;
  10391. }
  10392. if (isDanceStart8V)
  10393. {
  10394. for (int j = 0; j < maidCnt; j++)
  10395. {
  10396. if (maidArray[j] && maidArray[j].Visible)
  10397. {
  10398. if (isDanceStart8V)
  10399. {
  10400. maidArray[j].SetPos(dancePos[j]);
  10401. maidArray[j].body0.transform.localRotation = danceRot[j];
  10402. }
  10403. }
  10404. }
  10405. isDanceStart8V = false;
  10406. isDanceStart8P = false;
  10407. }
  10408. if (isDanceStart11V)
  10409. {
  10410. for (int j = 0; j < maidCnt; j++)
  10411. {
  10412. if (maidArray[j] && maidArray[j].Visible)
  10413. {
  10414. if (isDanceStart11V)
  10415. {
  10416. maidArray[j].SetPos(dancePos[j]);
  10417. maidArray[j].body0.transform.localRotation = danceRot[j];
  10418. }
  10419. }
  10420. }
  10421. isDanceStart11V = false;
  10422. }
  10423. if (isDanceStart1K || isDanceStart3K || isDanceStart4K || isDanceStart5K || isDanceStart6K || isDanceStart9K
  10424. || isDanceStart13K)
  10425. {
  10426. for (int j = 0; j < maidCnt; j++)
  10427. {
  10428. if (maidArray[j] && maidArray[j].Visible)
  10429. {
  10430. if (isDanceStart1K || isDanceStart3K || isDanceStart4K || isDanceStart5K || isDanceStart6K || isDanceStart9K
  10431. || isDanceStart13K)
  10432. {
  10433. maidArray[j].SetPos(dancePos[j]);
  10434. maidArray[j].body0.transform.localRotation = danceRot[j];
  10435. int i = j;
  10436. if (!isVR)
  10437. {
  10438. delCount[i] = 20;
  10439. if (goSlot[(int)selectList[i]] != null)
  10440. {
  10441. maidArray[i].body0.goSlot = new List<TBodySkin>(goSlot[(int)selectList[i]]);
  10442. for (int l = 0; l < bodyHit[(int)selectList[i]].Count; l++)
  10443. {
  10444. maidArray[i].body0.goSlot[l].bonehair.bodyhit = bodyHit[(int)selectList[i]][l];
  10445. }
  10446. }
  10447. }
  10448. Maid maid = maidArray[j];
  10449. maid.DelProp(MPN.handitem, true);
  10450. maid.DelProp(MPN.accvag, true);
  10451. maid.DelProp(MPN.accanl, true);
  10452. maid.DelProp(MPN.kousoku_upper, true);
  10453. maid.DelProp(MPN.kousoku_lower, true);
  10454. maid.AllProcPropSeqStart();
  10455. }
  10456. }
  10457. }
  10458. isDanceStart1K = false;
  10459. isDanceStart3K = false;
  10460. isDanceStart4K = false;
  10461. isDanceStart5K = false;
  10462. isDanceStart6K = false;
  10463. isDanceStart9K = false;
  10464. isDanceStart13K = false;
  10465. }
  10466. if (isDanceStart14V)
  10467. {
  10468. for (int j = 0; j < maidCnt; j++)
  10469. {
  10470. if (maidArray[j] && maidArray[j].Visible)
  10471. {
  10472. if (isDanceStart14V)
  10473. {
  10474. maidArray[j].SetPos(dancePos[j]);
  10475. maidArray[j].body0.transform.localRotation = danceRot[j];
  10476. }
  10477. }
  10478. }
  10479. isDanceStart14V = false;
  10480. }
  10481. if (isDanceStart15V)
  10482. {
  10483. for (int j = 0; j < maidCnt; j++)
  10484. {
  10485. if (maidArray[j] && maidArray[j].Visible)
  10486. {
  10487. if (isDanceStart15V)
  10488. {
  10489. maidArray[j].SetPos(dancePos[j]);
  10490. maidArray[j].body0.transform.localRotation = danceRot[j];
  10491. }
  10492. }
  10493. }
  10494. isDanceStart15V = false;
  10495. }
  10496. if (maidArray[1] && maidArray[1].Visible)
  10497. {
  10498. if (maidArray[0].transform.position == maidArray[1].transform.position)
  10499. {
  10500. Vector3 vector = Vector3.zero;
  10501. vector.x = 0.6f;
  10502. maidArray[1].SetPos(vector);
  10503. if (maidArray[2] && maidArray[2].Visible)
  10504. {
  10505. vector.x = -0.6f;
  10506. maidArray[2].SetPos(vector);
  10507. }
  10508. if (maidArray[3] && maidArray[3].Visible)
  10509. {
  10510. vector.x = 1.2f;
  10511. maidArray[3].SetPos(vector);
  10512. }
  10513. if (maidArray[4] && maidArray[4].Visible)
  10514. {
  10515. vector.x = -1.2f;
  10516. maidArray[4].SetPos(vector);
  10517. }
  10518. if (maidArray[5] && maidArray[5].Visible)
  10519. {
  10520. vector.x = 1.8f;
  10521. maidArray[5].SetPos(vector);
  10522. }
  10523. if (maidArray[6] && maidArray[6].Visible)
  10524. {
  10525. vector.x = -1.8f;
  10526. maidArray[6].SetPos(vector);
  10527. }
  10528. if (maidArray[7] && maidArray[7].Visible)
  10529. {
  10530. vector.x = 2.4f;
  10531. maidArray[7].SetPos(vector);
  10532. }
  10533. if (maidArray[8] && maidArray[8].Visible)
  10534. {
  10535. vector.x = -2.4f;
  10536. maidArray[8].SetPos(vector);
  10537. }
  10538. if (maidArray[9] && maidArray[9].Visible)
  10539. {
  10540. vector.x = 3f;
  10541. maidArray[9].SetPos(vector);
  10542. }
  10543. if (maidArray[10] && maidArray[10].Visible)
  10544. {
  10545. vector.x = -3f;
  10546. maidArray[10].SetPos(vector);
  10547. }
  10548. if (maidArray[11] && maidArray[11].Visible)
  10549. {
  10550. vector.x = 3.6f;
  10551. maidArray[11].SetPos(vector);
  10552. }
  10553. if (maidArray[12] && maidArray[12].Visible)
  10554. {
  10555. vector.x = -3.6f;
  10556. maidArray[12].SetPos(vector);
  10557. }
  10558. if (maidArray[13] && maidArray[13].Visible)
  10559. {
  10560. vector.x = 4.2f;
  10561. maidArray[13].SetPos(vector);
  10562. }
  10563. }
  10564. }
  10565. if (isShift)
  10566. {
  10567. isDanceStart3K = true;
  10568. for (int j = 0; j < maidCnt; j++)
  10569. {
  10570. maidArray[j].SetRot(new Vector3(maidArray[j].body0.transform.localRotation.x,
  10571. maidArray[j].body0.transform.localRotation.y + 90f,
  10572. maidArray[j].body0.transform.localRotation.z));
  10573. maidArray[j].SetPos(new Vector3(maidArray[j].body0.transform.position.x + 1f,
  10574. maidArray[j].body0.transform.position.y,
  10575. maidArray[j].body0.transform.position.z + 4f));
  10576. string text2 = "handitem,HanditemL_Karaoke_Mike_I_.menu";
  10577. int i = j;
  10578. Maid maid = maidArray[j];
  10579. if (!isVR)
  10580. {
  10581. delCount[i] = 20;
  10582. if (goSlot[(int)selectList[i]] != null)
  10583. {
  10584. maidArray[i].body0.goSlot = new List<TBodySkin>(goSlot[(int)selectList[i]]);
  10585. for (int l = 0; l < bodyHit[(int)selectList[i]].Count; l++)
  10586. {
  10587. maidArray[i].body0.goSlot[l].bonehair.bodyhit = bodyHit[(int)selectList[i]][l];
  10588. }
  10589. }
  10590. }
  10591. string[] array = new string[2];
  10592. array = text2.Split(new char[] { ',' });
  10593. maid.DelProp(MPN.handitem, true);
  10594. maid.DelProp(MPN.accvag, true);
  10595. maid.DelProp(MPN.accanl, true);
  10596. maid.DelProp(MPN.kousoku_upper, true);
  10597. maid.DelProp(MPN.kousoku_lower, true);
  10598. if (array[0] != "")
  10599. {
  10600. maid.SetProp(array[0], array[1], 0, true, false);
  10601. }
  10602. maid.AllProcPropSeqStart();
  10603. }
  10604. }
  10605. isDance = true;
  10606. isDanceStart3 = true;
  10607. isF3 = false;
  10608. }
  10609. if ((Input.GetKey(KeyCode.Return) && Input.GetKeyDown(KeyCode.Alpha3))
  10610. || (Input.GetKey(KeyCode.KeypadEnter) && Input.GetKeyDown(KeyCode.Keypad3)))
  10611. {
  10612. GameMain.Instance.SoundMgr.StopBGM(0f);
  10613. isF3 = true;
  10614. if (getModKeyPressing(modKey.Shift))
  10615. {
  10616. isShift = true;
  10617. }
  10618. }
  10619. if (isSF1 || isSF2 || isSF3)
  10620. {
  10621. TextAsset textAsset = Resources.Load("SceneDance/dance_SmT_m0") as TextAsset;
  10622. string text4 = textAsset.text;
  10623. text4 = Regex.Replace(text4, "(\\r|\\n| )", string.Empty);
  10624. audioSourceBgm = GameMain.Instance.SoundMgr.GetAudioSourceBgm();
  10625. GameMain.Instance.SoundMgr.PlayBGM("se002.ogg", 0f, false);
  10626. for (int j = 0; j < maidCnt; j++)
  10627. {
  10628. if (!isShift)
  10629. {
  10630. if (!maidArray[j].body0.m_Bones.GetComponent<Animation>().GetClip("dance_cm3d2_002_smt_f.anm"))
  10631. {
  10632. maidArray[j].body0.LoadAnime("dance_cm3d2_002_smt_f.anm",
  10633. GameUty.FileSystem,
  10634. "dance_cm3d2_002_smt_f.anm",
  10635. false,
  10636. false);
  10637. }
  10638. }
  10639. else
  10640. {
  10641. if (!maidArray[j].body0.m_Bones.GetComponent<Animation>().GetClip("dance_cm3d2_kara02_001_smt_f1.anm"))
  10642. {
  10643. maidArray[j].body0.LoadAnime("dance_cm3d2_kara02_001_smt_f1.anm",
  10644. GameUty.FileSystem,
  10645. "dance_cm3d2_kara02_001_smt_f1.anm",
  10646. false,
  10647. false);
  10648. }
  10649. textAsset = Resources.Load("SceneDance/stellar my tears_kara_voice") as TextAsset;
  10650. text4 = textAsset.text;
  10651. text4 = Regex.Replace(text4, "(\\r|\\n| )", string.Empty);
  10652. if (!isDanceStart1K && !isDanceStart3K && !isDanceStart4K && !isDanceStart5K && !isDanceStart6K
  10653. && !isDanceStart9K && !isDanceStart13K)
  10654. {
  10655. dancePos[j] = maidArray[j].transform.position;
  10656. danceRot[j] = maidArray[j].transform.localRotation;
  10657. }
  10658. }
  10659. m_baKuchipakuPattern[j] = Convert.FromBase64String(text4);
  10660. }
  10661. if (!isShift)
  10662. {
  10663. if (isSF1)
  10664. {
  10665. GameMain.Instance.SoundMgr.PlayDanceBGM("stellarmytears_short.ogg", 0f, false);
  10666. }
  10667. if (isSF2)
  10668. {
  10669. GameMain.Instance.SoundMgr.PlayDanceBGM("stellarmytears_short2.ogg", 0f, false);
  10670. }
  10671. if (isSF3)
  10672. {
  10673. GameMain.Instance.SoundMgr.PlayDanceBGM("stellarmytears_short3.ogg", 0f, false);
  10674. }
  10675. }
  10676. else
  10677. {
  10678. if (isSF1)
  10679. {
  10680. GameMain.Instance.SoundMgr.PlayDanceBGM("stellarmytears_short_nao_kara.ogg", 0f, false);
  10681. }
  10682. if (isSF2)
  10683. {
  10684. GameMain.Instance.SoundMgr.PlayDanceBGM("stellarmytears_short_sasaki_kara.ogg", 0f, false);
  10685. }
  10686. if (isSF3)
  10687. {
  10688. GameMain.Instance.SoundMgr.PlayDanceBGM("stellarmytears_short_misato_kara.ogg", 0f, false);
  10689. }
  10690. }
  10691. for (int j = 0; j < maidCnt; j++)
  10692. {
  10693. maidArray[j].StartKuchipakuPattern(0f, text4, true);
  10694. isStop[j] = false;
  10695. isLock[j] = false;
  10696. pHandL[j] = 0;
  10697. pHandR[j] = 0;
  10698. muneIKL[j] = false;
  10699. muneIKR[j] = false;
  10700. if (!isVR)
  10701. {
  10702. maidArray[j].body0.quaDefEyeL.eulerAngles = eyeL[(int)selectList[j]];
  10703. maidArray[j].body0.quaDefEyeR.eulerAngles = eyeR[(int)selectList[j]];
  10704. }
  10705. }
  10706. ikBui = 5;
  10707. isDanceStart1F = false;
  10708. isDanceStart2F = false;
  10709. isDanceStart3F = false;
  10710. isDanceStart4F = false;
  10711. isDanceStart5F = false;
  10712. isDanceStart6F = false;
  10713. isDanceStart7F = false;
  10714. isDanceStart8F = false;
  10715. isDanceStart9F = false;
  10716. isDanceStart10F = false;
  10717. isDanceStart11F = false;
  10718. isDanceStart12F = false;
  10719. isDanceStart13F = false;
  10720. isDanceStart14F = false;
  10721. isDanceStart15F = false;
  10722. for (int j = 0; j < maidCnt; j++)
  10723. {
  10724. danceFace[j] = 0f;
  10725. }
  10726. if (isDanceStart7V)
  10727. {
  10728. for (int j = 0; j < maidCnt; j++)
  10729. {
  10730. if (maidArray[j] && maidArray[j].Visible)
  10731. {
  10732. if (isDanceStart7V)
  10733. {
  10734. maidArray[j].SetPos(dancePos[j]);
  10735. maidArray[j].body0.transform.localRotation = danceRot[j];
  10736. }
  10737. }
  10738. }
  10739. isDanceStart7V = false;
  10740. }
  10741. if (isDanceStart8V)
  10742. {
  10743. for (int j = 0; j < maidCnt; j++)
  10744. {
  10745. if (maidArray[j] && maidArray[j].Visible)
  10746. {
  10747. if (isDanceStart8V)
  10748. {
  10749. maidArray[j].SetPos(dancePos[j]);
  10750. maidArray[j].body0.transform.localRotation = danceRot[j];
  10751. }
  10752. }
  10753. }
  10754. isDanceStart8V = false;
  10755. isDanceStart8P = false;
  10756. }
  10757. if (isDanceStart11V)
  10758. {
  10759. for (int j = 0; j < maidCnt; j++)
  10760. {
  10761. if (maidArray[j] && maidArray[j].Visible)
  10762. {
  10763. if (isDanceStart11V)
  10764. {
  10765. maidArray[j].SetPos(dancePos[j]);
  10766. maidArray[j].body0.transform.localRotation = danceRot[j];
  10767. }
  10768. }
  10769. }
  10770. isDanceStart11V = false;
  10771. }
  10772. if (isDanceStart1K || isDanceStart3K || isDanceStart4K || isDanceStart5K || isDanceStart6K || isDanceStart9K
  10773. || isDanceStart13K)
  10774. {
  10775. for (int j = 0; j < maidCnt; j++)
  10776. {
  10777. if (maidArray[j] && maidArray[j].Visible)
  10778. {
  10779. if (isDanceStart1K || isDanceStart3K || isDanceStart4K || isDanceStart5K || isDanceStart6K || isDanceStart9K
  10780. || isDanceStart13K)
  10781. {
  10782. maidArray[j].SetPos(dancePos[j]);
  10783. maidArray[j].body0.transform.localRotation = danceRot[j];
  10784. int i = j;
  10785. if (!isVR)
  10786. {
  10787. delCount[i] = 20;
  10788. if (goSlot[(int)selectList[i]] != null)
  10789. {
  10790. maidArray[i].body0.goSlot = new List<TBodySkin>(goSlot[(int)selectList[i]]);
  10791. for (int l = 0; l < bodyHit[(int)selectList[i]].Count; l++)
  10792. {
  10793. maidArray[i].body0.goSlot[l].bonehair.bodyhit = bodyHit[(int)selectList[i]][l];
  10794. }
  10795. }
  10796. }
  10797. Maid maid = maidArray[j];
  10798. maid.DelProp(MPN.handitem, true);
  10799. maid.DelProp(MPN.accvag, true);
  10800. maid.DelProp(MPN.accanl, true);
  10801. maid.DelProp(MPN.kousoku_upper, true);
  10802. maid.DelProp(MPN.kousoku_lower, true);
  10803. maid.AllProcPropSeqStart();
  10804. }
  10805. }
  10806. }
  10807. isDanceStart1K = false;
  10808. isDanceStart3K = false;
  10809. isDanceStart4K = false;
  10810. isDanceStart5K = false;
  10811. isDanceStart6K = false;
  10812. isDanceStart9K = false;
  10813. isDanceStart13K = false;
  10814. }
  10815. if (isDanceStart14V)
  10816. {
  10817. for (int j = 0; j < maidCnt; j++)
  10818. {
  10819. if (maidArray[j] && maidArray[j].Visible)
  10820. {
  10821. if (isDanceStart14V)
  10822. {
  10823. maidArray[j].SetPos(dancePos[j]);
  10824. maidArray[j].body0.transform.localRotation = danceRot[j];
  10825. }
  10826. }
  10827. }
  10828. isDanceStart14V = false;
  10829. }
  10830. if (isDanceStart15V)
  10831. {
  10832. for (int j = 0; j < maidCnt; j++)
  10833. {
  10834. if (maidArray[j] && maidArray[j].Visible)
  10835. {
  10836. if (isDanceStart15V)
  10837. {
  10838. maidArray[j].SetPos(dancePos[j]);
  10839. maidArray[j].body0.transform.localRotation = danceRot[j];
  10840. }
  10841. }
  10842. }
  10843. isDanceStart15V = false;
  10844. }
  10845. if (maidArray[1] && maidArray[1].Visible)
  10846. {
  10847. if (maidArray[0].transform.position == maidArray[1].transform.position)
  10848. {
  10849. Vector3 vector = Vector3.zero;
  10850. vector.x = 0.6f;
  10851. maidArray[1].SetPos(vector);
  10852. if (maidArray[2] && maidArray[2].Visible)
  10853. {
  10854. vector.x = -0.6f;
  10855. maidArray[2].SetPos(vector);
  10856. }
  10857. if (maidArray[3] && maidArray[3].Visible)
  10858. {
  10859. vector.x = 1.2f;
  10860. maidArray[3].SetPos(vector);
  10861. }
  10862. if (maidArray[4] && maidArray[4].Visible)
  10863. {
  10864. vector.x = -1.2f;
  10865. maidArray[4].SetPos(vector);
  10866. }
  10867. if (maidArray[5] && maidArray[5].Visible)
  10868. {
  10869. vector.x = 1.8f;
  10870. maidArray[5].SetPos(vector);
  10871. }
  10872. if (maidArray[6] && maidArray[6].Visible)
  10873. {
  10874. vector.x = -1.8f;
  10875. maidArray[6].SetPos(vector);
  10876. }
  10877. if (maidArray[7] && maidArray[7].Visible)
  10878. {
  10879. vector.x = 2.4f;
  10880. maidArray[7].SetPos(vector);
  10881. }
  10882. if (maidArray[8] && maidArray[8].Visible)
  10883. {
  10884. vector.x = -2.4f;
  10885. maidArray[8].SetPos(vector);
  10886. }
  10887. if (maidArray[9] && maidArray[9].Visible)
  10888. {
  10889. vector.x = 3f;
  10890. maidArray[9].SetPos(vector);
  10891. }
  10892. if (maidArray[10] && maidArray[10].Visible)
  10893. {
  10894. vector.x = -3f;
  10895. maidArray[10].SetPos(vector);
  10896. }
  10897. if (maidArray[11] && maidArray[11].Visible)
  10898. {
  10899. vector.x = 3.6f;
  10900. maidArray[11].SetPos(vector);
  10901. }
  10902. if (maidArray[12] && maidArray[12].Visible)
  10903. {
  10904. vector.x = -3.6f;
  10905. maidArray[12].SetPos(vector);
  10906. }
  10907. if (maidArray[13] && maidArray[13].Visible)
  10908. {
  10909. vector.x = 4.2f;
  10910. maidArray[13].SetPos(vector);
  10911. }
  10912. }
  10913. }
  10914. if (isShift)
  10915. {
  10916. isDanceStart4K = true;
  10917. for (int j = 0; j < maidCnt; j++)
  10918. {
  10919. maidArray[j].SetRot(new Vector3(maidArray[j].body0.transform.localRotation.x,
  10920. maidArray[j].body0.transform.localRotation.y + 90f,
  10921. maidArray[j].body0.transform.localRotation.z));
  10922. maidArray[j].SetPos(new Vector3(maidArray[j].body0.transform.position.x + 1f,
  10923. maidArray[j].body0.transform.position.y,
  10924. maidArray[j].body0.transform.position.z + 4f));
  10925. string text2 = "handitem,HanditemL_Karaoke_Mike_I_.menu";
  10926. int i = j;
  10927. Maid maid = maidArray[j];
  10928. if (!isVR)
  10929. {
  10930. delCount[i] = 20;
  10931. if (goSlot[(int)selectList[i]] != null)
  10932. {
  10933. maidArray[i].body0.goSlot = new List<TBodySkin>(goSlot[(int)selectList[i]]);
  10934. for (int l = 0; l < bodyHit[(int)selectList[i]].Count; l++)
  10935. {
  10936. maidArray[i].body0.goSlot[l].bonehair.bodyhit = bodyHit[(int)selectList[i]][l];
  10937. }
  10938. }
  10939. }
  10940. string[] array = new string[2];
  10941. array = text2.Split(new char[] { ',' });
  10942. maid.DelProp(MPN.handitem, true);
  10943. maid.DelProp(MPN.accvag, true);
  10944. maid.DelProp(MPN.accanl, true);
  10945. maid.DelProp(MPN.kousoku_upper, true);
  10946. maid.DelProp(MPN.kousoku_lower, true);
  10947. if (array[0] != "")
  10948. {
  10949. maid.SetProp(array[0], array[1], 0, true, false);
  10950. }
  10951. maid.AllProcPropSeqStart();
  10952. }
  10953. }
  10954. isDance = true;
  10955. isDanceStart4 = true;
  10956. isSF1 = false;
  10957. isSF2 = false;
  10958. isSF3 = false;
  10959. }
  10960. if (isHS1 || isHS2 || isHS3)
  10961. {
  10962. TextAsset textAsset = Resources.Load("SceneDance/dance_Hhs_m0") as TextAsset;
  10963. string text4 = textAsset.text;
  10964. text4 = Regex.Replace(text4, "(\\r|\\n| )", string.Empty);
  10965. audioSourceBgm = GameMain.Instance.SoundMgr.GetAudioSourceBgm();
  10966. GameMain.Instance.SoundMgr.PlayBGM("se002.ogg", 0f, false);
  10967. for (int j = 0; j < maidCnt; j++)
  10968. {
  10969. if (!isShift)
  10970. {
  10971. if (!maidArray[j].body0.m_Bones.GetComponent<Animation>().GetClip("dance_cm3d2_003_hs_f1.anm"))
  10972. {
  10973. maidArray[j].body0.LoadAnime("dance_cm3d2_003_hs_f1.anm",
  10974. GameUty.FileSystem,
  10975. "dance_cm3d2_003_hs_f1.anm",
  10976. false,
  10977. false);
  10978. }
  10979. }
  10980. else
  10981. {
  10982. if (!maidArray[j].body0.m_Bones.GetComponent<Animation>().GetClip("dance_cm3d2_kara02_003_hs_f1.anm"))
  10983. {
  10984. maidArray[j].body0.LoadAnime("dance_cm3d2_kara02_003_hs_f1.anm",
  10985. GameUty.FileSystem,
  10986. "dance_cm3d2_kara02_003_hs_f1.anm",
  10987. false,
  10988. false);
  10989. }
  10990. textAsset = Resources.Load("SceneDance/happy_happy_scandal_kara_voice") as TextAsset;
  10991. text4 = textAsset.text;
  10992. text4 = Regex.Replace(text4, "(\\r|\\n| )", string.Empty);
  10993. if (!isDanceStart1K && !isDanceStart3K && !isDanceStart4K && !isDanceStart5K && !isDanceStart6K
  10994. && !isDanceStart9K && !isDanceStart13K)
  10995. {
  10996. dancePos[j] = maidArray[j].transform.position;
  10997. danceRot[j] = maidArray[j].transform.localRotation;
  10998. }
  10999. }
  11000. m_baKuchipakuPattern[j] = Convert.FromBase64String(text4);
  11001. }
  11002. if (!isShift)
  11003. {
  11004. if (isHS1)
  11005. {
  11006. GameMain.Instance.SoundMgr.PlayDanceBGM("happy_happy_scandal1.ogg", 0f, false);
  11007. }
  11008. if (isHS2)
  11009. {
  11010. GameMain.Instance.SoundMgr.PlayDanceBGM("happy_happy_scandal2.ogg", 0f, false);
  11011. }
  11012. if (isHS3)
  11013. {
  11014. GameMain.Instance.SoundMgr.PlayDanceBGM("happy_happy_scandal3.ogg", 0f, false);
  11015. }
  11016. }
  11017. else
  11018. {
  11019. if (isHS1)
  11020. {
  11021. GameMain.Instance.SoundMgr.PlayDanceBGM("happyhappyscandal_short_nao_kara.ogg", 0f, false);
  11022. }
  11023. if (isHS2)
  11024. {
  11025. GameMain.Instance.SoundMgr.PlayDanceBGM("happy_happy_scandal_sasaki_kara.ogg", 0f, false);
  11026. }
  11027. if (isHS3)
  11028. {
  11029. GameMain.Instance.SoundMgr.PlayDanceBGM("happy_happy_scandal_misato_kara.ogg", 0f, false);
  11030. }
  11031. }
  11032. for (int j = 0; j < maidCnt; j++)
  11033. {
  11034. maidArray[j].StartKuchipakuPattern(0f, text4, true);
  11035. isStop[j] = false;
  11036. isLock[j] = false;
  11037. pHandL[j] = 0;
  11038. pHandR[j] = 0;
  11039. muneIKL[j] = false;
  11040. muneIKR[j] = false;
  11041. if (!isVR)
  11042. {
  11043. maidArray[j].body0.quaDefEyeL.eulerAngles = eyeL[(int)selectList[j]];
  11044. maidArray[j].body0.quaDefEyeR.eulerAngles = eyeR[(int)selectList[j]];
  11045. }
  11046. }
  11047. ikBui = 5;
  11048. isDanceStart1F = false;
  11049. isDanceStart2F = false;
  11050. isDanceStart3F = false;
  11051. isDanceStart4F = false;
  11052. isDanceStart5F = false;
  11053. isDanceStart6F = false;
  11054. isDanceStart7F = false;
  11055. isDanceStart8F = false;
  11056. isDanceStart9F = false;
  11057. isDanceStart10F = false;
  11058. isDanceStart11F = false;
  11059. isDanceStart12F = false;
  11060. isDanceStart13F = false;
  11061. isDanceStart14F = false;
  11062. isDanceStart15F = false;
  11063. for (int j = 0; j < maidCnt; j++)
  11064. {
  11065. danceFace[j] = 0f;
  11066. }
  11067. if (isDanceStart7V)
  11068. {
  11069. for (int j = 0; j < maidCnt; j++)
  11070. {
  11071. if (maidArray[j] && maidArray[j].Visible)
  11072. {
  11073. if (isDanceStart7V)
  11074. {
  11075. maidArray[j].SetPos(dancePos[j]);
  11076. maidArray[j].body0.transform.localRotation = danceRot[j];
  11077. }
  11078. }
  11079. }
  11080. isDanceStart7V = false;
  11081. }
  11082. if (isDanceStart8V)
  11083. {
  11084. for (int j = 0; j < maidCnt; j++)
  11085. {
  11086. if (maidArray[j] && maidArray[j].Visible)
  11087. {
  11088. if (isDanceStart8V)
  11089. {
  11090. maidArray[j].SetPos(dancePos[j]);
  11091. maidArray[j].body0.transform.localRotation = danceRot[j];
  11092. }
  11093. }
  11094. }
  11095. isDanceStart8V = false;
  11096. isDanceStart8P = false;
  11097. }
  11098. if (isDanceStart11V)
  11099. {
  11100. for (int j = 0; j < maidCnt; j++)
  11101. {
  11102. if (maidArray[j] && maidArray[j].Visible)
  11103. {
  11104. if (isDanceStart11V)
  11105. {
  11106. maidArray[j].SetPos(dancePos[j]);
  11107. maidArray[j].body0.transform.localRotation = danceRot[j];
  11108. }
  11109. }
  11110. }
  11111. isDanceStart11V = false;
  11112. }
  11113. if (isDanceStart1K || isDanceStart3K || isDanceStart4K || isDanceStart5K || isDanceStart6K || isDanceStart9K
  11114. || isDanceStart13K)
  11115. {
  11116. for (int j = 0; j < maidCnt; j++)
  11117. {
  11118. if (maidArray[j] && maidArray[j].Visible)
  11119. {
  11120. if (isDanceStart1K || isDanceStart3K || isDanceStart4K || isDanceStart5K || isDanceStart6K || isDanceStart9K
  11121. || isDanceStart13K)
  11122. {
  11123. maidArray[j].SetPos(dancePos[j]);
  11124. maidArray[j].body0.transform.localRotation = danceRot[j];
  11125. int i = j;
  11126. if (!isVR)
  11127. {
  11128. delCount[i] = 20;
  11129. if (goSlot[(int)selectList[i]] != null)
  11130. {
  11131. maidArray[i].body0.goSlot = new List<TBodySkin>(goSlot[(int)selectList[i]]);
  11132. for (int l = 0; l < bodyHit[(int)selectList[i]].Count; l++)
  11133. {
  11134. maidArray[i].body0.goSlot[l].bonehair.bodyhit = bodyHit[(int)selectList[i]][l];
  11135. }
  11136. }
  11137. }
  11138. Maid maid = maidArray[j];
  11139. maid.DelProp(MPN.handitem, true);
  11140. maid.DelProp(MPN.accvag, true);
  11141. maid.DelProp(MPN.accanl, true);
  11142. maid.DelProp(MPN.kousoku_upper, true);
  11143. maid.DelProp(MPN.kousoku_lower, true);
  11144. maid.AllProcPropSeqStart();
  11145. }
  11146. }
  11147. }
  11148. isDanceStart1K = false;
  11149. isDanceStart3K = false;
  11150. isDanceStart4K = false;
  11151. isDanceStart5K = false;
  11152. isDanceStart6K = false;
  11153. isDanceStart9K = false;
  11154. isDanceStart13K = false;
  11155. }
  11156. if (isDanceStart14V)
  11157. {
  11158. for (int j = 0; j < maidCnt; j++)
  11159. {
  11160. if (maidArray[j] && maidArray[j].Visible)
  11161. {
  11162. if (isDanceStart14V)
  11163. {
  11164. maidArray[j].SetPos(dancePos[j]);
  11165. maidArray[j].body0.transform.localRotation = danceRot[j];
  11166. }
  11167. }
  11168. }
  11169. isDanceStart14V = false;
  11170. }
  11171. if (isDanceStart15V)
  11172. {
  11173. for (int j = 0; j < maidCnt; j++)
  11174. {
  11175. if (maidArray[j] && maidArray[j].Visible)
  11176. {
  11177. if (isDanceStart15V)
  11178. {
  11179. maidArray[j].SetPos(dancePos[j]);
  11180. maidArray[j].body0.transform.localRotation = danceRot[j];
  11181. }
  11182. }
  11183. }
  11184. isDanceStart15V = false;
  11185. }
  11186. if (maidArray[1] && maidArray[1].Visible)
  11187. {
  11188. if (maidArray[0].transform.position == maidArray[1].transform.position)
  11189. {
  11190. Vector3 vector = Vector3.zero;
  11191. vector.x = 0.6f;
  11192. maidArray[1].SetPos(vector);
  11193. if (maidArray[2] && maidArray[2].Visible)
  11194. {
  11195. vector.x = -0.6f;
  11196. maidArray[2].SetPos(vector);
  11197. }
  11198. if (maidArray[3] && maidArray[3].Visible)
  11199. {
  11200. vector.x = 1.2f;
  11201. maidArray[3].SetPos(vector);
  11202. }
  11203. if (maidArray[4] && maidArray[4].Visible)
  11204. {
  11205. vector.x = -1.2f;
  11206. maidArray[4].SetPos(vector);
  11207. }
  11208. if (maidArray[5] && maidArray[5].Visible)
  11209. {
  11210. vector.x = 1.8f;
  11211. maidArray[5].SetPos(vector);
  11212. }
  11213. if (maidArray[6] && maidArray[6].Visible)
  11214. {
  11215. vector.x = -1.8f;
  11216. maidArray[6].SetPos(vector);
  11217. }
  11218. if (maidArray[7] && maidArray[7].Visible)
  11219. {
  11220. vector.x = 2.4f;
  11221. maidArray[7].SetPos(vector);
  11222. }
  11223. if (maidArray[8] && maidArray[8].Visible)
  11224. {
  11225. vector.x = -2.4f;
  11226. maidArray[8].SetPos(vector);
  11227. }
  11228. if (maidArray[9] && maidArray[9].Visible)
  11229. {
  11230. vector.x = 3f;
  11231. maidArray[9].SetPos(vector);
  11232. }
  11233. if (maidArray[10] && maidArray[10].Visible)
  11234. {
  11235. vector.x = -3f;
  11236. maidArray[10].SetPos(vector);
  11237. }
  11238. if (maidArray[11] && maidArray[11].Visible)
  11239. {
  11240. vector.x = 3.6f;
  11241. maidArray[11].SetPos(vector);
  11242. }
  11243. if (maidArray[12] && maidArray[12].Visible)
  11244. {
  11245. vector.x = -3.6f;
  11246. maidArray[12].SetPos(vector);
  11247. }
  11248. if (maidArray[13] && maidArray[13].Visible)
  11249. {
  11250. vector.x = 4.2f;
  11251. maidArray[13].SetPos(vector);
  11252. }
  11253. }
  11254. }
  11255. if (isShift)
  11256. {
  11257. isDanceStart6K = true;
  11258. for (int j = 0; j < maidCnt; j++)
  11259. {
  11260. maidArray[j].SetRot(new Vector3(maidArray[j].body0.transform.localRotation.x,
  11261. maidArray[j].body0.transform.localRotation.y + 90f,
  11262. maidArray[j].body0.transform.localRotation.z));
  11263. maidArray[j].SetPos(new Vector3(maidArray[j].body0.transform.position.x + 1f,
  11264. maidArray[j].body0.transform.position.y,
  11265. maidArray[j].body0.transform.position.z + 4f));
  11266. string text2 = "handitem,HanditemL_Karaoke_Mike_I_.menu";
  11267. int i = j;
  11268. Maid maid = maidArray[j];
  11269. if (!isVR)
  11270. {
  11271. delCount[i] = 20;
  11272. if (goSlot[(int)selectList[i]] != null)
  11273. {
  11274. maidArray[i].body0.goSlot = new List<TBodySkin>(goSlot[(int)selectList[i]]);
  11275. for (int l = 0; l < bodyHit[(int)selectList[i]].Count; l++)
  11276. {
  11277. maidArray[i].body0.goSlot[l].bonehair.bodyhit = bodyHit[(int)selectList[i]][l];
  11278. }
  11279. }
  11280. }
  11281. string[] array = new string[2];
  11282. array = text2.Split(new char[] { ',' });
  11283. maid.DelProp(MPN.handitem, true);
  11284. maid.DelProp(MPN.accvag, true);
  11285. maid.DelProp(MPN.accanl, true);
  11286. maid.DelProp(MPN.kousoku_upper, true);
  11287. maid.DelProp(MPN.kousoku_lower, true);
  11288. if (array[0] != "")
  11289. {
  11290. maid.SetProp(array[0], array[1], 0, true, false);
  11291. }
  11292. maid.AllProcPropSeqStart();
  11293. }
  11294. }
  11295. isDance = true;
  11296. isDanceStart6 = true;
  11297. isHS1 = false;
  11298. isHS2 = false;
  11299. isHS3 = false;
  11300. }
  11301. if (isHS4 || isHS5 || isHS6)
  11302. {
  11303. audioSourceBgm = GameMain.Instance.SoundMgr.GetAudioSourceBgm();
  11304. GameMain.Instance.SoundMgr.PlayBGM("se002.ogg", 0f, false);
  11305. for (int j = 0; j < maidCnt; j++)
  11306. {
  11307. TextAsset textAsset = Resources.Load("SceneDance/dance_Hhs_m0") as TextAsset;
  11308. string text5 = "dance_cm3d2_003_hs_f1.anm";
  11309. switch (j)
  11310. {
  11311. case 1:
  11312. case 3:
  11313. case 5:
  11314. case 7:
  11315. case 9:
  11316. case 11:
  11317. case 13:
  11318. text5 = "dance_cm3d2_003_hs_f2.anm";
  11319. textAsset = Resources.Load("SceneDance/dance_Hhs_m1") as TextAsset;
  11320. break;
  11321. }
  11322. if (maidArray[j] && maidArray[j].Visible)
  11323. {
  11324. if (!maidArray[j].body0.m_Bones.GetComponent<Animation>().GetClip(text5))
  11325. {
  11326. maidArray[j].body0.LoadAnime(text5, GameUty.FileSystem, text5, false, false);
  11327. }
  11328. string text4 = textAsset.text;
  11329. text4 = Regex.Replace(text4, "(\\r|\\n| )", string.Empty);
  11330. maidArray[j].StartKuchipakuPattern(0f, text4, true);
  11331. m_baKuchipakuPattern[j] = Convert.FromBase64String(text4);
  11332. }
  11333. }
  11334. if (isHS4)
  11335. {
  11336. GameMain.Instance.SoundMgr.PlayDanceBGM("happy_happy_scandal1.ogg", 0f, false);
  11337. }
  11338. if (isHS5)
  11339. {
  11340. GameMain.Instance.SoundMgr.PlayDanceBGM("happy_happy_scandal2.ogg", 0f, false);
  11341. }
  11342. if (isHS6)
  11343. {
  11344. GameMain.Instance.SoundMgr.PlayDanceBGM("happy_happy_scandal3.ogg", 0f, false);
  11345. }
  11346. ikBui = 5;
  11347. isDanceStart1F = false;
  11348. isDanceStart2F = false;
  11349. isDanceStart3F = false;
  11350. isDanceStart4F = false;
  11351. isDanceStart5F = false;
  11352. isDanceStart6F = false;
  11353. isDanceStart7F = false;
  11354. isDanceStart8F = false;
  11355. isDanceStart9F = false;
  11356. isDanceStart10F = false;
  11357. isDanceStart11F = false;
  11358. isDanceStart12F = false;
  11359. isDanceStart13F = false;
  11360. isDanceStart14F = false;
  11361. isDanceStart15F = false;
  11362. for (int j = 0; j < maidCnt; j++)
  11363. {
  11364. danceFace[j] = 0f;
  11365. }
  11366. if (isDanceStart7V)
  11367. {
  11368. for (int j = 0; j < maidCnt; j++)
  11369. {
  11370. if (maidArray[j] && maidArray[j].Visible)
  11371. {
  11372. if (isDanceStart7V)
  11373. {
  11374. maidArray[j].SetPos(dancePos[j]);
  11375. maidArray[j].body0.transform.localRotation = danceRot[j];
  11376. }
  11377. }
  11378. }
  11379. isDanceStart7V = false;
  11380. }
  11381. if (isDanceStart8V)
  11382. {
  11383. for (int j = 0; j < maidCnt; j++)
  11384. {
  11385. if (maidArray[j] && maidArray[j].Visible)
  11386. {
  11387. if (isDanceStart8V)
  11388. {
  11389. maidArray[j].SetPos(dancePos[j]);
  11390. maidArray[j].body0.transform.localRotation = danceRot[j];
  11391. }
  11392. }
  11393. }
  11394. isDanceStart8V = false;
  11395. isDanceStart8P = false;
  11396. }
  11397. if (isDanceStart11V)
  11398. {
  11399. for (int j = 0; j < maidCnt; j++)
  11400. {
  11401. if (maidArray[j] && maidArray[j].Visible)
  11402. {
  11403. if (isDanceStart11V)
  11404. {
  11405. maidArray[j].SetPos(dancePos[j]);
  11406. maidArray[j].body0.transform.localRotation = danceRot[j];
  11407. }
  11408. }
  11409. }
  11410. isDanceStart11V = false;
  11411. }
  11412. if (isDanceStart1K || isDanceStart3K || isDanceStart4K || isDanceStart5K || isDanceStart6K || isDanceStart9K
  11413. || isDanceStart13K)
  11414. {
  11415. for (int j = 0; j < maidCnt; j++)
  11416. {
  11417. if (maidArray[j] && maidArray[j].Visible)
  11418. {
  11419. if (isDanceStart1K || isDanceStart3K || isDanceStart4K || isDanceStart5K || isDanceStart6K || isDanceStart9K
  11420. || isDanceStart13K)
  11421. {
  11422. maidArray[j].SetPos(dancePos[j]);
  11423. maidArray[j].body0.transform.localRotation = danceRot[j];
  11424. int i = j;
  11425. if (!isVR)
  11426. {
  11427. delCount[i] = 20;
  11428. if (goSlot[(int)selectList[i]] != null)
  11429. {
  11430. maidArray[i].body0.goSlot = new List<TBodySkin>(goSlot[(int)selectList[i]]);
  11431. for (int l = 0; l < bodyHit[(int)selectList[i]].Count; l++)
  11432. {
  11433. maidArray[i].body0.goSlot[l].bonehair.bodyhit = bodyHit[(int)selectList[i]][l];
  11434. }
  11435. }
  11436. }
  11437. Maid maid = maidArray[j];
  11438. maid.DelProp(MPN.handitem, true);
  11439. maid.DelProp(MPN.accvag, true);
  11440. maid.DelProp(MPN.accanl, true);
  11441. maid.DelProp(MPN.kousoku_upper, true);
  11442. maid.DelProp(MPN.kousoku_lower, true);
  11443. maid.AllProcPropSeqStart();
  11444. }
  11445. }
  11446. }
  11447. isDanceStart1K = false;
  11448. isDanceStart3K = false;
  11449. isDanceStart4K = false;
  11450. isDanceStart5K = false;
  11451. isDanceStart6K = false;
  11452. isDanceStart9K = false;
  11453. isDanceStart13K = false;
  11454. }
  11455. if (isDanceStart14V)
  11456. {
  11457. for (int j = 0; j < maidCnt; j++)
  11458. {
  11459. if (maidArray[j] && maidArray[j].Visible)
  11460. {
  11461. if (isDanceStart14V)
  11462. {
  11463. maidArray[j].SetPos(dancePos[j]);
  11464. maidArray[j].body0.transform.localRotation = danceRot[j];
  11465. }
  11466. }
  11467. }
  11468. isDanceStart14V = false;
  11469. }
  11470. if (isDanceStart15V)
  11471. {
  11472. for (int j = 0; j < maidCnt; j++)
  11473. {
  11474. if (maidArray[j] && maidArray[j].Visible)
  11475. {
  11476. if (isDanceStart15V)
  11477. {
  11478. maidArray[j].SetPos(dancePos[j]);
  11479. maidArray[j].body0.transform.localRotation = danceRot[j];
  11480. }
  11481. }
  11482. }
  11483. isDanceStart15V = false;
  11484. }
  11485. for (int j = 0; j < maidCnt; j++)
  11486. {
  11487. isStop[j] = false;
  11488. isLock[j] = false;
  11489. pHandL[j] = 0;
  11490. pHandR[j] = 0;
  11491. muneIKL[j] = false;
  11492. muneIKR[j] = false;
  11493. if (!isVR)
  11494. {
  11495. maidArray[j].body0.quaDefEyeL.eulerAngles = eyeL[(int)selectList[j]];
  11496. maidArray[j].body0.quaDefEyeR.eulerAngles = eyeR[(int)selectList[j]];
  11497. }
  11498. if (maidArray[j].transform.position.y != 100f)
  11499. {
  11500. dancePos[j] = maidArray[j].transform.position;
  11501. }
  11502. else
  11503. {
  11504. dancePos[j] = new Vector3(maidArray[j].transform.position.x, 0f, maidArray[j].transform.position.z);
  11505. }
  11506. danceRot[j] = maidArray[j].transform.localRotation;
  11507. }
  11508. if (maidArray[1] && maidArray[1].Visible)
  11509. {
  11510. maidArray[1].SetPos(new Vector3(maidArray[0].transform.position.x, 100f, maidArray[0].transform.position.z));
  11511. maidArray[1].body0.transform.localRotation = maidArray[0].body0.transform.localRotation;
  11512. }
  11513. if (maidArray[3] && maidArray[3].Visible)
  11514. {
  11515. maidArray[3].SetPos(new Vector3(maidArray[2].transform.position.x, 100f, maidArray[2].transform.position.z));
  11516. maidArray[3].body0.transform.localRotation = maidArray[2].body0.transform.localRotation;
  11517. }
  11518. if (maidArray[5] && maidArray[5].Visible)
  11519. {
  11520. maidArray[5].SetPos(new Vector3(maidArray[4].transform.position.x, 100f, maidArray[4].transform.position.z));
  11521. maidArray[5].body0.transform.localRotation = maidArray[4].body0.transform.localRotation;
  11522. }
  11523. if (maidArray[7] && maidArray[7].Visible)
  11524. {
  11525. maidArray[7].SetPos(new Vector3(maidArray[6].transform.position.x, 100f, maidArray[6].transform.position.z));
  11526. maidArray[7].body0.transform.localRotation = maidArray[6].body0.transform.localRotation;
  11527. }
  11528. if (maidArray[9] && maidArray[9].Visible)
  11529. {
  11530. maidArray[9].SetPos(new Vector3(maidArray[8].transform.position.x, 100f, maidArray[8].transform.position.z));
  11531. maidArray[9].body0.transform.localRotation = maidArray[8].body0.transform.localRotation;
  11532. }
  11533. if (maidArray[11] && maidArray[11].Visible)
  11534. {
  11535. maidArray[11].SetPos(new Vector3(maidArray[10].transform.position.x, 100f, maidArray[10].transform.position.z));
  11536. maidArray[11].body0.transform.localRotation = maidArray[10].body0.transform.localRotation;
  11537. }
  11538. if (maidArray[13] && maidArray[13].Visible)
  11539. {
  11540. maidArray[13].SetPos(new Vector3(maidArray[12].transform.position.x, 100f, maidArray[12].transform.position.z));
  11541. maidArray[13].body0.transform.localRotation = maidArray[12].body0.transform.localRotation;
  11542. }
  11543. if (maidArray[2] && maidArray[2].Visible)
  11544. {
  11545. if (maidArray[0].transform.position == maidArray[2].transform.position)
  11546. {
  11547. Vector3 vector = Vector3.zero;
  11548. vector.x = 0.6f;
  11549. maidArray[1].SetPos(vector);
  11550. if (maidArray[2] && maidArray[2].Visible)
  11551. {
  11552. vector.x = -0.6f;
  11553. maidArray[2].SetPos(vector);
  11554. }
  11555. if (maidArray[3] && maidArray[3].Visible)
  11556. {
  11557. vector.x = 1.2f;
  11558. maidArray[3].SetPos(vector);
  11559. }
  11560. if (maidArray[4] && maidArray[4].Visible)
  11561. {
  11562. vector.x = -1.2f;
  11563. maidArray[4].SetPos(vector);
  11564. }
  11565. if (maidArray[5] && maidArray[5].Visible)
  11566. {
  11567. vector.x = 1.8f;
  11568. maidArray[5].SetPos(vector);
  11569. }
  11570. if (maidArray[6] && maidArray[6].Visible)
  11571. {
  11572. vector.x = -1.8f;
  11573. maidArray[6].SetPos(vector);
  11574. }
  11575. if (maidArray[7] && maidArray[7].Visible)
  11576. {
  11577. vector.x = 2.4f;
  11578. maidArray[7].SetPos(vector);
  11579. }
  11580. if (maidArray[8] && maidArray[8].Visible)
  11581. {
  11582. vector.x = -2.4f;
  11583. maidArray[8].SetPos(vector);
  11584. }
  11585. if (maidArray[9] && maidArray[9].Visible)
  11586. {
  11587. vector.x = 3f;
  11588. maidArray[9].SetPos(vector);
  11589. }
  11590. if (maidArray[10] && maidArray[10].Visible)
  11591. {
  11592. vector.x = -3f;
  11593. maidArray[10].SetPos(vector);
  11594. }
  11595. if (maidArray[11] && maidArray[11].Visible)
  11596. {
  11597. vector.x = 3.6f;
  11598. maidArray[11].SetPos(vector);
  11599. }
  11600. if (maidArray[12] && maidArray[12].Visible)
  11601. {
  11602. vector.x = -3.6f;
  11603. maidArray[12].SetPos(vector);
  11604. }
  11605. if (maidArray[13] && maidArray[13].Visible)
  11606. {
  11607. vector.x = 4.2f;
  11608. maidArray[13].SetPos(vector);
  11609. }
  11610. }
  11611. }
  11612. isDance = true;
  11613. isDanceStart7 = true;
  11614. isHS4 = false;
  11615. isHS5 = false;
  11616. isHS6 = false;
  11617. }
  11618. if (isHS7 || isHS8 || isHS9)
  11619. {
  11620. audioSourceBgm = GameMain.Instance.SoundMgr.GetAudioSourceBgm();
  11621. GameMain.Instance.SoundMgr.PlayBGM("se002.ogg", 0f, false);
  11622. for (int j = 0; j < maidCnt; j++)
  11623. {
  11624. string text5 = "dance_cm3d2_003_hs_f1.anm";
  11625. TextAsset textAsset = Resources.Load("SceneDance/dance_Hhs_m0") as TextAsset;
  11626. switch (j)
  11627. {
  11628. case 1:
  11629. case 5:
  11630. case 9:
  11631. case 13:
  11632. text5 = "dance_cm3d2_003_hs_f2.anm";
  11633. textAsset = Resources.Load("SceneDance/dance_Hhs_m1") as TextAsset;
  11634. break;
  11635. case 2:
  11636. case 6:
  11637. case 10:
  11638. text5 = "dance_cm3d2_003_hs_f3.anm";
  11639. textAsset = Resources.Load("SceneDance/dance_Hhs_m2") as TextAsset;
  11640. break;
  11641. case 3:
  11642. case 7:
  11643. case 11:
  11644. text5 = "dance_cm3d2_003_hs_f4.anm";
  11645. textAsset = Resources.Load("SceneDance/dance_Hhs_m2") as TextAsset;
  11646. break;
  11647. }
  11648. if (maidArray[j] && maidArray[j].Visible)
  11649. {
  11650. if (!maidArray[j].body0.m_Bones.GetComponent<Animation>().GetClip(text5))
  11651. {
  11652. maidArray[j].body0.LoadAnime(text5, GameUty.FileSystem, text5, false, false);
  11653. }
  11654. }
  11655. string text4 = textAsset.text;
  11656. text4 = Regex.Replace(text4, "(\\r|\\n| )", string.Empty);
  11657. maidArray[j].StartKuchipakuPattern(0f, text4, true);
  11658. m_baKuchipakuPattern[j] = Convert.FromBase64String(text4);
  11659. }
  11660. if (isHS7)
  11661. {
  11662. GameMain.Instance.SoundMgr.PlayDanceBGM("happy_happy_scandal1.ogg", 0f, false);
  11663. }
  11664. if (isHS8)
  11665. {
  11666. GameMain.Instance.SoundMgr.PlayDanceBGM("happy_happy_scandal2.ogg", 0f, false);
  11667. }
  11668. if (isHS9)
  11669. {
  11670. GameMain.Instance.SoundMgr.PlayDanceBGM("happy_happy_scandal3.ogg", 0f, false);
  11671. }
  11672. ikBui = 5;
  11673. isDanceStart1F = false;
  11674. isDanceStart2F = false;
  11675. isDanceStart3F = false;
  11676. isDanceStart4F = false;
  11677. isDanceStart5F = false;
  11678. isDanceStart6F = false;
  11679. isDanceStart7F = false;
  11680. isDanceStart8F = false;
  11681. isDanceStart9F = false;
  11682. isDanceStart10F = false;
  11683. isDanceStart11F = false;
  11684. isDanceStart12F = false;
  11685. isDanceStart13F = false;
  11686. isDanceStart14F = false;
  11687. isDanceStart15F = false;
  11688. for (int j = 0; j < maidCnt; j++)
  11689. {
  11690. danceFace[j] = 0f;
  11691. }
  11692. if (isDanceStart8V)
  11693. {
  11694. for (int j = 0; j < maidCnt; j++)
  11695. {
  11696. if (maidArray[j] && maidArray[j].Visible)
  11697. {
  11698. if (isDanceStart8V)
  11699. {
  11700. maidArray[j].SetPos(dancePos[j]);
  11701. maidArray[j].body0.transform.localRotation = danceRot[j];
  11702. }
  11703. }
  11704. }
  11705. isDanceStart8V = false;
  11706. isDanceStart8P = false;
  11707. }
  11708. for (int j = 0; j < maidCnt; j++)
  11709. {
  11710. isStop[j] = false;
  11711. isLock[j] = false;
  11712. pHandL[j] = 0;
  11713. pHandR[j] = 0;
  11714. muneIKL[j] = false;
  11715. muneIKR[j] = false;
  11716. if (!isVR)
  11717. {
  11718. maidArray[j].body0.quaDefEyeL.eulerAngles = eyeL[(int)selectList[j]];
  11719. maidArray[j].body0.quaDefEyeR.eulerAngles = eyeR[(int)selectList[j]];
  11720. }
  11721. if (maidArray[j].transform.position.y != 100f)
  11722. {
  11723. dancePos[j] = maidArray[j].transform.position;
  11724. }
  11725. else
  11726. {
  11727. dancePos[j] = new Vector3(maidArray[j].transform.position.x, 0f, maidArray[j].transform.position.z);
  11728. }
  11729. danceRot[j] = maidArray[j].transform.localRotation;
  11730. }
  11731. if ((maidArray[0].transform.position.x == 0.3f || maidArray[0].transform.position.x == -0.3f)
  11732. && maidArray[0].transform.position.y == 0f && maidArray[0].transform.position.z == 0f)
  11733. {
  11734. maidArray[0].SetPos(Vector3.zero);
  11735. maidArray[0].SetRot(Vector3.zero);
  11736. }
  11737. if (maidArray[1] && maidArray[1].Visible)
  11738. {
  11739. maidArray[1].SetPos(new Vector3(maidArray[0].transform.position.x, 100f, maidArray[0].transform.position.z));
  11740. maidArray[1].body0.transform.localRotation = maidArray[0].body0.transform.localRotation;
  11741. }
  11742. if (maidArray[2] && maidArray[2].Visible)
  11743. {
  11744. maidArray[2].SetPos(maidArray[0].transform.position);
  11745. maidArray[2].body0.transform.localRotation = maidArray[0].body0.transform.localRotation;
  11746. }
  11747. if (maidArray[3] && maidArray[3].Visible)
  11748. {
  11749. maidArray[3].SetPos(maidArray[0].transform.position);
  11750. maidArray[3].body0.transform.localRotation = maidArray[0].body0.transform.localRotation;
  11751. }
  11752. if (maidArray[5] && maidArray[5].Visible)
  11753. {
  11754. maidArray[5].SetPos(new Vector3(maidArray[4].transform.position.x, 100f, maidArray[4].transform.position.z));
  11755. maidArray[5].body0.transform.localRotation = maidArray[4].body0.transform.localRotation;
  11756. }
  11757. if (maidArray[6] && maidArray[6].Visible)
  11758. {
  11759. maidArray[6].SetPos(maidArray[4].transform.position);
  11760. maidArray[6].body0.transform.localRotation = maidArray[4].body0.transform.localRotation;
  11761. }
  11762. if (maidArray[7] && maidArray[7].Visible)
  11763. {
  11764. maidArray[7].SetPos(maidArray[4].transform.position);
  11765. maidArray[7].body0.transform.localRotation = maidArray[4].body0.transform.localRotation;
  11766. }
  11767. if (maidArray[9] && maidArray[9].Visible)
  11768. {
  11769. maidArray[9].SetPos(new Vector3(maidArray[8].transform.position.x, 100f, maidArray[8].transform.position.z));
  11770. maidArray[9].body0.transform.localRotation = maidArray[8].body0.transform.localRotation;
  11771. }
  11772. if (maidArray[10] && maidArray[10].Visible)
  11773. {
  11774. maidArray[10].SetPos(maidArray[8].transform.position);
  11775. maidArray[10].body0.transform.localRotation = maidArray[8].body0.transform.localRotation;
  11776. }
  11777. if (maidArray[11] && maidArray[11].Visible)
  11778. {
  11779. maidArray[11].SetPos(maidArray[8].transform.position);
  11780. maidArray[11].body0.transform.localRotation = maidArray[8].body0.transform.localRotation;
  11781. }
  11782. if (maidArray[13] && maidArray[13].Visible)
  11783. {
  11784. maidArray[13].SetPos(new Vector3(maidArray[12].transform.position.x, 100f, maidArray[12].transform.position.z));
  11785. maidArray[13].body0.transform.localRotation = maidArray[12].body0.transform.localRotation;
  11786. }
  11787. if (maidArray[4] && maidArray[4].Visible)
  11788. {
  11789. if (maidArray[0].transform.position == maidArray[4].transform.position)
  11790. {
  11791. Vector3 vector = Vector3.zero;
  11792. vector.x = 0.6f;
  11793. maidArray[1].SetPos(vector);
  11794. if (maidArray[2] && maidArray[2].Visible)
  11795. {
  11796. vector.x = -0.6f;
  11797. maidArray[2].SetPos(vector);
  11798. }
  11799. if (maidArray[3] && maidArray[3].Visible)
  11800. {
  11801. vector.x = 1.2f;
  11802. maidArray[3].SetPos(vector);
  11803. }
  11804. if (maidArray[4] && maidArray[4].Visible)
  11805. {
  11806. vector.x = -1.2f;
  11807. maidArray[4].SetPos(vector);
  11808. }
  11809. if (maidArray[5] && maidArray[5].Visible)
  11810. {
  11811. vector.x = 1.8f;
  11812. maidArray[5].SetPos(vector);
  11813. }
  11814. if (maidArray[6] && maidArray[6].Visible)
  11815. {
  11816. vector.x = -1.8f;
  11817. maidArray[6].SetPos(vector);
  11818. }
  11819. if (maidArray[7] && maidArray[7].Visible)
  11820. {
  11821. vector.x = 2.4f;
  11822. maidArray[7].SetPos(vector);
  11823. }
  11824. if (maidArray[8] && maidArray[8].Visible)
  11825. {
  11826. vector.x = -2.4f;
  11827. maidArray[8].SetPos(vector);
  11828. }
  11829. if (maidArray[9] && maidArray[9].Visible)
  11830. {
  11831. vector.x = 3f;
  11832. maidArray[9].SetPos(vector);
  11833. }
  11834. if (maidArray[10] && maidArray[10].Visible)
  11835. {
  11836. vector.x = -3f;
  11837. maidArray[10].SetPos(vector);
  11838. }
  11839. if (maidArray[11] && maidArray[11].Visible)
  11840. {
  11841. vector.x = 3.6f;
  11842. maidArray[11].SetPos(vector);
  11843. }
  11844. if (maidArray[12] && maidArray[12].Visible)
  11845. {
  11846. vector.x = -3.6f;
  11847. maidArray[12].SetPos(vector);
  11848. }
  11849. if (maidArray[13] && maidArray[13].Visible)
  11850. {
  11851. vector.x = 4.2f;
  11852. maidArray[13].SetPos(vector);
  11853. }
  11854. }
  11855. }
  11856. isDance = true;
  11857. isDanceStart8 = true;
  11858. isHS7 = false;
  11859. isHS8 = false;
  11860. isHS9 = false;
  11861. }
  11862. if (isCF1)
  11863. {
  11864. TextAsset textAsset = Resources.Load("SceneDance/dance_RtY_m0") as TextAsset;
  11865. string text4 = textAsset.text;
  11866. text4 = Regex.Replace(text4, "(\\r|\\n| )", string.Empty);
  11867. audioSourceBgm = GameMain.Instance.SoundMgr.GetAudioSourceBgm();
  11868. GameMain.Instance.SoundMgr.PlayBGM("se002.ogg", 0f, false);
  11869. for (int j = 0; j < maidCnt; j++)
  11870. {
  11871. if (!isShift)
  11872. {
  11873. if (!maidArray[j].body0.m_Bones.GetComponent<Animation>().GetClip("dance_cm3d_003_sp2_f1.anm"))
  11874. {
  11875. maidArray[j].body0.LoadAnime("dance_cm3d_003_sp2_f1.anm",
  11876. GameUty.FileSystem,
  11877. "dance_cm3d_003_sp2_f1.anm",
  11878. false,
  11879. false);
  11880. }
  11881. }
  11882. else
  11883. {
  11884. if (!maidArray[j].body0.m_Bones.GetComponent<Animation>().GetClip("dance_cm3d2_kara02_002_rty_f1.anm"))
  11885. {
  11886. maidArray[j].body0.LoadAnime("dance_cm3d2_kara02_002_rty_f1.anm",
  11887. GameUty.FileSystem,
  11888. "dance_cm3d2_kara02_002_rty_f1.anm",
  11889. false,
  11890. false);
  11891. }
  11892. textAsset = Resources.Load("SceneDance/rhythmix to you_kara_voice") as TextAsset;
  11893. text4 = textAsset.text;
  11894. text4 = Regex.Replace(text4, "(\\r|\\n| )", string.Empty);
  11895. if (!isDanceStart1K && !isDanceStart3K && !isDanceStart4K && !isDanceStart5K && !isDanceStart6K
  11896. && !isDanceStart9K && !isDanceStart13K)
  11897. {
  11898. dancePos[j] = maidArray[j].transform.position;
  11899. danceRot[j] = maidArray[j].transform.localRotation;
  11900. }
  11901. }
  11902. m_baKuchipakuPattern[j] = Convert.FromBase64String(text4);
  11903. }
  11904. if (!isShift)
  11905. {
  11906. GameMain.Instance.SoundMgr.PlayDanceBGM("RhythmixToYou.ogg", 0f, false);
  11907. }
  11908. else
  11909. {
  11910. GameMain.Instance.SoundMgr.PlayDanceBGM("rhythmixtoyou_kara.ogg", 0f, false);
  11911. }
  11912. for (int j = 0; j < maidCnt; j++)
  11913. {
  11914. maidArray[j].StartKuchipakuPattern(0f, text4, true);
  11915. isStop[j] = false;
  11916. isLock[j] = false;
  11917. pHandL[j] = 0;
  11918. pHandR[j] = 0;
  11919. muneIKL[j] = false;
  11920. muneIKR[j] = false;
  11921. if (!isVR)
  11922. {
  11923. maidArray[j].body0.quaDefEyeL.eulerAngles = eyeL[(int)selectList[j]];
  11924. maidArray[j].body0.quaDefEyeR.eulerAngles = eyeR[(int)selectList[j]];
  11925. }
  11926. }
  11927. ikBui = 5;
  11928. isDanceStart1F = false;
  11929. isDanceStart2F = false;
  11930. isDanceStart3F = false;
  11931. isDanceStart4F = false;
  11932. isDanceStart5F = false;
  11933. isDanceStart6F = false;
  11934. isDanceStart7F = false;
  11935. isDanceStart8F = false;
  11936. isDanceStart9F = false;
  11937. isDanceStart10F = false;
  11938. isDanceStart11F = false;
  11939. isDanceStart12F = false;
  11940. isDanceStart13F = false;
  11941. isDanceStart14F = false;
  11942. isDanceStart15F = false;
  11943. for (int j = 0; j < maidCnt; j++)
  11944. {
  11945. danceFace[j] = 0f;
  11946. }
  11947. if (isDanceStart7V)
  11948. {
  11949. for (int j = 0; j < maidCnt; j++)
  11950. {
  11951. if (maidArray[j] && maidArray[j].Visible)
  11952. {
  11953. if (isDanceStart7V)
  11954. {
  11955. maidArray[j].SetPos(dancePos[j]);
  11956. maidArray[j].body0.transform.localRotation = danceRot[j];
  11957. }
  11958. }
  11959. }
  11960. isDanceStart7V = false;
  11961. }
  11962. if (isDanceStart8V)
  11963. {
  11964. for (int j = 0; j < maidCnt; j++)
  11965. {
  11966. if (maidArray[j] && maidArray[j].Visible)
  11967. {
  11968. if (isDanceStart8V)
  11969. {
  11970. maidArray[j].SetPos(dancePos[j]);
  11971. maidArray[j].body0.transform.localRotation = danceRot[j];
  11972. }
  11973. }
  11974. }
  11975. isDanceStart8V = false;
  11976. isDanceStart8P = false;
  11977. }
  11978. if (isDanceStart11V)
  11979. {
  11980. for (int j = 0; j < maidCnt; j++)
  11981. {
  11982. if (maidArray[j] && maidArray[j].Visible)
  11983. {
  11984. if (isDanceStart11V)
  11985. {
  11986. maidArray[j].SetPos(dancePos[j]);
  11987. maidArray[j].body0.transform.localRotation = danceRot[j];
  11988. }
  11989. }
  11990. }
  11991. isDanceStart11V = false;
  11992. }
  11993. if (isDanceStart1K || isDanceStart3K || isDanceStart4K || isDanceStart5K || isDanceStart6K || isDanceStart9K
  11994. || isDanceStart13K)
  11995. {
  11996. for (int j = 0; j < maidCnt; j++)
  11997. {
  11998. if (maidArray[j] && maidArray[j].Visible)
  11999. {
  12000. if (isDanceStart1K || isDanceStart3K || isDanceStart4K || isDanceStart5K || isDanceStart6K || isDanceStart9K
  12001. || isDanceStart13K)
  12002. {
  12003. maidArray[j].SetPos(dancePos[j]);
  12004. maidArray[j].body0.transform.localRotation = danceRot[j];
  12005. int i = j;
  12006. if (!isVR)
  12007. {
  12008. delCount[i] = 20;
  12009. if (goSlot[(int)selectList[i]] != null)
  12010. {
  12011. maidArray[i].body0.goSlot = new List<TBodySkin>(goSlot[(int)selectList[i]]);
  12012. for (int l = 0; l < bodyHit[(int)selectList[i]].Count; l++)
  12013. {
  12014. maidArray[i].body0.goSlot[l].bonehair.bodyhit = bodyHit[(int)selectList[i]][l];
  12015. }
  12016. }
  12017. }
  12018. Maid maid = maidArray[j];
  12019. maid.DelProp(MPN.handitem, true);
  12020. maid.DelProp(MPN.accvag, true);
  12021. maid.DelProp(MPN.accanl, true);
  12022. maid.DelProp(MPN.kousoku_upper, true);
  12023. maid.DelProp(MPN.kousoku_lower, true);
  12024. maid.AllProcPropSeqStart();
  12025. }
  12026. }
  12027. }
  12028. isDanceStart1K = false;
  12029. isDanceStart3K = false;
  12030. isDanceStart4K = false;
  12031. isDanceStart5K = false;
  12032. isDanceStart6K = false;
  12033. isDanceStart9K = false;
  12034. isDanceStart13K = false;
  12035. }
  12036. if (isDanceStart14V)
  12037. {
  12038. for (int j = 0; j < maidCnt; j++)
  12039. {
  12040. if (maidArray[j] && maidArray[j].Visible)
  12041. {
  12042. if (isDanceStart14V)
  12043. {
  12044. maidArray[j].SetPos(dancePos[j]);
  12045. maidArray[j].body0.transform.localRotation = danceRot[j];
  12046. }
  12047. }
  12048. }
  12049. isDanceStart14V = false;
  12050. }
  12051. if (isDanceStart15V)
  12052. {
  12053. for (int j = 0; j < maidCnt; j++)
  12054. {
  12055. if (maidArray[j] && maidArray[j].Visible)
  12056. {
  12057. if (isDanceStart15V)
  12058. {
  12059. maidArray[j].SetPos(dancePos[j]);
  12060. maidArray[j].body0.transform.localRotation = danceRot[j];
  12061. }
  12062. }
  12063. }
  12064. isDanceStart15V = false;
  12065. }
  12066. if (maidArray[1] && maidArray[1].Visible)
  12067. {
  12068. if (maidArray[0].transform.position == maidArray[1].transform.position)
  12069. {
  12070. Vector3 vector = Vector3.zero;
  12071. vector.x = 0.6f;
  12072. maidArray[1].SetPos(vector);
  12073. if (maidArray[2] && maidArray[2].Visible)
  12074. {
  12075. vector.x = -0.6f;
  12076. maidArray[2].SetPos(vector);
  12077. }
  12078. if (maidArray[3] && maidArray[3].Visible)
  12079. {
  12080. vector.x = 1.2f;
  12081. maidArray[3].SetPos(vector);
  12082. }
  12083. if (maidArray[4] && maidArray[4].Visible)
  12084. {
  12085. vector.x = -1.2f;
  12086. maidArray[4].SetPos(vector);
  12087. }
  12088. if (maidArray[5] && maidArray[5].Visible)
  12089. {
  12090. vector.x = 1.8f;
  12091. maidArray[5].SetPos(vector);
  12092. }
  12093. if (maidArray[6] && maidArray[6].Visible)
  12094. {
  12095. vector.x = -1.8f;
  12096. maidArray[6].SetPos(vector);
  12097. }
  12098. if (maidArray[7] && maidArray[7].Visible)
  12099. {
  12100. vector.x = 2.4f;
  12101. maidArray[7].SetPos(vector);
  12102. }
  12103. if (maidArray[8] && maidArray[8].Visible)
  12104. {
  12105. vector.x = -2.4f;
  12106. maidArray[8].SetPos(vector);
  12107. }
  12108. if (maidArray[9] && maidArray[9].Visible)
  12109. {
  12110. vector.x = 3f;
  12111. maidArray[9].SetPos(vector);
  12112. }
  12113. if (maidArray[10] && maidArray[10].Visible)
  12114. {
  12115. vector.x = -3f;
  12116. maidArray[10].SetPos(vector);
  12117. }
  12118. if (maidArray[11] && maidArray[11].Visible)
  12119. {
  12120. vector.x = 3.6f;
  12121. maidArray[11].SetPos(vector);
  12122. }
  12123. if (maidArray[12] && maidArray[12].Visible)
  12124. {
  12125. vector.x = -3.6f;
  12126. maidArray[12].SetPos(vector);
  12127. }
  12128. if (maidArray[13] && maidArray[13].Visible)
  12129. {
  12130. vector.x = 4.2f;
  12131. maidArray[13].SetPos(vector);
  12132. }
  12133. }
  12134. }
  12135. if (isShift)
  12136. {
  12137. isDanceStart5K = true;
  12138. for (int j = 0; j < maidCnt; j++)
  12139. {
  12140. maidArray[j].SetRot(new Vector3(maidArray[j].body0.transform.localRotation.x,
  12141. maidArray[j].body0.transform.localRotation.y + 90f,
  12142. maidArray[j].body0.transform.localRotation.z));
  12143. maidArray[j].SetPos(new Vector3(maidArray[j].body0.transform.position.x + 1f,
  12144. maidArray[j].body0.transform.position.y,
  12145. maidArray[j].body0.transform.position.z + 4f));
  12146. string text2 = "handitem,HanditemL_Karaoke_Mike_I_.menu";
  12147. int i = j;
  12148. Maid maid = maidArray[j];
  12149. if (!isVR)
  12150. {
  12151. delCount[i] = 20;
  12152. if (goSlot[(int)selectList[i]] != null)
  12153. {
  12154. maidArray[i].body0.goSlot = new List<TBodySkin>(goSlot[(int)selectList[i]]);
  12155. for (int l = 0; l < bodyHit[(int)selectList[i]].Count; l++)
  12156. {
  12157. maidArray[i].body0.goSlot[l].bonehair.bodyhit = bodyHit[(int)selectList[i]][l];
  12158. }
  12159. }
  12160. }
  12161. string[] array = new string[2];
  12162. array = text2.Split(new char[] { ',' });
  12163. maid.DelProp(MPN.handitem, true);
  12164. maid.DelProp(MPN.accvag, true);
  12165. maid.DelProp(MPN.accanl, true);
  12166. maid.DelProp(MPN.kousoku_upper, true);
  12167. maid.DelProp(MPN.kousoku_lower, true);
  12168. if (array[0] != "")
  12169. {
  12170. maid.SetProp(array[0], array[1], 0, true, false);
  12171. }
  12172. maid.AllProcPropSeqStart();
  12173. }
  12174. }
  12175. isDance = true;
  12176. isDanceStart5 = true;
  12177. isCF1 = false;
  12178. }
  12179. if ((Input.GetKey(KeyCode.Return) && Input.GetKeyDown(KeyCode.Alpha4))
  12180. || (Input.GetKey(KeyCode.KeypadEnter) && Input.GetKeyDown(KeyCode.Keypad4)))
  12181. {
  12182. GameMain.Instance.SoundMgr.StopBGM(0f);
  12183. isCF1 = true;
  12184. if (getModKeyPressing(modKey.Shift))
  12185. {
  12186. isShift = true;
  12187. }
  12188. }
  12189. if (isKT1)
  12190. {
  12191. TextAsset textAsset = Resources.Load("SceneDance/dance_cktc_1_m0") as TextAsset;
  12192. string text4 = textAsset.text;
  12193. text4 = Regex.Replace(text4, "(\\r|\\n| )", string.Empty);
  12194. audioSourceBgm = GameMain.Instance.SoundMgr.GetAudioSourceBgm();
  12195. GameMain.Instance.SoundMgr.PlayBGM("se002.ogg", 0f, false);
  12196. for (int j = 0; j < maidCnt; j++)
  12197. {
  12198. if (!isShift)
  12199. {
  12200. if (!maidArray[j].body0.m_Bones.GetComponent<Animation>().GetClip("dance_cm3d_004_kano_f1.anm"))
  12201. {
  12202. maidArray[j].body0.LoadAnime("dance_cm3d_004_kano_f1.anm",
  12203. GameUty.FileSystem,
  12204. "dance_cm3d_004_kano_f1.anm",
  12205. false,
  12206. false);
  12207. }
  12208. danceName[j] = "dance_cm3d_004_kano_f1.anm";
  12209. }
  12210. else
  12211. {
  12212. if (!maidArray[j].body0.m_Bones.GetComponent<Animation>().GetClip("dance_cm3d2_kara_002_cktc_f1.anm"))
  12213. {
  12214. maidArray[j].body0.LoadAnime("dance_cm3d2_kara_002_cktc_f1.anm",
  12215. GameUty.FileSystem,
  12216. "dance_cm3d2_kara_002_cktc_f1.anm",
  12217. false,
  12218. false);
  12219. }
  12220. textAsset = Resources.Load("SceneDance/cktc_kara_voice_2") as TextAsset;
  12221. text4 = textAsset.text;
  12222. text4 = Regex.Replace(text4, "(\\r|\\n| )", string.Empty);
  12223. if (!isDanceStart1K && !isDanceStart3K && !isDanceStart4K && !isDanceStart5K && !isDanceStart6K
  12224. && !isDanceStart9K && !isDanceStart13K)
  12225. {
  12226. dancePos[j] = maidArray[j].transform.position;
  12227. danceRot[j] = maidArray[j].transform.localRotation;
  12228. }
  12229. }
  12230. m_baKuchipakuPattern[j] = Convert.FromBase64String(text4);
  12231. }
  12232. if (!isShift)
  12233. {
  12234. GameMain.Instance.SoundMgr.PlayDanceBGM("can_know_two_close.ogg", 0f, false);
  12235. }
  12236. else
  12237. {
  12238. GameMain.Instance.SoundMgr.PlayDanceBGM("canknowtwoclose_short_kara.ogg", 0f, false);
  12239. }
  12240. for (int j = 0; j < maidCnt; j++)
  12241. {
  12242. maidArray[j].StartKuchipakuPattern(0f, text4, true);
  12243. isStop[j] = false;
  12244. isLock[j] = false;
  12245. pHandL[j] = 0;
  12246. pHandR[j] = 0;
  12247. muneIKL[j] = false;
  12248. muneIKR[j] = false;
  12249. if (!isVR)
  12250. {
  12251. maidArray[j].body0.quaDefEyeL.eulerAngles = eyeL[(int)selectList[j]];
  12252. maidArray[j].body0.quaDefEyeR.eulerAngles = eyeR[(int)selectList[j]];
  12253. }
  12254. }
  12255. ikBui = 5;
  12256. isDanceStart1F = false;
  12257. isDanceStart2F = false;
  12258. isDanceStart3F = false;
  12259. isDanceStart4F = false;
  12260. isDanceStart5F = false;
  12261. isDanceStart6F = false;
  12262. isDanceStart7F = false;
  12263. isDanceStart8F = false;
  12264. isDanceStart9F = false;
  12265. isDanceStart10F = false;
  12266. isDanceStart11F = false;
  12267. isDanceStart12F = false;
  12268. isDanceStart13F = false;
  12269. isDanceStart14F = false;
  12270. isDanceStart15F = false;
  12271. for (int j = 0; j < maidCnt; j++)
  12272. {
  12273. danceFace[j] = 0f;
  12274. }
  12275. if (isDanceStart7V)
  12276. {
  12277. for (int j = 0; j < maidCnt; j++)
  12278. {
  12279. if (maidArray[j] && maidArray[j].Visible)
  12280. {
  12281. if (isDanceStart7V)
  12282. {
  12283. maidArray[j].SetPos(dancePos[j]);
  12284. maidArray[j].body0.transform.localRotation = danceRot[j];
  12285. }
  12286. }
  12287. }
  12288. isDanceStart7V = false;
  12289. }
  12290. if (isDanceStart8V)
  12291. {
  12292. for (int j = 0; j < maidCnt; j++)
  12293. {
  12294. if (maidArray[j] && maidArray[j].Visible)
  12295. {
  12296. if (isDanceStart8V)
  12297. {
  12298. maidArray[j].SetPos(dancePos[j]);
  12299. maidArray[j].body0.transform.localRotation = danceRot[j];
  12300. }
  12301. }
  12302. }
  12303. isDanceStart8V = false;
  12304. isDanceStart8P = false;
  12305. }
  12306. if (isDanceStart11V)
  12307. {
  12308. for (int j = 0; j < maidCnt; j++)
  12309. {
  12310. if (maidArray[j] && maidArray[j].Visible)
  12311. {
  12312. if (isDanceStart11V)
  12313. {
  12314. maidArray[j].SetPos(dancePos[j]);
  12315. maidArray[j].body0.transform.localRotation = danceRot[j];
  12316. }
  12317. }
  12318. }
  12319. isDanceStart11V = false;
  12320. }
  12321. if (isDanceStart1K || isDanceStart3K || isDanceStart4K || isDanceStart5K || isDanceStart6K || isDanceStart9K
  12322. || isDanceStart13K)
  12323. {
  12324. for (int j = 0; j < maidCnt; j++)
  12325. {
  12326. if (maidArray[j] && maidArray[j].Visible)
  12327. {
  12328. if (isDanceStart1K || isDanceStart3K || isDanceStart4K || isDanceStart5K || isDanceStart6K || isDanceStart9K
  12329. || isDanceStart13K)
  12330. {
  12331. maidArray[j].SetPos(dancePos[j]);
  12332. maidArray[j].body0.transform.localRotation = danceRot[j];
  12333. int i = j;
  12334. if (!isVR)
  12335. {
  12336. delCount[i] = 20;
  12337. if (goSlot[(int)selectList[i]] != null)
  12338. {
  12339. maidArray[i].body0.goSlot = new List<TBodySkin>(goSlot[(int)selectList[i]]);
  12340. for (int l = 0; l < bodyHit[(int)selectList[i]].Count; l++)
  12341. {
  12342. maidArray[i].body0.goSlot[l].bonehair.bodyhit = bodyHit[(int)selectList[i]][l];
  12343. }
  12344. }
  12345. }
  12346. Maid maid = maidArray[j];
  12347. maid.DelProp(MPN.handitem, true);
  12348. maid.DelProp(MPN.accvag, true);
  12349. maid.DelProp(MPN.accanl, true);
  12350. maid.DelProp(MPN.kousoku_upper, true);
  12351. maid.DelProp(MPN.kousoku_lower, true);
  12352. maid.AllProcPropSeqStart();
  12353. }
  12354. }
  12355. }
  12356. isDanceStart1K = false;
  12357. isDanceStart3K = false;
  12358. isDanceStart4K = false;
  12359. isDanceStart5K = false;
  12360. isDanceStart6K = false;
  12361. isDanceStart9K = false;
  12362. isDanceStart13K = false;
  12363. }
  12364. if (isDanceStart14V)
  12365. {
  12366. for (int j = 0; j < maidCnt; j++)
  12367. {
  12368. if (maidArray[j] && maidArray[j].Visible)
  12369. {
  12370. if (isDanceStart14V)
  12371. {
  12372. maidArray[j].SetPos(dancePos[j]);
  12373. maidArray[j].body0.transform.localRotation = danceRot[j];
  12374. }
  12375. }
  12376. }
  12377. isDanceStart14V = false;
  12378. }
  12379. if (isDanceStart15V)
  12380. {
  12381. for (int j = 0; j < maidCnt; j++)
  12382. {
  12383. if (maidArray[j] && maidArray[j].Visible)
  12384. {
  12385. if (isDanceStart15V)
  12386. {
  12387. maidArray[j].SetPos(dancePos[j]);
  12388. maidArray[j].body0.transform.localRotation = danceRot[j];
  12389. }
  12390. }
  12391. }
  12392. isDanceStart15V = false;
  12393. }
  12394. if (maidArray[1] && maidArray[1].Visible)
  12395. {
  12396. if (maidArray[0].transform.position == maidArray[1].transform.position)
  12397. {
  12398. Vector3 vector = Vector3.zero;
  12399. vector.x = 0.6f;
  12400. maidArray[1].SetPos(vector);
  12401. if (maidArray[2] && maidArray[2].Visible)
  12402. {
  12403. vector.x = -0.6f;
  12404. maidArray[2].SetPos(vector);
  12405. }
  12406. if (maidArray[3] && maidArray[3].Visible)
  12407. {
  12408. vector.x = 1.2f;
  12409. maidArray[3].SetPos(vector);
  12410. }
  12411. if (maidArray[4] && maidArray[4].Visible)
  12412. {
  12413. vector.x = -1.2f;
  12414. maidArray[4].SetPos(vector);
  12415. }
  12416. if (maidArray[5] && maidArray[5].Visible)
  12417. {
  12418. vector.x = 1.8f;
  12419. maidArray[5].SetPos(vector);
  12420. }
  12421. if (maidArray[6] && maidArray[6].Visible)
  12422. {
  12423. vector.x = -1.8f;
  12424. maidArray[6].SetPos(vector);
  12425. }
  12426. if (maidArray[7] && maidArray[7].Visible)
  12427. {
  12428. vector.x = 2.4f;
  12429. maidArray[7].SetPos(vector);
  12430. }
  12431. if (maidArray[8] && maidArray[8].Visible)
  12432. {
  12433. vector.x = -2.4f;
  12434. maidArray[8].SetPos(vector);
  12435. }
  12436. if (maidArray[9] && maidArray[9].Visible)
  12437. {
  12438. vector.x = 3f;
  12439. maidArray[9].SetPos(vector);
  12440. }
  12441. if (maidArray[10] && maidArray[10].Visible)
  12442. {
  12443. vector.x = -3f;
  12444. maidArray[10].SetPos(vector);
  12445. }
  12446. if (maidArray[11] && maidArray[11].Visible)
  12447. {
  12448. vector.x = 3.6f;
  12449. maidArray[11].SetPos(vector);
  12450. }
  12451. if (maidArray[12] && maidArray[12].Visible)
  12452. {
  12453. vector.x = -3.6f;
  12454. maidArray[12].SetPos(vector);
  12455. }
  12456. if (maidArray[13] && maidArray[13].Visible)
  12457. {
  12458. vector.x = 4.2f;
  12459. maidArray[13].SetPos(vector);
  12460. }
  12461. }
  12462. }
  12463. if (maidArray[2] && maidArray[2].Visible)
  12464. {
  12465. if (maidArray[0].transform.position == maidArray[2].transform.position)
  12466. {
  12467. Vector3 vector = Vector3.zero;
  12468. vector.x = 0.6f;
  12469. maidArray[1].SetPos(vector);
  12470. if (maidArray[2] && maidArray[2].Visible)
  12471. {
  12472. vector.x = -0.6f;
  12473. maidArray[2].SetPos(vector);
  12474. }
  12475. if (maidArray[3] && maidArray[3].Visible)
  12476. {
  12477. vector.x = 1.2f;
  12478. maidArray[3].SetPos(vector);
  12479. }
  12480. if (maidArray[4] && maidArray[4].Visible)
  12481. {
  12482. vector.x = -1.2f;
  12483. maidArray[4].SetPos(vector);
  12484. }
  12485. if (maidArray[5] && maidArray[5].Visible)
  12486. {
  12487. vector.x = 1.8f;
  12488. maidArray[5].SetPos(vector);
  12489. }
  12490. if (maidArray[6] && maidArray[6].Visible)
  12491. {
  12492. vector.x = -1.8f;
  12493. maidArray[6].SetPos(vector);
  12494. }
  12495. if (maidArray[7] && maidArray[7].Visible)
  12496. {
  12497. vector.x = 2.4f;
  12498. maidArray[7].SetPos(vector);
  12499. }
  12500. if (maidArray[8] && maidArray[8].Visible)
  12501. {
  12502. vector.x = -2.4f;
  12503. maidArray[8].SetPos(vector);
  12504. }
  12505. if (maidArray[9] && maidArray[9].Visible)
  12506. {
  12507. vector.x = 3f;
  12508. maidArray[9].SetPos(vector);
  12509. }
  12510. if (maidArray[10] && maidArray[10].Visible)
  12511. {
  12512. vector.x = -3f;
  12513. maidArray[10].SetPos(vector);
  12514. }
  12515. if (maidArray[11] && maidArray[11].Visible)
  12516. {
  12517. vector.x = 3.6f;
  12518. maidArray[11].SetPos(vector);
  12519. }
  12520. if (maidArray[12] && maidArray[12].Visible)
  12521. {
  12522. vector.x = -3.6f;
  12523. maidArray[12].SetPos(vector);
  12524. }
  12525. if (maidArray[13] && maidArray[13].Visible)
  12526. {
  12527. vector.x = 4.2f;
  12528. maidArray[13].SetPos(vector);
  12529. }
  12530. }
  12531. }
  12532. if (isShift)
  12533. {
  12534. isDanceStart9K = true;
  12535. for (int j = 0; j < maidCnt; j++)
  12536. {
  12537. maidArray[j].SetRot(new Vector3(maidArray[j].body0.transform.localRotation.x,
  12538. maidArray[j].body0.transform.localRotation.y + 90f,
  12539. maidArray[j].body0.transform.localRotation.z));
  12540. maidArray[j].SetPos(new Vector3(maidArray[j].body0.transform.position.x + 1f,
  12541. maidArray[j].body0.transform.position.y,
  12542. maidArray[j].body0.transform.position.z + 4f));
  12543. string text2 = "handitem,HanditemL_Karaoke_Mike_I_.menu";
  12544. int i = j;
  12545. Maid maid = maidArray[j];
  12546. if (!isVR)
  12547. {
  12548. delCount[i] = 20;
  12549. if (goSlot[(int)selectList[i]] != null)
  12550. {
  12551. maidArray[i].body0.goSlot = new List<TBodySkin>(goSlot[(int)selectList[i]]);
  12552. for (int l = 0; l < bodyHit[(int)selectList[i]].Count; l++)
  12553. {
  12554. maidArray[i].body0.goSlot[l].bonehair.bodyhit = bodyHit[(int)selectList[i]][l];
  12555. }
  12556. }
  12557. }
  12558. string[] array = new string[2];
  12559. array = text2.Split(new char[] { ',' });
  12560. maid.DelProp(MPN.handitem, true);
  12561. maid.DelProp(MPN.accvag, true);
  12562. maid.DelProp(MPN.accanl, true);
  12563. maid.DelProp(MPN.kousoku_upper, true);
  12564. maid.DelProp(MPN.kousoku_lower, true);
  12565. if (array[0] != "")
  12566. {
  12567. maid.SetProp(array[0], array[1], 0, true, false);
  12568. }
  12569. maid.AllProcPropSeqStart();
  12570. }
  12571. }
  12572. isDance = true;
  12573. isDanceStart9 = true;
  12574. isKT1 = false;
  12575. }
  12576. if (isSS && (isSS1 || isSS2 || isSS3 || isSS4 || isSS5 || isSS6))
  12577. {
  12578. audioSourceBgm = GameMain.Instance.SoundMgr.GetAudioSourceBgm();
  12579. GameMain.Instance.SoundMgr.PlayBGM("se002.ogg", 0f, false);
  12580. if (isSS1)
  12581. {
  12582. nameK = "dance_BlD_m";
  12583. nameA = "dance_cm3d21_002_bid_f";
  12584. nameS = "bloomingdreaming_short";
  12585. danceNo1 = 1;
  12586. danceNo2 = 3;
  12587. danceNo3 = 2;
  12588. }
  12589. if (isSS2)
  12590. {
  12591. nameK = "dance_KAD_m";
  12592. nameA = "dance_cm3d21_003_kad_f";
  12593. nameS = "kiminiaijodelicious_short";
  12594. danceNo1 = 1;
  12595. danceNo2 = 2;
  12596. danceNo3 = 3;
  12597. }
  12598. if (isSS3)
  12599. {
  12600. nameK = "dance_LUM_m";
  12601. nameA = "dance_cm3d21_004_lm_f";
  12602. nameS = "luminousmoment_short";
  12603. danceNo1 = 3;
  12604. danceNo2 = 1;
  12605. danceNo3 = 2;
  12606. }
  12607. if (isSS4)
  12608. {
  12609. nameK = "dance_NmF_m";
  12610. nameA = "dance_cm3d21_001_nmf_f";
  12611. nameS = "nightmagicfire_short";
  12612. danceNo1 = 2;
  12613. danceNo2 = 1;
  12614. danceNo3 = 3;
  12615. }
  12616. if (isSS5)
  12617. {
  12618. nameK = "dance_MoE_m";
  12619. nameA = "dance_cm3d21_005_moe_f";
  12620. nameS = "melodyofempire_short";
  12621. danceNo1 = 1;
  12622. danceNo2 = 3;
  12623. danceNo3 = 2;
  12624. }
  12625. if (isSS6)
  12626. {
  12627. nameK = "dance_NmF_m";
  12628. nameA = "dance_cm3d21_kara_001_nmf_f";
  12629. nameS = "nightmagicfire_short";
  12630. danceNo1 = 1;
  12631. danceNo2 = 1;
  12632. danceNo3 = 1;
  12633. }
  12634. for (int j = 0; j < maidCnt; j++)
  12635. {
  12636. TextAsset textAsset = Resources.Load("SceneDance/" + nameK + (danceNo1 - 1)) as TextAsset;
  12637. string text5 = nameA + danceNo1 + ".anm";
  12638. switch (j)
  12639. {
  12640. case 1:
  12641. case 4:
  12642. case 7:
  12643. case 10:
  12644. case 13:
  12645. text5 = nameA + danceNo2 + ".anm";
  12646. textAsset = Resources.Load("SceneDance/" + nameK + (danceNo2 - 1)) as TextAsset;
  12647. break;
  12648. case 2:
  12649. case 5:
  12650. case 8:
  12651. case 11:
  12652. text5 = nameA + danceNo3 + ".anm";
  12653. textAsset = Resources.Load("SceneDance/" + nameK + (danceNo3 - 1)) as TextAsset;
  12654. break;
  12655. }
  12656. if (maidArray[j] && maidArray[j].Visible)
  12657. {
  12658. if (!maidArray[j].body0.m_Bones.GetComponent<Animation>().GetClip(text5))
  12659. {
  12660. maidArray[j].body0.LoadAnime(text5, GameUty.FileSystem, text5, false, false);
  12661. }
  12662. string text4 = textAsset.text;
  12663. text4 = Regex.Replace(text4, "(\\r|\\n| )", string.Empty);
  12664. maidArray[j].StartKuchipakuPattern(0f, text4, true);
  12665. m_baKuchipakuPattern[j] = Convert.FromBase64String(text4);
  12666. }
  12667. }
  12668. GameMain.Instance.SoundMgr.PlayDanceBGM(nameS + ".ogg", 0f, false);
  12669. ikBui = 5;
  12670. isDanceStart1F = false;
  12671. isDanceStart2F = false;
  12672. isDanceStart3F = false;
  12673. isDanceStart4F = false;
  12674. isDanceStart5F = false;
  12675. isDanceStart6F = false;
  12676. isDanceStart7F = false;
  12677. isDanceStart8F = false;
  12678. isDanceStart9F = false;
  12679. isDanceStart10F = false;
  12680. isDanceStart11F = false;
  12681. isDanceStart12F = false;
  12682. isDanceStart13F = false;
  12683. isDanceStart14F = false;
  12684. isDanceStart15F = false;
  12685. for (int j = 0; j < maidCnt; j++)
  12686. {
  12687. danceFace[j] = 0f;
  12688. }
  12689. if (isDanceStart7V)
  12690. {
  12691. for (int j = 0; j < maidCnt; j++)
  12692. {
  12693. if (maidArray[j] && maidArray[j].Visible)
  12694. {
  12695. if (isDanceStart7V)
  12696. {
  12697. maidArray[j].SetPos(dancePos[j]);
  12698. maidArray[j].body0.transform.localRotation = danceRot[j];
  12699. }
  12700. }
  12701. }
  12702. isDanceStart7V = false;
  12703. }
  12704. if (isDanceStart8V)
  12705. {
  12706. for (int j = 0; j < maidCnt; j++)
  12707. {
  12708. if (maidArray[j] && maidArray[j].Visible)
  12709. {
  12710. if (isDanceStart8V)
  12711. {
  12712. maidArray[j].SetPos(dancePos[j]);
  12713. maidArray[j].body0.transform.localRotation = danceRot[j];
  12714. }
  12715. }
  12716. }
  12717. isDanceStart8V = false;
  12718. isDanceStart8P = false;
  12719. }
  12720. if (isDanceStart11V)
  12721. {
  12722. for (int j = 0; j < maidCnt; j++)
  12723. {
  12724. if (maidArray[j] && maidArray[j].Visible)
  12725. {
  12726. if (isDanceStart11V)
  12727. {
  12728. maidArray[j].SetPos(dancePos[j]);
  12729. maidArray[j].body0.transform.localRotation = danceRot[j];
  12730. }
  12731. }
  12732. }
  12733. isDanceStart11V = false;
  12734. }
  12735. if (isDanceStart1K || isDanceStart3K || isDanceStart4K || isDanceStart5K || isDanceStart6K || isDanceStart9K
  12736. || isDanceStart13K)
  12737. {
  12738. for (int j = 0; j < maidCnt; j++)
  12739. {
  12740. if (maidArray[j] && maidArray[j].Visible)
  12741. {
  12742. if (isDanceStart1K || isDanceStart3K || isDanceStart4K || isDanceStart5K || isDanceStart6K || isDanceStart9K
  12743. || isDanceStart13K)
  12744. {
  12745. maidArray[j].SetPos(dancePos[j]);
  12746. maidArray[j].body0.transform.localRotation = danceRot[j];
  12747. int i = j;
  12748. if (!isVR)
  12749. {
  12750. delCount[i] = 20;
  12751. if (goSlot[(int)selectList[i]] != null)
  12752. {
  12753. maidArray[i].body0.goSlot = new List<TBodySkin>(goSlot[(int)selectList[i]]);
  12754. for (int l = 0; l < bodyHit[(int)selectList[i]].Count; l++)
  12755. {
  12756. maidArray[i].body0.goSlot[l].bonehair.bodyhit = bodyHit[(int)selectList[i]][l];
  12757. }
  12758. }
  12759. }
  12760. Maid maid = maidArray[j];
  12761. maid.DelProp(MPN.handitem, true);
  12762. maid.DelProp(MPN.accvag, true);
  12763. maid.DelProp(MPN.accanl, true);
  12764. maid.DelProp(MPN.kousoku_upper, true);
  12765. maid.DelProp(MPN.kousoku_lower, true);
  12766. maid.AllProcPropSeqStart();
  12767. }
  12768. }
  12769. }
  12770. isDanceStart1K = false;
  12771. isDanceStart3K = false;
  12772. isDanceStart4K = false;
  12773. isDanceStart5K = false;
  12774. isDanceStart6K = false;
  12775. isDanceStart9K = false;
  12776. isDanceStart13K = false;
  12777. }
  12778. if (isDanceStart14V)
  12779. {
  12780. for (int j = 0; j < maidCnt; j++)
  12781. {
  12782. if (maidArray[j] && maidArray[j].Visible)
  12783. {
  12784. if (isDanceStart14V)
  12785. {
  12786. maidArray[j].SetPos(dancePos[j]);
  12787. maidArray[j].body0.transform.localRotation = danceRot[j];
  12788. }
  12789. }
  12790. }
  12791. isDanceStart14V = false;
  12792. }
  12793. if (isDanceStart15V)
  12794. {
  12795. for (int j = 0; j < maidCnt; j++)
  12796. {
  12797. if (maidArray[j] && maidArray[j].Visible)
  12798. {
  12799. if (isDanceStart15V)
  12800. {
  12801. maidArray[j].SetPos(dancePos[j]);
  12802. maidArray[j].body0.transform.localRotation = danceRot[j];
  12803. }
  12804. }
  12805. }
  12806. isDanceStart15V = false;
  12807. }
  12808. for (int j = 0; j < maidCnt; j++)
  12809. {
  12810. isStop[j] = false;
  12811. isLock[j] = false;
  12812. pHandL[j] = 0;
  12813. pHandR[j] = 0;
  12814. muneIKL[j] = false;
  12815. muneIKR[j] = false;
  12816. if (!isVR)
  12817. {
  12818. maidArray[j].body0.quaDefEyeL.eulerAngles = eyeL[(int)selectList[j]];
  12819. maidArray[j].body0.quaDefEyeR.eulerAngles = eyeR[(int)selectList[j]];
  12820. }
  12821. if (maidArray[j].transform.position.y != 100f)
  12822. {
  12823. dancePos[j] = maidArray[j].transform.position;
  12824. }
  12825. else
  12826. {
  12827. dancePos[j] = new Vector3(maidArray[j].transform.position.x, 0f, maidArray[j].transform.position.z);
  12828. }
  12829. danceRot[j] = maidArray[j].transform.localRotation;
  12830. }
  12831. if (maidArray[1] && maidArray[1].Visible)
  12832. {
  12833. maidArray[1].SetPos(new Vector3(maidArray[0].transform.position.x,
  12834. maidArray[0].transform.position.y,
  12835. maidArray[0].transform.position.z));
  12836. maidArray[1].body0.transform.localRotation = maidArray[0].body0.transform.localRotation;
  12837. }
  12838. if (maidArray[2] && maidArray[2].Visible)
  12839. {
  12840. maidArray[2].SetPos(new Vector3(maidArray[0].transform.position.x,
  12841. maidArray[0].transform.position.y,
  12842. maidArray[0].transform.position.z));
  12843. maidArray[2].body0.transform.localRotation = maidArray[0].body0.transform.localRotation;
  12844. }
  12845. if (maidArray[4] && maidArray[4].Visible)
  12846. {
  12847. maidArray[4].SetPos(new Vector3(maidArray[3].transform.position.x,
  12848. maidArray[3].transform.position.y,
  12849. maidArray[3].transform.position.z));
  12850. maidArray[4].body0.transform.localRotation = maidArray[3].body0.transform.localRotation;
  12851. }
  12852. if (maidArray[5] && maidArray[5].Visible)
  12853. {
  12854. maidArray[5].SetPos(new Vector3(maidArray[3].transform.position.x,
  12855. maidArray[3].transform.position.y,
  12856. maidArray[3].transform.position.z));
  12857. maidArray[5].body0.transform.localRotation = maidArray[3].body0.transform.localRotation;
  12858. }
  12859. if (maidArray[7] && maidArray[7].Visible)
  12860. {
  12861. maidArray[7].SetPos(new Vector3(maidArray[6].transform.position.x,
  12862. maidArray[6].transform.position.y,
  12863. maidArray[6].transform.position.z));
  12864. maidArray[7].body0.transform.localRotation = maidArray[6].body0.transform.localRotation;
  12865. }
  12866. if (maidArray[8] && maidArray[8].Visible)
  12867. {
  12868. maidArray[8].SetPos(new Vector3(maidArray[6].transform.position.x,
  12869. maidArray[6].transform.position.y,
  12870. maidArray[6].transform.position.z));
  12871. maidArray[8].body0.transform.localRotation = maidArray[6].body0.transform.localRotation;
  12872. }
  12873. if (maidArray[10] && maidArray[10].Visible)
  12874. {
  12875. maidArray[10].SetPos(new Vector3(maidArray[9].transform.position.x,
  12876. maidArray[9].transform.position.y,
  12877. maidArray[9].transform.position.z));
  12878. maidArray[10].body0.transform.localRotation = maidArray[9].body0.transform.localRotation;
  12879. }
  12880. if (maidArray[11] && maidArray[11].Visible)
  12881. {
  12882. maidArray[11].SetPos(new Vector3(maidArray[9].transform.position.x,
  12883. maidArray[9].transform.position.y,
  12884. maidArray[9].transform.position.z));
  12885. maidArray[11].body0.transform.localRotation = maidArray[9].body0.transform.localRotation;
  12886. }
  12887. if (maidArray[13] && maidArray[13].Visible)
  12888. {
  12889. maidArray[13].SetPos(new Vector3(maidArray[12].transform.position.x,
  12890. maidArray[12].transform.position.y,
  12891. maidArray[12].transform.position.z));
  12892. maidArray[13].body0.transform.localRotation = maidArray[12].body0.transform.localRotation;
  12893. }
  12894. isSS = false;
  12895. isDance = true;
  12896. isDanceStart11 = true;
  12897. }
  12898. if ((Input.GetKey(KeyCode.Return) && Input.GetKeyDown(KeyCode.Alpha5))
  12899. || (Input.GetKey(KeyCode.KeypadEnter) && Input.GetKeyDown(KeyCode.Alpha5)))
  12900. {
  12901. GameMain.Instance.SoundMgr.StopBGM(0f);
  12902. isSS1 = true;
  12903. isSS2 = false;
  12904. isSS3 = false;
  12905. isSS4 = false;
  12906. isSS5 = false;
  12907. isSS6 = false;
  12908. isSS = true;
  12909. }
  12910. if ((Input.GetKey(KeyCode.Return) && Input.GetKeyDown(KeyCode.Alpha6))
  12911. || (Input.GetKey(KeyCode.KeypadEnter) && Input.GetKeyDown(KeyCode.Alpha6)))
  12912. {
  12913. GameMain.Instance.SoundMgr.StopBGM(0f);
  12914. isSS1 = false;
  12915. isSS2 = true;
  12916. isSS3 = false;
  12917. isSS4 = false;
  12918. isSS5 = false;
  12919. isSS6 = false;
  12920. isSS = true;
  12921. }
  12922. if ((Input.GetKey(KeyCode.Return) && Input.GetKeyDown(KeyCode.Alpha7))
  12923. || (Input.GetKey(KeyCode.KeypadEnter) && Input.GetKeyDown(KeyCode.Alpha7)))
  12924. {
  12925. GameMain.Instance.SoundMgr.StopBGM(0f);
  12926. isSS1 = false;
  12927. isSS2 = false;
  12928. isSS3 = true;
  12929. isSS4 = false;
  12930. isSS5 = false;
  12931. isSS6 = false;
  12932. isSS = true;
  12933. }
  12934. if ((Input.GetKey(KeyCode.Return) && Input.GetKeyDown(KeyCode.Alpha8))
  12935. || (Input.GetKey(KeyCode.KeypadEnter) && Input.GetKeyDown(KeyCode.Alpha8)))
  12936. {
  12937. GameMain.Instance.SoundMgr.StopBGM(0f);
  12938. isSS1 = false;
  12939. isSS2 = false;
  12940. isSS3 = false;
  12941. isSS4 = true;
  12942. isSS5 = false;
  12943. isSS6 = false;
  12944. isSS = true;
  12945. }
  12946. if ((Input.GetKey(KeyCode.Return) && Input.GetKeyDown(KeyCode.Alpha9))
  12947. || (Input.GetKey(KeyCode.KeypadEnter) && Input.GetKeyDown(KeyCode.Alpha9)))
  12948. {
  12949. GameMain.Instance.SoundMgr.StopBGM(0f);
  12950. isSS1 = false;
  12951. isSS2 = false;
  12952. isSS3 = false;
  12953. isSS4 = false;
  12954. isSS5 = true;
  12955. isSS6 = false;
  12956. isSS = true;
  12957. }
  12958. if (isKHG1 || isKHG2)
  12959. {
  12960. TextAsset textAsset = Resources.Load("SceneDance/dance_KhG_m0") as TextAsset;
  12961. string text4 = textAsset.text;
  12962. text4 = Regex.Replace(text4, "(\\r|\\n| )", string.Empty);
  12963. audioSourceBgm = GameMain.Instance.SoundMgr.GetAudioSourceBgm();
  12964. GameMain.Instance.SoundMgr.PlayBGM("se002.ogg", 0f, false);
  12965. for (int j = 0; j < maidCnt; j++)
  12966. {
  12967. if (!maidArray[j].body0.m_Bones.GetComponent<Animation>().GetClip("dance_cm3d2_005_khg_f.anm"))
  12968. {
  12969. maidArray[j].body0.LoadAnime("dance_cm3d2_005_khg_f.anm",
  12970. GameUty.FileSystem,
  12971. "dance_cm3d2_005_khg_f.anm",
  12972. false,
  12973. false);
  12974. }
  12975. m_baKuchipakuPattern[j] = Convert.FromBase64String(text4);
  12976. }
  12977. if (isKHG1)
  12978. {
  12979. GameMain.Instance.SoundMgr.PlayDanceBGM("kaikaku_short1.ogg", 0f, false);
  12980. }
  12981. if (isKHG2)
  12982. {
  12983. GameMain.Instance.SoundMgr.PlayDanceBGM("kaikaku_short2.ogg", 0f, false);
  12984. }
  12985. for (int j = 0; j < maidCnt; j++)
  12986. {
  12987. maidArray[j].StartKuchipakuPattern(0f, text4, true);
  12988. isStop[j] = false;
  12989. isLock[j] = false;
  12990. pHandL[j] = 0;
  12991. pHandR[j] = 0;
  12992. muneIKL[j] = false;
  12993. muneIKR[j] = false;
  12994. if (!isVR)
  12995. {
  12996. maidArray[j].body0.quaDefEyeL.eulerAngles = eyeL[(int)selectList[j]];
  12997. maidArray[j].body0.quaDefEyeR.eulerAngles = eyeR[(int)selectList[j]];
  12998. }
  12999. }
  13000. ikBui = 5;
  13001. isDanceStart1F = false;
  13002. isDanceStart2F = false;
  13003. isDanceStart3F = false;
  13004. isDanceStart4F = false;
  13005. isDanceStart5F = false;
  13006. isDanceStart6F = false;
  13007. isDanceStart7F = false;
  13008. isDanceStart8F = false;
  13009. isDanceStart9F = false;
  13010. isDanceStart10F = false;
  13011. isDanceStart11F = false;
  13012. isDanceStart12F = false;
  13013. isDanceStart13F = false;
  13014. isDanceStart14F = false;
  13015. isDanceStart15F = false;
  13016. for (int j = 0; j < maidCnt; j++)
  13017. {
  13018. danceFace[j] = 0f;
  13019. }
  13020. if (isDanceStart7V)
  13021. {
  13022. for (int j = 0; j < maidCnt; j++)
  13023. {
  13024. if (maidArray[j] && maidArray[j].Visible)
  13025. {
  13026. if (isDanceStart7V)
  13027. {
  13028. maidArray[j].SetPos(dancePos[j]);
  13029. maidArray[j].body0.transform.localRotation = danceRot[j];
  13030. }
  13031. }
  13032. }
  13033. isDanceStart7V = false;
  13034. }
  13035. if (isDanceStart8V)
  13036. {
  13037. for (int j = 0; j < maidCnt; j++)
  13038. {
  13039. if (maidArray[j] && maidArray[j].Visible)
  13040. {
  13041. if (isDanceStart8V)
  13042. {
  13043. maidArray[j].SetPos(dancePos[j]);
  13044. maidArray[j].body0.transform.localRotation = danceRot[j];
  13045. }
  13046. }
  13047. }
  13048. isDanceStart8V = false;
  13049. isDanceStart8P = false;
  13050. }
  13051. if (isDanceStart11V)
  13052. {
  13053. for (int j = 0; j < maidCnt; j++)
  13054. {
  13055. if (maidArray[j] && maidArray[j].Visible)
  13056. {
  13057. if (isDanceStart11V)
  13058. {
  13059. maidArray[j].SetPos(dancePos[j]);
  13060. maidArray[j].body0.transform.localRotation = danceRot[j];
  13061. }
  13062. }
  13063. }
  13064. isDanceStart11V = false;
  13065. }
  13066. if (isDanceStart1K || isDanceStart3K || isDanceStart4K || isDanceStart5K || isDanceStart6K || isDanceStart9K
  13067. || isDanceStart13K)
  13068. {
  13069. for (int j = 0; j < maidCnt; j++)
  13070. {
  13071. if (maidArray[j] && maidArray[j].Visible)
  13072. {
  13073. if (isDanceStart1K || isDanceStart3K || isDanceStart4K || isDanceStart5K || isDanceStart6K || isDanceStart9K
  13074. || isDanceStart13K)
  13075. {
  13076. maidArray[j].SetPos(dancePos[j]);
  13077. maidArray[j].body0.transform.localRotation = danceRot[j];
  13078. int i = j;
  13079. if (!isVR)
  13080. {
  13081. delCount[i] = 20;
  13082. if (goSlot[(int)selectList[i]] != null)
  13083. {
  13084. maidArray[i].body0.goSlot = new List<TBodySkin>(goSlot[(int)selectList[i]]);
  13085. for (int l = 0; l < bodyHit[(int)selectList[i]].Count; l++)
  13086. {
  13087. maidArray[i].body0.goSlot[l].bonehair.bodyhit = bodyHit[(int)selectList[i]][l];
  13088. }
  13089. }
  13090. }
  13091. Maid maid = maidArray[j];
  13092. maid.DelProp(MPN.handitem, true);
  13093. maid.DelProp(MPN.accvag, true);
  13094. maid.DelProp(MPN.accanl, true);
  13095. maid.DelProp(MPN.kousoku_upper, true);
  13096. maid.DelProp(MPN.kousoku_lower, true);
  13097. maid.AllProcPropSeqStart();
  13098. }
  13099. }
  13100. }
  13101. isDanceStart1K = false;
  13102. isDanceStart3K = false;
  13103. isDanceStart4K = false;
  13104. isDanceStart5K = false;
  13105. isDanceStart6K = false;
  13106. isDanceStart9K = false;
  13107. isDanceStart13K = false;
  13108. }
  13109. if (isDanceStart14V)
  13110. {
  13111. for (int j = 0; j < maidCnt; j++)
  13112. {
  13113. if (maidArray[j] && maidArray[j].Visible)
  13114. {
  13115. if (isDanceStart14V)
  13116. {
  13117. maidArray[j].SetPos(dancePos[j]);
  13118. maidArray[j].body0.transform.localRotation = danceRot[j];
  13119. }
  13120. }
  13121. }
  13122. isDanceStart14V = false;
  13123. }
  13124. if (isDanceStart15V)
  13125. {
  13126. for (int j = 0; j < maidCnt; j++)
  13127. {
  13128. if (maidArray[j] && maidArray[j].Visible)
  13129. {
  13130. if (isDanceStart15V)
  13131. {
  13132. maidArray[j].SetPos(dancePos[j]);
  13133. maidArray[j].body0.transform.localRotation = danceRot[j];
  13134. }
  13135. }
  13136. }
  13137. isDanceStart15V = false;
  13138. }
  13139. if (maidArray[1] && maidArray[1].Visible)
  13140. {
  13141. if (maidArray[0].transform.position == maidArray[1].transform.position)
  13142. {
  13143. Vector3 vector = Vector3.zero;
  13144. vector.x = 0.6f;
  13145. maidArray[1].SetPos(vector);
  13146. if (maidArray[2] && maidArray[2].Visible)
  13147. {
  13148. vector.x = -0.6f;
  13149. maidArray[2].SetPos(vector);
  13150. }
  13151. if (maidArray[3] && maidArray[3].Visible)
  13152. {
  13153. vector.x = 1.2f;
  13154. maidArray[3].SetPos(vector);
  13155. }
  13156. if (maidArray[4] && maidArray[4].Visible)
  13157. {
  13158. vector.x = -1.2f;
  13159. maidArray[4].SetPos(vector);
  13160. }
  13161. if (maidArray[5] && maidArray[5].Visible)
  13162. {
  13163. vector.x = 1.8f;
  13164. maidArray[5].SetPos(vector);
  13165. }
  13166. if (maidArray[6] && maidArray[6].Visible)
  13167. {
  13168. vector.x = -1.8f;
  13169. maidArray[6].SetPos(vector);
  13170. }
  13171. if (maidArray[7] && maidArray[7].Visible)
  13172. {
  13173. vector.x = 2.4f;
  13174. maidArray[7].SetPos(vector);
  13175. }
  13176. if (maidArray[8] && maidArray[8].Visible)
  13177. {
  13178. vector.x = -2.4f;
  13179. maidArray[8].SetPos(vector);
  13180. }
  13181. if (maidArray[9] && maidArray[9].Visible)
  13182. {
  13183. vector.x = 3f;
  13184. maidArray[9].SetPos(vector);
  13185. }
  13186. if (maidArray[10] && maidArray[10].Visible)
  13187. {
  13188. vector.x = -3f;
  13189. maidArray[10].SetPos(vector);
  13190. }
  13191. if (maidArray[11] && maidArray[11].Visible)
  13192. {
  13193. vector.x = 3.6f;
  13194. maidArray[11].SetPos(vector);
  13195. }
  13196. if (maidArray[12] && maidArray[12].Visible)
  13197. {
  13198. vector.x = -3.6f;
  13199. maidArray[12].SetPos(vector);
  13200. }
  13201. if (maidArray[13] && maidArray[13].Visible)
  13202. {
  13203. vector.x = 4.2f;
  13204. maidArray[13].SetPos(vector);
  13205. }
  13206. }
  13207. }
  13208. isDance = true;
  13209. isDanceStart12 = true;
  13210. isKHG1 = false;
  13211. isKHG2 = false;
  13212. }
  13213. if (isDanceStart13Count > 0)
  13214. {
  13215. isDanceStart13Count++;
  13216. }
  13217. if (isDanceStart13Count == 1)
  13218. {
  13219. GameMain.Instance.SoundMgr.PlayDanceBGM("nightmagicfire_short.ogg", 0f, false);
  13220. isDanceStart13Count = 0;
  13221. TextAsset textAsset = Resources.Load("SceneDance/dance_SsN_m0") as TextAsset;
  13222. string text4 = textAsset.text;
  13223. text4 = Regex.Replace(text4, "(\\r|\\n| )", string.Empty);
  13224. for (int j = 0; j < maidCnt; j++)
  13225. {
  13226. maidArray[j].StartKuchipakuPattern(0f, text4, true);
  13227. }
  13228. }
  13229. if ((isSN1 || isSN2 || isSN3) && isShift)
  13230. {
  13231. TextAsset textAsset = Resources.Load("SceneDance/dance_SsN_m0") as TextAsset;
  13232. string text4 = textAsset.text;
  13233. text4 = Regex.Replace(text4, "(\\r|\\n| )", string.Empty);
  13234. audioSourceBgm = GameMain.Instance.SoundMgr.GetAudioSourceBgm();
  13235. GameMain.Instance.SoundMgr.PlayBGM("se002.ogg", 0f, false);
  13236. for (int j = 0; j < maidCnt; j++)
  13237. {
  13238. if (!isShift)
  13239. {
  13240. if (!maidArray[j].body0.m_Bones.GetComponent<Animation>().GetClip("dance_cm3d2_006_ssn_f1.anm"))
  13241. {
  13242. maidArray[j].body0.LoadAnime("dance_cm3d2_006_ssn_f1.anm",
  13243. GameUty.FileSystem,
  13244. "dance_cm3d2_006_ssn_f1.anm",
  13245. false,
  13246. false);
  13247. }
  13248. }
  13249. else
  13250. {
  13251. if (!maidArray[j].body0.m_Bones.GetComponent<Animation>().GetClip("dance_cm3d21_kara_001_nmf_f1.anm"))
  13252. {
  13253. maidArray[j].body0.LoadAnime("dance_cm3d21_kara_001_nmf_f1.anm",
  13254. GameUty.FileSystem,
  13255. "dance_cm3d21_kara_001_nmf_f1.anm",
  13256. false,
  13257. false);
  13258. }
  13259. textAsset = Resources.Load("SceneDance/dance_NmF_m1") as TextAsset;
  13260. string text5 = nameA + danceNo1 + ".anm";
  13261. switch (j)
  13262. {
  13263. case 1:
  13264. case 4:
  13265. case 7:
  13266. case 10:
  13267. case 13:
  13268. textAsset = Resources.Load("SceneDance/dance_NmF_m0") as TextAsset;
  13269. break;
  13270. case 2:
  13271. case 5:
  13272. case 8:
  13273. case 11:
  13274. textAsset = Resources.Load("SceneDance/dance_NmF_m2") as TextAsset;
  13275. break;
  13276. }
  13277. text4 = textAsset.text;
  13278. text4 = Regex.Replace(text4, "(\\r|\\n| )", string.Empty);
  13279. if (!isDanceStart1K && !isDanceStart3K && !isDanceStart4K && !isDanceStart5K && !isDanceStart6K
  13280. && !isDanceStart9K && !isDanceStart13K)
  13281. {
  13282. dancePos[j] = maidArray[j].transform.position;
  13283. danceRot[j] = maidArray[j].transform.localRotation;
  13284. }
  13285. }
  13286. m_baKuchipakuPattern[j] = Convert.FromBase64String(text4);
  13287. }
  13288. if (!isShift)
  13289. {
  13290. if (isSN1)
  13291. {
  13292. GameMain.Instance.SoundMgr.PlayDanceBGM("nightmagicfire_short.ogg", 0f, false);
  13293. }
  13294. if (isSN2)
  13295. {
  13296. GameMain.Instance.SoundMgr.PlayDanceBGM("sunshinenatsu2.ogg", 0f, false);
  13297. }
  13298. if (isSN3)
  13299. {
  13300. GameMain.Instance.SoundMgr.PlayDanceBGM("sunshinenatsu3.ogg", 0f, false);
  13301. }
  13302. }
  13303. else
  13304. {
  13305. danceWait = 400;
  13306. isDanceStart13Count++;
  13307. GameMain.Instance.SoundMgr.PlayDanceBGM("nightmagicfire_short.ogg", 0f, false);
  13308. }
  13309. for (int j = 0; j < maidCnt; j++)
  13310. {
  13311. maidArray[j].StartKuchipakuPattern(0f, text4, true);
  13312. isStop[j] = false;
  13313. isLock[j] = false;
  13314. pHandL[j] = 0;
  13315. pHandR[j] = 0;
  13316. muneIKL[j] = false;
  13317. muneIKR[j] = false;
  13318. if (!isVR)
  13319. {
  13320. maidArray[j].body0.quaDefEyeL.eulerAngles = eyeL[(int)selectList[j]];
  13321. maidArray[j].body0.quaDefEyeR.eulerAngles = eyeR[(int)selectList[j]];
  13322. }
  13323. }
  13324. ikBui = 5;
  13325. isDanceStart1F = false;
  13326. isDanceStart2F = false;
  13327. isDanceStart3F = false;
  13328. isDanceStart4F = false;
  13329. isDanceStart5F = false;
  13330. isDanceStart6F = false;
  13331. isDanceStart7F = false;
  13332. isDanceStart8F = false;
  13333. isDanceStart9F = false;
  13334. isDanceStart10F = false;
  13335. isDanceStart11F = false;
  13336. isDanceStart12F = false;
  13337. isDanceStart13F = false;
  13338. isDanceStart14F = false;
  13339. isDanceStart15F = false;
  13340. for (int j = 0; j < maidCnt; j++)
  13341. {
  13342. danceFace[j] = 0f;
  13343. }
  13344. if (isDanceStart7V)
  13345. {
  13346. for (int j = 0; j < maidCnt; j++)
  13347. {
  13348. if (maidArray[j] && maidArray[j].Visible)
  13349. {
  13350. if (isDanceStart7V)
  13351. {
  13352. maidArray[j].SetPos(dancePos[j]);
  13353. maidArray[j].body0.transform.localRotation = danceRot[j];
  13354. }
  13355. }
  13356. }
  13357. isDanceStart7V = false;
  13358. }
  13359. if (isDanceStart8V)
  13360. {
  13361. for (int j = 0; j < maidCnt; j++)
  13362. {
  13363. if (maidArray[j] && maidArray[j].Visible)
  13364. {
  13365. if (isDanceStart8V)
  13366. {
  13367. maidArray[j].SetPos(dancePos[j]);
  13368. maidArray[j].body0.transform.localRotation = danceRot[j];
  13369. }
  13370. }
  13371. }
  13372. isDanceStart8V = false;
  13373. isDanceStart8P = false;
  13374. }
  13375. if (isDanceStart11V)
  13376. {
  13377. for (int j = 0; j < maidCnt; j++)
  13378. {
  13379. if (maidArray[j] && maidArray[j].Visible)
  13380. {
  13381. if (isDanceStart11V)
  13382. {
  13383. maidArray[j].SetPos(dancePos[j]);
  13384. maidArray[j].body0.transform.localRotation = danceRot[j];
  13385. }
  13386. }
  13387. }
  13388. isDanceStart11V = false;
  13389. }
  13390. if (isDanceStart1K || isDanceStart3K || isDanceStart4K || isDanceStart5K || isDanceStart6K || isDanceStart9K
  13391. || isDanceStart13K)
  13392. {
  13393. for (int j = 0; j < maidCnt; j++)
  13394. {
  13395. if (maidArray[j] && maidArray[j].Visible)
  13396. {
  13397. if (isDanceStart1K || isDanceStart3K || isDanceStart4K || isDanceStart5K || isDanceStart6K || isDanceStart9K
  13398. || isDanceStart13K)
  13399. {
  13400. maidArray[j].SetPos(dancePos[j]);
  13401. maidArray[j].body0.transform.localRotation = danceRot[j];
  13402. int i = j;
  13403. if (!isVR)
  13404. {
  13405. delCount[i] = 20;
  13406. if (goSlot[(int)selectList[i]] != null)
  13407. {
  13408. maidArray[i].body0.goSlot = new List<TBodySkin>(goSlot[(int)selectList[i]]);
  13409. for (int l = 0; l < bodyHit[(int)selectList[i]].Count; l++)
  13410. {
  13411. maidArray[i].body0.goSlot[l].bonehair.bodyhit = bodyHit[(int)selectList[i]][l];
  13412. }
  13413. }
  13414. }
  13415. Maid maid = maidArray[j];
  13416. maid.DelProp(MPN.handitem, true);
  13417. maid.DelProp(MPN.accvag, true);
  13418. maid.DelProp(MPN.accanl, true);
  13419. maid.DelProp(MPN.kousoku_upper, true);
  13420. maid.DelProp(MPN.kousoku_lower, true);
  13421. maid.AllProcPropSeqStart();
  13422. }
  13423. }
  13424. }
  13425. isDanceStart1K = false;
  13426. isDanceStart3K = false;
  13427. isDanceStart4K = false;
  13428. isDanceStart5K = false;
  13429. isDanceStart6K = false;
  13430. isDanceStart9K = false;
  13431. isDanceStart13K = false;
  13432. }
  13433. if (isDanceStart14V)
  13434. {
  13435. for (int j = 0; j < maidCnt; j++)
  13436. {
  13437. if (maidArray[j] && maidArray[j].Visible)
  13438. {
  13439. if (isDanceStart14V)
  13440. {
  13441. maidArray[j].SetPos(dancePos[j]);
  13442. maidArray[j].body0.transform.localRotation = danceRot[j];
  13443. }
  13444. }
  13445. }
  13446. isDanceStart14V = false;
  13447. }
  13448. if (isDanceStart15V)
  13449. {
  13450. for (int j = 0; j < maidCnt; j++)
  13451. {
  13452. if (maidArray[j] && maidArray[j].Visible)
  13453. {
  13454. if (isDanceStart15V)
  13455. {
  13456. maidArray[j].SetPos(dancePos[j]);
  13457. maidArray[j].body0.transform.localRotation = danceRot[j];
  13458. }
  13459. }
  13460. }
  13461. isDanceStart15V = false;
  13462. }
  13463. if (maidArray[1] && maidArray[1].Visible)
  13464. {
  13465. if (maidArray[0].transform.position == maidArray[1].transform.position)
  13466. {
  13467. Vector3 vector = Vector3.zero;
  13468. vector.x = 0.6f;
  13469. maidArray[1].SetPos(vector);
  13470. if (maidArray[2] && maidArray[2].Visible)
  13471. {
  13472. vector.x = -0.6f;
  13473. maidArray[2].SetPos(vector);
  13474. }
  13475. if (maidArray[3] && maidArray[3].Visible)
  13476. {
  13477. vector.x = 1.2f;
  13478. maidArray[3].SetPos(vector);
  13479. }
  13480. if (maidArray[4] && maidArray[4].Visible)
  13481. {
  13482. vector.x = -1.2f;
  13483. maidArray[4].SetPos(vector);
  13484. }
  13485. if (maidArray[5] && maidArray[5].Visible)
  13486. {
  13487. vector.x = 1.8f;
  13488. maidArray[5].SetPos(vector);
  13489. }
  13490. if (maidArray[6] && maidArray[6].Visible)
  13491. {
  13492. vector.x = -1.8f;
  13493. maidArray[6].SetPos(vector);
  13494. }
  13495. if (maidArray[7] && maidArray[7].Visible)
  13496. {
  13497. vector.x = 2.4f;
  13498. maidArray[7].SetPos(vector);
  13499. }
  13500. if (maidArray[8] && maidArray[8].Visible)
  13501. {
  13502. vector.x = -2.4f;
  13503. maidArray[8].SetPos(vector);
  13504. }
  13505. if (maidArray[9] && maidArray[9].Visible)
  13506. {
  13507. vector.x = 3f;
  13508. maidArray[9].SetPos(vector);
  13509. }
  13510. if (maidArray[10] && maidArray[10].Visible)
  13511. {
  13512. vector.x = -3f;
  13513. maidArray[10].SetPos(vector);
  13514. }
  13515. if (maidArray[11] && maidArray[11].Visible)
  13516. {
  13517. vector.x = 3.6f;
  13518. maidArray[11].SetPos(vector);
  13519. }
  13520. if (maidArray[12] && maidArray[12].Visible)
  13521. {
  13522. vector.x = -3.6f;
  13523. maidArray[12].SetPos(vector);
  13524. }
  13525. if (maidArray[13] && maidArray[13].Visible)
  13526. {
  13527. vector.x = 4.2f;
  13528. maidArray[13].SetPos(vector);
  13529. }
  13530. }
  13531. }
  13532. if (isShift)
  13533. {
  13534. isDanceStart13K = true;
  13535. for (int j = 0; j < maidCnt; j++)
  13536. {
  13537. maidArray[j].SetRot(new Vector3(maidArray[j].body0.transform.localRotation.x,
  13538. maidArray[j].body0.transform.localRotation.y + 90f,
  13539. maidArray[j].body0.transform.localRotation.z));
  13540. maidArray[j].SetPos(new Vector3(maidArray[j].body0.transform.position.x + 1f,
  13541. maidArray[j].body0.transform.position.y,
  13542. maidArray[j].body0.transform.position.z + 4f));
  13543. string text2 = "handitem,HanditemL_Karaoke_Mike_I_.menu";
  13544. int i = j;
  13545. Maid maid = maidArray[j];
  13546. if (!isVR)
  13547. {
  13548. delCount[i] = 20;
  13549. if (goSlot[(int)selectList[i]] != null)
  13550. {
  13551. maidArray[i].body0.goSlot = new List<TBodySkin>(goSlot[(int)selectList[i]]);
  13552. for (int l = 0; l < bodyHit[(int)selectList[i]].Count; l++)
  13553. {
  13554. maidArray[i].body0.goSlot[l].bonehair.bodyhit = bodyHit[(int)selectList[i]][l];
  13555. }
  13556. }
  13557. }
  13558. string[] array = new string[2];
  13559. array = text2.Split(new char[] { ',' });
  13560. maid.DelProp(MPN.handitem, true);
  13561. maid.DelProp(MPN.accvag, true);
  13562. maid.DelProp(MPN.accanl, true);
  13563. maid.DelProp(MPN.kousoku_upper, true);
  13564. maid.DelProp(MPN.kousoku_lower, true);
  13565. if (array[0] != "")
  13566. {
  13567. maid.SetProp(array[0], array[1], 0, true, false);
  13568. }
  13569. maid.AllProcPropSeqStart();
  13570. }
  13571. }
  13572. isDance = true;
  13573. isDanceStart13 = true;
  13574. isSN1 = false;
  13575. isSN2 = false;
  13576. isSN3 = false;
  13577. }
  13578. if ((Input.GetKey(KeyCode.Return) && Input.GetKeyDown(KeyCode.Alpha8))
  13579. || (Input.GetKey(KeyCode.KeypadEnter) && Input.GetKeyDown(KeyCode.Alpha8)))
  13580. {
  13581. GameMain.Instance.SoundMgr.StopBGM(0f);
  13582. isSN1 = true;
  13583. hFlg = true;
  13584. if (getModKeyPressing(modKey.Shift))
  13585. {
  13586. isShift = true;
  13587. }
  13588. }
  13589. if (isSN4 || isSN5 || isSN6)
  13590. {
  13591. audioSourceBgm = GameMain.Instance.SoundMgr.GetAudioSourceBgm();
  13592. GameMain.Instance.SoundMgr.PlayBGM("se002.ogg", 0f, false);
  13593. for (int j = 0; j < maidCnt; j++)
  13594. {
  13595. TextAsset textAsset = Resources.Load("SceneDance/dance_SsN_m0") as TextAsset;
  13596. string text5 = "dance_cm3d2_006_ssn_f1.anm";
  13597. switch (j)
  13598. {
  13599. case 1:
  13600. case 4:
  13601. case 7:
  13602. case 10:
  13603. case 13:
  13604. text5 = "dance_cm3d2_006_ssn_f2.anm";
  13605. textAsset = Resources.Load("SceneDance/dance_SsN_m1") as TextAsset;
  13606. break;
  13607. case 2:
  13608. case 5:
  13609. case 8:
  13610. case 11:
  13611. text5 = "dance_cm3d2_006_ssn_f3.anm";
  13612. textAsset = Resources.Load("SceneDance/dance_SsN_m1") as TextAsset;
  13613. break;
  13614. }
  13615. if (maidArray[j] && maidArray[j].Visible)
  13616. {
  13617. if (!maidArray[j].body0.m_Bones.GetComponent<Animation>().GetClip(text5))
  13618. {
  13619. maidArray[j].body0.LoadAnime(text5, GameUty.FileSystem, text5, false, false);
  13620. }
  13621. string text4 = textAsset.text;
  13622. text4 = Regex.Replace(text4, "(\\r|\\n| )", string.Empty);
  13623. maidArray[j].StartKuchipakuPattern(0f, text4, true);
  13624. m_baKuchipakuPattern[j] = Convert.FromBase64String(text4);
  13625. }
  13626. }
  13627. if (isSN4)
  13628. {
  13629. GameMain.Instance.SoundMgr.PlayDanceBGM("sunshinenatsu1.ogg", 0f, false);
  13630. }
  13631. if (isSN5)
  13632. {
  13633. GameMain.Instance.SoundMgr.PlayDanceBGM("sunshinenatsu2.ogg", 0f, false);
  13634. }
  13635. if (isSN6)
  13636. {
  13637. GameMain.Instance.SoundMgr.PlayDanceBGM("sunshinenatsu3.ogg", 0f, false);
  13638. }
  13639. ikBui = 5;
  13640. isDanceStart1F = false;
  13641. isDanceStart2F = false;
  13642. isDanceStart3F = false;
  13643. isDanceStart4F = false;
  13644. isDanceStart5F = false;
  13645. isDanceStart6F = false;
  13646. isDanceStart7F = false;
  13647. isDanceStart8F = false;
  13648. isDanceStart9F = false;
  13649. isDanceStart10F = false;
  13650. isDanceStart11F = false;
  13651. isDanceStart12F = false;
  13652. isDanceStart13F = false;
  13653. isDanceStart14F = false;
  13654. isDanceStart15F = false;
  13655. for (int j = 0; j < maidCnt; j++)
  13656. {
  13657. danceFace[j] = 0f;
  13658. }
  13659. if (isDanceStart7V)
  13660. {
  13661. for (int j = 0; j < maidCnt; j++)
  13662. {
  13663. if (maidArray[j] && maidArray[j].Visible)
  13664. {
  13665. if (isDanceStart7V)
  13666. {
  13667. maidArray[j].SetPos(dancePos[j]);
  13668. maidArray[j].body0.transform.localRotation = danceRot[j];
  13669. }
  13670. }
  13671. }
  13672. isDanceStart7V = false;
  13673. }
  13674. if (isDanceStart8V)
  13675. {
  13676. for (int j = 0; j < maidCnt; j++)
  13677. {
  13678. if (maidArray[j] && maidArray[j].Visible)
  13679. {
  13680. if (isDanceStart8V)
  13681. {
  13682. maidArray[j].SetPos(dancePos[j]);
  13683. maidArray[j].body0.transform.localRotation = danceRot[j];
  13684. }
  13685. }
  13686. }
  13687. isDanceStart8V = false;
  13688. isDanceStart8P = false;
  13689. }
  13690. if (isDanceStart11V)
  13691. {
  13692. for (int j = 0; j < maidCnt; j++)
  13693. {
  13694. if (maidArray[j] && maidArray[j].Visible)
  13695. {
  13696. if (isDanceStart11V)
  13697. {
  13698. maidArray[j].SetPos(dancePos[j]);
  13699. maidArray[j].body0.transform.localRotation = danceRot[j];
  13700. }
  13701. }
  13702. }
  13703. isDanceStart11V = false;
  13704. }
  13705. if (isDanceStart1K || isDanceStart3K || isDanceStart4K || isDanceStart5K || isDanceStart6K || isDanceStart9K
  13706. || isDanceStart13K)
  13707. {
  13708. for (int j = 0; j < maidCnt; j++)
  13709. {
  13710. if (maidArray[j] && maidArray[j].Visible)
  13711. {
  13712. if (isDanceStart1K || isDanceStart3K || isDanceStart4K || isDanceStart5K || isDanceStart6K || isDanceStart9K
  13713. || isDanceStart13K)
  13714. {
  13715. maidArray[j].SetPos(dancePos[j]);
  13716. maidArray[j].body0.transform.localRotation = danceRot[j];
  13717. int i = j;
  13718. if (!isVR)
  13719. {
  13720. delCount[i] = 20;
  13721. if (goSlot[(int)selectList[i]] != null)
  13722. {
  13723. maidArray[i].body0.goSlot = new List<TBodySkin>(goSlot[(int)selectList[i]]);
  13724. for (int l = 0; l < bodyHit[(int)selectList[i]].Count; l++)
  13725. {
  13726. maidArray[i].body0.goSlot[l].bonehair.bodyhit = bodyHit[(int)selectList[i]][l];
  13727. }
  13728. }
  13729. }
  13730. Maid maid = maidArray[j];
  13731. maid.DelProp(MPN.handitem, true);
  13732. maid.DelProp(MPN.accvag, true);
  13733. maid.DelProp(MPN.accanl, true);
  13734. maid.DelProp(MPN.kousoku_upper, true);
  13735. maid.DelProp(MPN.kousoku_lower, true);
  13736. maid.AllProcPropSeqStart();
  13737. }
  13738. }
  13739. }
  13740. isDanceStart1K = false;
  13741. isDanceStart3K = false;
  13742. isDanceStart4K = false;
  13743. isDanceStart5K = false;
  13744. isDanceStart6K = false;
  13745. isDanceStart9K = false;
  13746. isDanceStart13K = false;
  13747. }
  13748. if (isDanceStart14V)
  13749. {
  13750. for (int j = 0; j < maidCnt; j++)
  13751. {
  13752. if (maidArray[j] && maidArray[j].Visible)
  13753. {
  13754. if (isDanceStart14V)
  13755. {
  13756. maidArray[j].SetPos(dancePos[j]);
  13757. maidArray[j].body0.transform.localRotation = danceRot[j];
  13758. }
  13759. }
  13760. }
  13761. isDanceStart14V = false;
  13762. }
  13763. if (isDanceStart15V)
  13764. {
  13765. for (int j = 0; j < maidCnt; j++)
  13766. {
  13767. if (maidArray[j] && maidArray[j].Visible)
  13768. {
  13769. if (isDanceStart15V)
  13770. {
  13771. maidArray[j].SetPos(dancePos[j]);
  13772. maidArray[j].body0.transform.localRotation = danceRot[j];
  13773. }
  13774. }
  13775. }
  13776. isDanceStart15V = false;
  13777. }
  13778. for (int j = 0; j < maidCnt; j++)
  13779. {
  13780. isStop[j] = false;
  13781. isLock[j] = false;
  13782. pHandL[j] = 0;
  13783. pHandR[j] = 0;
  13784. muneIKL[j] = false;
  13785. muneIKR[j] = false;
  13786. if (!isVR)
  13787. {
  13788. maidArray[j].body0.quaDefEyeL.eulerAngles = eyeL[(int)selectList[j]];
  13789. maidArray[j].body0.quaDefEyeR.eulerAngles = eyeR[(int)selectList[j]];
  13790. }
  13791. if (maidArray[j].transform.position.y != 100f)
  13792. {
  13793. dancePos[j] = maidArray[j].transform.position;
  13794. }
  13795. else
  13796. {
  13797. dancePos[j] = new Vector3(maidArray[j].transform.position.x, 0f, maidArray[j].transform.position.z);
  13798. }
  13799. danceRot[j] = maidArray[j].transform.localRotation;
  13800. }
  13801. if (maidArray[1] && maidArray[1].Visible)
  13802. {
  13803. maidArray[1].SetPos(new Vector3(maidArray[0].transform.position.x,
  13804. maidArray[0].transform.position.y,
  13805. maidArray[0].transform.position.z));
  13806. maidArray[1].body0.transform.localRotation = maidArray[0].body0.transform.localRotation;
  13807. }
  13808. if (maidArray[2] && maidArray[2].Visible)
  13809. {
  13810. maidArray[2].SetPos(new Vector3(maidArray[0].transform.position.x,
  13811. maidArray[0].transform.position.y,
  13812. maidArray[0].transform.position.z));
  13813. maidArray[2].body0.transform.localRotation = maidArray[0].body0.transform.localRotation;
  13814. }
  13815. if (maidArray[4] && maidArray[4].Visible)
  13816. {
  13817. maidArray[4].SetPos(new Vector3(maidArray[3].transform.position.x,
  13818. maidArray[3].transform.position.y,
  13819. maidArray[3].transform.position.z));
  13820. maidArray[4].body0.transform.localRotation = maidArray[3].body0.transform.localRotation;
  13821. }
  13822. if (maidArray[5] && maidArray[5].Visible)
  13823. {
  13824. maidArray[5].SetPos(new Vector3(maidArray[3].transform.position.x,
  13825. maidArray[3].transform.position.y,
  13826. maidArray[3].transform.position.z));
  13827. maidArray[5].body0.transform.localRotation = maidArray[3].body0.transform.localRotation;
  13828. }
  13829. if (maidArray[7] && maidArray[7].Visible)
  13830. {
  13831. maidArray[7].SetPos(new Vector3(maidArray[6].transform.position.x,
  13832. maidArray[6].transform.position.y,
  13833. maidArray[6].transform.position.z));
  13834. maidArray[7].body0.transform.localRotation = maidArray[6].body0.transform.localRotation;
  13835. }
  13836. if (maidArray[8] && maidArray[8].Visible)
  13837. {
  13838. maidArray[8].SetPos(new Vector3(maidArray[6].transform.position.x,
  13839. maidArray[6].transform.position.y,
  13840. maidArray[6].transform.position.z));
  13841. maidArray[8].body0.transform.localRotation = maidArray[6].body0.transform.localRotation;
  13842. }
  13843. if (maidArray[10] && maidArray[10].Visible)
  13844. {
  13845. maidArray[10].SetPos(new Vector3(maidArray[9].transform.position.x,
  13846. maidArray[9].transform.position.y,
  13847. maidArray[9].transform.position.z));
  13848. maidArray[10].body0.transform.localRotation = maidArray[9].body0.transform.localRotation;
  13849. }
  13850. if (maidArray[11] && maidArray[11].Visible)
  13851. {
  13852. maidArray[11].SetPos(new Vector3(maidArray[9].transform.position.x,
  13853. maidArray[9].transform.position.y,
  13854. maidArray[9].transform.position.z));
  13855. maidArray[11].body0.transform.localRotation = maidArray[9].body0.transform.localRotation;
  13856. }
  13857. if (maidArray[13] && maidArray[13].Visible)
  13858. {
  13859. maidArray[13].SetPos(new Vector3(maidArray[12].transform.position.x,
  13860. maidArray[12].transform.position.y,
  13861. maidArray[12].transform.position.z));
  13862. maidArray[13].body0.transform.localRotation = maidArray[12].body0.transform.localRotation;
  13863. }
  13864. isDance = true;
  13865. isDanceStart14 = true;
  13866. isSN4 = false;
  13867. isSN5 = false;
  13868. isSN6 = false;
  13869. }
  13870. if (isSD1)
  13871. {
  13872. audioSourceBgm = GameMain.Instance.SoundMgr.GetAudioSourceBgm();
  13873. GameMain.Instance.SoundMgr.PlayBGM("se002.ogg", 0f, false);
  13874. for (int j = 0; j < maidCnt; j++)
  13875. {
  13876. TextAsset textAsset = Resources.Load("SceneDance/uta_mmlop_mix_Bok") as TextAsset;
  13877. string text5 = "dance_cmo_002_sd_f1.anm";
  13878. switch (j)
  13879. {
  13880. case 1:
  13881. case 3:
  13882. case 5:
  13883. case 7:
  13884. case 9:
  13885. case 11:
  13886. case 13:
  13887. text5 = "dance_cmo_002_sd_f2.anm";
  13888. textAsset = Resources.Load("SceneDance/uta_mmlop_mix_Aok") as TextAsset;
  13889. break;
  13890. }
  13891. danceName[j] = text5;
  13892. if (maidArray[j] && maidArray[j].Visible)
  13893. {
  13894. if (!maidArray[j].body0.m_Bones.GetComponent<Animation>().GetClip(text5))
  13895. {
  13896. maidArray[j].body0.LoadAnime(text5, GameUty.FileSystem, text5, false, false);
  13897. }
  13898. string text4 = textAsset.text;
  13899. text4 = Regex.Replace(text4, "(\\r|\\n| )", string.Empty);
  13900. maidArray[j].StartKuchipakuPattern(0f, text4, true);
  13901. m_baKuchipakuPattern[j] = Convert.FromBase64String(text4);
  13902. }
  13903. }
  13904. GameMain.Instance.SoundMgr.PlayDanceBGM("selfishdestiny_due_short_1.ogg", 0f, false);
  13905. ikBui = 5;
  13906. isDanceStart1F = false;
  13907. isDanceStart2F = false;
  13908. isDanceStart3F = false;
  13909. isDanceStart4F = false;
  13910. isDanceStart5F = false;
  13911. isDanceStart6F = false;
  13912. isDanceStart7F = false;
  13913. isDanceStart8F = false;
  13914. isDanceStart9F = false;
  13915. isDanceStart10F = false;
  13916. isDanceStart11F = false;
  13917. isDanceStart12F = false;
  13918. isDanceStart13F = false;
  13919. isDanceStart14F = false;
  13920. isDanceStart15F = false;
  13921. for (int j = 0; j < maidCnt; j++)
  13922. {
  13923. danceFace[j] = 0f;
  13924. }
  13925. if (isDanceStart7V)
  13926. {
  13927. for (int j = 0; j < maidCnt; j++)
  13928. {
  13929. if (maidArray[j] && maidArray[j].Visible)
  13930. {
  13931. if (isDanceStart7V)
  13932. {
  13933. maidArray[j].SetPos(dancePos[j]);
  13934. maidArray[j].body0.transform.localRotation = danceRot[j];
  13935. }
  13936. }
  13937. }
  13938. isDanceStart7V = false;
  13939. }
  13940. if (isDanceStart8V)
  13941. {
  13942. for (int j = 0; j < maidCnt; j++)
  13943. {
  13944. if (maidArray[j] && maidArray[j].Visible)
  13945. {
  13946. if (isDanceStart8V)
  13947. {
  13948. maidArray[j].SetPos(dancePos[j]);
  13949. maidArray[j].body0.transform.localRotation = danceRot[j];
  13950. }
  13951. }
  13952. }
  13953. isDanceStart8V = false;
  13954. isDanceStart8P = false;
  13955. }
  13956. if (isDanceStart11V)
  13957. {
  13958. for (int j = 0; j < maidCnt; j++)
  13959. {
  13960. if (maidArray[j] && maidArray[j].Visible)
  13961. {
  13962. if (isDanceStart11V)
  13963. {
  13964. maidArray[j].SetPos(dancePos[j]);
  13965. maidArray[j].body0.transform.localRotation = danceRot[j];
  13966. }
  13967. }
  13968. }
  13969. isDanceStart11V = false;
  13970. }
  13971. if (isDanceStart1K || isDanceStart3K || isDanceStart4K || isDanceStart5K || isDanceStart6K || isDanceStart9K
  13972. || isDanceStart13K)
  13973. {
  13974. for (int j = 0; j < maidCnt; j++)
  13975. {
  13976. if (maidArray[j] && maidArray[j].Visible)
  13977. {
  13978. if (isDanceStart1K || isDanceStart3K || isDanceStart4K || isDanceStart5K || isDanceStart6K || isDanceStart9K
  13979. || isDanceStart13K)
  13980. {
  13981. maidArray[j].SetPos(dancePos[j]);
  13982. maidArray[j].body0.transform.localRotation = danceRot[j];
  13983. int i = j;
  13984. if (!isVR)
  13985. {
  13986. delCount[i] = 20;
  13987. if (goSlot[(int)selectList[i]] != null)
  13988. {
  13989. maidArray[i].body0.goSlot = new List<TBodySkin>(goSlot[(int)selectList[i]]);
  13990. for (int l = 0; l < bodyHit[(int)selectList[i]].Count; l++)
  13991. {
  13992. maidArray[i].body0.goSlot[l].bonehair.bodyhit = bodyHit[(int)selectList[i]][l];
  13993. }
  13994. }
  13995. }
  13996. Maid maid = maidArray[j];
  13997. maid.DelProp(MPN.handitem, true);
  13998. maid.DelProp(MPN.accvag, true);
  13999. maid.DelProp(MPN.accanl, true);
  14000. maid.DelProp(MPN.kousoku_upper, true);
  14001. maid.DelProp(MPN.kousoku_lower, true);
  14002. maid.AllProcPropSeqStart();
  14003. }
  14004. }
  14005. }
  14006. isDanceStart1K = false;
  14007. isDanceStart3K = false;
  14008. isDanceStart4K = false;
  14009. isDanceStart5K = false;
  14010. isDanceStart6K = false;
  14011. isDanceStart9K = false;
  14012. isDanceStart13K = false;
  14013. }
  14014. if (isDanceStart14V)
  14015. {
  14016. for (int j = 0; j < maidCnt; j++)
  14017. {
  14018. if (maidArray[j] && maidArray[j].Visible)
  14019. {
  14020. if (isDanceStart14V)
  14021. {
  14022. maidArray[j].SetPos(dancePos[j]);
  14023. maidArray[j].body0.transform.localRotation = danceRot[j];
  14024. }
  14025. }
  14026. }
  14027. isDanceStart14V = false;
  14028. }
  14029. if (isDanceStart15V)
  14030. {
  14031. for (int j = 0; j < maidCnt; j++)
  14032. {
  14033. if (maidArray[j] && maidArray[j].Visible)
  14034. {
  14035. if (isDanceStart15V)
  14036. {
  14037. maidArray[j].SetPos(dancePos[j]);
  14038. maidArray[j].body0.transform.localRotation = danceRot[j];
  14039. }
  14040. }
  14041. }
  14042. isDanceStart15V = false;
  14043. }
  14044. for (int j = 0; j < maidCnt; j++)
  14045. {
  14046. isStop[j] = false;
  14047. isLock[j] = false;
  14048. pHandL[j] = 0;
  14049. pHandR[j] = 0;
  14050. muneIKL[j] = false;
  14051. muneIKR[j] = false;
  14052. if (!isVR)
  14053. {
  14054. maidArray[j].body0.quaDefEyeL.eulerAngles = eyeL[(int)selectList[j]];
  14055. maidArray[j].body0.quaDefEyeR.eulerAngles = eyeR[(int)selectList[j]];
  14056. }
  14057. if (maidArray[j].transform.position.y != 100f)
  14058. {
  14059. dancePos[j] = maidArray[j].transform.position;
  14060. }
  14061. else
  14062. {
  14063. dancePos[j] = new Vector3(maidArray[j].transform.position.x, 0f, maidArray[j].transform.position.z);
  14064. }
  14065. danceRot[j] = maidArray[j].transform.localRotation;
  14066. }
  14067. if (maidArray[0] && maidArray[0].Visible && maidArray[1] && maidArray[1].Visible)
  14068. {
  14069. maidArray[0].SetPos(new Vector3((maidArray[0].transform.position.x + maidArray[1].transform.position.x) / 2f,
  14070. (maidArray[0].transform.position.y + maidArray[1].transform.position.y) / 2f,
  14071. (maidArray[0].transform.position.z + maidArray[1].transform.position.z) / 2f));
  14072. maidArray[0].body0.transform.localRotation =
  14073. Quaternion.Lerp(maidArray[0].transform.localRotation, maidArray[1].transform.localRotation, 0.5f);
  14074. }
  14075. if (maidArray[2] && maidArray[2].Visible && maidArray[3] && maidArray[3].Visible)
  14076. {
  14077. maidArray[2].SetPos(new Vector3((maidArray[2].transform.position.x + maidArray[3].transform.position.x) / 2f,
  14078. (maidArray[2].transform.position.y + maidArray[3].transform.position.y) / 2f,
  14079. (maidArray[2].transform.position.z + maidArray[3].transform.position.z) / 2f));
  14080. maidArray[2].body0.transform.localRotation =
  14081. Quaternion.Lerp(maidArray[2].transform.localRotation, maidArray[3].transform.localRotation, 0.5f);
  14082. }
  14083. if (maidArray[4] && maidArray[4].Visible && maidArray[5] && maidArray[5].Visible)
  14084. {
  14085. maidArray[4].SetPos(new Vector3((maidArray[4].transform.position.x + maidArray[5].transform.position.x) / 2f,
  14086. (maidArray[4].transform.position.y + maidArray[5].transform.position.y) / 2f,
  14087. (maidArray[4].transform.position.z + maidArray[5].transform.position.z) / 2f));
  14088. maidArray[4].body0.transform.localRotation =
  14089. Quaternion.Lerp(maidArray[4].transform.localRotation, maidArray[5].transform.localRotation, 0.5f);
  14090. }
  14091. if (maidArray[6] && maidArray[6].Visible && maidArray[7] && maidArray[7].Visible)
  14092. {
  14093. maidArray[6].SetPos(new Vector3((maidArray[6].transform.position.x + maidArray[7].transform.position.x) / 2f,
  14094. (maidArray[6].transform.position.y + maidArray[7].transform.position.y) / 2f,
  14095. (maidArray[6].transform.position.z + maidArray[7].transform.position.z) / 2f));
  14096. maidArray[6].body0.transform.localRotation =
  14097. Quaternion.Lerp(maidArray[6].transform.localRotation, maidArray[7].transform.localRotation, 0.5f);
  14098. }
  14099. if (maidArray[8] && maidArray[8].Visible && maidArray[9] && maidArray[9].Visible)
  14100. {
  14101. maidArray[8].SetPos(new Vector3((maidArray[8].transform.position.x + maidArray[9].transform.position.x) / 2f,
  14102. (maidArray[8].transform.position.y + maidArray[9].transform.position.y) / 2f,
  14103. (maidArray[8].transform.position.z + maidArray[9].transform.position.z) / 2f));
  14104. maidArray[8].body0.transform.localRotation =
  14105. Quaternion.Lerp(maidArray[8].transform.localRotation, maidArray[9].transform.localRotation, 0.5f);
  14106. }
  14107. if (maidArray[10] && maidArray[10].Visible && maidArray[11] && maidArray[11].Visible)
  14108. {
  14109. maidArray[10].SetPos(new Vector3((maidArray[10].transform.position.x + maidArray[11].transform.position.x) / 2f,
  14110. (maidArray[10].transform.position.y + maidArray[11].transform.position.y) / 2f,
  14111. (maidArray[10].transform.position.z + maidArray[11].transform.position.z) / 2f));
  14112. maidArray[10].body0.transform.localRotation =
  14113. Quaternion.Lerp(maidArray[10].transform.localRotation, maidArray[11].transform.localRotation, 0.5f);
  14114. }
  14115. if (maidArray[12] && maidArray[12].Visible && maidArray[13] && maidArray[13].Visible)
  14116. {
  14117. maidArray[12].SetPos(new Vector3((maidArray[12].transform.position.x + maidArray[13].transform.position.x) / 2f,
  14118. (maidArray[12].transform.position.y + maidArray[13].transform.position.y) / 2f,
  14119. (maidArray[12].transform.position.z + maidArray[13].transform.position.z) / 2f));
  14120. maidArray[12].body0.transform.localRotation =
  14121. Quaternion.Lerp(maidArray[12].transform.localRotation, maidArray[13].transform.localRotation, 0.5f);
  14122. }
  14123. if (maidArray[1] && maidArray[1].Visible)
  14124. {
  14125. maidArray[1].SetPos(new Vector3(maidArray[0].transform.position.x,
  14126. maidArray[0].transform.position.y,
  14127. maidArray[0].transform.position.z));
  14128. maidArray[1].body0.transform.localRotation = maidArray[0].body0.transform.localRotation;
  14129. }
  14130. if (maidArray[3] && maidArray[3].Visible)
  14131. {
  14132. maidArray[3].SetPos(new Vector3(maidArray[2].transform.position.x,
  14133. maidArray[2].transform.position.y,
  14134. maidArray[2].transform.position.z));
  14135. maidArray[3].body0.transform.localRotation = maidArray[2].body0.transform.localRotation;
  14136. }
  14137. if (maidArray[5] && maidArray[5].Visible)
  14138. {
  14139. maidArray[5].SetPos(new Vector3(maidArray[4].transform.position.x,
  14140. maidArray[4].transform.position.y,
  14141. maidArray[4].transform.position.z));
  14142. maidArray[5].body0.transform.localRotation = maidArray[4].body0.transform.localRotation;
  14143. }
  14144. if (maidArray[7] && maidArray[7].Visible)
  14145. {
  14146. maidArray[7].SetPos(new Vector3(maidArray[6].transform.position.x,
  14147. maidArray[6].transform.position.y,
  14148. maidArray[6].transform.position.z));
  14149. maidArray[7].body0.transform.localRotation = maidArray[6].body0.transform.localRotation;
  14150. }
  14151. if (maidArray[9] && maidArray[9].Visible)
  14152. {
  14153. maidArray[9].SetPos(new Vector3(maidArray[8].transform.position.x,
  14154. maidArray[8].transform.position.y,
  14155. maidArray[8].transform.position.z));
  14156. maidArray[9].body0.transform.localRotation = maidArray[8].body0.transform.localRotation;
  14157. }
  14158. if (maidArray[11] && maidArray[11].Visible)
  14159. {
  14160. maidArray[11].SetPos(new Vector3(maidArray[10].transform.position.x,
  14161. maidArray[10].transform.position.y,
  14162. maidArray[10].transform.position.z));
  14163. maidArray[11].body0.transform.localRotation = maidArray[10].body0.transform.localRotation;
  14164. }
  14165. if (maidArray[13] && maidArray[13].Visible)
  14166. {
  14167. maidArray[13].SetPos(new Vector3(maidArray[12].transform.position.x,
  14168. maidArray[12].transform.position.y,
  14169. maidArray[12].transform.position.z));
  14170. maidArray[13].body0.transform.localRotation = maidArray[12].body0.transform.localRotation;
  14171. }
  14172. if (maidArray[2] && maidArray[2].Visible)
  14173. {
  14174. if (maidArray[0].transform.position == maidArray[2].transform.position)
  14175. {
  14176. Vector3 vector = Vector3.zero;
  14177. vector.x = 0.6f;
  14178. maidArray[1].SetPos(vector);
  14179. if (maidArray[2] && maidArray[2].Visible)
  14180. {
  14181. vector.x = -0.6f;
  14182. maidArray[2].SetPos(vector);
  14183. }
  14184. if (maidArray[3] && maidArray[3].Visible)
  14185. {
  14186. vector.x = 1.2f;
  14187. maidArray[3].SetPos(vector);
  14188. }
  14189. if (maidArray[4] && maidArray[4].Visible)
  14190. {
  14191. vector.x = -1.2f;
  14192. maidArray[4].SetPos(vector);
  14193. }
  14194. if (maidArray[5] && maidArray[5].Visible)
  14195. {
  14196. vector.x = 1.8f;
  14197. maidArray[5].SetPos(vector);
  14198. }
  14199. if (maidArray[6] && maidArray[6].Visible)
  14200. {
  14201. vector.x = -1.8f;
  14202. maidArray[6].SetPos(vector);
  14203. }
  14204. if (maidArray[7] && maidArray[7].Visible)
  14205. {
  14206. vector.x = 2.4f;
  14207. maidArray[7].SetPos(vector);
  14208. }
  14209. if (maidArray[8] && maidArray[8].Visible)
  14210. {
  14211. vector.x = -2.4f;
  14212. maidArray[8].SetPos(vector);
  14213. }
  14214. if (maidArray[9] && maidArray[9].Visible)
  14215. {
  14216. vector.x = 3f;
  14217. maidArray[9].SetPos(vector);
  14218. }
  14219. if (maidArray[10] && maidArray[10].Visible)
  14220. {
  14221. vector.x = -3f;
  14222. maidArray[10].SetPos(vector);
  14223. }
  14224. if (maidArray[11] && maidArray[11].Visible)
  14225. {
  14226. vector.x = 3.6f;
  14227. maidArray[11].SetPos(vector);
  14228. }
  14229. if (maidArray[12] && maidArray[12].Visible)
  14230. {
  14231. vector.x = -3.6f;
  14232. maidArray[12].SetPos(vector);
  14233. }
  14234. if (maidArray[13] && maidArray[13].Visible)
  14235. {
  14236. vector.x = 4.2f;
  14237. maidArray[13].SetPos(vector);
  14238. }
  14239. }
  14240. }
  14241. isDance = true;
  14242. isDanceStart15 = true;
  14243. isSD1 = false;
  14244. }
  14245. if (Input.GetKeyDown(KeyCode.Keypad1) || Input.GetKeyDown(KeyCode.Keypad2) || Input.GetKeyDown(KeyCode.Keypad3)
  14246. || Input.GetKeyDown(KeyCode.Keypad4) || Input.GetKeyDown(KeyCode.Keypad5) || Input.GetKeyDown(KeyCode.Keypad6)
  14247. || Input.GetKeyDown(KeyCode.Keypad7) || Input.GetKeyDown(KeyCode.Keypad8) || Input.GetKeyDown(KeyCode.Keypad9)
  14248. || Input.GetKeyDown(KeyCode.Keypad0))
  14249. {
  14250. for (int j = 0; j < maidCnt; j++)
  14251. {
  14252. if (maidArray[j] && maidArray[j].Visible)
  14253. {
  14254. if (!isVR)
  14255. {
  14256. if (goSlot[(int)selectList[j]] != null)
  14257. {
  14258. maidArray[j].body0.goSlot = new List<TBodySkin>(goSlot[(int)selectList[j]]);
  14259. for (int l = 0; l < bodyHit[(int)selectList[j]].Count; l++)
  14260. {
  14261. maidArray[j].body0.goSlot[l].bonehair.bodyhit = bodyHit[(int)selectList[j]][l];
  14262. }
  14263. }
  14264. }
  14265. }
  14266. }
  14267. }
  14268. if (!Input.GetKeyUp(KeyCode.Return) && Input.GetKeyUp(KeyCode.H) && !hFlg)
  14269. {
  14270. if (h2Flg)
  14271. {
  14272. h2Flg = false;
  14273. }
  14274. else
  14275. {
  14276. string text4 = "";
  14277. if (wearIndex == 0)
  14278. {
  14279. text4 = "Underwear";
  14280. wearIndex = 1;
  14281. isWear = false;
  14282. isSkirt = false;
  14283. isBra = true;
  14284. isPanz = true;
  14285. isHeadset = false;
  14286. isGlove = false;
  14287. isStkg = true;
  14288. isShoes = false;
  14289. }
  14290. else if (wearIndex == 1)
  14291. {
  14292. text4 = "Nude";
  14293. wearIndex = 2;
  14294. isWear = false;
  14295. isSkirt = false;
  14296. isBra = false;
  14297. isPanz = false;
  14298. isHeadset = false;
  14299. isGlove = false;
  14300. isStkg = false;
  14301. isShoes = false;
  14302. }
  14303. else if (wearIndex == 2)
  14304. {
  14305. text4 = "None";
  14306. wearIndex = 0;
  14307. isWear = true;
  14308. isSkirt = true;
  14309. isBra = true;
  14310. isPanz = true;
  14311. isHeadset = true;
  14312. isGlove = true;
  14313. isStkg = true;
  14314. isShoes = true;
  14315. }
  14316. TBody.MaskMode maskMode = (TBody.MaskMode)(int)Enum.Parse(typeof(TBody.MaskMode), text4);
  14317. for (int j = 0; j < maidCnt; j++)
  14318. {
  14319. if (maidArray[j] && maidArray[j].Visible)
  14320. {
  14321. if (!isVR)
  14322. {
  14323. if (goSlot[(int)selectList[j]] != null)
  14324. {
  14325. maidArray[j].body0.goSlot = new List<TBodySkin>(goSlot[(int)selectList[j]]);
  14326. for (int l = 0; l < bodyHit[(int)selectList[j]].Count; l++)
  14327. {
  14328. maidArray[j].body0.goSlot[l].bonehair.bodyhit = bodyHit[(int)selectList[j]][l];
  14329. }
  14330. }
  14331. }
  14332. maidArray[j].body0.SetMaskMode(maskMode);
  14333. }
  14334. }
  14335. }
  14336. }
  14337. if (getModKeyPressing(modKey.Ctrl) && Input.GetKeyDown(KeyCode.S) && !sFlg)
  14338. {
  14339. saveScene = 9999;
  14340. saveScene2 = saveScene;
  14341. GameMain.Instance.SoundMgr.PlaySe("se002.ogg", false);
  14342. try
  14343. {
  14344. thum_byte_to_base64_ = string.Empty;
  14345. thum_file_path_ = Path.Combine(Path.GetTempPath(), "cm3d2_" + Guid.NewGuid().ToString() + ".png");
  14346. GameMain.Instance.MainCamera.ScreenShot(thum_file_path_, 1, false);
  14347. }
  14348. catch { }
  14349. }
  14350. if (getModKeyPressing(modKey.Ctrl) && Input.GetKeyDown(KeyCode.A))
  14351. {
  14352. loadScene = 9999;
  14353. GameMain.Instance.SoundMgr.PlaySe("se002.ogg", false);
  14354. }
  14355. if (isScreen)
  14356. {
  14357. isScreen = false;
  14358. bGui = isGui;
  14359. isGui = false;
  14360. if (!isMessage)
  14361. {
  14362. foreach (UICamera uicamera in ui_cam_hide_list_)
  14363. {
  14364. uicamera.GetComponent<Camera>().enabled = true;
  14365. }
  14366. ui_cam_hide_list_.Clear();
  14367. }
  14368. else
  14369. {
  14370. if (editUI != null)
  14371. {
  14372. editUI.SetActive(true);
  14373. }
  14374. if (GameMain.Instance.CMSystem.ViewFps)
  14375. {
  14376. GameObject childObject = UTY.GetChildObject(GameMain.Instance.gameObject, "SystemUI Root/FpsCounter", false);
  14377. childObject.SetActive(true);
  14378. }
  14379. GameObject childObject2 = UTY.GetChildObject(GameMain.Instance.gameObject, "SystemUI Root/SystemDialog", false);
  14380. GameObject childObject3 = UTY.GetChildObject(GameMain.Instance.gameObject, "SystemUI Root/SystemShortcut", false);
  14381. childObject2.SetActive(true);
  14382. childObject3.SetActive(true);
  14383. }
  14384. for (int j = 0; j < maidCnt; j++)
  14385. {
  14386. if (maidArray[j] && maidArray[j].Visible)
  14387. {
  14388. isBone[j] = isBoneN[j];
  14389. if (isBone[j])
  14390. {
  14391. gNeck[j].SetActive(true);
  14392. gSpine[j].SetActive(true);
  14393. gSpine0a[j].SetActive(true);
  14394. gSpine1a[j].SetActive(true);
  14395. gSpine1[j].SetActive(true);
  14396. gPelvis[j].SetActive(true);
  14397. gHandL[j].SetActive(true);
  14398. gArmL[j].SetActive(true);
  14399. gFootL[j].SetActive(true);
  14400. gHizaL[j].SetActive(true);
  14401. gHandR[j].SetActive(true);
  14402. gArmR[j].SetActive(true);
  14403. gFootR[j].SetActive(true);
  14404. gHizaR[j].SetActive(true);
  14405. gClavicleL[j].SetActive(true);
  14406. gClavicleR[j].SetActive(true);
  14407. }
  14408. }
  14409. }
  14410. }
  14411. if (isScreen2)
  14412. {
  14413. isScreen = true;
  14414. isScreen2 = false;
  14415. }
  14416. if (!isVR && Input.GetKeyDown(KeyCode.S) && !sFlg && !Input.GetKey(KeyCode.KeypadEnter) && !Input.GetKey(KeyCode.Return)
  14417. && !Input.GetKey(KeyCode.Q))
  14418. {
  14419. if (!Input.GetKey(KeyCode.LeftShift) && !Input.GetKey(KeyCode.LeftAlt) && !getModKeyPressing(modKey.Ctrl))
  14420. {
  14421. isScreen = true;
  14422. for (int j = 0; j < maidCnt; j++)
  14423. {
  14424. if (maidArray[j] && maidArray[j].Visible)
  14425. {
  14426. if (isBone[j])
  14427. {
  14428. gNeck[j].SetActive(false);
  14429. gSpine[j].SetActive(false);
  14430. gSpine0a[j].SetActive(false);
  14431. gSpine1a[j].SetActive(false);
  14432. gSpine1[j].SetActive(false);
  14433. gPelvis[j].SetActive(false);
  14434. gHandL[j].SetActive(false);
  14435. gArmL[j].SetActive(false);
  14436. gFootL[j].SetActive(false);
  14437. gHizaL[j].SetActive(false);
  14438. gHandR[j].SetActive(false);
  14439. gArmR[j].SetActive(false);
  14440. gFootR[j].SetActive(false);
  14441. gHizaR[j].SetActive(false);
  14442. gClavicleL[j].SetActive(false);
  14443. gClavicleR[j].SetActive(false);
  14444. }
  14445. isBoneN[j] = isBone[j];
  14446. isBone[j] = false;
  14447. }
  14448. }
  14449. if (!isMessage)
  14450. {
  14451. ui_cam_hide_list_.Clear();
  14452. UICamera[] array16 = NGUITools.FindActive<UICamera>();
  14453. foreach (UICamera uicamera2 in array16)
  14454. {
  14455. if (uicamera2.GetComponent<Camera>().enabled)
  14456. {
  14457. uicamera2.GetComponent<Camera>().enabled = false;
  14458. ui_cam_hide_list_.Add(uicamera2);
  14459. }
  14460. }
  14461. }
  14462. else
  14463. {
  14464. editUI = GameObject.Find("/UI Root/Camera");
  14465. if (editUI != null)
  14466. {
  14467. editUI.SetActive(false);
  14468. }
  14469. if (GameMain.Instance.CMSystem.ViewFps)
  14470. {
  14471. GameObject childObject =
  14472. UTY.GetChildObject(GameMain.Instance.gameObject, "SystemUI Root/FpsCounter", false);
  14473. childObject.SetActive(false);
  14474. }
  14475. GameObject childObject2 = UTY.GetChildObject(GameMain.Instance.gameObject, "SystemUI Root/SystemDialog", false);
  14476. GameObject childObject3 =
  14477. UTY.GetChildObject(GameMain.Instance.gameObject, "SystemUI Root/SystemShortcut", false);
  14478. childObject2.SetActive(false);
  14479. childObject3.SetActive(false);
  14480. }
  14481. isGui = bGui;
  14482. bGui = false;
  14483. GameMain.Instance.MainCamera.ScreenShot(false);
  14484. GameMain.Instance.SoundMgr.PlaySe("se022.ogg", false);
  14485. }
  14486. }
  14487. if (!isVR && Input.GetKey(KeyCode.Q) && Input.GetKey(KeyCode.U) && !qFlg)
  14488. {
  14489. mainCameraTransform.Rotate(0f, 0f, -0.15f);
  14490. keyFlg2 = true;
  14491. }
  14492. else if (!isVR && Input.GetKey(KeyCode.Q) && Input.GetKey(KeyCode.O) && !qFlg)
  14493. {
  14494. mainCameraTransform.Rotate(0f, 0f, 0.15f);
  14495. keyFlg2 = true;
  14496. }
  14497. else if (!isVR && Input.GetKey(KeyCode.Q) && Input.GetKeyDown(KeyCode.BackQuote) && !qFlg)
  14498. {
  14499. mainCameraTransform.eulerAngles =
  14500. new Vector3(mainCameraTransform.rotation.eulerAngles.x, mainCameraTransform.rotation.eulerAngles.y, 0f);
  14501. keyFlg2 = true;
  14502. }
  14503. else if (!isVR && Input.GetKey(KeyCode.Q) && Input.GetKeyDown(KeyCode.R) && !qFlg)
  14504. {
  14505. GameMain.Instance.MainCamera.Reset(CameraMain.CameraType.Target, true);
  14506. mainCamera.SetTargetPos(new Vector3(0f, 0.9f, 0f), true);
  14507. mainCamera.SetDistance(3f, true);
  14508. keyFlg2 = true;
  14509. }
  14510. else if (!isVR && Input.GetKey(KeyCode.Q) && Input.GetKeyDown(KeyCode.S) && !qFlg)
  14511. {
  14512. cameraIti = mainCamera.GetTargetPos();
  14513. cameraIti2 = mainCamera.GetPos();
  14514. cameraItiAngle = mainCamera.GetAroundAngle();
  14515. cameraItiDistance = mainCamera.GetDistance();
  14516. keyFlg2 = true;
  14517. }
  14518. else if (!isVR && Input.GetKey(KeyCode.Q) && Input.GetKeyDown(KeyCode.A) && !qFlg)
  14519. {
  14520. mainCamera.SetTargetPos(cameraIti, true);
  14521. mainCamera.SetPos(cameraIti2);
  14522. mainCamera.SetAroundAngle(cameraItiAngle, true);
  14523. mainCamera.SetDistance(cameraItiDistance, true);
  14524. keyFlg2 = true;
  14525. }
  14526. else if (!isVR && Input.GetKeyUp(KeyCode.Q) && !qFlg)
  14527. {
  14528. if (keyFlg2)
  14529. {
  14530. keyFlg2 = false;
  14531. }
  14532. else
  14533. {
  14534. effectIndex++;
  14535. if (effectIndex == 9)
  14536. {
  14537. kami.SetActive(false);
  14538. effectIndex = 0;
  14539. }
  14540. Vignetting component3 = GameMain.Instance.MainCamera.gameObject.GetComponent<Vignetting>();
  14541. if (!isBlur)
  14542. {
  14543. component3.mode = Vignetting.AberrationMode.Simple;
  14544. component3.intensity = -3.98f;
  14545. component3.chromaticAberration = -0.75f;
  14546. component3.axialAberration = 1.18f;
  14547. component3.blurSpread = 4.19f;
  14548. component3.luminanceDependency = 0.494f;
  14549. component3.blurDistance = 1.71f;
  14550. component3.enabled = false;
  14551. }
  14552. if (kami) { }
  14553. if (effectIndex == 0)
  14554. {
  14555. component3.enabled = false;
  14556. }
  14557. if (effectIndex == 1)
  14558. {
  14559. component3.mode = Vignetting.AberrationMode.Simple;
  14560. component3.intensity = -1f;
  14561. component3.chromaticAberration = 0f;
  14562. component3.axialAberration = 0f;
  14563. component3.blurSpread = 5f;
  14564. component3.luminanceDependency = 0f;
  14565. component3.blurDistance = 0f;
  14566. component3.enabled = true;
  14567. }
  14568. if (effectIndex == 2)
  14569. {
  14570. component3.enabled = true;
  14571. }
  14572. if (effectIndex == 3)
  14573. {
  14574. component3.mode = Vignetting.AberrationMode.Simple;
  14575. component3.intensity = 9f;
  14576. component3.chromaticAberration = 0f;
  14577. component3.axialAberration = 0f;
  14578. component3.blurSpread = 5f;
  14579. component3.luminanceDependency = 0f;
  14580. component3.blurDistance = 0f;
  14581. component3.enabled = true;
  14582. }
  14583. if (effectIndex == 4)
  14584. {
  14585. Object @object = Resources.Load("Prefab/p_kamihubuki_photo_ver");
  14586. kami = (GameObject)Instantiate(@object);
  14587. Vector3 localPosition = kami.transform.localPosition;
  14588. localPosition.y = 3.5f;
  14589. kami.transform.localPosition = localPosition;
  14590. }
  14591. if (effectIndex == 5)
  14592. {
  14593. component3.enabled = true;
  14594. component3.mode = Vignetting.AberrationMode.Simple;
  14595. component3.intensity = -2.5f;
  14596. component3.chromaticAberration = -0.3f;
  14597. component3.axialAberration = 0.5f;
  14598. component3.blurSpread = 4.5f;
  14599. component3.luminanceDependency = 0.2f;
  14600. component3.blurDistance = 0.8f;
  14601. component3.enabled = true;
  14602. }
  14603. if (effectIndex == 6)
  14604. {
  14605. kami.SetActive(false);
  14606. Object @object = Resources.Load("Prefab/p_powder_snow_photo_ver");
  14607. kami = (GameObject)Instantiate(@object);
  14608. Vector3 localPosition = kami.transform.localPosition;
  14609. localPosition.y = 3.5f;
  14610. kami.transform.localPosition = localPosition;
  14611. }
  14612. if (effectIndex == 7)
  14613. {
  14614. component3.enabled = true;
  14615. component3.mode = Vignetting.AberrationMode.Simple;
  14616. component3.intensity = -2.5f;
  14617. component3.chromaticAberration = -0.3f;
  14618. component3.axialAberration = 0.5f;
  14619. component3.blurSpread = 4.5f;
  14620. component3.luminanceDependency = 0.2f;
  14621. component3.blurDistance = 0.8f;
  14622. component3.enabled = true;
  14623. }
  14624. if (effectIndex == 8)
  14625. {
  14626. component3.mode = Vignetting.AberrationMode.Simple;
  14627. component3.intensity = 8f;
  14628. component3.chromaticAberration = 0f;
  14629. component3.axialAberration = 0f;
  14630. component3.blurSpread = 5f;
  14631. component3.luminanceDependency = 0f;
  14632. component3.blurDistance = 0f;
  14633. component3.enabled = true;
  14634. }
  14635. }
  14636. }
  14637. if (!isVR && Input.GetKeyUp(KeyCode.Q) && qFlg)
  14638. {
  14639. qFlg = false;
  14640. }
  14641. if (Input.GetKey(KeyCode.A) && !Input.GetKey(KeyCode.Space))
  14642. {
  14643. bool flag5 = false;
  14644. for (int k = 0; k < keyArray.Length; k++)
  14645. {
  14646. if (Input.GetKey(keyArray[k]))
  14647. {
  14648. flag5 = true;
  14649. break;
  14650. }
  14651. }
  14652. if (!getModKeyPressing(modKey.Shift))
  14653. {
  14654. if (!flag5)
  14655. {
  14656. Vector3 vector2 = mainCameraTransform.TransformDirection(Vector3.forward);
  14657. Vector3 vector3 = mainCameraTransform.TransformDirection(Vector3.right);
  14658. Vector3 vector4 = mainCameraTransform.TransformDirection(Vector3.up);
  14659. if (Input.GetKey(KeyCode.A) && Input.GetKey(KeyCode.I) && Input.GetKey(KeyCode.J))
  14660. {
  14661. Vector3 vector = softG;
  14662. vector += new Vector3(vector2.x, 0f, vector2.z) * 6E-05f * speed;
  14663. vector += new Vector3(vector3.x, 0f, vector3.z) * -6E-05f * speed;
  14664. softG = vector;
  14665. }
  14666. else if (Input.GetKey(KeyCode.A) && Input.GetKey(KeyCode.I) && Input.GetKey(KeyCode.L))
  14667. {
  14668. Vector3 vector = softG;
  14669. vector += new Vector3(vector2.x, 0f, vector2.z) * 6E-05f * speed;
  14670. vector += new Vector3(vector3.x, 0f, vector3.z) * 6E-05f * speed;
  14671. softG = vector;
  14672. }
  14673. else if (Input.GetKey(KeyCode.A) && Input.GetKey(KeyCode.K) && Input.GetKey(KeyCode.J))
  14674. {
  14675. Vector3 vector = softG;
  14676. vector += new Vector3(vector2.x, 0f, vector2.z) * -6E-05f * speed;
  14677. vector += new Vector3(vector3.x, 0f, vector3.z) * -6E-05f * speed;
  14678. softG = vector;
  14679. }
  14680. else if (Input.GetKey(KeyCode.A) && Input.GetKey(KeyCode.K) && Input.GetKey(KeyCode.L))
  14681. {
  14682. Vector3 vector = softG;
  14683. vector += new Vector3(vector2.x, 0f, vector2.z) * -6E-05f * speed;
  14684. vector += new Vector3(vector3.x, 0f, vector3.z) * 6E-05f * speed;
  14685. softG = vector;
  14686. }
  14687. else if (Input.GetKey(KeyCode.A) && Input.GetKey(KeyCode.I))
  14688. {
  14689. Vector3 vector = softG;
  14690. vector += new Vector3(vector2.x, 0f, vector2.z) * 6E-05f * speed;
  14691. softG = vector;
  14692. }
  14693. else if (Input.GetKey(KeyCode.A) && Input.GetKey(KeyCode.K))
  14694. {
  14695. Vector3 vector = softG;
  14696. vector += new Vector3(vector2.x, 0f, vector2.z) * -6E-05f * speed;
  14697. softG = vector;
  14698. }
  14699. else if (Input.GetKey(KeyCode.A) && Input.GetKey(KeyCode.J))
  14700. {
  14701. Vector3 vector = softG;
  14702. vector += new Vector3(vector3.x, 0f, vector3.z) * -6E-05f * speed;
  14703. softG = vector;
  14704. }
  14705. else if (Input.GetKey(KeyCode.A) && Input.GetKey(KeyCode.L))
  14706. {
  14707. Vector3 vector = softG;
  14708. vector += new Vector3(vector3.x, 0f, vector3.z) * 6E-05f * speed;
  14709. softG = vector;
  14710. }
  14711. else if (Input.GetKey(KeyCode.A) && Input.GetKey(KeyCode.Alpha0))
  14712. {
  14713. Vector3 vector = softG;
  14714. vector.y += 6E-05f * speed;
  14715. softG = vector;
  14716. }
  14717. else if (Input.GetKey(KeyCode.A) && Input.GetKey(KeyCode.P))
  14718. {
  14719. Vector3 vector = softG;
  14720. vector.y -= 6E-05f * speed;
  14721. softG = vector;
  14722. }
  14723. else if (Input.GetKey(KeyCode.A) && Input.GetKey(KeyCode.BackQuote) && !atFlg)
  14724. {
  14725. softG = new Vector3(0f, -0.003f, 0f);
  14726. }
  14727. for (int j = 0; j < maidCnt; j++)
  14728. {
  14729. Maid maid = maidArray[j];
  14730. for (int l = 0; l < maid.body0.goSlot.Count; l++)
  14731. {
  14732. if (maid.body0.goSlot[l].obj != null)
  14733. {
  14734. DynamicBone component2 = maid.body0.goSlot[l].obj.GetComponent<DynamicBone>();
  14735. if (component2 != null && component2.enabled)
  14736. {
  14737. component2.m_Gravity = new Vector3(softG.x * 5f, (softG.y + 0.003f) * 5f, softG.z * 5f);
  14738. }
  14739. }
  14740. List<THair1> fieldValue3 =
  14741. GetFieldValue<TBoneHair_, List<THair1>>(maid.body0.goSlot[l].bonehair, "hair1list");
  14742. for (int k = 0; k < fieldValue3.Count; k++)
  14743. {
  14744. fieldValue3[k].SoftG = new Vector3(softG.x, softG.y + kamiyure, softG.z);
  14745. }
  14746. }
  14747. }
  14748. }
  14749. }
  14750. else if (!flag5)
  14751. {
  14752. Vector3 vector2 = mainCameraTransform.TransformDirection(Vector3.forward);
  14753. Vector3 vector3 = mainCameraTransform.TransformDirection(Vector3.right);
  14754. Vector3 vector4 = mainCameraTransform.TransformDirection(Vector3.up);
  14755. if (Input.GetKey(KeyCode.A) && Input.GetKey(KeyCode.I) && Input.GetKey(KeyCode.J))
  14756. {
  14757. Vector3 vector = softG2;
  14758. vector += new Vector3(vector2.x, 0f, vector2.z) * 4E-05f * speed;
  14759. vector += new Vector3(vector3.x, 0f, vector3.z) * -4E-05f * speed;
  14760. softG2 = vector;
  14761. }
  14762. else if (Input.GetKey(KeyCode.A) && Input.GetKey(KeyCode.I) && Input.GetKey(KeyCode.L))
  14763. {
  14764. Vector3 vector = softG2;
  14765. vector += new Vector3(vector2.x, 0f, vector2.z) * 4E-05f * speed;
  14766. vector += new Vector3(vector3.x, 0f, vector3.z) * 4E-05f * speed;
  14767. softG2 = vector;
  14768. }
  14769. else if (Input.GetKey(KeyCode.A) && Input.GetKey(KeyCode.K) && Input.GetKey(KeyCode.J))
  14770. {
  14771. Vector3 vector = softG2;
  14772. vector += new Vector3(vector2.x, 0f, vector2.z) * -4E-05f * speed;
  14773. vector += new Vector3(vector3.x, 0f, vector3.z) * -4E-05f * speed;
  14774. softG2 = vector;
  14775. }
  14776. else if (Input.GetKey(KeyCode.A) && Input.GetKey(KeyCode.K) && Input.GetKey(KeyCode.L))
  14777. {
  14778. Vector3 vector = softG2;
  14779. vector += new Vector3(vector2.x, 0f, vector2.z) * -4E-05f * speed;
  14780. vector += new Vector3(vector3.x, 0f, vector3.z) * 4E-05f * speed;
  14781. softG2 = vector;
  14782. }
  14783. else if (Input.GetKey(KeyCode.A) && Input.GetKey(KeyCode.I))
  14784. {
  14785. Vector3 vector = softG2;
  14786. vector += new Vector3(vector2.x, 0f, vector2.z) * 4E-05f * speed;
  14787. softG2 = vector;
  14788. }
  14789. else if (Input.GetKey(KeyCode.A) && Input.GetKey(KeyCode.K))
  14790. {
  14791. Vector3 vector = softG2;
  14792. vector += new Vector3(vector2.x, 0f, vector2.z) * -4E-05f * speed;
  14793. softG2 = vector;
  14794. }
  14795. else if (Input.GetKey(KeyCode.A) && Input.GetKey(KeyCode.J))
  14796. {
  14797. Vector3 vector = softG2;
  14798. vector += new Vector3(vector3.x, 0f, vector3.z) * -4E-05f * speed;
  14799. softG2 = vector;
  14800. }
  14801. else if (Input.GetKey(KeyCode.A) && Input.GetKey(KeyCode.L))
  14802. {
  14803. Vector3 vector = softG2;
  14804. vector += new Vector3(vector3.x, 0f, vector3.z) * 4E-05f * speed;
  14805. softG2 = vector;
  14806. }
  14807. else if (Input.GetKey(KeyCode.A) && Input.GetKey(KeyCode.Alpha0))
  14808. {
  14809. Vector3 vector = softG2;
  14810. vector.y += 2E-05f * speed;
  14811. softG2 = vector;
  14812. }
  14813. else if (Input.GetKey(KeyCode.A) && Input.GetKey(KeyCode.P))
  14814. {
  14815. Vector3 vector = softG2;
  14816. vector.y -= 2E-05f * speed;
  14817. softG2 = vector;
  14818. }
  14819. else if (Input.GetKey(KeyCode.A) && Input.GetKey(KeyCode.BackQuote) && !atFlg)
  14820. {
  14821. softG2 = new Vector3(0f, -0.005f, 0f);
  14822. }
  14823. for (int j = 0; j < maidCnt; j++)
  14824. {
  14825. Maid maid = maidArray[j];
  14826. for (int l = 0; l < maid.body0.goSlot.Count; l++)
  14827. {
  14828. if (maid.body0.goSlot[l].obj != null)
  14829. {
  14830. DynamicSkirtBone fieldValue8 =
  14831. GetFieldValue<BoneHair3, DynamicSkirtBone>(maidArray[j].body0.goSlot[l].bonehair3,
  14832. "m_SkirtBone");
  14833. if (fieldValue8 != null)
  14834. {
  14835. fieldValue8.m_vGravity = new Vector3(softG2.x, softG2.y, softG2.z);
  14836. fieldValue8.UpdateParameters();
  14837. }
  14838. }
  14839. }
  14840. }
  14841. }
  14842. }
  14843. if (!isVR)
  14844. {
  14845. if (doguObject.Count > 0)
  14846. {
  14847. Vector3 vector2 = mainCameraTransform.TransformDirection(Vector3.forward);
  14848. Vector3 vector3 = mainCameraTransform.TransformDirection(Vector3.right);
  14849. Vector3 vector4 = mainCameraTransform.TransformDirection(Vector3.up);
  14850. if (doguObject[doguSelectIndex] && Input.GetKey(KeyCode.W) && Input.GetKey(KeyCode.E))
  14851. {
  14852. idoFlg2 = true;
  14853. doguObject[doguSelectIndex].transform.localScale =
  14854. new Vector3(doguObject[doguSelectIndex].transform.localScale.x * 1.005f,
  14855. doguObject[doguSelectIndex].transform.localScale.y * 1.005f,
  14856. doguObject[doguSelectIndex].transform.localScale.z * 1.005f);
  14857. }
  14858. else if (doguObject[doguSelectIndex] && Input.GetKey(KeyCode.W) && Input.GetKey(KeyCode.D))
  14859. {
  14860. idoFlg2 = true;
  14861. doguObject[doguSelectIndex].transform.localScale =
  14862. new Vector3(doguObject[doguSelectIndex].transform.localScale.x * 0.995f,
  14863. doguObject[doguSelectIndex].transform.localScale.y * 0.995f,
  14864. doguObject[doguSelectIndex].transform.localScale.z * 0.995f);
  14865. }
  14866. else if (doguObject[doguSelectIndex] && Input.GetKey(KeyCode.W) && Input.GetKeyDown(KeyCode.C))
  14867. {
  14868. idoFlg2 = true;
  14869. doguObject[doguSelectIndex].transform.localScale = new Vector3(1f, 1f, 1f);
  14870. }
  14871. else if (doguObject[doguSelectIndex] && Input.GetKey(KeyCode.W) && Input.GetKey(KeyCode.U))
  14872. {
  14873. doguObject[doguSelectIndex]
  14874. .transform.RotateAround(doguObject[doguSelectIndex].transform.position, Vector3.up, -0.7f);
  14875. idoFlg2 = true;
  14876. }
  14877. else if (doguObject[doguSelectIndex] && Input.GetKey(KeyCode.W) && Input.GetKey(KeyCode.O))
  14878. {
  14879. doguObject[doguSelectIndex]
  14880. .transform.RotateAround(doguObject[doguSelectIndex].transform.position, Vector3.up, 0.7f);
  14881. idoFlg2 = true;
  14882. }
  14883. else if (doguObject[doguSelectIndex] && Input.GetKey(KeyCode.W) && Input.GetKeyDown(KeyCode.BackQuote)
  14884. && getModKeyPressing(modKey.Alt))
  14885. {
  14886. for (int k = 0; k < 10; k++)
  14887. {
  14888. doguObject[doguSelectIndex].transform.RotateAround(doguObject[doguSelectIndex].transform.position,
  14889. Vector3.right,
  14890. -doguObject[doguSelectIndex]
  14891. .transform.rotation.eulerAngles.x);
  14892. doguObject[doguSelectIndex].transform.RotateAround(doguObject[doguSelectIndex].transform.position,
  14893. Vector3.forward,
  14894. -doguObject[doguSelectIndex]
  14895. .transform.rotation.eulerAngles.z);
  14896. }
  14897. idoFlg2 = true;
  14898. Vector3 vector = Vector3.zero;
  14899. Vector3 zero3 = Vector3.zero;
  14900. zero3.x = -90f;
  14901. int num12 = doguIndex[doguSelectIndex];
  14902. switch (num12)
  14903. {
  14904. case 3:
  14905. vector.z = 0.5f;
  14906. zero3.z = 90f;
  14907. break;
  14908. case 4:
  14909. case 5:
  14910. case 7:
  14911. case 10:
  14912. case 11: break;
  14913. case 6:
  14914. vector.z = 0.6f;
  14915. zero3.x = 0f;
  14916. break;
  14917. case 8:
  14918. vector.z = 0.5f;
  14919. zero3.x = 0f;
  14920. break;
  14921. case 9:
  14922. vector.z = 0.32f;
  14923. zero3.z = 180f;
  14924. break;
  14925. case 12:
  14926. vector.z = 0.5f;
  14927. zero3.z = 180f;
  14928. break;
  14929. case 13:
  14930. vector.z = 0.7f;
  14931. zero3.z = 180f;
  14932. break;
  14933. default:
  14934. if (num12 != 16)
  14935. {
  14936. switch (num12)
  14937. {
  14938. case 23:
  14939. vector.z = 2.7f;
  14940. vector.x = 0.77f;
  14941. zero3.z = 90f;
  14942. break;
  14943. case 25:
  14944. vector.z = 0.5f;
  14945. vector.y = 0.9f;
  14946. zero3.z = 180f;
  14947. break;
  14948. case 26:
  14949. vector.z = 0.5f;
  14950. vector.y = 0.9f;
  14951. zero3.z = 180f;
  14952. break;
  14953. case 30:
  14954. vector.z = 0f;
  14955. zero3.z = 0f;
  14956. break;
  14957. case 31:
  14958. vector.z = -0.6f;
  14959. vector.y = 0.96f;
  14960. zero3.z = 180f;
  14961. break;
  14962. case 32:
  14963. vector.z = -0.6f;
  14964. vector.y = 0.96f;
  14965. zero3.z = 180f;
  14966. break;
  14967. case 33:
  14968. vector.z = -0.6f;
  14969. vector.y = 0.85f;
  14970. zero3.z = 180f;
  14971. break;
  14972. }
  14973. }
  14974. else
  14975. {
  14976. vector.z = -0.4f;
  14977. zero3.z = 180f;
  14978. }
  14979. break;
  14980. }
  14981. doguObject[doguSelectIndex].transform.localRotation = Quaternion.Euler(zero3);
  14982. }
  14983. else if (Input.GetKey(KeyCode.W) && getModKeyPressing(modKey.Alt) && Input.GetKey(KeyCode.I)
  14984. && Input.GetKey(KeyCode.J))
  14985. {
  14986. doguObject[doguSelectIndex]
  14987. .transform.RotateAround(doguObject[doguSelectIndex].transform.position,
  14988. new Vector3(vector3.x, 0f, vector3.z),
  14989. 0.3f);
  14990. doguObject[doguSelectIndex]
  14991. .transform.RotateAround(doguObject[doguSelectIndex].transform.position,
  14992. new Vector3(vector2.x, 0f, vector2.z),
  14993. 0.3f);
  14994. idoFlg2 = true;
  14995. }
  14996. else if (Input.GetKey(KeyCode.W) && getModKeyPressing(modKey.Alt) && Input.GetKey(KeyCode.I)
  14997. && Input.GetKey(KeyCode.L))
  14998. {
  14999. doguObject[doguSelectIndex]
  15000. .transform.RotateAround(doguObject[doguSelectIndex].transform.position,
  15001. new Vector3(vector3.x, 0f, vector3.z),
  15002. 0.3f);
  15003. doguObject[doguSelectIndex].transform.RotateAround(doguObject[doguSelectIndex].transform.position,
  15004. new Vector3(vector2.x, 0f, vector2.z),
  15005. -0.3f);
  15006. idoFlg2 = true;
  15007. }
  15008. else if (Input.GetKey(KeyCode.W) && getModKeyPressing(modKey.Alt) && Input.GetKey(KeyCode.K)
  15009. && Input.GetKey(KeyCode.J))
  15010. {
  15011. doguObject[doguSelectIndex].transform.RotateAround(doguObject[doguSelectIndex].transform.position,
  15012. new Vector3(vector3.x, 0f, vector3.z),
  15013. -0.3f);
  15014. doguObject[doguSelectIndex]
  15015. .transform.RotateAround(doguObject[doguSelectIndex].transform.position,
  15016. new Vector3(vector2.x, 0f, vector2.z),
  15017. 0.3f);
  15018. idoFlg2 = true;
  15019. }
  15020. else if (Input.GetKey(KeyCode.W) && getModKeyPressing(modKey.Alt) && Input.GetKey(KeyCode.K)
  15021. && Input.GetKey(KeyCode.L))
  15022. {
  15023. doguObject[doguSelectIndex].transform.RotateAround(doguObject[doguSelectIndex].transform.position,
  15024. new Vector3(vector3.x, 0f, vector3.z),
  15025. -0.3f);
  15026. doguObject[doguSelectIndex].transform.RotateAround(doguObject[doguSelectIndex].transform.position,
  15027. new Vector3(vector2.x, 0f, vector2.z),
  15028. -0.3f);
  15029. idoFlg2 = true;
  15030. }
  15031. else if (Input.GetKey(KeyCode.W) && getModKeyPressing(modKey.Alt) && Input.GetKey(KeyCode.I))
  15032. {
  15033. doguObject[doguSelectIndex]
  15034. .transform.RotateAround(doguObject[doguSelectIndex].transform.position,
  15035. new Vector3(vector3.x, 0f, vector3.z),
  15036. 0.4f);
  15037. idoFlg2 = true;
  15038. }
  15039. else if (Input.GetKey(KeyCode.W) && getModKeyPressing(modKey.Alt) && Input.GetKey(KeyCode.K))
  15040. {
  15041. doguObject[doguSelectIndex].transform.RotateAround(doguObject[doguSelectIndex].transform.position,
  15042. new Vector3(vector3.x, 0f, vector3.z),
  15043. -0.4f);
  15044. idoFlg2 = true;
  15045. }
  15046. else if (Input.GetKey(KeyCode.W) && getModKeyPressing(modKey.Alt) && Input.GetKey(KeyCode.J))
  15047. {
  15048. doguObject[doguSelectIndex]
  15049. .transform.RotateAround(doguObject[doguSelectIndex].transform.position,
  15050. new Vector3(vector2.x, 0f, vector2.z),
  15051. 0.4f);
  15052. idoFlg2 = true;
  15053. }
  15054. else if (Input.GetKey(KeyCode.W) && getModKeyPressing(modKey.Alt) && Input.GetKey(KeyCode.L))
  15055. {
  15056. doguObject[doguSelectIndex].transform.RotateAround(doguObject[doguSelectIndex].transform.position,
  15057. new Vector3(vector2.x, 0f, vector2.z),
  15058. -0.4f);
  15059. idoFlg2 = true;
  15060. }
  15061. else if (Input.GetKey(KeyCode.W) && getModKeyPressing(modKey.Alt) && Input.GetKey(KeyCode.U))
  15062. {
  15063. doguObject[doguSelectIndex].transform.localRotation =
  15064. Quaternion.Euler(doguObject[doguSelectIndex].transform.localEulerAngles)
  15065. * Quaternion.AngleAxis(-1.5f, Vector3.up);
  15066. idoFlg2 = true;
  15067. }
  15068. else if (Input.GetKey(KeyCode.W) && getModKeyPressing(modKey.Alt) && Input.GetKey(KeyCode.O))
  15069. {
  15070. doguObject[doguSelectIndex].transform.localRotation =
  15071. Quaternion.Euler(doguObject[doguSelectIndex].transform.localEulerAngles)
  15072. * Quaternion.AngleAxis(1.5f, Vector3.up);
  15073. idoFlg2 = true;
  15074. }
  15075. else if (doguObject[doguSelectIndex] && Input.GetKey(KeyCode.W)
  15076. && ((Input.GetKey(KeyCode.Minus) && getModKeyPressing(modKey.Shift))
  15077. || (Input.GetKey(KeyCode.K) && getModKeyPressing(modKey.Alt))))
  15078. {
  15079. doguObject[doguSelectIndex].transform.RotateAround(doguObject[doguSelectIndex].transform.position,
  15080. new Vector3(vector3.x, 0f, vector3.z),
  15081. -0.7f);
  15082. idoFlg2 = true;
  15083. }
  15084. else if (doguObject[doguSelectIndex] && Input.GetKey(KeyCode.W)
  15085. && ((Input.GetKey(KeyCode.Quote) && getModKeyPressing(modKey.Shift))
  15086. || (Input.GetKey(KeyCode.I) && getModKeyPressing(modKey.Alt))))
  15087. {
  15088. doguObject[doguSelectIndex]
  15089. .transform.RotateAround(doguObject[doguSelectIndex].transform.position,
  15090. new Vector3(vector3.x, 0f, vector3.z),
  15091. 0.7f);
  15092. idoFlg2 = true;
  15093. }
  15094. else if (doguObject[doguSelectIndex] && Input.GetKey(KeyCode.W)
  15095. && (Input.GetKey(KeyCode.Minus)
  15096. || (Input.GetKey(KeyCode.J) && getModKeyPressing(modKey.Alt))))
  15097. {
  15098. doguObject[doguSelectIndex]
  15099. .transform.RotateAround(doguObject[doguSelectIndex].transform.position,
  15100. new Vector3(vector2.x, 0f, vector2.z),
  15101. 0.7f);
  15102. idoFlg2 = true;
  15103. }
  15104. else if (doguObject[doguSelectIndex] && Input.GetKey(KeyCode.W)
  15105. && (Input.GetKey(KeyCode.Quote)
  15106. || (Input.GetKey(KeyCode.L) && getModKeyPressing(modKey.Alt))))
  15107. {
  15108. doguObject[doguSelectIndex].transform.RotateAround(doguObject[doguSelectIndex].transform.position,
  15109. new Vector3(vector2.x, 0f, vector2.z),
  15110. -0.7f);
  15111. idoFlg2 = true;
  15112. }
  15113. else if (doguObject[doguSelectIndex] && Input.GetKey(KeyCode.W) && Input.GetKey(KeyCode.I)
  15114. && Input.GetKey(KeyCode.J))
  15115. {
  15116. Vector3 vector = doguObject[doguSelectIndex].transform.position;
  15117. vector += new Vector3(vector2.x, 0f, vector2.z) * 0.0075f * speed;
  15118. vector += new Vector3(vector3.x, 0f, vector3.z) * -0.0075f * speed;
  15119. doguObject[doguSelectIndex].transform.localPosition = vector;
  15120. idoFlg2 = true;
  15121. }
  15122. else if (doguObject[doguSelectIndex] && Input.GetKey(KeyCode.W) && Input.GetKey(KeyCode.I)
  15123. && Input.GetKey(KeyCode.L))
  15124. {
  15125. Vector3 vector = doguObject[doguSelectIndex].transform.position;
  15126. vector += new Vector3(vector2.x, 0f, vector2.z) * 0.0075f * speed;
  15127. vector += new Vector3(vector3.x, 0f, vector3.z) * 0.0075f * speed;
  15128. doguObject[doguSelectIndex].transform.localPosition = vector;
  15129. idoFlg2 = true;
  15130. }
  15131. else if (doguObject[doguSelectIndex] && Input.GetKey(KeyCode.W) && Input.GetKey(KeyCode.K)
  15132. && Input.GetKey(KeyCode.J))
  15133. {
  15134. Vector3 vector = doguObject[doguSelectIndex].transform.position;
  15135. vector += new Vector3(vector2.x, 0f, vector2.z) * -0.0075f * speed;
  15136. vector += new Vector3(vector3.x, 0f, vector3.z) * -0.0075f * speed;
  15137. doguObject[doguSelectIndex].transform.localPosition = vector;
  15138. idoFlg2 = true;
  15139. }
  15140. else if (doguObject[doguSelectIndex] && Input.GetKey(KeyCode.W) && Input.GetKey(KeyCode.K)
  15141. && Input.GetKey(KeyCode.L))
  15142. {
  15143. Vector3 vector = doguObject[doguSelectIndex].transform.position;
  15144. vector += new Vector3(vector2.x, 0f, vector2.z) * -0.0075f * speed;
  15145. vector += new Vector3(vector3.x, 0f, vector3.z) * 0.0075f * speed;
  15146. doguObject[doguSelectIndex].transform.localPosition = vector;
  15147. idoFlg2 = true;
  15148. }
  15149. else if (doguObject[doguSelectIndex] && Input.GetKey(KeyCode.W) && Input.GetKey(KeyCode.I))
  15150. {
  15151. Vector3 vector = doguObject[doguSelectIndex].transform.position;
  15152. vector += new Vector3(vector2.x, 0f, vector2.z) * 0.0075f * speed;
  15153. doguObject[doguSelectIndex].transform.localPosition = vector;
  15154. idoFlg2 = true;
  15155. }
  15156. else if (doguObject[doguSelectIndex] && Input.GetKey(KeyCode.W) && Input.GetKey(KeyCode.K))
  15157. {
  15158. Vector3 vector = doguObject[doguSelectIndex].transform.position;
  15159. vector += new Vector3(vector2.x, 0f, vector2.z) * -0.0075f * speed;
  15160. doguObject[doguSelectIndex].transform.localPosition = vector;
  15161. idoFlg2 = true;
  15162. }
  15163. else if (doguObject[doguSelectIndex] && Input.GetKey(KeyCode.W) && Input.GetKey(KeyCode.J))
  15164. {
  15165. Vector3 vector = doguObject[doguSelectIndex].transform.position;
  15166. vector += new Vector3(vector3.x, 0f, vector3.z) * -0.0075f * speed;
  15167. doguObject[doguSelectIndex].transform.localPosition = vector;
  15168. idoFlg2 = true;
  15169. }
  15170. else if (doguObject[doguSelectIndex] && Input.GetKey(KeyCode.W) && Input.GetKey(KeyCode.L))
  15171. {
  15172. Vector3 vector = doguObject[doguSelectIndex].transform.position;
  15173. vector += new Vector3(vector3.x, 0f, vector3.z) * 0.0075f * speed;
  15174. doguObject[doguSelectIndex].transform.localPosition = vector;
  15175. idoFlg2 = true;
  15176. }
  15177. else if (doguObject[doguSelectIndex] && Input.GetKey(KeyCode.W) && Input.GetKey(KeyCode.Alpha0))
  15178. {
  15179. Vector3 vector = doguObject[doguSelectIndex].transform.position;
  15180. vector.y += 0.0075f * speed;
  15181. doguObject[doguSelectIndex].transform.localPosition = vector;
  15182. idoFlg2 = true;
  15183. }
  15184. else if (doguObject[doguSelectIndex] && Input.GetKey(KeyCode.W) && Input.GetKey(KeyCode.P))
  15185. {
  15186. Vector3 vector = doguObject[doguSelectIndex].transform.position;
  15187. vector.y -= 0.0075f * speed;
  15188. doguObject[doguSelectIndex].transform.localPosition = vector;
  15189. idoFlg2 = true;
  15190. }
  15191. else if (doguObject[doguSelectIndex] && Input.GetKey(KeyCode.W) && Input.GetKeyDown(KeyCode.BackQuote) && !atFlg)
  15192. {
  15193. idoFlg2 = true;
  15194. if (doguObject.Count > 0 && doguObject[doguSelectIndex] != null)
  15195. {
  15196. Destroy(doguObject[doguSelectIndex]);
  15197. doguObject.RemoveAt(doguSelectIndex);
  15198. }
  15199. doguIndex.RemoveAt(doguSelectIndex);
  15200. doguSelectIndex = 0;
  15201. }
  15202. }
  15203. if (Input.GetKeyDown(KeyCode.W) && getModKeyPressing(modKey.Shift))
  15204. {
  15205. idoFlg2 = true;
  15206. if (doguSelectIndex == doguObject.Count)
  15207. {
  15208. doguIndex.Add(0);
  15209. }
  15210. else if (doguObject.Count > 0 && doguObject[doguSelectIndex] != null)
  15211. {
  15212. Destroy(doguObject[doguSelectIndex]);
  15213. doguObject.RemoveAt(doguSelectIndex);
  15214. }
  15215. else
  15216. {
  15217. doguIndex.Add(0);
  15218. doguSelectIndex = doguIndex.Count - 1;
  15219. }
  15220. List<int> list2;
  15221. int index;
  15222. (list2 = doguIndex)[index = doguSelectIndex] = list2[index] - 1;
  15223. if (doguIndex[doguSelectIndex] <= -1)
  15224. {
  15225. doguIndex[doguSelectIndex] = doguArray.Length - 1;
  15226. }
  15227. if (doguIndex[doguSelectIndex] > 0)
  15228. {
  15229. if (!doguArray[doguIndex[doguSelectIndex]].StartsWith("mirror"))
  15230. {
  15231. Object @object = null;
  15232. for (int j = 0; j < 5; j++)
  15233. {
  15234. @object = Resources.Load("Prefab/" + doguArray[doguIndex[doguSelectIndex]]);
  15235. if (@object != null)
  15236. {
  15237. break;
  15238. }
  15239. (list2 = doguIndex)[index = doguSelectIndex] = list2[index] - 1;
  15240. }
  15241. doguObject.Add(Instantiate(@object) as GameObject);
  15242. }
  15243. else
  15244. {
  15245. Material material = new Material(Shader.Find("Mirror"));
  15246. GameObject gameObject7 = GameObject.CreatePrimitive(PrimitiveType.Plane);
  15247. gameObject7.transform.localScale = new Vector3(0.3f, 1f, 0.3f);
  15248. gameObject7.GetComponent<Renderer>().material = material;
  15249. gameObject7.AddComponent<MirrorReflection2>();
  15250. MirrorReflection2 component5 = gameObject7.GetComponent<MirrorReflection2>();
  15251. component5.m_TextureSize = 2048;
  15252. component5.m_ClipPlaneOffset = 0f;
  15253. gameObject7.GetComponent<Renderer>().enabled = true;
  15254. doguObject.Add(gameObject7);
  15255. }
  15256. Vector3 vector = Vector3.zero;
  15257. Vector3 zero3 = Vector3.zero;
  15258. zero3.x = -90f;
  15259. switch (doguIndex[doguSelectIndex])
  15260. {
  15261. case 1:
  15262. vector.z = -0.5f;
  15263. goto IL_344DC;
  15264. case 2:
  15265. vector.z = -0.5f;
  15266. goto IL_344DC;
  15267. case 3:
  15268. vector.z = 0.5f;
  15269. zero3.z = 90f;
  15270. goto IL_344DC;
  15271. case 4:
  15272. vector.z = 0.9f;
  15273. goto IL_344DC;
  15274. case 5:
  15275. vector.z = 0.9f;
  15276. goto IL_344DC;
  15277. case 6:
  15278. vector.z = 0.6f;
  15279. zero3.x = 0f;
  15280. doguObject[doguSelectIndex].transform.localScale = new Vector3(4.5f, 4.5f, 4.5f);
  15281. goto IL_344DC;
  15282. case 7:
  15283. vector.z = 0.6f;
  15284. doguObject[doguSelectIndex].transform.localScale = new Vector3(3.5f, 3.5f, 3.5f);
  15285. goto IL_344DC;
  15286. case 8:
  15287. vector.z = 0.5f;
  15288. zero3.x = 0f;
  15289. goto IL_344DC;
  15290. case 9:
  15291. vector.z = 0.32f;
  15292. zero3.z = 180f;
  15293. goto IL_344DC;
  15294. case 10:
  15295. vector.z = 0.6f;
  15296. goto IL_344DC;
  15297. case 11:
  15298. vector.z = 0.6f;
  15299. goto IL_344DC;
  15300. case 12:
  15301. vector.z = 0.5f;
  15302. zero3.z = 180f;
  15303. goto IL_344DC;
  15304. case 13:
  15305. vector.z = 0.7f;
  15306. zero3.z = 180f;
  15307. goto IL_344DC;
  15308. case 14:
  15309. vector.z = -0.4f;
  15310. goto IL_344DC;
  15311. case 15:
  15312. vector.z = -0.4f;
  15313. goto IL_344DC;
  15314. case 16:
  15315. vector.z = -0.4f;
  15316. zero3.z = 180f;
  15317. goto IL_344DC;
  15318. case 17:
  15319. vector.z = -0.4f;
  15320. goto IL_344DC;
  15321. case 18:
  15322. vector.z = -0.2f;
  15323. goto IL_344DC;
  15324. case 19:
  15325. vector.z = 0f;
  15326. goto IL_344DC;
  15327. case 20:
  15328. vector.z = 3.4f;
  15329. vector.x = -1f;
  15330. goto IL_344DC;
  15331. case 21:
  15332. vector.z = 3.4f;
  15333. vector.x = -1f;
  15334. goto IL_344DC;
  15335. case 22:
  15336. vector.z = 3.4f;
  15337. vector.y = 0.3f;
  15338. vector.x = -1f;
  15339. goto IL_344DC;
  15340. case 23:
  15341. vector.z = 2.7f;
  15342. vector.x = 0.77f;
  15343. zero3.z = 90f;
  15344. goto IL_344DC;
  15345. case 25:
  15346. vector.z = 0.5f;
  15347. vector.y = 0.9f;
  15348. zero3.z = 180f;
  15349. goto IL_344DC;
  15350. case 26:
  15351. vector.z = 0.5f;
  15352. vector.y = 0.9f;
  15353. zero3.z = 180f;
  15354. goto IL_344DC;
  15355. case 29:
  15356. vector.z = 0.5f;
  15357. vector.x = -1.05f;
  15358. goto IL_344DC;
  15359. case 30:
  15360. vector.z = -2.8f;
  15361. zero3.z = 0f;
  15362. zero3.x = 0f;
  15363. doguObject[doguSelectIndex].transform.localScale = new Vector3(0.75f, 0.75f, 0.75f);
  15364. goto IL_344DC;
  15365. case 31:
  15366. vector.z = -0.6f;
  15367. vector.y = 0.96f;
  15368. zero3.z = 180f;
  15369. doguObject[doguSelectIndex].transform.localScale = new Vector3(0.2f, 0.4f, 0.2f);
  15370. goto IL_344DC;
  15371. case 32:
  15372. vector.z = -0.6f;
  15373. vector.y = 0.96f;
  15374. zero3.z = 180f;
  15375. doguObject[doguSelectIndex].transform.localScale = new Vector3(0.1f, 0.4f, 0.2f);
  15376. goto IL_344DC;
  15377. case 33:
  15378. vector.z = -0.6f;
  15379. vector.y = 0.85f;
  15380. zero3.z = 180f;
  15381. doguObject[doguSelectIndex].transform.localScale = new Vector3(0.03f, 0.18f, 0.124f);
  15382. goto IL_344DC;
  15383. }
  15384. vector.z = 0.5f;
  15385. IL_344DC:
  15386. doguObject[doguSelectIndex].transform.localPosition = vector;
  15387. doguObject[doguSelectIndex].transform.localRotation = Quaternion.Euler(zero3);
  15388. }
  15389. if (doguIndex[doguSelectIndex] == 0)
  15390. {
  15391. doguIndex.RemoveAt(doguSelectIndex);
  15392. }
  15393. }
  15394. else if (Input.GetKeyDown(KeyCode.W))
  15395. {
  15396. for (int k = 0; k < keyArray.Length; k++)
  15397. {
  15398. if (Input.GetKey(keyArray[k]))
  15399. {
  15400. wFlg = true;
  15401. break;
  15402. }
  15403. }
  15404. }
  15405. else if (Input.GetKeyUp(KeyCode.W))
  15406. {
  15407. if (wFlg)
  15408. {
  15409. wFlg = false;
  15410. }
  15411. else if (idoFlg2)
  15412. {
  15413. idoFlg2 = false;
  15414. }
  15415. else
  15416. {
  15417. if (doguObject.Count > 0 && doguObject[doguSelectIndex] != null)
  15418. {
  15419. Destroy(doguObject[doguSelectIndex]);
  15420. doguObject.RemoveAt(doguSelectIndex);
  15421. }
  15422. else
  15423. {
  15424. doguIndex.Add(0);
  15425. doguSelectIndex = doguIndex.Count - 1;
  15426. }
  15427. List<int> list2;
  15428. int index;
  15429. (list2 = doguIndex)[index = doguSelectIndex] = list2[index] + 1;
  15430. if (doguIndex[doguSelectIndex] == doguArray.Length)
  15431. {
  15432. doguIndex[doguSelectIndex] = 0;
  15433. }
  15434. if (doguIndex[doguSelectIndex] > 0)
  15435. {
  15436. if (!doguArray[doguIndex[doguSelectIndex]].StartsWith("mirror"))
  15437. {
  15438. Object @object = null;
  15439. for (int j = 0; j < 5; j++)
  15440. {
  15441. @object = Resources.Load("Prefab/" + doguArray[doguIndex[doguSelectIndex]]);
  15442. if (@object != null)
  15443. {
  15444. break;
  15445. }
  15446. (list2 = doguIndex)[index = doguSelectIndex] = list2[index] + 1;
  15447. }
  15448. doguObject.Add(Instantiate(@object) as GameObject);
  15449. }
  15450. else
  15451. {
  15452. Material material = new Material(Shader.Find("Mirror"));
  15453. GameObject gameObject7 = GameObject.CreatePrimitive(PrimitiveType.Plane);
  15454. gameObject7.transform.localScale = new Vector3(0.3f, 1f, 0.3f);
  15455. gameObject7.GetComponent<Renderer>().material = material;
  15456. gameObject7.AddComponent<MirrorReflection2>();
  15457. MirrorReflection2 component5 = gameObject7.GetComponent<MirrorReflection2>();
  15458. component5.m_TextureSize = 2048;
  15459. component5.m_ClipPlaneOffset = 0f;
  15460. gameObject7.GetComponent<Renderer>().enabled = true;
  15461. doguObject.Add(gameObject7);
  15462. }
  15463. Vector3 vector = Vector3.zero;
  15464. Vector3 zero3 = Vector3.zero;
  15465. zero3.x = -90f;
  15466. switch (doguIndex[doguSelectIndex])
  15467. {
  15468. case 1:
  15469. vector.z = -0.5f;
  15470. goto IL_34D66;
  15471. case 2:
  15472. vector.z = -0.5f;
  15473. goto IL_34D66;
  15474. case 3:
  15475. vector.z = 0.5f;
  15476. zero3.z = 90f;
  15477. goto IL_34D66;
  15478. case 4:
  15479. vector.z = 0.9f;
  15480. goto IL_34D66;
  15481. case 5:
  15482. vector.z = 0.9f;
  15483. goto IL_34D66;
  15484. case 6:
  15485. vector.z = 0.6f;
  15486. zero3.x = 0f;
  15487. doguObject[doguSelectIndex].transform.localScale = new Vector3(4.5f, 4.5f, 4.5f);
  15488. goto IL_34D66;
  15489. case 7:
  15490. vector.z = 0.6f;
  15491. doguObject[doguSelectIndex].transform.localScale = new Vector3(3.5f, 3.5f, 3.5f);
  15492. goto IL_34D66;
  15493. case 8:
  15494. vector.z = 0.5f;
  15495. zero3.x = 0f;
  15496. goto IL_34D66;
  15497. case 9:
  15498. vector.z = 0.32f;
  15499. zero3.z = 180f;
  15500. goto IL_34D66;
  15501. case 10:
  15502. vector.z = 0.6f;
  15503. goto IL_34D66;
  15504. case 11:
  15505. vector.z = 0.6f;
  15506. goto IL_34D66;
  15507. case 12:
  15508. vector.z = 0.5f;
  15509. zero3.z = 180f;
  15510. goto IL_34D66;
  15511. case 13:
  15512. vector.z = 0.7f;
  15513. zero3.z = 180f;
  15514. goto IL_34D66;
  15515. case 14:
  15516. vector.z = -0.4f;
  15517. goto IL_34D66;
  15518. case 15:
  15519. vector.z = -0.4f;
  15520. goto IL_34D66;
  15521. case 16:
  15522. vector.z = -0.4f;
  15523. zero3.z = 180f;
  15524. goto IL_34D66;
  15525. case 17:
  15526. vector.z = -0.4f;
  15527. goto IL_34D66;
  15528. case 18:
  15529. vector.z = -0.2f;
  15530. goto IL_34D66;
  15531. case 19:
  15532. vector.z = 0f;
  15533. goto IL_34D66;
  15534. case 20:
  15535. vector.z = 3.4f;
  15536. vector.x = -1f;
  15537. goto IL_34D66;
  15538. case 21:
  15539. vector.z = 3.4f;
  15540. vector.x = -1f;
  15541. goto IL_34D66;
  15542. case 22:
  15543. vector.z = 3.4f;
  15544. vector.y = 0.3f;
  15545. vector.x = -1f;
  15546. goto IL_34D66;
  15547. case 23:
  15548. vector.z = 2.7f;
  15549. vector.x = 0.77f;
  15550. zero3.z = 90f;
  15551. goto IL_34D66;
  15552. case 25:
  15553. vector.z = 0.5f;
  15554. vector.y = 0.9f;
  15555. zero3.z = 180f;
  15556. goto IL_34D66;
  15557. case 26:
  15558. vector.z = 0.5f;
  15559. vector.y = 0.9f;
  15560. zero3.z = 180f;
  15561. goto IL_34D66;
  15562. case 29:
  15563. vector.z = 0.5f;
  15564. vector.x = -1.05f;
  15565. goto IL_34D66;
  15566. case 30:
  15567. vector.z = -2.8f;
  15568. zero3.z = 0f;
  15569. zero3.x = 0f;
  15570. doguObject[doguSelectIndex].transform.localScale = new Vector3(0.75f, 0.75f, 0.75f);
  15571. goto IL_34D66;
  15572. case 31:
  15573. vector.z = -0.6f;
  15574. vector.y = 0.96f;
  15575. zero3.z = 180f;
  15576. doguObject[doguSelectIndex].transform.localScale = new Vector3(0.2f, 0.4f, 0.2f);
  15577. goto IL_34D66;
  15578. case 32:
  15579. vector.z = -0.6f;
  15580. vector.y = 0.96f;
  15581. zero3.z = 180f;
  15582. doguObject[doguSelectIndex].transform.localScale = new Vector3(0.1f, 0.4f, 0.2f);
  15583. goto IL_34D66;
  15584. case 33:
  15585. vector.z = -0.6f;
  15586. vector.y = 0.85f;
  15587. zero3.z = 180f;
  15588. doguObject[doguSelectIndex].transform.localScale = new Vector3(0.03f, 0.18f, 0.124f);
  15589. goto IL_34D66;
  15590. }
  15591. vector.z = 0.5f;
  15592. IL_34D66:;
  15593. }
  15594. if (doguIndex[doguSelectIndex] == 0)
  15595. {
  15596. doguIndex.RemoveAt(doguSelectIndex);
  15597. }
  15598. }
  15599. }
  15600. }
  15601. if (!isVR)
  15602. {
  15603. int i;
  15604. for (i = 0; i < 999; i++)
  15605. {
  15606. if (gDogu[i] != null)
  15607. {
  15608. gDogu[i].GetComponent<Renderer>().enabled = false;
  15609. gDogu[i].SetActive(false);
  15610. if (mDogu[i].del)
  15611. {
  15612. mDogu[i].del = false;
  15613. Destroy(doguBObject[i]);
  15614. doguBObject.RemoveAt(i);
  15615. }
  15616. else if (mDogu[i].count > 0)
  15617. {
  15618. mDogu[i].count--;
  15619. if (doguBObject.Count > i && doguBObject[i] != null && doguBObject[i].name.StartsWith("Particle/p"))
  15620. {
  15621. if (mDogu[i].count == 1)
  15622. {
  15623. doguBObject[i].SetActive(false);
  15624. }
  15625. if (mDogu[i].count == 0)
  15626. {
  15627. doguBObject[i].SetActive(true);
  15628. string name = doguBObject[i].name;
  15629. if (name != null)
  15630. {
  15631. if (!(name == "Particle/pLineY"))
  15632. {
  15633. if (!(name == "Particle/pLineP02"))
  15634. {
  15635. if (!(name == "Particle/pLine_act2"))
  15636. {
  15637. if (name == "Particle/pHeart01")
  15638. {
  15639. mDogu[i].count = 77;
  15640. }
  15641. }
  15642. else
  15643. {
  15644. mDogu[i].count = 90;
  15645. }
  15646. }
  15647. else
  15648. {
  15649. mDogu[i].count = 115;
  15650. }
  15651. }
  15652. else
  15653. {
  15654. mDogu[i].count = 180;
  15655. }
  15656. }
  15657. }
  15658. }
  15659. }
  15660. }
  15661. }
  15662. if (Input.GetKey(KeyCode.Z) && getModKeyPressing(modKey.Shift))
  15663. {
  15664. ikMode2 = 11;
  15665. }
  15666. else if (Input.GetKey(KeyCode.Z) && getModKeyPressing(modKey.Ctrl))
  15667. {
  15668. ikMode2 = 12;
  15669. }
  15670. else if (Input.GetKey(KeyCode.X) && getModKeyPressing(modKey.Shift))
  15671. {
  15672. ikMode2 = 14;
  15673. }
  15674. else if (Input.GetKey(KeyCode.X))
  15675. {
  15676. ikMode2 = 9;
  15677. }
  15678. else if (Input.GetKey(KeyCode.Z))
  15679. {
  15680. ikMode2 = 10;
  15681. }
  15682. else if (Input.GetKey(KeyCode.C))
  15683. {
  15684. ikMode2 = 13;
  15685. }
  15686. else if (Input.GetKey(KeyCode.D))
  15687. {
  15688. ikMode2 = 15;
  15689. }
  15690. else
  15691. {
  15692. ikMode2 = 0;
  15693. }
  15694. if (gBg != null)
  15695. {
  15696. if (!isCube3)
  15697. {
  15698. gBg.GetComponent<Renderer>().enabled = false;
  15699. gBg.SetActive(false);
  15700. }
  15701. else
  15702. {
  15703. if (ikMode2 > 0 && ikMode2 != 15)
  15704. {
  15705. gBg.GetComponent<Renderer>().enabled = true;
  15706. gBg.SetActive(true);
  15707. }
  15708. else
  15709. {
  15710. gBg.GetComponent<Renderer>().enabled = false;
  15711. gBg.SetActive(false);
  15712. }
  15713. if (ikMode2 == 10 || ikMode2 == 11 || ikMode2 == 12)
  15714. {
  15715. gBg.GetComponent<Renderer>().material.color = new Color(0.4f, 0.4f, 1f, 0.5f);
  15716. }
  15717. if (ikMode2 == 9 || ikMode2 == 14)
  15718. {
  15719. gBg.GetComponent<Renderer>().material.color = new Color(0.3f, 0.7f, 0.3f, 0.5f);
  15720. mBg.Update();
  15721. }
  15722. if (ikMode2 == 13)
  15723. {
  15724. gBg.GetComponent<Renderer>().material.color = new Color(0.7f, 0.7f, 0.3f, 0.5f);
  15725. mBg.Update();
  15726. }
  15727. if (ikMode2 == 13)
  15728. {
  15729. if ((ikModeOld2 == 0 || ikModeOld2 >= 9) && ikModeOld2 != 13 && gBg)
  15730. {
  15731. mBg.ido = 5;
  15732. mBg.reset = true;
  15733. }
  15734. else
  15735. {
  15736. gBg.transform.position = bg.position;
  15737. gBg.transform.eulerAngles = bg.eulerAngles;
  15738. mBg.maid = bgObject;
  15739. mBg.ido = 5;
  15740. }
  15741. }
  15742. else if (ikMode2 == 11)
  15743. {
  15744. if ((ikModeOld2 == 0 || ikModeOld2 >= 9) && ikModeOld2 != 11 && gBg)
  15745. {
  15746. mBg.ido = 3;
  15747. mBg.reset = true;
  15748. }
  15749. else
  15750. {
  15751. gBg.transform.position = bg.position;
  15752. gBg.transform.eulerAngles = bg.eulerAngles;
  15753. mBg.maid = bgObject;
  15754. mBg.ido = 3;
  15755. }
  15756. }
  15757. else if (ikMode2 == 12)
  15758. {
  15759. if ((ikModeOld2 == 0 || ikModeOld2 >= 9) && ikModeOld2 != 12 && gBg)
  15760. {
  15761. mBg.ido = 2;
  15762. mBg.reset = true;
  15763. }
  15764. else
  15765. {
  15766. gBg.transform.position = bg.position;
  15767. gBg.transform.eulerAngles = bg.eulerAngles;
  15768. mBg.maid = bgObject;
  15769. mBg.ido = 2;
  15770. }
  15771. }
  15772. else if (ikMode2 == 10)
  15773. {
  15774. if ((ikModeOld2 == 0 || ikModeOld2 >= 9) && ikModeOld2 != 10 && gBg)
  15775. {
  15776. mBg.ido = 1;
  15777. mBg.reset = true;
  15778. }
  15779. else
  15780. {
  15781. gBg.transform.position = bg.position;
  15782. gBg.transform.eulerAngles = bg.eulerAngles;
  15783. mBg.maid = bgObject;
  15784. mBg.ido = 1;
  15785. }
  15786. }
  15787. else if (ikMode2 == 9)
  15788. {
  15789. if ((ikModeOld2 == 0 || ikModeOld2 >= 9) && ikModeOld2 != 9 && gBg)
  15790. {
  15791. mBg.ido = 4;
  15792. mBg.reset = true;
  15793. }
  15794. else
  15795. {
  15796. gBg.transform.position = bg.position;
  15797. gBg.transform.eulerAngles = bg.eulerAngles;
  15798. mBg.maid = bgObject;
  15799. mBg.ido = 4;
  15800. }
  15801. }
  15802. else if (ikMode2 == 14)
  15803. {
  15804. if ((ikModeOld2 == 0 || ikModeOld2 >= 9) && ikModeOld2 != 14 && gBg)
  15805. {
  15806. mBg.ido = 6;
  15807. mBg.reset = true;
  15808. }
  15809. else
  15810. {
  15811. gBg.transform.position = bg.position;
  15812. gBg.transform.eulerAngles = bg.eulerAngles;
  15813. mBg.maid = bgObject;
  15814. mBg.ido = 6;
  15815. }
  15816. }
  15817. }
  15818. }
  15819. for (i = 0; i < lightIndex.Count; i++)
  15820. {
  15821. if (gLight[0] == null)
  15822. {
  15823. gLight[0] = GameObject.CreatePrimitive(PrimitiveType.Cube);
  15824. Material material2 = new Material(Shader.Find("Transparent/Diffuse"))
  15825. {
  15826. color = new Color(0.5f, 0.5f, 1f, 0.8f)
  15827. };
  15828. gLight[0].GetComponent<Renderer>().material = material2;
  15829. gLight[0].layer = 8;
  15830. gLight[0].GetComponent<Renderer>().enabled = false;
  15831. gLight[0].SetActive(false);
  15832. gLight[0].transform.position = GameMain.Instance.MainLight.transform.position;
  15833. mLight[0] = gLight[0].AddComponent<MouseDrag6>();
  15834. mLight[0].obj = gLight[0];
  15835. mLight[0].maid = GameMain.Instance.MainLight.gameObject;
  15836. mLight[0].angles = GameMain.Instance.MainLight.gameObject.transform.eulerAngles;
  15837. gLight[0].transform.localScale = new Vector3(0.12f, 0.12f, 0.12f);
  15838. mLight[0].ido = 1;
  15839. mLight[0].isScale = false;
  15840. }
  15841. if (gLight[i] != null)
  15842. {
  15843. if (!isCube4)
  15844. {
  15845. gLight[i].GetComponent<Renderer>().enabled = false;
  15846. gLight[i].SetActive(false);
  15847. }
  15848. else if (lightList[i].GetComponent<Light>().type == LightType.Spot
  15849. || lightList[i].GetComponent<Light>().type == LightType.Point)
  15850. {
  15851. if (ikMode2 > 0 && ikMode2 != 15)
  15852. {
  15853. gLight[i].GetComponent<Renderer>().enabled = true;
  15854. gLight[i].SetActive(true);
  15855. }
  15856. else
  15857. {
  15858. gLight[i].GetComponent<Renderer>().enabled = false;
  15859. gLight[i].SetActive(false);
  15860. mLight[i].isAlt = false;
  15861. }
  15862. if (ikMode2 == 10 || ikMode2 == 11 || ikMode2 == 12)
  15863. {
  15864. gLight[i].GetComponent<Renderer>().material.color = new Color(0.4f, 0.4f, 1f, 0.5f);
  15865. if (mLight[i].isAlt)
  15866. {
  15867. gLight[i].GetComponent<Renderer>().material.color = new Color(0.6f, 0.6f, 1f, 0.5f);
  15868. }
  15869. }
  15870. if (ikMode2 == 9 || ikMode2 == 14)
  15871. {
  15872. gLight[i].GetComponent<Renderer>().material.color = new Color(0.3f, 0.7f, 0.3f, 0.5f);
  15873. mLight[i].Update();
  15874. }
  15875. if (ikMode2 == 13)
  15876. {
  15877. gLight[i].GetComponent<Renderer>().material.color = new Color(0.7f, 0.7f, 0.3f, 0.5f);
  15878. mLight[i].Update();
  15879. }
  15880. if (ikMode2 == 13)
  15881. {
  15882. if ((ikModeOld2 == 0 || ikModeOld2 >= 9) && ikModeOld2 != 13 && gLight[i])
  15883. {
  15884. mLight[i].ido = 15;
  15885. mLight[i].reset = true;
  15886. }
  15887. else
  15888. {
  15889. if (lightList[i].transform.localScale.x == 1f)
  15890. {
  15891. lightList[i].transform.localScale = new Vector3(lightRange[i], lightRange[i], lightRange[i]);
  15892. }
  15893. lightRange[i] = lightList[i].transform.localScale.x;
  15894. gLight[i].transform.position = lightList[i].transform.position;
  15895. gLight[i].transform.eulerAngles = lightList[i].transform.eulerAngles;
  15896. mLight[i].maid = lightList[i];
  15897. mLight[i].ido = 15;
  15898. }
  15899. }
  15900. else if (ikMode2 == 11)
  15901. {
  15902. if ((ikModeOld2 == 0 || ikModeOld2 >= 9) && ikModeOld2 != 11 && gLight[i])
  15903. {
  15904. mLight[i].ido = 3;
  15905. mLight[i].reset = true;
  15906. }
  15907. else
  15908. {
  15909. gLight[i].transform.position = lightList[i].transform.position;
  15910. gLight[i].transform.eulerAngles = lightList[i].transform.eulerAngles;
  15911. lightX[i] = gLight[i].transform.eulerAngles.x;
  15912. lightY[i] = gLight[i].transform.eulerAngles.y;
  15913. mLight[i].maid = lightList[i];
  15914. mLight[i].ido = 3;
  15915. }
  15916. }
  15917. else if (ikMode2 == 12)
  15918. {
  15919. if ((ikModeOld2 == 0 || ikModeOld2 >= 9) && ikModeOld2 != 12 && gLight[i])
  15920. {
  15921. mLight[i].ido = 2;
  15922. mLight[i].reset = true;
  15923. }
  15924. else
  15925. {
  15926. gLight[i].transform.position = lightList[i].transform.position;
  15927. gLight[i].transform.eulerAngles = lightList[i].transform.eulerAngles;
  15928. mLight[i].maid = lightList[i];
  15929. mLight[i].ido = 2;
  15930. }
  15931. }
  15932. else if (ikMode2 == 10)
  15933. {
  15934. if ((ikModeOld2 == 0 || ikModeOld2 >= 9) && ikModeOld2 != 10 && gLight[i])
  15935. {
  15936. mLight[i].ido = 1;
  15937. mLight[i].reset = true;
  15938. }
  15939. else
  15940. {
  15941. gLight[i].transform.position = lightList[i].transform.position;
  15942. gLight[i].transform.eulerAngles = lightList[i].transform.eulerAngles;
  15943. mLight[i].maid = lightList[i];
  15944. mLight[i].maidArray = lightList.ToArray();
  15945. mLight[i].mArray = mLight.ToArray();
  15946. mLight[i].ido = 1;
  15947. }
  15948. }
  15949. else if (ikMode2 == 9)
  15950. {
  15951. if ((ikModeOld2 == 0 || ikModeOld2 >= 9) && ikModeOld2 != 9 && gLight[i])
  15952. {
  15953. mLight[i].ido = 4;
  15954. mLight[i].reset = true;
  15955. }
  15956. else
  15957. {
  15958. gLight[i].transform.position = lightList[i].transform.position;
  15959. gLight[i].transform.eulerAngles = lightList[i].transform.eulerAngles;
  15960. lightX[i] = gLight[i].transform.eulerAngles.x;
  15961. lightY[i] = gLight[i].transform.eulerAngles.y;
  15962. mLight[i].maid = lightList[i];
  15963. mLight[i].ido = 4;
  15964. }
  15965. }
  15966. else if (ikMode2 == 14)
  15967. {
  15968. if ((ikModeOld2 == 0 || ikModeOld2 >= 9) && ikModeOld2 != 14 && gLight[i])
  15969. {
  15970. mLight[i].ido = 6;
  15971. mLight[i].reset = true;
  15972. }
  15973. else
  15974. {
  15975. gLight[i].transform.position = lightList[i].transform.position;
  15976. gLight[i].transform.eulerAngles = lightList[i].transform.eulerAngles;
  15977. lightX[i] = gLight[i].transform.eulerAngles.x;
  15978. lightY[i] = gLight[i].transform.eulerAngles.y;
  15979. mLight[i].maid = lightList[i];
  15980. mLight[i].ido = 6;
  15981. }
  15982. }
  15983. }
  15984. }
  15985. }
  15986. for (i = 0; i < doguBObject.Count; i++)
  15987. {
  15988. if (!isCube2)
  15989. {
  15990. gDogu[i].GetComponent<Renderer>().enabled = false;
  15991. gDogu[i].SetActive(false);
  15992. }
  15993. else
  15994. {
  15995. if (ikMode2 > 0)
  15996. {
  15997. gDogu[i].GetComponent<Renderer>().enabled = true;
  15998. gDogu[i].SetActive(true);
  15999. }
  16000. else
  16001. {
  16002. gDogu[i].GetComponent<Renderer>().enabled = false;
  16003. gDogu[i].SetActive(false);
  16004. mDogu[i].isAlt = false;
  16005. }
  16006. if (ikMode2 == 10 || ikMode2 == 11 || ikMode2 == 12)
  16007. {
  16008. gDogu[i].GetComponent<Renderer>().material.color = new Color(0.4f, 0.4f, 1f, 0.5f);
  16009. if (mDogu[i].isAlt)
  16010. {
  16011. gDogu[i].GetComponent<Renderer>().material.color = new Color(0.6f, 0.6f, 1f, 0.5f);
  16012. }
  16013. }
  16014. if (ikMode2 == 9 || ikMode2 == 14)
  16015. {
  16016. gDogu[i].GetComponent<Renderer>().material.color = new Color(0.3f, 0.7f, 0.3f, 0.5f);
  16017. mDogu[i].Update();
  16018. }
  16019. if (ikMode2 == 15)
  16020. {
  16021. gDogu[i].GetComponent<Renderer>().material.color = new Color(1f, 0.3f, 0.3f, 0.5f);
  16022. }
  16023. if (ikMode2 == 13)
  16024. {
  16025. gDogu[i].GetComponent<Renderer>().material.color = new Color(0.7f, 0.7f, 0.3f, 0.5f);
  16026. mDogu[i].Update();
  16027. }
  16028. if (ikMode2 == 13)
  16029. {
  16030. if ((ikModeOld2 == 0 || ikModeOld2 >= 9) && ikModeOld2 != 13 && gDogu[i])
  16031. {
  16032. mDogu[i].ido = 5;
  16033. mDogu[i].reset = true;
  16034. }
  16035. else
  16036. {
  16037. gDogu[i].transform.position = doguBObject[i].transform.position;
  16038. gDogu[i].transform.eulerAngles = doguBObject[i].transform.eulerAngles;
  16039. mDogu[i].maid = doguBObject[i];
  16040. mDogu[i].ido = 5;
  16041. }
  16042. }
  16043. else if (ikMode2 == 11)
  16044. {
  16045. if ((ikModeOld2 == 0 || ikModeOld2 >= 9) && ikModeOld2 != 11 && gDogu[i])
  16046. {
  16047. mDogu[i].ido = 3;
  16048. mDogu[i].reset = true;
  16049. }
  16050. else
  16051. {
  16052. gDogu[i].transform.position = doguBObject[i].transform.position;
  16053. gDogu[i].transform.eulerAngles = doguBObject[i].transform.eulerAngles;
  16054. mDogu[i].maid = doguBObject[i];
  16055. mDogu[i].ido = 3;
  16056. }
  16057. }
  16058. else if (ikMode2 == 12)
  16059. {
  16060. if ((ikModeOld2 == 0 || ikModeOld2 >= 9) && ikModeOld2 != 12 && gDogu[i])
  16061. {
  16062. mDogu[i].ido = 2;
  16063. mDogu[i].reset = true;
  16064. }
  16065. else
  16066. {
  16067. gDogu[i].transform.position = doguBObject[i].transform.position;
  16068. gDogu[i].transform.eulerAngles = doguBObject[i].transform.eulerAngles;
  16069. mDogu[i].maid = doguBObject[i];
  16070. mDogu[i].ido = 2;
  16071. }
  16072. }
  16073. else if (ikMode2 == 10)
  16074. {
  16075. if ((ikModeOld2 == 0 || ikModeOld2 >= 9) && ikModeOld2 != 10 && gDogu[i])
  16076. {
  16077. mDogu[i].ido = 1;
  16078. mDogu[i].reset = true;
  16079. }
  16080. else
  16081. {
  16082. gDogu[i].transform.position = doguBObject[i].transform.position;
  16083. gDogu[i].transform.eulerAngles = doguBObject[i].transform.eulerAngles;
  16084. mDogu[i].maid = doguBObject[i];
  16085. mDogu[i].maidArray = doguBObject.ToArray();
  16086. mDogu[i].mArray = mDogu.ToArray();
  16087. mDogu[i].ido = 1;
  16088. }
  16089. }
  16090. else if (ikMode2 == 9)
  16091. {
  16092. if ((ikModeOld2 == 0 || ikModeOld2 >= 9) && ikModeOld2 != 9 && gDogu[i])
  16093. {
  16094. mDogu[i].ido = 4;
  16095. mDogu[i].reset = true;
  16096. }
  16097. else
  16098. {
  16099. gDogu[i].transform.position = doguBObject[i].transform.position;
  16100. gDogu[i].transform.eulerAngles = doguBObject[i].transform.eulerAngles;
  16101. mDogu[i].maid = doguBObject[i];
  16102. mDogu[i].ido = 4;
  16103. }
  16104. }
  16105. else if (ikMode2 == 14)
  16106. {
  16107. if ((ikModeOld2 == 0 || ikModeOld2 >= 9) && ikModeOld2 != 14 && gDogu[i])
  16108. {
  16109. mDogu[i].ido = 6;
  16110. mDogu[i].reset = true;
  16111. }
  16112. else
  16113. {
  16114. gDogu[i].transform.position = doguBObject[i].transform.position;
  16115. gDogu[i].transform.eulerAngles = doguBObject[i].transform.eulerAngles;
  16116. mDogu[i].maid = doguBObject[i];
  16117. mDogu[i].ido = 6;
  16118. }
  16119. }
  16120. else if (ikMode2 == 15)
  16121. {
  16122. if ((ikModeOld2 == 0 || ikModeOld2 >= 9) && ikModeOld2 != 15 && gDogu[i])
  16123. {
  16124. mDogu[i].ido = 7;
  16125. mDogu[i].reset = true;
  16126. }
  16127. else
  16128. {
  16129. gDogu[i].transform.position = doguBObject[i].transform.position;
  16130. gDogu[i].transform.eulerAngles = doguBObject[i].transform.eulerAngles;
  16131. mDogu[i].maid = doguBObject[i];
  16132. mDogu[i].ido = 7;
  16133. }
  16134. }
  16135. }
  16136. }
  16137. ikModeOld2 = ikMode2;
  16138. }
  16139. if (isVR)
  16140. {
  16141. if (Input.GetKeyDown(KeyCode.F8) && getModKeyPressing(modKey.Shift))
  16142. {
  16143. if (!isVR2)
  16144. {
  16145. isVR2 = true;
  16146. Preferences["config"]["shift_f8"].Value = "true";
  16147. SaveConfig();
  16148. GameMain.Instance.SoundMgr.PlaySe("se002.ogg", false);
  16149. }
  16150. else
  16151. {
  16152. isVR2 = false;
  16153. Preferences["config"]["shift_f8"].Value = "false";
  16154. SaveConfig();
  16155. GameMain.Instance.SoundMgr.PlaySe("se003.ogg", false);
  16156. }
  16157. }
  16158. if (Input.GetKey(KeyCode.F8) && Input.GetKeyDown(KeyCode.Alpha1))
  16159. {
  16160. loadScene = 1;
  16161. GameMain.Instance.SoundMgr.PlaySe("se002.ogg", false);
  16162. }
  16163. if (Input.GetKey(KeyCode.F8) && Input.GetKeyDown(KeyCode.Alpha2))
  16164. {
  16165. loadScene = 2;
  16166. GameMain.Instance.SoundMgr.PlaySe("se002.ogg", false);
  16167. }
  16168. if (Input.GetKey(KeyCode.F8) && Input.GetKeyDown(KeyCode.Alpha3))
  16169. {
  16170. loadScene = 3;
  16171. GameMain.Instance.SoundMgr.PlaySe("se002.ogg", false);
  16172. }
  16173. if (Input.GetKey(KeyCode.F8) && Input.GetKeyDown(KeyCode.Alpha4))
  16174. {
  16175. loadScene = 4;
  16176. GameMain.Instance.SoundMgr.PlaySe("se002.ogg", false);
  16177. }
  16178. if (Input.GetKey(KeyCode.F8) && Input.GetKeyDown(KeyCode.Alpha5))
  16179. {
  16180. loadScene = 5;
  16181. GameMain.Instance.SoundMgr.PlaySe("se002.ogg", false);
  16182. }
  16183. if (Input.GetKey(KeyCode.F8) && Input.GetKeyDown(KeyCode.Alpha6))
  16184. {
  16185. loadScene = 6;
  16186. GameMain.Instance.SoundMgr.PlaySe("se002.ogg", false);
  16187. }
  16188. if (Input.GetKey(KeyCode.F8) && Input.GetKeyDown(KeyCode.Alpha7))
  16189. {
  16190. loadScene = 7;
  16191. GameMain.Instance.SoundMgr.PlaySe("se002.ogg", false);
  16192. }
  16193. if (Input.GetKey(KeyCode.F8) && Input.GetKeyDown(KeyCode.Alpha8))
  16194. {
  16195. loadScene = 8;
  16196. GameMain.Instance.SoundMgr.PlaySe("se002.ogg", false);
  16197. }
  16198. if (Input.GetKey(KeyCode.F8) && Input.GetKeyDown(KeyCode.Alpha9))
  16199. {
  16200. loadScene = 9;
  16201. GameMain.Instance.SoundMgr.PlaySe("se002.ogg", false);
  16202. }
  16203. if (Input.GetKey(KeyCode.F8) && Input.GetKeyDown(KeyCode.Alpha0))
  16204. {
  16205. loadScene = 10;
  16206. GameMain.Instance.SoundMgr.PlaySe("se002.ogg", false);
  16207. }
  16208. for (int j = 0; j < 7; j++)
  16209. {
  16210. if (!maidArray[j])
  16211. {
  16212. maidArray[j] = GameMain.Instance.CharacterMgr.GetMaid(j);
  16213. }
  16214. }
  16215. }
  16216. }
  16217. }
  16218. }
  16219. }