BaseKagManager.cs 163 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329330331332333334335336337338339340341342343344345346347348349350351352353354355356357358359360361362363364365366367368369370371372373374375376377378379380381382383384385386387388389390391392393394395396397398399400401402403404405406407408409410411412413414415416417418419420421422423424425426427428429430431432433434435436437438439440441442443444445446447448449450451452453454455456457458459460461462463464465466467468469470471472473474475476477478479480481482483484485486487488489490491492493494495496497498499500501502503504505506507508509510511512513514515516517518519520521522523524525526527528529530531532533534535536537538539540541542543544545546547548549550551552553554555556557558559560561562563564565566567568569570571572573574575576577578579580581582583584585586587588589590591592593594595596597598599600601602603604605606607608609610611612613614615616617618619620621622623624625626627628629630631632633634635636637638639640641642643644645646647648649650651652653654655656657658659660661662663664665666667668669670671672673674675676677678679680681682683684685686687688689690691692693694695696697698699700701702703704705706707708709710711712713714715716717718719720721722723724725726727728729730731732733734735736737738739740741742743744745746747748749750751752753754755756757758759760761762763764765766767768769770771772773774775776777778779780781782783784785786787788789790791792793794795796797798799800801802803804805806807808809810811812813814815816817818819820821822823824825826827828829830831832833834835836837838839840841842843844845846847848849850851852853854855856857858859860861862863864865866867868869870871872873874875876877878879880881882883884885886887888889890891892893894895896897898899900901902903904905906907908909910911912913914915916917918919920921922923924925926927928929930931932933934935936937938939940941942943944945946947948949950951952953954955956957958959960961962963964965966967968969970971972973974975976977978979980981982983984985986987988989990991992993994995996997998999100010011002100310041005100610071008100910101011101210131014101510161017101810191020102110221023102410251026102710281029103010311032103310341035103610371038103910401041104210431044104510461047104810491050105110521053105410551056105710581059106010611062106310641065106610671068106910701071107210731074107510761077107810791080108110821083108410851086108710881089109010911092109310941095109610971098109911001101110211031104110511061107110811091110111111121113111411151116111711181119112011211122112311241125112611271128112911301131113211331134113511361137113811391140114111421143114411451146114711481149115011511152115311541155115611571158115911601161116211631164116511661167116811691170117111721173117411751176117711781179118011811182118311841185118611871188118911901191119211931194119511961197119811991200120112021203120412051206120712081209121012111212121312141215121612171218121912201221122212231224122512261227122812291230123112321233123412351236123712381239124012411242124312441245124612471248124912501251125212531254125512561257125812591260126112621263126412651266126712681269127012711272127312741275127612771278127912801281128212831284128512861287128812891290129112921293129412951296129712981299130013011302130313041305130613071308130913101311131213131314131513161317131813191320132113221323132413251326132713281329133013311332133313341335133613371338133913401341134213431344134513461347134813491350135113521353135413551356135713581359136013611362136313641365136613671368136913701371137213731374137513761377137813791380138113821383138413851386138713881389139013911392139313941395139613971398139914001401140214031404140514061407140814091410141114121413141414151416141714181419142014211422142314241425142614271428142914301431143214331434143514361437143814391440144114421443144414451446144714481449145014511452145314541455145614571458145914601461146214631464146514661467146814691470147114721473147414751476147714781479148014811482148314841485148614871488148914901491149214931494149514961497149814991500150115021503150415051506150715081509151015111512151315141515151615171518151915201521152215231524152515261527152815291530153115321533153415351536153715381539154015411542154315441545154615471548154915501551155215531554155515561557155815591560156115621563156415651566156715681569157015711572157315741575157615771578157915801581158215831584158515861587158815891590159115921593159415951596159715981599160016011602160316041605160616071608160916101611161216131614161516161617161816191620162116221623162416251626162716281629163016311632163316341635163616371638163916401641164216431644164516461647164816491650165116521653165416551656165716581659166016611662166316641665166616671668166916701671167216731674167516761677167816791680168116821683168416851686168716881689169016911692169316941695169616971698169917001701170217031704170517061707170817091710171117121713171417151716171717181719172017211722172317241725172617271728172917301731173217331734173517361737173817391740174117421743174417451746174717481749175017511752175317541755175617571758175917601761176217631764176517661767176817691770177117721773177417751776177717781779178017811782178317841785178617871788178917901791179217931794179517961797179817991800180118021803180418051806180718081809181018111812181318141815181618171818181918201821182218231824182518261827182818291830183118321833183418351836183718381839184018411842184318441845184618471848184918501851185218531854185518561857185818591860186118621863186418651866186718681869187018711872187318741875187618771878187918801881188218831884188518861887188818891890189118921893189418951896189718981899190019011902190319041905190619071908190919101911191219131914191519161917191819191920192119221923192419251926192719281929193019311932193319341935193619371938193919401941194219431944194519461947194819491950195119521953195419551956195719581959196019611962196319641965196619671968196919701971197219731974197519761977197819791980198119821983198419851986198719881989199019911992199319941995199619971998199920002001200220032004200520062007200820092010201120122013201420152016201720182019202020212022202320242025202620272028202920302031203220332034203520362037203820392040204120422043204420452046204720482049205020512052205320542055205620572058205920602061206220632064206520662067206820692070207120722073207420752076207720782079208020812082208320842085208620872088208920902091209220932094209520962097209820992100210121022103210421052106210721082109211021112112211321142115211621172118211921202121212221232124212521262127212821292130213121322133213421352136213721382139214021412142214321442145214621472148214921502151215221532154215521562157215821592160216121622163216421652166216721682169217021712172217321742175217621772178217921802181218221832184218521862187218821892190219121922193219421952196219721982199220022012202220322042205220622072208220922102211221222132214221522162217221822192220222122222223222422252226222722282229223022312232223322342235223622372238223922402241224222432244224522462247224822492250225122522253225422552256225722582259226022612262226322642265226622672268226922702271227222732274227522762277227822792280228122822283228422852286228722882289229022912292229322942295229622972298229923002301230223032304230523062307230823092310231123122313231423152316231723182319232023212322232323242325232623272328232923302331233223332334233523362337233823392340234123422343234423452346234723482349235023512352235323542355235623572358235923602361236223632364236523662367236823692370237123722373237423752376237723782379238023812382238323842385238623872388238923902391239223932394239523962397239823992400240124022403240424052406240724082409241024112412241324142415241624172418241924202421242224232424242524262427242824292430243124322433243424352436243724382439244024412442244324442445244624472448244924502451245224532454245524562457245824592460246124622463246424652466246724682469247024712472247324742475247624772478247924802481248224832484248524862487248824892490249124922493249424952496249724982499250025012502250325042505250625072508250925102511251225132514251525162517251825192520252125222523252425252526252725282529253025312532253325342535253625372538253925402541254225432544254525462547254825492550255125522553255425552556255725582559256025612562256325642565256625672568256925702571257225732574257525762577257825792580258125822583258425852586258725882589259025912592259325942595259625972598259926002601260226032604260526062607260826092610261126122613261426152616261726182619262026212622262326242625262626272628262926302631263226332634263526362637263826392640264126422643264426452646264726482649265026512652265326542655265626572658265926602661266226632664266526662667266826692670267126722673267426752676267726782679268026812682268326842685268626872688268926902691269226932694269526962697269826992700270127022703270427052706270727082709271027112712271327142715271627172718271927202721272227232724272527262727272827292730273127322733273427352736273727382739274027412742274327442745274627472748274927502751275227532754275527562757275827592760276127622763276427652766276727682769277027712772277327742775277627772778277927802781278227832784278527862787278827892790279127922793279427952796279727982799280028012802280328042805280628072808280928102811281228132814281528162817281828192820282128222823282428252826282728282829283028312832283328342835283628372838283928402841284228432844284528462847284828492850285128522853285428552856285728582859286028612862286328642865286628672868286928702871287228732874287528762877287828792880288128822883288428852886288728882889289028912892289328942895289628972898289929002901290229032904290529062907290829092910291129122913291429152916291729182919292029212922292329242925292629272928292929302931293229332934293529362937293829392940294129422943294429452946294729482949295029512952295329542955295629572958295929602961296229632964296529662967296829692970297129722973297429752976297729782979298029812982298329842985298629872988298929902991299229932994299529962997299829993000300130023003300430053006300730083009301030113012301330143015301630173018301930203021302230233024302530263027302830293030303130323033303430353036303730383039304030413042304330443045304630473048304930503051305230533054305530563057305830593060306130623063306430653066306730683069307030713072307330743075307630773078307930803081308230833084308530863087308830893090309130923093309430953096309730983099310031013102310331043105310631073108310931103111311231133114311531163117311831193120312131223123312431253126312731283129313031313132313331343135313631373138313931403141314231433144314531463147314831493150315131523153315431553156315731583159316031613162316331643165316631673168316931703171317231733174317531763177317831793180318131823183318431853186318731883189319031913192319331943195319631973198319932003201320232033204320532063207320832093210321132123213321432153216321732183219322032213222322332243225322632273228322932303231323232333234323532363237323832393240324132423243324432453246324732483249325032513252325332543255325632573258325932603261326232633264326532663267326832693270327132723273327432753276327732783279328032813282328332843285328632873288328932903291329232933294329532963297329832993300330133023303330433053306330733083309331033113312331333143315331633173318331933203321332233233324332533263327332833293330333133323333333433353336333733383339334033413342334333443345334633473348334933503351335233533354335533563357335833593360336133623363336433653366336733683369337033713372337333743375337633773378337933803381338233833384338533863387338833893390339133923393339433953396339733983399340034013402340334043405340634073408340934103411341234133414341534163417341834193420342134223423342434253426342734283429343034313432343334343435343634373438343934403441344234433444344534463447344834493450345134523453345434553456345734583459346034613462346334643465346634673468346934703471347234733474347534763477347834793480348134823483348434853486348734883489349034913492349334943495349634973498349935003501350235033504350535063507350835093510351135123513351435153516351735183519352035213522352335243525352635273528352935303531353235333534353535363537353835393540354135423543354435453546354735483549355035513552355335543555355635573558355935603561356235633564356535663567356835693570357135723573357435753576357735783579358035813582358335843585358635873588358935903591359235933594359535963597359835993600360136023603360436053606360736083609361036113612361336143615361636173618361936203621362236233624362536263627362836293630363136323633363436353636363736383639364036413642364336443645364636473648364936503651365236533654365536563657365836593660366136623663366436653666366736683669367036713672367336743675367636773678367936803681368236833684368536863687368836893690369136923693369436953696369736983699370037013702370337043705370637073708370937103711371237133714371537163717371837193720372137223723372437253726372737283729373037313732373337343735373637373738373937403741374237433744374537463747374837493750375137523753375437553756375737583759376037613762376337643765376637673768376937703771377237733774377537763777377837793780378137823783378437853786378737883789379037913792379337943795379637973798379938003801380238033804380538063807380838093810381138123813381438153816381738183819382038213822382338243825382638273828382938303831383238333834383538363837383838393840384138423843384438453846384738483849385038513852385338543855385638573858385938603861386238633864386538663867386838693870387138723873387438753876387738783879388038813882388338843885388638873888388938903891389238933894389538963897389838993900390139023903390439053906390739083909391039113912391339143915391639173918391939203921392239233924392539263927392839293930393139323933393439353936393739383939394039413942394339443945394639473948394939503951395239533954395539563957395839593960396139623963396439653966396739683969397039713972397339743975397639773978397939803981398239833984398539863987398839893990399139923993399439953996399739983999400040014002400340044005400640074008400940104011401240134014401540164017401840194020402140224023402440254026402740284029403040314032403340344035403640374038403940404041404240434044404540464047404840494050405140524053405440554056405740584059406040614062406340644065406640674068406940704071407240734074407540764077407840794080408140824083408440854086408740884089409040914092409340944095409640974098409941004101410241034104410541064107410841094110411141124113411441154116411741184119412041214122412341244125412641274128412941304131413241334134413541364137413841394140414141424143414441454146414741484149415041514152415341544155415641574158415941604161416241634164416541664167416841694170417141724173417441754176417741784179418041814182418341844185418641874188418941904191419241934194419541964197419841994200420142024203420442054206420742084209421042114212421342144215421642174218421942204221422242234224422542264227422842294230423142324233423442354236423742384239424042414242424342444245424642474248424942504251425242534254425542564257425842594260426142624263426442654266426742684269427042714272427342744275427642774278427942804281428242834284428542864287428842894290429142924293429442954296429742984299430043014302430343044305430643074308430943104311431243134314431543164317431843194320432143224323432443254326432743284329433043314332433343344335433643374338433943404341434243434344434543464347434843494350435143524353435443554356435743584359436043614362436343644365436643674368436943704371437243734374437543764377437843794380438143824383438443854386438743884389439043914392439343944395439643974398439944004401440244034404440544064407440844094410441144124413441444154416441744184419442044214422442344244425442644274428442944304431443244334434443544364437443844394440444144424443444444454446444744484449445044514452445344544455445644574458445944604461446244634464446544664467446844694470447144724473447444754476447744784479448044814482448344844485448644874488448944904491449244934494449544964497449844994500450145024503450445054506450745084509451045114512451345144515451645174518451945204521452245234524452545264527452845294530453145324533453445354536453745384539454045414542454345444545454645474548454945504551455245534554455545564557455845594560456145624563456445654566456745684569457045714572457345744575457645774578457945804581458245834584458545864587458845894590459145924593459445954596459745984599460046014602460346044605460646074608460946104611461246134614461546164617461846194620462146224623462446254626462746284629463046314632463346344635463646374638463946404641464246434644464546464647464846494650465146524653465446554656465746584659466046614662466346644665466646674668466946704671467246734674467546764677467846794680468146824683468446854686468746884689469046914692469346944695469646974698469947004701470247034704470547064707470847094710471147124713471447154716471747184719472047214722472347244725472647274728472947304731473247334734473547364737473847394740474147424743474447454746474747484749475047514752475347544755475647574758475947604761476247634764476547664767476847694770477147724773477447754776477747784779478047814782478347844785478647874788478947904791479247934794479547964797479847994800480148024803480448054806480748084809481048114812481348144815481648174818481948204821482248234824482548264827482848294830483148324833483448354836483748384839484048414842484348444845484648474848484948504851485248534854485548564857485848594860486148624863486448654866486748684869487048714872487348744875487648774878487948804881488248834884488548864887488848894890489148924893489448954896489748984899490049014902490349044905490649074908490949104911491249134914491549164917491849194920492149224923492449254926492749284929493049314932493349344935493649374938493949404941494249434944494549464947494849494950495149524953495449554956495749584959496049614962496349644965496649674968496949704971497249734974497549764977497849794980498149824983498449854986498749884989499049914992499349944995499649974998499950005001500250035004500550065007500850095010501150125013501450155016501750185019502050215022502350245025502650275028502950305031503250335034503550365037503850395040504150425043504450455046504750485049505050515052505350545055505650575058505950605061506250635064506550665067506850695070507150725073507450755076507750785079508050815082508350845085508650875088508950905091509250935094509550965097509850995100510151025103510451055106510751085109511051115112511351145115511651175118511951205121512251235124512551265127512851295130513151325133513451355136513751385139514051415142514351445145514651475148514951505151515251535154515551565157515851595160516151625163516451655166516751685169517051715172517351745175517651775178517951805181518251835184518551865187518851895190519151925193519451955196519751985199520052015202520352045205520652075208520952105211521252135214521552165217521852195220522152225223522452255226522752285229523052315232523352345235523652375238523952405241524252435244524552465247524852495250525152525253525452555256525752585259526052615262526352645265526652675268526952705271527252735274527552765277527852795280528152825283528452855286528752885289529052915292529352945295529652975298529953005301530253035304530553065307530853095310531153125313531453155316531753185319532053215322532353245325532653275328532953305331533253335334533553365337533853395340534153425343534453455346534753485349535053515352535353545355535653575358535953605361536253635364536553665367536853695370537153725373537453755376537753785379538053815382538353845385538653875388538953905391539253935394539553965397539853995400540154025403540454055406540754085409541054115412541354145415541654175418541954205421542254235424542554265427542854295430543154325433543454355436543754385439544054415442544354445445544654475448544954505451545254535454545554565457545854595460546154625463546454655466546754685469547054715472547354745475547654775478547954805481548254835484548554865487548854895490549154925493549454955496549754985499550055015502550355045505550655075508550955105511551255135514551555165517551855195520552155225523552455255526552755285529553055315532553355345535553655375538553955405541554255435544554555465547554855495550555155525553555455555556555755585559556055615562556355645565556655675568556955705571557255735574557555765577557855795580558155825583558455855586558755885589559055915592559355945595559655975598559956005601560256035604560556065607560856095610561156125613561456155616561756185619562056215622562356245625562656275628562956305631563256335634563556365637563856395640564156425643564456455646564756485649565056515652565356545655565656575658565956605661566256635664566556665667566856695670567156725673567456755676567756785679568056815682568356845685568656875688568956905691569256935694569556965697569856995700570157025703570457055706570757085709571057115712571357145715571657175718571957205721572257235724572557265727572857295730573157325733573457355736573757385739574057415742574357445745574657475748574957505751575257535754575557565757575857595760576157625763576457655766576757685769577057715772577357745775577657775778577957805781578257835784578557865787578857895790579157925793579457955796579757985799580058015802580358045805580658075808580958105811581258135814581558165817581858195820582158225823582458255826582758285829583058315832583358345835583658375838583958405841584258435844584558465847584858495850585158525853585458555856585758585859586058615862586358645865586658675868586958705871587258735874587558765877587858795880588158825883588458855886588758885889589058915892589358945895589658975898589959005901590259035904590559065907590859095910591159125913591459155916
  1. using System;
  2. using System.Collections.Generic;
  3. using System.IO;
  4. using System.Runtime.CompilerServices;
  5. using MaidStatus;
  6. using Schedule;
  7. using script;
  8. using UnityEngine;
  9. using wf;
  10. public class BaseKagManager : IDisposable
  11. {
  12. public BaseKagManager(TJSScript tjs, ScriptManager script_mgr)
  13. {
  14. NDebug.AssertNull(tjs != null);
  15. this.maidOffsetSetList = new List<Maid>();
  16. this.tjs_ = tjs;
  17. this.script_mgr_ = script_mgr;
  18. this.kag_ = new KagScript(this.tjs_);
  19. this.kag_.SetReplaceEvent(new KagScript.ReplaceCallBack(this.ReplaceFileNameCallBack));
  20. this.kag_.onScenarioLoadEventList.Add(new KagScript.OnScenarioLoadCallBack(this.OnScenarioLoadEvent));
  21. this.exec_wait_data_.Clear();
  22. }
  23. ~BaseKagManager()
  24. {
  25. this.Dispose(false);
  26. }
  27. public virtual void Initialize()
  28. {
  29. this.kag_.AddTagCallBack("wait", new KagScript.KagTagCallBack(this.TagWait));
  30. this.kag_.AddTagCallBack("face", new KagScript.KagTagCallBack(this.TagFace));
  31. this.kag_.AddTagCallBack("faceblend", new KagScript.KagTagCallBack(this.TagFaceBlend));
  32. this.kag_.AddTagCallBack("faceblend2", new KagScript.KagTagCallBack(this.TagFaceBlend2));
  33. this.kag_.AddTagCallBack("startkuchipakupattern", new KagScript.KagTagCallBack(this.TagStartKuchipakuPattern));
  34. this.kag_.AddTagCallBack("stopkuchipakupattern", new KagScript.KagTagCallBack(this.TagStopKuchipakuPattern));
  35. this.kag_.AddTagCallBack("motion", new KagScript.KagTagCallBack(this.TagMotion));
  36. this.kag_.AddTagCallBack("motionnext", new KagScript.KagTagCallBack(this.TagMotionNext));
  37. this.kag_.AddTagCallBack("motionnextabs", new KagScript.KagTagCallBack(this.TagMotionNextAbs));
  38. this.kag_.AddTagCallBack("motionstop", new KagScript.KagTagCallBack(this.TagMotionStop));
  39. this.kag_.AddTagCallBack("motionlayerstop", new KagScript.KagTagCallBack(this.TagMotionLayerStop));
  40. this.kag_.AddTagCallBack("motionautotwist", new KagScript.KagTagCallBack(this.TagMotionAutoTwist));
  41. this.kag_.AddTagCallBack("motionblendenabled", new KagScript.KagTagCallBack(this.TagMotionBlendEnabled));
  42. this.kag_.AddTagCallBack("motionscript", new KagScript.KagTagCallBack(this.TagMotionScript));
  43. this.kag_.AddTagCallBack("itemanime", new KagScript.KagTagCallBack(this.TagItemAnime));
  44. this.kag_.AddTagCallBack("hairphisics", new KagScript.KagTagCallBack(this.TagHairPhisics));
  45. this.kag_.AddTagCallBack("bustmove", new KagScript.KagTagCallBack(this.TagBustMove));
  46. this.kag_.AddTagCallBack("phisicshit", new KagScript.KagTagCallBack(this.TagPhisicsHit));
  47. this.kag_.AddTagCallBack("ikattachpoint", new KagScript.KagTagCallBack(this.TagIKAttachPoint));
  48. this.kag_.AddTagCallBack("ikattachbone", new KagScript.KagTagCallBack(this.TagIKAttachBone));
  49. this.kag_.AddTagCallBack("ikdetach", new KagScript.KagTagCallBack(this.TagIKDetach));
  50. this.kag_.AddTagCallBack("allikdetach", new KagScript.KagTagCallBack(this.TagAllIKDetach));
  51. this.kag_.AddTagCallBack("ikattachodogu", new KagScript.KagTagCallBack(this.TagIKAttachOdogu));
  52. this.kag_.AddTagCallBack("ikattachikbone", new KagScript.KagTagCallBack(this.TagIKAttachIKBone));
  53. this.kag_.AddTagCallBack("iksetbodypos", new KagScript.KagTagCallBack(this.TagIKSetBodyPos));
  54. this.kag_.AddTagCallBack("ikcheckthrough", new KagScript.KagTagCallBack(this.TagIKCheckThrough));
  55. this.kag_.AddTagCallBack("ikbendbonectrl", new KagScript.KagTagCallBack(this.TagIKBendBoneCtrl));
  56. this.kag_.AddTagCallBack("nextikflag", new KagScript.KagTagCallBack(this.TagNextIKFlag));
  57. this.kag_.AddTagCallBack("ikattachpointnext", new KagScript.KagTagCallBack(this.TagIKAttachPointNext));
  58. this.kag_.AddTagCallBack("ikattachbonenext", new KagScript.KagTagCallBack(this.TagIKAttachBoneNext));
  59. this.kag_.AddTagCallBack("ikattachodogunext", new KagScript.KagTagCallBack(this.TagIKAttachOdoguNext));
  60. this.kag_.AddTagCallBack("ikattachikbonenext", new KagScript.KagTagCallBack(this.TagIKAttachIKBoneNext));
  61. this.kag_.AddTagCallBack("iksetpelvispull", new KagScript.KagTagCallBack(this.TagIKSetPelvisPull));
  62. this.kag_.AddTagCallBack("allpos", new KagScript.KagTagCallBack(this.TagAllPos));
  63. this.kag_.AddTagCallBack("alloffset", new KagScript.KagTagCallBack(this.TagAllOffSet));
  64. this.kag_.AddTagCallBack("addalloffset", new KagScript.KagTagCallBack(this.TagAddAllOffset));
  65. this.kag_.AddTagCallBack("offset", new KagScript.KagTagCallBack(this.TagOffSet));
  66. this.kag_.AddTagCallBack("rotatelink", new KagScript.KagTagCallBack(this.TagRotatelink));
  67. this.kag_.AddTagCallBack("allresetpos", new KagScript.KagTagCallBack(this.TagAllResetPos));
  68. this.kag_.AddTagCallBack("transform", new KagScript.KagTagCallBack(this.TagTransform));
  69. this.kag_.AddTagCallBack("position", new KagScript.KagTagCallBack(this.TagPosition));
  70. this.kag_.AddTagCallBack("rotation", new KagScript.KagTagCallBack(this.TagRotation));
  71. this.kag_.AddTagCallBack("camera", new KagScript.KagTagCallBack(this.TagCamera));
  72. this.kag_.AddTagCallBack("camerachase", new KagScript.KagTagCallBack(this.TagCameraChase));
  73. this.kag_.AddTagCallBack("camerachasestop", new KagScript.KagTagCallBack(this.TagCameraChaseStop));
  74. this.kag_.AddTagCallBack("cameraanimationstart", new KagScript.KagTagCallBack(this.TagCameraAnimationStart));
  75. this.kag_.AddTagCallBack("cameracontrol", new KagScript.KagTagCallBack(this.TagCameraControl));
  76. this.kag_.AddTagCallBack("lightmain", new KagScript.KagTagCallBack(this.TagLightMain));
  77. this.kag_.AddTagCallBack("playbgm", new KagScript.KagTagCallBack(this.TagPlayBgm));
  78. this.kag_.AddTagCallBack("stopbgm", new KagScript.KagTagCallBack(this.TagStopBgm));
  79. this.kag_.AddTagCallBack("playenv", new KagScript.KagTagCallBack(this.TagPlayEnv));
  80. this.kag_.AddTagCallBack("stopenv", new KagScript.KagTagCallBack(this.TagStopEnv));
  81. this.kag_.AddTagCallBack("playse", new KagScript.KagTagCallBack(this.TagPlaySe));
  82. this.kag_.AddTagCallBack("stopse", new KagScript.KagTagCallBack(this.TagStopSe));
  83. this.kag_.AddTagCallBack("playvoice", new KagScript.KagTagCallBack(this.TagPlayVoice));
  84. this.kag_.AddTagCallBack("stopvoice", new KagScript.KagTagCallBack(this.TagStopVoice));
  85. this.kag_.AddTagCallBack("stopsound", new KagScript.KagTagCallBack(this.TagStopSound));
  86. this.kag_.AddTagCallBack("fade3d", new KagScript.KagTagCallBack(this.TagFade3D));
  87. this.kag_.AddTagCallBack("setbg", new KagScript.KagTagCallBack(this.TagSetBg));
  88. this.kag_.AddTagCallBack("draw2dtex", new KagScript.KagTagCallBack(this.TagDraw2DTex));
  89. this.kag_.AddTagCallBack("clear2dtex", new KagScript.KagTagCallBack(this.TagClear2DTex));
  90. this.kag_.AddTagCallBack("itemchange", new KagScript.KagTagCallBack(this.TagItemChange));
  91. this.kag_.AddTagCallBack("itemset", new KagScript.KagTagCallBack(this.TagItemSet));
  92. this.kag_.AddTagCallBack("itemreset", new KagScript.KagTagCallBack(this.TagItemReset));
  93. this.kag_.AddTagCallBack("itempos", new KagScript.KagTagCallBack(this.TagItemPos));
  94. this.kag_.AddTagCallBack("allprocpropseqstart", new KagScript.KagTagCallBack(this.TagAllProcPropSeqStart));
  95. this.kag_.AddTagCallBack("itemmask", new KagScript.KagTagCallBack(this.TagItemMask));
  96. this.kag_.AddTagCallBack("itemmaskmode", new KagScript.KagTagCallBack(this.TagItemMaskMode));
  97. this.kag_.AddTagCallBack("maidreset", new KagScript.KagTagCallBack(this.TagMaidReset));
  98. this.kag_.AddTagCallBack("propset", new KagScript.KagTagCallBack(this.TagPropSet));
  99. this.kag_.AddTagCallBack("propreset", new KagScript.KagTagCallBack(this.TagPropReset));
  100. this.kag_.AddTagCallBack("addprefabbg", new KagScript.KagTagCallBack(this.TagAddPrefabBg));
  101. this.kag_.AddTagCallBack("setprefabbgtransformdata", new KagScript.KagTagCallBack(this.TagSetPrefabBgTransformData));
  102. this.kag_.AddTagCallBack("delprefabbg", new KagScript.KagTagCallBack(this.TagDelPrefabBg));
  103. this.kag_.AddTagCallBack("delprefabbgall", new KagScript.KagTagCallBack(this.TagDelPrefabBgAll));
  104. this.kag_.AddTagCallBack("moveprefabtochara", new KagScript.KagTagCallBack(this.TagMovePrefabToChara));
  105. this.kag_.AddTagCallBack("addprefabworld", new KagScript.KagTagCallBack(this.TagAddPrefabWorld));
  106. this.kag_.AddTagCallBack("releaseprefab", new KagScript.KagTagCallBack(this.TagReleasePrefab));
  107. this.kag_.AddTagCallBack("prefabanimatorsetparam", new KagScript.KagTagCallBack(this.TagPrefabAnimatorSetParam));
  108. this.kag_.AddTagCallBack("chinko", new KagScript.KagTagCallBack(this.TagChinko));
  109. this.kag_.AddTagCallBack("chinslide", new KagScript.KagTagCallBack(this.TagChinSlide));
  110. this.kag_.AddTagCallBack("setloacalposition", new KagScript.KagTagCallBack(this.TagSetLoacalPosition));
  111. this.kag_.AddTagCallBack("addlocalposition", new KagScript.KagTagCallBack(this.TagAddLocalPosition));
  112. this.kag_.AddTagCallBack("openmouth", new KagScript.KagTagCallBack(this.TagOpenMouth));
  113. this.kag_.AddTagCallBack("eyetoposition", new KagScript.KagTagCallBack(this.TagEyeToPosition));
  114. this.kag_.AddTagCallBack("eyetotarget", new KagScript.KagTagCallBack(this.TagEyeToTarget));
  115. this.kag_.AddTagCallBack("eyetocamera", new KagScript.KagTagCallBack(this.TagEyeToCamera));
  116. this.kag_.AddTagCallBack("eyetoreset", new KagScript.KagTagCallBack(this.TagEyeToReset));
  117. this.kag_.AddTagCallBack("setmaidoffsetpos", new KagScript.KagTagCallBack(this.TagSetMaidOffsetPos));
  118. this.kag_.AddTagCallBack("setmaidoffsetmultipos", new KagScript.KagTagCallBack(this.TagSetMaidOffsetMultiPos));
  119. this.kag_.AddTagCallBack("setmanoffsetpos", new KagScript.KagTagCallBack(this.TagSetManOffsetPos));
  120. this.kag_.AddTagCallBack("setmaidoffsetposcategory", new KagScript.KagTagCallBack(this.TagSetMaidOffsetPosCategory));
  121. this.kag_.AddTagCallBack("addprefabchara", new KagScript.KagTagCallBack(this.TagAddPrefabChara));
  122. this.kag_.AddTagCallBack("delprefabchara", new KagScript.KagTagCallBack(this.TagDelPrefabChara));
  123. this.kag_.AddTagCallBack("delprefabcharaall", new KagScript.KagTagCallBack(this.TagDelPrefabCharaAll));
  124. this.kag_.AddTagCallBack("animobjchara", new KagScript.KagTagCallBack(this.TagAnimObjChara));
  125. this.kag_.AddTagCallBack("charaactivate", new KagScript.KagTagCallBack(this.TagCharaActivate));
  126. this.kag_.AddTagCallBack("charaactivatefreenpc", new KagScript.KagTagCallBack(this.TagConCharaActivateFreeNPC));
  127. this.kag_.AddTagCallBack("CharaActivate1stRanking", new KagScript.KagTagCallBack(this.TagConCharaActivate1stRanking));
  128. this.kag_.AddTagCallBack("CharaActivateLeader", new KagScript.KagTagCallBack(this.TagConCharaActivateLeader));
  129. this.kag_.AddTagCallBack("manpresetmenuload", new KagScript.KagTagCallBack(this.TagManPresetMenuLoad));
  130. this.kag_.AddTagCallBack("charadeactivate", new KagScript.KagTagCallBack(this.TagCharaDeactivate));
  131. this.kag_.AddTagCallBack("charavisible", new KagScript.KagTagCallBack(this.TagCharaVisible));
  132. this.kag_.AddTagCallBack("charavisiblealloff", new KagScript.KagTagCallBack(this.TagCharaVisibleAllOff));
  133. this.kag_.AddTagCallBack("texmuladd", new KagScript.KagTagCallBack(this.TagTexMulAdd));
  134. this.kag_.AddTagCallBack("texmuldel", new KagScript.KagTagCallBack(this.TagTexMulDel));
  135. this.kag_.AddTagCallBack("startday", new KagScript.KagTagCallBack(this.TagStartDay));
  136. this.kag_.AddTagCallBack("schedulestartmanage", new KagScript.KagTagCallBack(this.TagScheduleStartManage));
  137. this.kag_.AddTagCallBack("endday", new KagScript.KagTagCallBack(this.TagEndDay));
  138. this.kag_.AddTagCallBack("updatemaidpoint", new KagScript.KagTagCallBack(this.TagConUpdateMaidPoint));
  139. this.kag_.AddTagCallBack("vrbgchangeinit", new KagScript.KagTagCallBack(this.TagVRBGChangeInit));
  140. this.kag_.AddTagCallBack("vreventobj", new KagScript.KagTagCallBack(this.TagVREventObj));
  141. this.kag_.AddTagCallBack("vreventgroup", new KagScript.KagTagCallBack(this.TagVREventGroup));
  142. this.kag_.AddTagCallBack("vrfreescene", new KagScript.KagTagCallBack(this.TagVRFreeScene));
  143. this.kag_.AddTagCallBack("vrcamera", new KagScript.KagTagCallBack(this.TagVRCamera));
  144. this.kag_.AddTagCallBack("vrtablet", new KagScript.KagTagCallBack(this.TagVRTablet));
  145. this.kag_.AddTagCallBack("vrchoicesset", new KagScript.KagTagCallBack(this.TagVRChoicesSet));
  146. this.kag_.AddTagCallBack("vrchoicesshow", new KagScript.KagTagCallBack(this.TagVRChoicesShow));
  147. this.kag_.AddTagCallBack("vrchoicesshownonstop", new KagScript.KagTagCallBack(this.TagVRChoicesShowNonStop));
  148. this.kag_.AddTagCallBack("vrdonexttime", new KagScript.KagTagCallBack(this.TagVRDoNextTime));
  149. this.kag_.AddTagCallBack("vrresetheadpos", new KagScript.KagTagCallBack(this.TagVRResetHeadPos));
  150. this.kag_.AddTagCallBack("vrtouchscript", new KagScript.KagTagCallBack(this.TagVRTouchScript));
  151. this.kag_.AddTagCallBack("vrdaytimeshow", new KagScript.KagTagCallBack(this.TagVRDayTimeShow));
  152. this.kag_.AddTagCallBack("vrdialog", new KagScript.KagTagCallBack(this.TagVRDialog));
  153. this.kag_.AddTagCallBack("vrstartmoviemusicplayertv", new KagScript.KagTagCallBack(this.TagVRStartMovieMusicPlayerTV));
  154. this.kag_.AddTagCallBack("vrmovietv", new KagScript.KagTagCallBack(this.TagVRMovieTV));
  155. this.kag_.AddTagCallBack("vrplantwindowshow", new KagScript.KagTagCallBack(this.TagVRPlantWindowShow));
  156. this.kag_.AddTagCallBack("vrplantupdate", new KagScript.KagTagCallBack(this.TagVRPlantUpdate));
  157. this.kag_.AddTagCallBack("vrtutorialstart", new KagScript.KagTagCallBack(this.TagVRTutorialStart));
  158. this.kag_.AddTagCallBack("vrphotomodestart", new KagScript.KagTagCallBack(this.TagVRPhotoModeStart));
  159. this.kag_.AddTagCallBack("vrnochangebg", new KagScript.KagTagCallBack(this.TagVRNoChangeBG));
  160. this.kag_.AddTagCallBack("vrcamtomanhead", new KagScript.KagTagCallBack(this.TagVRCamToManHead));
  161. this.kag_.AddTagCallBack("vrtrophytext", new KagScript.KagTagCallBack(this.TagVRTrophyText));
  162. this.kag_.AddTagCallBack("vrrentalmaidselectstart", new KagScript.KagTagCallBack(this.TagVRRentalMaidSelectStart));
  163. this.kag_.AddTagCallBack("vrtouchuseselect", new KagScript.KagTagCallBack(this.TagVRTouchUseSelect));
  164. this.kag_.AddTagCallBack("vrhintshow", new KagScript.KagTagCallBack(this.TagVRHintShow));
  165. this.kag_.AddTagCallBack("vrkaraokewindowshow", new KagScript.KagTagCallBack(this.TagVRKaraokeWindowShow));
  166. this.kag_.AddTagCallBack("danceresult", new KagScript.KagTagCallBack(this.TagDanceResultStart));
  167. this.kag_.AddTagCallBack("setdance", new KagScript.KagTagCallBack(this.TagSetDanceType));
  168. this.kag_.AddTagCallBack("cutinshoot", new KagScript.KagTagCallBack(this.TagCutinTexShoot));
  169. this.kag_.AddTagCallBack("battlecutin", new KagScript.KagTagCallBack(this.TagBattleCutInStart));
  170. this.kag_.AddTagCallBack("motioncheck", new KagScript.KagTagCallBack(this.TagMotionCheckStart));
  171. this.kag_.AddTagCallBack("setmcskip", new KagScript.KagTagCallBack(this.TagSetMcSkip));
  172. this.kag_.AddTagCallBack("totitle", new KagScript.KagTagCallBack(this.TagToTitle));
  173. this.kag_.AddTagCallBack("addeventdisplay", new KagScript.KagTagCallBack(this.TagAddedEventDisplay));
  174. this.kag_.AddTagCallBack("tutorialstart", new KagScript.KagTagCallBack(this.TagTutorialStart));
  175. this.kag_.AddTagCallBack("loadsubtitlefile", new KagScript.KagTagCallBack(this.TagLoadSubtitleFile));
  176. this.kag_.AddTagCallBack("endsubtitledisplay", new KagScript.KagTagCallBack(this.TagEndSubtitleDisplay));
  177. this.kag_.AddTagCallBack("subtitledisplayforplayvoice", new KagScript.KagTagCallBack(this.TagSubtitleDisplayForPlayVoice));
  178. this.kag_.AddTagCallBack("subtitledisplay", new KagScript.KagTagCallBack(this.TagSubtitleDisplay));
  179. this.kag_.AddTagCallBack("kupa", new KagScript.KagTagCallBack(this.TagKupa));
  180. this.kag_.AddTagCallBack("starttouchmode", new KagScript.KagTagCallBack(this.TagStartTouchMode));
  181. }
  182. public virtual void Update()
  183. {
  184. if (!this.enabled)
  185. {
  186. return;
  187. }
  188. if (this.fade_wait_)
  189. {
  190. if (this.IsFadeProc())
  191. {
  192. return;
  193. }
  194. this.fade_wait_ = false;
  195. this.Exec();
  196. }
  197. if (0 < this.wait_event_list_.Count)
  198. {
  199. foreach (KeyValuePair<string, WaitEventList> keyValuePair in this.wait_event_list_)
  200. {
  201. keyValuePair.Value.EventCheck();
  202. }
  203. }
  204. if (this.exec_wait_data_.use && this.exec_wait_data_.Check())
  205. {
  206. this.exec_wait_data_.Clear();
  207. this.Exec();
  208. }
  209. }
  210. public virtual bool Exec()
  211. {
  212. if (!this.enabled)
  213. {
  214. return false;
  215. }
  216. if (this.fade_wait_ && this.IsFadeProc())
  217. {
  218. return false;
  219. }
  220. if (this.exec_wait_data_.use)
  221. {
  222. if (!this.exec_wait_data_.Check())
  223. {
  224. return false;
  225. }
  226. this.exec_wait_data_.Clear();
  227. }
  228. this.maidOffsetSetList.Clear();
  229. return this.kag_.Exec();
  230. }
  231. public virtual bool IsExec()
  232. {
  233. return !this.exec_wait_data_.use && this.enabled;
  234. }
  235. public void SetFadeWait(bool value)
  236. {
  237. this.fade_wait_ = value;
  238. }
  239. public void SetExecWait(int wait_time, bool skip_possible)
  240. {
  241. this.exec_wait_data_.Clear();
  242. if (wait_time <= 0)
  243. {
  244. return;
  245. }
  246. this.exec_wait_data_ = new BaseKagManager.ExecWaitData();
  247. this.exec_wait_data_.wait_time = wait_time;
  248. this.exec_wait_data_.skip_possible = skip_possible;
  249. this.exec_wait_data_.start_tick_count = GameMain.tick_count;
  250. this.exec_wait_data_.use = true;
  251. }
  252. public bool SetMaidAllPropSeqWait(Maid maid)
  253. {
  254. if (maid == null || !maid.IsBusy)
  255. {
  256. return false;
  257. }
  258. this.exec_wait_data_ = new BaseKagManager.MaidPropSeqWaitData
  259. {
  260. skip_possible = false,
  261. use = true,
  262. maid = maid
  263. };
  264. return true;
  265. }
  266. public bool SetMaidVoiceWait(Maid maid)
  267. {
  268. if (maid == null)
  269. {
  270. return false;
  271. }
  272. this.exec_wait_data_ = new BaseKagManager.MaidVoiceWaitData
  273. {
  274. skip_possible = false,
  275. use = true,
  276. maid = maid
  277. };
  278. return true;
  279. }
  280. public bool SetDummyVoiceWait()
  281. {
  282. this.exec_wait_data_ = new BaseKagManager.DummyVoiceWaitData
  283. {
  284. skip_possible = false,
  285. use = true
  286. };
  287. return true;
  288. }
  289. public void ClearExecWait()
  290. {
  291. if (this.exec_wait_data_.use && !this.exec_wait_data_.skip_possible)
  292. {
  293. return;
  294. }
  295. this.exec_wait_data_.Clear();
  296. }
  297. public virtual void LoadScriptFile(string file_name, string label_name = "")
  298. {
  299. WaitEventList waitEventList = this.GetWaitEventList("se");
  300. waitEventList.Clear();
  301. this.exec_wait_data_.Clear();
  302. this.kag_.LoadScenario(file_name);
  303. if (label_name != string.Empty)
  304. {
  305. this.kag_.GoToLabel(label_name);
  306. }
  307. }
  308. public virtual void JumpLabel(string label_name)
  309. {
  310. this.exec_wait_data_.Clear();
  311. if (label_name != string.Empty)
  312. {
  313. this.kag_.GoToLabel(label_name);
  314. }
  315. }
  316. public virtual bool TagWait(KagTagSupport tag_data)
  317. {
  318. this.CheckAbsolutelyNecessaryTag(tag_data, "wait", new string[]
  319. {
  320. "time"
  321. });
  322. this.exec_wait_data_.Clear();
  323. int num = tag_data.GetTagProperty("time").AsInteger();
  324. if (num <= 0)
  325. {
  326. return false;
  327. }
  328. bool skip_possible = !tag_data.IsValid("skip") || tag_data.GetTagProperty("skip").AsBool();
  329. this.SetWait(num, skip_possible);
  330. return true;
  331. }
  332. public bool TagFace(KagTagSupport tag_data)
  333. {
  334. Maid maid = this.GetMaidAndMan(tag_data, true);
  335. if (maid == null)
  336. {
  337. return false;
  338. }
  339. this.CheckAbsolutelyNecessaryTag(tag_data, "face", new string[]
  340. {
  341. "name"
  342. });
  343. string face_name = tag_data.GetTagProperty("name").AsString();
  344. int num = 0;
  345. if (tag_data.IsValid("wait"))
  346. {
  347. num = tag_data.GetTagProperty("wait").AsInteger();
  348. }
  349. WaitEventList waitEventList = this.GetWaitEventList("face");
  350. if (num <= 0)
  351. {
  352. maid.FaceAnime(face_name, 1f, 0);
  353. waitEventList.Clear();
  354. }
  355. else
  356. {
  357. waitEventList.Add(delegate
  358. {
  359. if (maid != null && maid.body0 != null && maid.body0.isLoadedBody)
  360. {
  361. maid.FaceAnime(face_name, 1f, 0);
  362. }
  363. }, num);
  364. }
  365. return false;
  366. }
  367. public bool TagFaceBlend(KagTagSupport tag_data)
  368. {
  369. this.CheckAbsolutelyNecessaryTag(tag_data, "faceblend", new string[]
  370. {
  371. "name"
  372. });
  373. Maid maidAndMan = this.GetMaidAndMan(tag_data, true);
  374. if (maidAndMan == null)
  375. {
  376. return false;
  377. }
  378. string text = tag_data.GetTagProperty("name").AsString();
  379. if (text == "なし")
  380. {
  381. text = "無し";
  382. }
  383. maidAndMan.FaceBlend(text);
  384. return false;
  385. }
  386. public bool TagFaceBlend2(KagTagSupport tag_data)
  387. {
  388. Maid maidAndMan = this.GetMaidAndMan(tag_data, true);
  389. if (maidAndMan == null)
  390. {
  391. return false;
  392. }
  393. if (tag_data.IsValid("reset"))
  394. {
  395. maidAndMan.FaceBlend("無し");
  396. }
  397. else
  398. {
  399. TMorph.AddBlendType addBlendType = TMorph.AddBlendType.None;
  400. if (tag_data.IsValid("頬1") || tag_data.IsValid("頬1"))
  401. {
  402. addBlendType |= TMorph.AddBlendType.Cheek1;
  403. }
  404. if (tag_data.IsValid("頬2") || tag_data.IsValid("頬2"))
  405. {
  406. addBlendType |= TMorph.AddBlendType.Cheek2;
  407. }
  408. if (tag_data.IsValid("頬3") || tag_data.IsValid("頬3"))
  409. {
  410. addBlendType |= TMorph.AddBlendType.Cheek3;
  411. }
  412. if (tag_data.IsValid("涙1") || tag_data.IsValid("涙1"))
  413. {
  414. addBlendType |= TMorph.AddBlendType.Tear1;
  415. }
  416. if (tag_data.IsValid("涙2") || tag_data.IsValid("涙2"))
  417. {
  418. addBlendType |= TMorph.AddBlendType.Tear2;
  419. }
  420. if (tag_data.IsValid("涙3") || tag_data.IsValid("涙3"))
  421. {
  422. addBlendType |= TMorph.AddBlendType.Tear3;
  423. }
  424. if (tag_data.IsValid("ショック"))
  425. {
  426. addBlendType |= TMorph.AddBlendType.Shock;
  427. }
  428. if (tag_data.IsValid("よだれ") || tag_data.IsValid("涎"))
  429. {
  430. addBlendType |= TMorph.AddBlendType.Yodare;
  431. }
  432. if (tag_data.IsValid("赤面"))
  433. {
  434. addBlendType |= TMorph.AddBlendType.Blush;
  435. }
  436. if (tag_data.IsValid("玉涙"))
  437. {
  438. addBlendType |= TMorph.AddBlendType.TearBig;
  439. }
  440. maidAndMan.body0.Face.morph.SetValueOriginalBlendSet(addBlendType);
  441. maidAndMan.FaceBlend("オリジナル");
  442. }
  443. return false;
  444. }
  445. public bool TagStartKuchipakuPattern(KagTagSupport tag_data)
  446. {
  447. this.CheckAbsolutelyNecessaryTag(tag_data, "startkuchipakupattern", new string[]
  448. {
  449. "offsettime",
  450. "pattern"
  451. });
  452. Maid maidAndMan = this.GetMaidAndMan(tag_data, true);
  453. if (maidAndMan == null)
  454. {
  455. return false;
  456. }
  457. maidAndMan.StartKuchipakuPattern(tag_data.GetTagProperty("offsettime").AsReal(), tag_data.GetTagProperty("pattern").AsString(), false);
  458. return false;
  459. }
  460. public bool TagStopKuchipakuPattern(KagTagSupport tag_data)
  461. {
  462. Maid maidAndMan = this.GetMaidAndMan(tag_data, true);
  463. if (maidAndMan == null)
  464. {
  465. return false;
  466. }
  467. maidAndMan.StopKuchipakuPattern();
  468. return false;
  469. }
  470. public bool TagLipsync(KagTagSupport tag_data)
  471. {
  472. Maid maidAndMan = this.GetMaidAndMan(tag_data, true);
  473. if (maidAndMan == null)
  474. {
  475. return false;
  476. }
  477. maidAndMan.Lipsync(tag_data.IsValid("on"));
  478. return false;
  479. }
  480. public bool TagMotion(KagTagSupport tag_data)
  481. {
  482. string text = tag_data.GetTagProperty("mot").AsString() + ".anm";
  483. Maid maid = this.GetMaidAndMan(tag_data, true);
  484. if (maid == null)
  485. {
  486. return false;
  487. }
  488. this.CheckAbsolutelyNecessaryTag(tag_data, "motion", new string[]
  489. {
  490. "mot"
  491. });
  492. string play_motion_name = tag_data.GetTagProperty("mot").AsString() + ".anm";
  493. int blend = 500;
  494. if (tag_data.IsValid("blend"))
  495. {
  496. blend = tag_data.GetTagProperty("blend").AsInteger();
  497. }
  498. bool loop = false;
  499. if (tag_data.IsValid("loop"))
  500. {
  501. loop = tag_data.GetTagProperty("loop").AsBool();
  502. }
  503. int num = 0;
  504. if (tag_data.IsValid("wait"))
  505. {
  506. num = tag_data.GetTagProperty("wait").AsInteger();
  507. }
  508. WaitEventList waitEventList = this.GetWaitEventList("motion");
  509. if (num <= 0)
  510. {
  511. if (maid.Visible)
  512. {
  513. this.PlayMaidMotion(maid, play_motion_name, false, loop, false, GameUty.MillisecondToSecond(blend));
  514. }
  515. waitEventList.Clear();
  516. }
  517. else
  518. {
  519. waitEventList.Add(delegate
  520. {
  521. if (maid != null && maid.Visible && maid.body0 != null && maid.body0.isLoadedBody)
  522. {
  523. this.PlayMaidMotion(maid, play_motion_name, false, loop, false, GameUty.MillisecondToSecond(blend));
  524. }
  525. }, num);
  526. }
  527. return false;
  528. }
  529. public bool TagMotionNext(KagTagSupport tag_data)
  530. {
  531. Maid maid = this.GetMaidAndMan(tag_data, true);
  532. if (maid == null)
  533. {
  534. return false;
  535. }
  536. this.CheckAbsolutelyNecessaryTag(tag_data, "motionnext", new string[]
  537. {
  538. "mot"
  539. });
  540. string play_motion_name = tag_data.GetTagProperty("mot").AsString() + ".anm";
  541. int blend = 500;
  542. if (tag_data.IsValid("blend"))
  543. {
  544. blend = tag_data.GetTagProperty("blend").AsInteger();
  545. }
  546. bool loop = false;
  547. if (tag_data.IsValid("loop"))
  548. {
  549. loop = tag_data.GetTagProperty("loop").AsBool();
  550. }
  551. WaitEventList waitEventList = this.GetWaitEventList("motion");
  552. if (waitEventList.list.Count <= 0)
  553. {
  554. if (maid.Visible)
  555. {
  556. this.PlayMaidMotion(maid, play_motion_name, false, loop, true, GameUty.MillisecondToSecond(blend));
  557. }
  558. waitEventList.Clear();
  559. }
  560. else
  561. {
  562. int wait_time = waitEventList.list[waitEventList.list.Count - 1].wait_time;
  563. waitEventList.Add(delegate
  564. {
  565. if (maid != null && maid.Visible)
  566. {
  567. this.PlayMaidMotion(maid, play_motion_name, false, loop, true, GameUty.MillisecondToSecond(blend));
  568. }
  569. }, wait_time);
  570. }
  571. return false;
  572. }
  573. public bool TagMotionNextAbs(KagTagSupport tag_data)
  574. {
  575. Maid maid = this.GetMaidAndMan(tag_data, true);
  576. if (maid == null)
  577. {
  578. return false;
  579. }
  580. this.CheckAbsolutelyNecessaryTag(tag_data, "motionnextabs", new string[]
  581. {
  582. "mot"
  583. });
  584. string play_motion_name = tag_data.GetTagProperty("mot").AsString() + ".anm";
  585. int blend = 500;
  586. if (tag_data.IsValid("blend"))
  587. {
  588. blend = tag_data.GetTagProperty("blend").AsInteger();
  589. }
  590. bool loop = false;
  591. if (tag_data.IsValid("loop"))
  592. {
  593. loop = tag_data.GetTagProperty("loop").AsBool();
  594. }
  595. WaitEventList waitEventList = this.GetWaitEventList("motion");
  596. if (waitEventList.list.Count <= 0)
  597. {
  598. if (maid.Visible)
  599. {
  600. this.PlayMaidMotionAbs(maid, play_motion_name, false, loop, true, GameUty.MillisecondToSecond(blend));
  601. }
  602. waitEventList.Clear();
  603. }
  604. else
  605. {
  606. int wait_time = waitEventList.list[waitEventList.list.Count - 1].wait_time;
  607. waitEventList.Add(delegate
  608. {
  609. if (maid != null && maid.Visible)
  610. {
  611. this.PlayMaidMotionAbs(maid, play_motion_name, false, loop, true, GameUty.MillisecondToSecond(blend));
  612. }
  613. }, wait_time);
  614. }
  615. return false;
  616. }
  617. public bool TagMotionStop(KagTagSupport tag_data)
  618. {
  619. Maid maidAndMan = this.GetMaidAndMan(tag_data, true);
  620. if (maidAndMan == null)
  621. {
  622. return false;
  623. }
  624. maidAndMan.StopAnime(string.Empty);
  625. WaitEventList waitEventList = this.GetWaitEventList("motion");
  626. waitEventList.Clear();
  627. return false;
  628. }
  629. public bool TagMotionLayerStop(KagTagSupport tag_data)
  630. {
  631. Maid maidAndMan = this.GetMaidAndMan(tag_data, true);
  632. if (maidAndMan == null)
  633. {
  634. return false;
  635. }
  636. if (tag_data.IsValid("layer"))
  637. {
  638. string[] array = tag_data.GetTagProperty("layer").AsString().Split(new char[]
  639. {
  640. ','
  641. });
  642. for (int i = 0; i < array.Length; i++)
  643. {
  644. maidAndMan.body0.StopAnimeLayer(int.Parse(array[i]));
  645. }
  646. }
  647. if (tag_data.IsValid("range"))
  648. {
  649. string[] array2 = tag_data.GetTagProperty("range").AsString().Split(new char[]
  650. {
  651. '-'
  652. });
  653. NDebug.Assert(array2.Length == 2, "motionlayerstopのrange設定が不正です.個数不一致");
  654. int num = int.Parse(array2[0]);
  655. int num2 = int.Parse(array2[1]);
  656. NDebug.Assert(num <= num2, "motionlayerstopのrange設定が不正です.範囲不一致");
  657. for (int j = num; j <= num2; j++)
  658. {
  659. maidAndMan.body0.StopAnimeLayer(j);
  660. }
  661. }
  662. return false;
  663. }
  664. public bool TagMotionAutoTwist(KagTagSupport tag_data)
  665. {
  666. Maid maid = this.GetMaidAndMan(tag_data, true);
  667. if (maid == null)
  668. {
  669. return false;
  670. }
  671. Func<string, Maid.AutoTwist[], bool> func = delegate(string tag_name, Maid.AutoTwist[] change_type_array)
  672. {
  673. bool flag = tag_data.IsValid(tag_name);
  674. if (flag && change_type_array != null)
  675. {
  676. string a = tag_data.GetTagProperty(tag_name).AsString();
  677. bool f_bEnable = a == "on";
  678. for (int i = 0; i < change_type_array.Length; i++)
  679. {
  680. maid.SetAutoTwist(change_type_array[i], f_bEnable);
  681. }
  682. }
  683. return flag;
  684. };
  685. if (!func("kata", new Maid.AutoTwist[]
  686. {
  687. Maid.AutoTwist.ShoulderL,
  688. Maid.AutoTwist.ShoulderR
  689. }))
  690. {
  691. func("kata_r", new Maid.AutoTwist[]
  692. {
  693. Maid.AutoTwist.ShoulderR
  694. });
  695. func("kata_l", new Maid.AutoTwist[1]);
  696. }
  697. if (!func("tekubi", new Maid.AutoTwist[]
  698. {
  699. Maid.AutoTwist.WristL,
  700. Maid.AutoTwist.WristR
  701. }))
  702. {
  703. func("tekubi_r", new Maid.AutoTwist[]
  704. {
  705. Maid.AutoTwist.WristR
  706. });
  707. func("tekubi_l", new Maid.AutoTwist[]
  708. {
  709. Maid.AutoTwist.WristL
  710. });
  711. }
  712. if (!func("momo", new Maid.AutoTwist[]
  713. {
  714. Maid.AutoTwist.ThighL,
  715. Maid.AutoTwist.ThighR
  716. }))
  717. {
  718. func("momo_r", new Maid.AutoTwist[]
  719. {
  720. Maid.AutoTwist.ThighR
  721. });
  722. func("momo_l", new Maid.AutoTwist[]
  723. {
  724. Maid.AutoTwist.ThighL
  725. });
  726. }
  727. return false;
  728. }
  729. public bool TagMotionBlendEnabled(KagTagSupport tag_data)
  730. {
  731. bool is_motion_blend = true;
  732. if (tag_data.IsValid("false"))
  733. {
  734. is_motion_blend = false;
  735. }
  736. this.script_mgr_.is_motion_blend = is_motion_blend;
  737. return false;
  738. }
  739. public bool TagMotionScript(KagTagSupport tag_data)
  740. {
  741. string maid_guid = string.Empty;
  742. if (tag_data.IsValid("maid"))
  743. {
  744. Maid maidAndMan = this.GetMaidAndMan(tag_data, true);
  745. if (maidAndMan != null)
  746. {
  747. maid_guid = maidAndMan.status.guid;
  748. }
  749. }
  750. string man_guid = string.Empty;
  751. if (tag_data.IsValid("man"))
  752. {
  753. Maid maidAndMan2 = this.GetMaidAndMan(tag_data, false);
  754. if (maidAndMan2 != null)
  755. {
  756. man_guid = maidAndMan2.status.guid;
  757. }
  758. }
  759. this.CheckAbsolutelyNecessaryTag(tag_data, "motionscript", new string[]
  760. {
  761. "file"
  762. });
  763. string file_name = tag_data.GetTagProperty("file").AsString() + ".ks";
  764. string label_name = string.Empty;
  765. if (tag_data.IsValid("label"))
  766. {
  767. label_name = tag_data.GetTagProperty("label").AsString();
  768. }
  769. int num = 0;
  770. if (tag_data.IsValid("wait"))
  771. {
  772. num = tag_data.GetTagProperty("wait").AsInteger();
  773. }
  774. bool vailed_pos = !tag_data.IsValid("npos");
  775. int sloat = 0;
  776. if (tag_data.IsValid("sloat"))
  777. {
  778. sloat = tag_data.GetTagProperty("sloat").AsInteger();
  779. }
  780. WaitEventList waitEventList = this.GetWaitEventList("motion_script");
  781. if (num <= 0)
  782. {
  783. this.script_mgr_.LoadMotionScript(sloat, false, file_name, label_name, maid_guid, man_guid, false, vailed_pos, false);
  784. waitEventList.Clear();
  785. if (this.script_mgr_.is_motion_all_prop_seq && this.script_mgr_.motion_all_prop_seq_maid != null)
  786. {
  787. this.script_mgr_.motion_all_prop_seq_maid.AllProcPropSeqStart();
  788. this.SetMaidAllPropSeqWait(this.script_mgr_.motion_all_prop_seq_maid);
  789. this.script_mgr_.motion_all_prop_seq_maid = null;
  790. this.script_mgr_.is_motion_all_prop_seq = false;
  791. return true;
  792. }
  793. }
  794. else
  795. {
  796. waitEventList.Add(delegate
  797. {
  798. Maid maid = null;
  799. for (int i = 0; i < GameMain.Instance.CharacterMgr.GetMaidCount(); i++)
  800. {
  801. Maid maid2 = GameMain.Instance.CharacterMgr.GetMaid(i);
  802. if (maid2 != null && maid2.status.guid == maid_guid)
  803. {
  804. maid = maid2;
  805. break;
  806. }
  807. }
  808. if (maid != null && maid.body0 != null && maid.body0.isLoadedBody)
  809. {
  810. this.script_mgr_.LoadMotionScript(sloat, false, file_name, label_name, maid_guid, man_guid, false, vailed_pos, false);
  811. NDebug.Assert(!this.script_mgr_.is_motion_all_prop_seq, "motionscript wait内でのAllProcPropSeqStartはできません");
  812. }
  813. }, num);
  814. }
  815. return false;
  816. }
  817. public bool TagItemAnime(KagTagSupport tag_data)
  818. {
  819. this.CheckAbsolutelyNecessaryTag(tag_data, "itemanime", new string[]
  820. {
  821. "slot"
  822. });
  823. Maid maidAndMan = this.GetMaidAndMan(tag_data, true);
  824. if (maidAndMan == null)
  825. {
  826. return false;
  827. }
  828. TBody.SlotID f_slot = (TBody.SlotID)Enum.Parse(typeof(TBody.SlotID), tag_data.GetTagProperty("slot").AsString(), true);
  829. string f_strAnimName = tag_data.GetTagProperty("file").AsString();
  830. maidAndMan.body0.ItemAnimationLoad(f_slot, f_strAnimName);
  831. if (tag_data.IsValid("start"))
  832. {
  833. maidAndMan.body0.ItemAnimationPlay(f_slot, f_strAnimName, tag_data.IsValid("loop"));
  834. }
  835. else if (tag_data.IsValid("stop"))
  836. {
  837. maidAndMan.body0.ItemAnimationStop(f_slot);
  838. }
  839. return false;
  840. }
  841. public bool TagHairPhisics(KagTagSupport tag_data)
  842. {
  843. this.CheckAbsolutelyNecessaryTag(tag_data, "hairphisics", new string[]
  844. {
  845. "hairr"
  846. });
  847. Maid maidAndMan = this.GetMaidAndMan(tag_data, true);
  848. if (maidAndMan == null)
  849. {
  850. return false;
  851. }
  852. string text = tag_data.GetTagProperty("hairr").AsString();
  853. if (text == "normal")
  854. {
  855. maidAndMan.SetModeHairR(TBody.ModeHirR.Normal);
  856. }
  857. else if (text == "nofront")
  858. {
  859. maidAndMan.SetModeHairR(TBody.ModeHirR.NoFront);
  860. }
  861. else
  862. {
  863. NDebug.Assert("hairrの指定[" + text + "]は間違っています", false);
  864. }
  865. return false;
  866. }
  867. public bool TagBustMove(KagTagSupport tag_data)
  868. {
  869. this.CheckAbsolutelyNecessaryTag(tag_data, "bustmove", new string[]
  870. {
  871. "move"
  872. });
  873. Maid maidAndMan = this.GetMaidAndMan(tag_data, true);
  874. if (maidAndMan == null)
  875. {
  876. return false;
  877. }
  878. string a = tag_data.GetTagProperty("move").AsString().ToLower();
  879. if (a == "stop")
  880. {
  881. maidAndMan.body0.MuneYureL(0f);
  882. maidAndMan.body0.MuneYureR(0f);
  883. }
  884. else if (a == "lstop")
  885. {
  886. maidAndMan.body0.MuneYureL(0f);
  887. }
  888. else if (a == "rstop")
  889. {
  890. maidAndMan.body0.MuneYureR(0f);
  891. }
  892. else if (a == "non")
  893. {
  894. maidAndMan.body0.MuneYureL(1f);
  895. maidAndMan.body0.MuneYureR(1f);
  896. }
  897. return false;
  898. }
  899. public bool TagPhisicsHit(KagTagSupport tag_data)
  900. {
  901. this.CheckAbsolutelyNecessaryTag(tag_data, "phisicshit", new string[]
  902. {
  903. "height"
  904. });
  905. Maid maidAndMan = this.GetMaidAndMan(tag_data, true);
  906. if (maidAndMan == null)
  907. {
  908. return false;
  909. }
  910. maidAndMan.body0.SetBoneHitHeightY(tag_data.GetTagProperty("height").AsReal());
  911. return false;
  912. }
  913. public bool TagIKAttachPoint(KagTagSupport tag_data)
  914. {
  915. this.CheckAbsolutelyNecessaryTag(tag_data, "ikattachpoint", new string[]
  916. {
  917. "src",
  918. "srcbone",
  919. "target",
  920. "targetobj",
  921. "targetpoint"
  922. });
  923. Maid maidAndMan = this.GetMaidAndMan(tag_data.GetTagProperty("src").AsString());
  924. Maid maidAndMan2 = this.GetMaidAndMan(tag_data.GetTagProperty("target").AsString());
  925. if (maidAndMan == null || maidAndMan2 == null)
  926. {
  927. return false;
  928. }
  929. string text = tag_data.GetTagProperty("srcbone").AsString();
  930. string attachpoint_name = tag_data.GetTagProperty("targetpoint").AsString();
  931. string tgt_name = tag_data.GetTagProperty("targetobj").AsString();
  932. IKCtrlData ikdata = maidAndMan.IKCtrl.GetIKData(text);
  933. if (!ikdata)
  934. {
  935. return false;
  936. }
  937. Vector3 zero = Vector3.zero;
  938. if (tag_data.IsValid("offsetx"))
  939. {
  940. zero.x = tag_data.GetTagProperty("offsetx").AsReal();
  941. }
  942. if (tag_data.IsValid("offsety"))
  943. {
  944. zero.y = tag_data.GetTagProperty("offsety").AsReal();
  945. }
  946. if (tag_data.IsValid("offsetz"))
  947. {
  948. zero.z = tag_data.GetTagProperty("offsetz").AsReal();
  949. }
  950. IKCtrlData.IKAttachType ikattachType = IKCtrlData.IKAttachType.Point;
  951. if (tag_data.IsValid("attach_type"))
  952. {
  953. ikattachType = (IKCtrlData.IKAttachType)Enum.Parse(typeof(IKCtrlData.IKAttachType), tag_data.GetTagProperty("attach_type").AsString());
  954. }
  955. if (ikattachType == IKCtrlData.IKAttachType.NewPoint)
  956. {
  957. if (tag_data.IsValid("offset_world"))
  958. {
  959. ikdata.posOffsetType = IKCtrlData.PosOffsetType.OffsetWorld;
  960. }
  961. else if (tag_data.IsValid("offset_bone"))
  962. {
  963. ikdata.posOffsetType = IKCtrlData.PosOffsetType.OffsetBone;
  964. }
  965. }
  966. ikdata.GetIKEnable(ikattachType).Recet();
  967. if (tag_data.IsValid("disable"))
  968. {
  969. string[] array = tag_data.GetTagProperty("disable").AsString().Split(new char[]
  970. {
  971. ','
  972. });
  973. int i = 0;
  974. while (i < array.Length)
  975. {
  976. string text2 = array[i];
  977. string text3 = text2.ToLower();
  978. if (text3 != null)
  979. {
  980. if (!(text3 == "x"))
  981. {
  982. if (!(text3 == "y"))
  983. {
  984. if (text3 == "z")
  985. {
  986. ikdata.GetIKEnable(ikattachType).EnableZ = false;
  987. }
  988. }
  989. else
  990. {
  991. ikdata.GetIKEnable(ikattachType).EnableY = false;
  992. }
  993. }
  994. else
  995. {
  996. ikdata.GetIKEnable(ikattachType).EnableX = false;
  997. }
  998. }
  999. IL_29C:
  1000. i++;
  1001. continue;
  1002. goto IL_29C;
  1003. }
  1004. }
  1005. string axisbone = string.Empty;
  1006. if (tag_data.IsValid("axisbone"))
  1007. {
  1008. axisbone = tag_data.GetTagProperty("axisbone").AsString();
  1009. }
  1010. bool do_animation = false;
  1011. if (tag_data.IsValid("do_animation"))
  1012. {
  1013. do_animation = true;
  1014. }
  1015. if (ikattachType == IKCtrlData.IKAttachType.NewPoint && ikdata is HandFootIKData)
  1016. {
  1017. HandFootIKData handFootIKData = ikdata as HandFootIKData;
  1018. handFootIKData.SetPullState(!tag_data.IsValid("pull_off"));
  1019. }
  1020. maidAndMan.IKTargetToAttachPoint(text, maidAndMan2, tgt_name, attachpoint_name, zero, ikattachType, axisbone, do_animation, IKCtrlData.IKExecTiming.Normal);
  1021. return false;
  1022. }
  1023. public bool TagIKAttachBone(KagTagSupport tag_data)
  1024. {
  1025. this.CheckAbsolutelyNecessaryTag(tag_data, "ikattachbone", new string[]
  1026. {
  1027. "src",
  1028. "srcbone",
  1029. "target",
  1030. "targetbone"
  1031. });
  1032. Maid maidAndMan = this.GetMaidAndMan(tag_data.GetTagProperty("src").AsString());
  1033. Maid maidAndMan2 = this.GetMaidAndMan(tag_data.GetTagProperty("target").AsString());
  1034. if (maidAndMan == null || maidAndMan2 == null)
  1035. {
  1036. return false;
  1037. }
  1038. string text = tag_data.GetTagProperty("srcbone").AsString();
  1039. string tgtbone_name = tag_data.GetTagProperty("targetbone").AsString();
  1040. IKCtrlData ikdata = maidAndMan.IKCtrl.GetIKData(text);
  1041. if (!ikdata)
  1042. {
  1043. return false;
  1044. }
  1045. bool search_sm = tag_data.IsValid("Search_SM_Body");
  1046. Vector3 zero = Vector3.zero;
  1047. if (tag_data.IsValid("offsetx"))
  1048. {
  1049. zero.x = tag_data.GetTagProperty("offsetx").AsReal();
  1050. }
  1051. if (tag_data.IsValid("offsety"))
  1052. {
  1053. zero.y = tag_data.GetTagProperty("offsety").AsReal();
  1054. }
  1055. if (tag_data.IsValid("offsetz"))
  1056. {
  1057. zero.z = tag_data.GetTagProperty("offsetz").AsReal();
  1058. }
  1059. IKCtrlData.IKAttachType ikattachType = IKCtrlData.IKAttachType.Point;
  1060. if (tag_data.IsValid("attach_type"))
  1061. {
  1062. ikattachType = (IKCtrlData.IKAttachType)Enum.Parse(typeof(IKCtrlData.IKAttachType), tag_data.GetTagProperty("attach_type").AsString());
  1063. }
  1064. if (ikattachType == IKCtrlData.IKAttachType.NewPoint)
  1065. {
  1066. if (tag_data.IsValid("offset_world"))
  1067. {
  1068. ikdata.posOffsetType = IKCtrlData.PosOffsetType.OffsetWorld;
  1069. }
  1070. else if (tag_data.IsValid("offset_bone"))
  1071. {
  1072. ikdata.posOffsetType = IKCtrlData.PosOffsetType.OffsetBone;
  1073. }
  1074. }
  1075. ikdata.GetIKEnable(ikattachType).Recet();
  1076. if (tag_data.IsValid("disable"))
  1077. {
  1078. string[] array = tag_data.GetTagProperty("disable").AsString().Split(new char[]
  1079. {
  1080. ','
  1081. });
  1082. int i = 0;
  1083. while (i < array.Length)
  1084. {
  1085. string text2 = array[i];
  1086. string text3 = text2.ToLower();
  1087. if (text3 != null)
  1088. {
  1089. if (!(text3 == "x"))
  1090. {
  1091. if (!(text3 == "y"))
  1092. {
  1093. if (text3 == "z")
  1094. {
  1095. ikdata.GetIKEnable(ikattachType).EnableZ = false;
  1096. }
  1097. }
  1098. else
  1099. {
  1100. ikdata.GetIKEnable(ikattachType).EnableY = false;
  1101. }
  1102. }
  1103. else
  1104. {
  1105. ikdata.GetIKEnable(ikattachType).EnableX = false;
  1106. }
  1107. }
  1108. IL_28F:
  1109. i++;
  1110. continue;
  1111. goto IL_28F;
  1112. }
  1113. }
  1114. bool do_animation = false;
  1115. if (tag_data.IsValid("do_animation"))
  1116. {
  1117. do_animation = true;
  1118. }
  1119. if (ikattachType == IKCtrlData.IKAttachType.NewPoint && ikdata is HandFootIKData)
  1120. {
  1121. HandFootIKData handFootIKData = ikdata as HandFootIKData;
  1122. handFootIKData.SetPullState(!tag_data.IsValid("pull_off"));
  1123. }
  1124. maidAndMan.IKTargetToBone(text, maidAndMan2, tgtbone_name, zero, ikattachType, search_sm, do_animation, IKCtrlData.IKExecTiming.Normal);
  1125. return false;
  1126. }
  1127. public bool TagIKDetach(KagTagSupport tag_data)
  1128. {
  1129. this.CheckAbsolutelyNecessaryTag(tag_data, "ikdetach", new string[]
  1130. {
  1131. "src",
  1132. "srcbone"
  1133. });
  1134. Maid maidAndMan = this.GetMaidAndMan(tag_data.GetTagProperty("src").AsString());
  1135. if (maidAndMan == null)
  1136. {
  1137. return false;
  1138. }
  1139. string text = tag_data.GetTagProperty("srcbone").AsString();
  1140. IKCtrlData ikdata = maidAndMan.IKCtrl.GetIKData(text);
  1141. if (!ikdata)
  1142. {
  1143. return false;
  1144. }
  1145. maidAndMan.IKDetach(text);
  1146. return false;
  1147. }
  1148. public bool TagAllIKDetach(KagTagSupport tag_data)
  1149. {
  1150. this.CheckAbsolutelyNecessaryTag(tag_data, "allikdetach", new string[]
  1151. {
  1152. "src"
  1153. });
  1154. Maid maidAndMan = this.GetMaidAndMan(tag_data.GetTagProperty("src").AsString());
  1155. if (maidAndMan == null)
  1156. {
  1157. return false;
  1158. }
  1159. float blendtime = 0f;
  1160. if (tag_data.IsValid("blendtime"))
  1161. {
  1162. blendtime = GameUty.MillisecondToSecond(tag_data.GetTagProperty("blendtime").AsInteger());
  1163. }
  1164. maidAndMan.AllIKDetach(blendtime);
  1165. return false;
  1166. }
  1167. public bool TagIKAttachOdogu(KagTagSupport tag_data)
  1168. {
  1169. this.CheckAbsolutelyNecessaryTag(tag_data, "ikattachodogu", new string[]
  1170. {
  1171. "src",
  1172. "srcbone",
  1173. "odogu"
  1174. });
  1175. Maid maidAndMan = this.GetMaidAndMan(tag_data.GetTagProperty("src").AsString());
  1176. if (!maidAndMan)
  1177. {
  1178. return false;
  1179. }
  1180. string text = tag_data.GetTagProperty("srcbone").AsString();
  1181. string odogu_name = tag_data.GetTagProperty("odogu").AsString();
  1182. IKCtrlData ikdata = maidAndMan.IKCtrl.GetIKData(text);
  1183. if (!ikdata)
  1184. {
  1185. return false;
  1186. }
  1187. string tgt_name = string.Empty;
  1188. if (tag_data.IsValid("target"))
  1189. {
  1190. tgt_name = tag_data.GetTagProperty("target").AsString();
  1191. }
  1192. Vector3 zero = Vector3.zero;
  1193. if (tag_data.IsValid("offsetx"))
  1194. {
  1195. zero.x = tag_data.GetTagProperty("offsetx").AsReal();
  1196. }
  1197. if (tag_data.IsValid("offsety"))
  1198. {
  1199. zero.y = tag_data.GetTagProperty("offsety").AsReal();
  1200. }
  1201. if (tag_data.IsValid("offsetz"))
  1202. {
  1203. zero.z = tag_data.GetTagProperty("offsetz").AsReal();
  1204. }
  1205. IKCtrlData.IKAttachType ikattachType = IKCtrlData.IKAttachType.Point;
  1206. if (tag_data.IsValid("attach_type"))
  1207. {
  1208. ikattachType = (IKCtrlData.IKAttachType)Enum.Parse(typeof(IKCtrlData.IKAttachType), tag_data.GetTagProperty("attach_type").AsString());
  1209. }
  1210. if (ikattachType == IKCtrlData.IKAttachType.NewPoint)
  1211. {
  1212. if (tag_data.IsValid("offset_world"))
  1213. {
  1214. ikdata.posOffsetType = IKCtrlData.PosOffsetType.OffsetWorld;
  1215. }
  1216. else if (tag_data.IsValid("offset_bone"))
  1217. {
  1218. ikdata.posOffsetType = IKCtrlData.PosOffsetType.OffsetBone;
  1219. }
  1220. }
  1221. ikdata.GetIKEnable(ikattachType).Recet();
  1222. if (tag_data.IsValid("disable"))
  1223. {
  1224. string[] array = tag_data.GetTagProperty("disable").AsString().Split(new char[]
  1225. {
  1226. ','
  1227. });
  1228. int i = 0;
  1229. while (i < array.Length)
  1230. {
  1231. string text2 = array[i];
  1232. string text3 = text2.ToLower();
  1233. if (text3 != null)
  1234. {
  1235. if (!(text3 == "x"))
  1236. {
  1237. if (!(text3 == "y"))
  1238. {
  1239. if (text3 == "z")
  1240. {
  1241. ikdata.GetIKEnable(ikattachType).EnableZ = false;
  1242. }
  1243. }
  1244. else
  1245. {
  1246. ikdata.GetIKEnable(ikattachType).EnableY = false;
  1247. }
  1248. }
  1249. else
  1250. {
  1251. ikdata.GetIKEnable(ikattachType).EnableX = false;
  1252. }
  1253. }
  1254. IL_277:
  1255. i++;
  1256. continue;
  1257. goto IL_277;
  1258. }
  1259. }
  1260. bool do_animation = false;
  1261. if (tag_data.IsValid("do_animation"))
  1262. {
  1263. do_animation = true;
  1264. }
  1265. if (ikattachType == IKCtrlData.IKAttachType.NewPoint && ikdata is HandFootIKData)
  1266. {
  1267. HandFootIKData handFootIKData = ikdata as HandFootIKData;
  1268. handFootIKData.SetPullState(!tag_data.IsValid("pull_off"));
  1269. }
  1270. maidAndMan.IKTargetToOdogu(text, odogu_name, tgt_name, zero, ikattachType, do_animation, IKCtrlData.IKExecTiming.Normal);
  1271. return false;
  1272. }
  1273. public bool TagIKAttachIKBone(KagTagSupport tag_data)
  1274. {
  1275. this.CheckAbsolutelyNecessaryTag(tag_data, "ikattachbone", new string[]
  1276. {
  1277. "src",
  1278. "srcbone",
  1279. "target",
  1280. "targetbone"
  1281. });
  1282. Maid maidAndMan = this.GetMaidAndMan(tag_data.GetTagProperty("src").AsString());
  1283. Maid maidAndMan2 = this.GetMaidAndMan(tag_data.GetTagProperty("target").AsString());
  1284. if (maidAndMan == null || maidAndMan2 == null)
  1285. {
  1286. return false;
  1287. }
  1288. string text = tag_data.GetTagProperty("srcbone").AsString();
  1289. string bone_name = tag_data.GetTagProperty("targetbone").AsString();
  1290. IKCtrlData ikdata = maidAndMan.IKCtrl.GetIKData(text);
  1291. if (!ikdata)
  1292. {
  1293. return false;
  1294. }
  1295. Vector3 zero = Vector3.zero;
  1296. if (tag_data.IsValid("offsetx"))
  1297. {
  1298. zero.x = tag_data.GetTagProperty("offsetx").AsReal();
  1299. }
  1300. if (tag_data.IsValid("offsety"))
  1301. {
  1302. zero.y = tag_data.GetTagProperty("offsety").AsReal();
  1303. }
  1304. if (tag_data.IsValid("offsetz"))
  1305. {
  1306. zero.z = tag_data.GetTagProperty("offsetz").AsReal();
  1307. }
  1308. IKCtrlData.IKAttachType ikattachType = IKCtrlData.IKAttachType.Point;
  1309. if (tag_data.IsValid("attach_type"))
  1310. {
  1311. ikattachType = (IKCtrlData.IKAttachType)Enum.Parse(typeof(IKCtrlData.IKAttachType), tag_data.GetTagProperty("attach_type").AsString());
  1312. }
  1313. if (ikattachType == IKCtrlData.IKAttachType.NewPoint)
  1314. {
  1315. if (tag_data.IsValid("offset_world"))
  1316. {
  1317. ikdata.posOffsetType = IKCtrlData.PosOffsetType.OffsetWorld;
  1318. }
  1319. else if (tag_data.IsValid("offset_bone"))
  1320. {
  1321. ikdata.posOffsetType = IKCtrlData.PosOffsetType.OffsetBone;
  1322. }
  1323. }
  1324. ikdata.GetIKEnable(ikattachType).Recet();
  1325. if (tag_data.IsValid("disable"))
  1326. {
  1327. string[] array = tag_data.GetTagProperty("disable").AsString().Split(new char[]
  1328. {
  1329. ','
  1330. });
  1331. int i = 0;
  1332. while (i < array.Length)
  1333. {
  1334. string text2 = array[i];
  1335. string text3 = text2.ToLower();
  1336. if (text3 != null)
  1337. {
  1338. if (!(text3 == "x"))
  1339. {
  1340. if (!(text3 == "y"))
  1341. {
  1342. if (text3 == "z")
  1343. {
  1344. ikdata.GetIKEnable(ikattachType).EnableZ = false;
  1345. }
  1346. }
  1347. else
  1348. {
  1349. ikdata.GetIKEnable(ikattachType).EnableY = false;
  1350. }
  1351. }
  1352. else
  1353. {
  1354. ikdata.GetIKEnable(ikattachType).EnableX = false;
  1355. }
  1356. }
  1357. IL_282:
  1358. i++;
  1359. continue;
  1360. goto IL_282;
  1361. }
  1362. }
  1363. bool do_animation = tag_data.IsValid("do_animation");
  1364. if (ikattachType == IKCtrlData.IKAttachType.NewPoint && ikdata is HandFootIKData)
  1365. {
  1366. HandFootIKData handFootIKData = ikdata as HandFootIKData;
  1367. handFootIKData.SetPullState(!tag_data.IsValid("pull_off"));
  1368. }
  1369. maidAndMan.IKTargetToIKBone(text, maidAndMan2, bone_name, zero, ikattachType, do_animation, IKCtrlData.IKExecTiming.Normal);
  1370. return false;
  1371. }
  1372. public bool TagIKSetBodyPos(KagTagSupport tag_data)
  1373. {
  1374. this.CheckAbsolutelyNecessaryTag(tag_data, "iksetbodypos", new string[]
  1375. {
  1376. "src",
  1377. "srcbone",
  1378. "target",
  1379. "targetbone"
  1380. });
  1381. Maid maidAndMan = this.GetMaidAndMan(tag_data.GetTagProperty("src").AsString());
  1382. Maid maidAndMan2 = this.GetMaidAndMan(tag_data.GetTagProperty("target").AsString());
  1383. if (maidAndMan == null || maidAndMan2 == null)
  1384. {
  1385. return false;
  1386. }
  1387. string tgtbone_name = tag_data.GetTagProperty("targetbone").AsString();
  1388. Vector3 zero = Vector3.zero;
  1389. if (tag_data.IsValid("offsetx"))
  1390. {
  1391. zero.x = tag_data.GetTagProperty("offsetx").AsReal();
  1392. }
  1393. if (tag_data.IsValid("offsety"))
  1394. {
  1395. zero.y = tag_data.GetTagProperty("offsety").AsReal();
  1396. }
  1397. if (tag_data.IsValid("offsetz"))
  1398. {
  1399. zero.z = tag_data.GetTagProperty("offsetz").AsReal();
  1400. }
  1401. IKCtrlData.IKAttachType attach_type = IKCtrlData.IKAttachType.NewPoint;
  1402. bool search_sm = tag_data.IsValid("Search_SM_Body");
  1403. maidAndMan.IKCtrl.BodyCtrlData.OffsetEnable.Recet();
  1404. if (tag_data.IsValid("disable"))
  1405. {
  1406. string[] array = tag_data.GetTagProperty("disable").AsString().Split(new char[]
  1407. {
  1408. ','
  1409. });
  1410. int i = 0;
  1411. while (i < array.Length)
  1412. {
  1413. string text = array[i];
  1414. string text2 = text.ToLower();
  1415. if (text2 != null)
  1416. {
  1417. if (!(text2 == "x"))
  1418. {
  1419. if (!(text2 == "y"))
  1420. {
  1421. if (text2 == "z")
  1422. {
  1423. maidAndMan.IKCtrl.BodyCtrlData.OffsetEnable.EnableZ = false;
  1424. }
  1425. }
  1426. else
  1427. {
  1428. maidAndMan.IKCtrl.BodyCtrlData.OffsetEnable.EnableY = false;
  1429. }
  1430. }
  1431. else
  1432. {
  1433. maidAndMan.IKCtrl.BodyCtrlData.OffsetEnable.EnableX = false;
  1434. }
  1435. }
  1436. IL_20A:
  1437. i++;
  1438. continue;
  1439. goto IL_20A;
  1440. }
  1441. }
  1442. if (tag_data.IsValid("heighttype"))
  1443. {
  1444. BodyCtrlData.HeightFitType heightFit = (BodyCtrlData.HeightFitType)Enum.Parse(typeof(BodyCtrlData.HeightFitType), tag_data.GetTagProperty("heighttype").AsString());
  1445. maidAndMan.IKCtrl.BodyCtrlData.HeightFit = heightFit;
  1446. }
  1447. maidAndMan.IKCtrl.BodyCtrlData.PosBaseBone = maidAndMan.body0.GetBone(tag_data.GetTagProperty("srcbone").AsString());
  1448. maidAndMan.IKCtrl.BodyCtrlData.posOffsetType = IKCtrlData.PosOffsetType.OffsetWorld;
  1449. maidAndMan.IKTargetToBone("体全体", maidAndMan2, tgtbone_name, zero, attach_type, search_sm, false, IKCtrlData.IKExecTiming.Normal);
  1450. return false;
  1451. }
  1452. public bool TagIKCheckThrough(KagTagSupport tag_data)
  1453. {
  1454. this.CheckAbsolutelyNecessaryTag(tag_data, "ikcheckthrough", new string[]
  1455. {
  1456. "src",
  1457. "srcbone",
  1458. "checkobj"
  1459. });
  1460. Maid maidAndMan = this.GetMaidAndMan(tag_data.GetTagProperty("src").AsString());
  1461. if (maidAndMan == null)
  1462. {
  1463. return false;
  1464. }
  1465. string tag_name = tag_data.GetTagProperty("srcbone").AsString();
  1466. HandFootIKData ikdata = maidAndMan.IKCtrl.GetIKData<HandFootIKData>(tag_name);
  1467. if (tag_data.IsValid("correctbone"))
  1468. {
  1469. ikdata.ToCorrectBone = maidAndMan.body0.GetBone(tag_data.GetTagProperty("correctbone").AsString());
  1470. }
  1471. string text = tag_data.GetTagProperty("checkobj").AsString();
  1472. float weight = 1f;
  1473. if (tag_data.IsValid("bendweight"))
  1474. {
  1475. weight = tag_data.GetTagProperty("bendweight").AsReal();
  1476. }
  1477. HandFootIKData.BorderCorrectData borderCorrectData;
  1478. if (text.Contains("Floor"))
  1479. {
  1480. borderCorrectData = ikdata.FloorCorrect;
  1481. }
  1482. else
  1483. {
  1484. if (!text.Contains("Wall"))
  1485. {
  1486. Debug.LogErrorFormat("{0}は定義できません", new object[]
  1487. {
  1488. text
  1489. });
  1490. return false;
  1491. }
  1492. borderCorrectData = ikdata.WallCorrect;
  1493. }
  1494. if (tag_data.IsValid("correcttype"))
  1495. {
  1496. ikdata.CorrectType = (HandFootIKData.BorderCorrectType)Enum.Parse(typeof(HandFootIKData.BorderCorrectType), tag_data.GetTagProperty("correcttype").AsString());
  1497. }
  1498. ikdata.Chain.bendConstraint.weight = weight;
  1499. borderCorrectData.Enable = true;
  1500. borderCorrectData.Border = float.Parse(text.Split(new char[]
  1501. {
  1502. ':'
  1503. })[1]);
  1504. return false;
  1505. }
  1506. public bool TagIKBendBoneCtrl(KagTagSupport tag_data)
  1507. {
  1508. return false;
  1509. }
  1510. public bool TagNextIKFlag(KagTagSupport tag_data)
  1511. {
  1512. this.CheckAbsolutelyNecessaryTag(tag_data, "nextikflag", new string[]
  1513. {
  1514. "src",
  1515. "srcbone",
  1516. "flagobj"
  1517. });
  1518. Maid maidAndMan = this.GetMaidAndMan(tag_data.GetTagProperty("src").AsString());
  1519. if (maidAndMan == null)
  1520. {
  1521. return false;
  1522. }
  1523. string tag_name = tag_data.GetTagProperty("srcbone").AsString();
  1524. IKCtrlData ik_data = maidAndMan.IKCtrl.GetIKData(tag_name);
  1525. if (!ik_data)
  1526. {
  1527. return false;
  1528. }
  1529. Action<IKCtrlData.IKAttachType> action = delegate(IKCtrlData.IKAttachType attach_type)
  1530. {
  1531. if (tag_data.IsValid("axis"))
  1532. {
  1533. ik_data.GetFlagData(attach_type).Axis = KasaiUtility.Vec3Parse(tag_data.GetTagProperty("axis").AsString(), ',');
  1534. }
  1535. if (tag_data.IsValid("value"))
  1536. {
  1537. ik_data.GetFlagData(attach_type).OnValue = tag_data.GetTagProperty("value").AsReal();
  1538. }
  1539. ik_data.GetFlagData(attach_type).BlendCtrlSelf = tag_data.IsValid("blendself");
  1540. string name = tag_data.GetTagProperty("flagobj").AsString();
  1541. ik_data.SetFlagTarget(attach_type, name);
  1542. };
  1543. if (tag_data.IsValid("attach_type"))
  1544. {
  1545. IKCtrlData.IKAttachType obj = (IKCtrlData.IKAttachType)Enum.Parse(typeof(IKCtrlData.IKAttachType), tag_data.GetTagProperty("attach_type").AsString());
  1546. action(obj);
  1547. }
  1548. else
  1549. {
  1550. action(IKCtrlData.IKAttachType.NewPoint);
  1551. action(IKCtrlData.IKAttachType.Rotate);
  1552. }
  1553. return false;
  1554. }
  1555. public bool TagIKAttachPointNext(KagTagSupport tag_data)
  1556. {
  1557. this.CheckAbsolutelyNecessaryTag(tag_data, "ikattachpointnext", new string[]
  1558. {
  1559. "src",
  1560. "srcbone",
  1561. "target",
  1562. "targetobj",
  1563. "targetpoint"
  1564. });
  1565. Maid maidAndMan = this.GetMaidAndMan(tag_data.GetTagProperty("src").AsString());
  1566. Maid maidAndMan2 = this.GetMaidAndMan(tag_data.GetTagProperty("target").AsString());
  1567. if (maidAndMan == null || maidAndMan2 == null)
  1568. {
  1569. return false;
  1570. }
  1571. IKCtrlData.IKExecTiming timing = IKCtrlData.IKExecTiming.FlagPositive;
  1572. if (tag_data.IsValid("exectiming"))
  1573. {
  1574. timing = (IKCtrlData.IKExecTiming)Enum.Parse(typeof(IKCtrlData.IKExecTiming), tag_data.GetTagProperty("exectiming").AsString());
  1575. }
  1576. string text = tag_data.GetTagProperty("srcbone").AsString();
  1577. string attachpoint_name = tag_data.GetTagProperty("targetpoint").AsString();
  1578. string tgt_name = tag_data.GetTagProperty("targetobj").AsString();
  1579. IKCtrlData ikdata = maidAndMan.IKCtrl.GetIKData(text);
  1580. if (!ikdata)
  1581. {
  1582. return false;
  1583. }
  1584. Vector3 zero = Vector3.zero;
  1585. if (tag_data.IsValid("offsetx"))
  1586. {
  1587. zero.x = tag_data.GetTagProperty("offsetx").AsReal();
  1588. }
  1589. if (tag_data.IsValid("offsety"))
  1590. {
  1591. zero.y = tag_data.GetTagProperty("offsety").AsReal();
  1592. }
  1593. if (tag_data.IsValid("offsetz"))
  1594. {
  1595. zero.z = tag_data.GetTagProperty("offsetz").AsReal();
  1596. }
  1597. IKCtrlData.IKAttachType ikattachType = IKCtrlData.IKAttachType.Point;
  1598. if (tag_data.IsValid("attach_type"))
  1599. {
  1600. ikattachType = (IKCtrlData.IKAttachType)Enum.Parse(typeof(IKCtrlData.IKAttachType), tag_data.GetTagProperty("attach_type").AsString());
  1601. }
  1602. if (ikattachType == IKCtrlData.IKAttachType.NewPoint)
  1603. {
  1604. if (tag_data.IsValid("offset_world"))
  1605. {
  1606. ikdata.posOffsetType = IKCtrlData.PosOffsetType.OffsetWorld;
  1607. }
  1608. else if (tag_data.IsValid("offset_bone"))
  1609. {
  1610. ikdata.posOffsetType = IKCtrlData.PosOffsetType.OffsetBone;
  1611. }
  1612. }
  1613. ikdata.GetIKEnable(ikattachType).Recet();
  1614. if (tag_data.IsValid("disable"))
  1615. {
  1616. string[] array = tag_data.GetTagProperty("disable").AsString().Split(new char[]
  1617. {
  1618. ','
  1619. });
  1620. int i = 0;
  1621. while (i < array.Length)
  1622. {
  1623. string text2 = array[i];
  1624. string text3 = text2.ToLower();
  1625. if (text3 != null)
  1626. {
  1627. if (!(text3 == "x"))
  1628. {
  1629. if (!(text3 == "y"))
  1630. {
  1631. if (text3 == "z")
  1632. {
  1633. ikdata.GetIKEnable(ikattachType).EnableZ = false;
  1634. }
  1635. }
  1636. else
  1637. {
  1638. ikdata.GetIKEnable(ikattachType).EnableY = false;
  1639. }
  1640. }
  1641. else
  1642. {
  1643. ikdata.GetIKEnable(ikattachType).EnableX = false;
  1644. }
  1645. }
  1646. IL_2D4:
  1647. i++;
  1648. continue;
  1649. goto IL_2D4;
  1650. }
  1651. }
  1652. string axisbone = string.Empty;
  1653. if (tag_data.IsValid("axisbone"))
  1654. {
  1655. axisbone = tag_data.GetTagProperty("axisbone").AsString();
  1656. }
  1657. bool do_animation = false;
  1658. if (tag_data.IsValid("do_animation"))
  1659. {
  1660. do_animation = true;
  1661. }
  1662. if (ikattachType == IKCtrlData.IKAttachType.NewPoint && ikdata is HandFootIKData)
  1663. {
  1664. HandFootIKData handFootIKData = ikdata as HandFootIKData;
  1665. handFootIKData.SetPullState(!tag_data.IsValid("pull_off"));
  1666. }
  1667. maidAndMan.IKTargetToAttachPoint(text, maidAndMan2, tgt_name, attachpoint_name, zero, ikattachType, axisbone, do_animation, timing);
  1668. return false;
  1669. }
  1670. public bool TagIKAttachBoneNext(KagTagSupport tag_data)
  1671. {
  1672. this.CheckAbsolutelyNecessaryTag(tag_data, "ikattachbonenext", new string[]
  1673. {
  1674. "src",
  1675. "srcbone",
  1676. "target",
  1677. "targetbone"
  1678. });
  1679. Maid maidAndMan = this.GetMaidAndMan(tag_data.GetTagProperty("src").AsString());
  1680. Maid maidAndMan2 = this.GetMaidAndMan(tag_data.GetTagProperty("target").AsString());
  1681. if (maidAndMan == null || maidAndMan2 == null)
  1682. {
  1683. return false;
  1684. }
  1685. IKCtrlData.IKExecTiming timing = IKCtrlData.IKExecTiming.FlagPositive;
  1686. if (tag_data.IsValid("exectiming"))
  1687. {
  1688. timing = (IKCtrlData.IKExecTiming)Enum.Parse(typeof(IKCtrlData.IKExecTiming), tag_data.GetTagProperty("exectiming").AsString());
  1689. }
  1690. string text = tag_data.GetTagProperty("srcbone").AsString();
  1691. string tgtbone_name = tag_data.GetTagProperty("targetbone").AsString();
  1692. IKCtrlData ikdata = maidAndMan.IKCtrl.GetIKData(text);
  1693. if (!ikdata)
  1694. {
  1695. return false;
  1696. }
  1697. bool search_sm = tag_data.IsValid("Search_SM_Body");
  1698. Vector3 zero = Vector3.zero;
  1699. if (tag_data.IsValid("offsetx"))
  1700. {
  1701. zero.x = tag_data.GetTagProperty("offsetx").AsReal();
  1702. }
  1703. if (tag_data.IsValid("offsety"))
  1704. {
  1705. zero.y = tag_data.GetTagProperty("offsety").AsReal();
  1706. }
  1707. if (tag_data.IsValid("offsetz"))
  1708. {
  1709. zero.z = tag_data.GetTagProperty("offsetz").AsReal();
  1710. }
  1711. IKCtrlData.IKAttachType ikattachType = IKCtrlData.IKAttachType.Point;
  1712. if (tag_data.IsValid("attach_type"))
  1713. {
  1714. ikattachType = (IKCtrlData.IKAttachType)Enum.Parse(typeof(IKCtrlData.IKAttachType), tag_data.GetTagProperty("attach_type").AsString());
  1715. }
  1716. if (ikattachType == IKCtrlData.IKAttachType.NewPoint)
  1717. {
  1718. if (tag_data.IsValid("offset_world"))
  1719. {
  1720. ikdata.posOffsetType = IKCtrlData.PosOffsetType.OffsetWorld;
  1721. }
  1722. else if (tag_data.IsValid("offset_bone"))
  1723. {
  1724. ikdata.posOffsetType = IKCtrlData.PosOffsetType.OffsetBone;
  1725. }
  1726. }
  1727. ikdata.GetIKEnable(ikattachType).Recet();
  1728. if (tag_data.IsValid("disable"))
  1729. {
  1730. string[] array = tag_data.GetTagProperty("disable").AsString().Split(new char[]
  1731. {
  1732. ','
  1733. });
  1734. int i = 0;
  1735. while (i < array.Length)
  1736. {
  1737. string text2 = array[i];
  1738. string text3 = text2.ToLower();
  1739. if (text3 != null)
  1740. {
  1741. if (!(text3 == "x"))
  1742. {
  1743. if (!(text3 == "y"))
  1744. {
  1745. if (text3 == "z")
  1746. {
  1747. ikdata.GetIKEnable(ikattachType).EnableZ = false;
  1748. }
  1749. }
  1750. else
  1751. {
  1752. ikdata.GetIKEnable(ikattachType).EnableY = false;
  1753. }
  1754. }
  1755. else
  1756. {
  1757. ikdata.GetIKEnable(ikattachType).EnableX = false;
  1758. }
  1759. }
  1760. IL_2C7:
  1761. i++;
  1762. continue;
  1763. goto IL_2C7;
  1764. }
  1765. }
  1766. bool do_animation = false;
  1767. if (tag_data.IsValid("do_animation"))
  1768. {
  1769. do_animation = true;
  1770. }
  1771. if (ikattachType == IKCtrlData.IKAttachType.NewPoint && ikdata is HandFootIKData)
  1772. {
  1773. HandFootIKData handFootIKData = ikdata as HandFootIKData;
  1774. handFootIKData.SetPullState(!tag_data.IsValid("pull_off"));
  1775. }
  1776. maidAndMan.IKTargetToBone(text, maidAndMan2, tgtbone_name, zero, ikattachType, search_sm, do_animation, timing);
  1777. return false;
  1778. }
  1779. public bool TagIKAttachOdoguNext(KagTagSupport tag_data)
  1780. {
  1781. this.CheckAbsolutelyNecessaryTag(tag_data, "ikattachodogunext", new string[]
  1782. {
  1783. "src",
  1784. "srcbone",
  1785. "odogu"
  1786. });
  1787. Maid maidAndMan = this.GetMaidAndMan(tag_data.GetTagProperty("src").AsString());
  1788. if (!maidAndMan)
  1789. {
  1790. return false;
  1791. }
  1792. IKCtrlData.IKExecTiming timing = IKCtrlData.IKExecTiming.FlagPositive;
  1793. if (tag_data.IsValid("exectiming"))
  1794. {
  1795. timing = (IKCtrlData.IKExecTiming)Enum.Parse(typeof(IKCtrlData.IKExecTiming), tag_data.GetTagProperty("exectiming").AsString());
  1796. }
  1797. string text = tag_data.GetTagProperty("srcbone").AsString();
  1798. string odogu_name = tag_data.GetTagProperty("odogu").AsString();
  1799. IKCtrlData ikdata = maidAndMan.IKCtrl.GetIKData(text);
  1800. if (!ikdata)
  1801. {
  1802. return false;
  1803. }
  1804. string tgt_name = string.Empty;
  1805. if (tag_data.IsValid("target"))
  1806. {
  1807. tgt_name = tag_data.GetTagProperty("target").AsString();
  1808. }
  1809. Vector3 zero = Vector3.zero;
  1810. if (tag_data.IsValid("offsetx"))
  1811. {
  1812. zero.x = tag_data.GetTagProperty("offsetx").AsReal();
  1813. }
  1814. if (tag_data.IsValid("offsety"))
  1815. {
  1816. zero.y = tag_data.GetTagProperty("offsety").AsReal();
  1817. }
  1818. if (tag_data.IsValid("offsetz"))
  1819. {
  1820. zero.z = tag_data.GetTagProperty("offsetz").AsReal();
  1821. }
  1822. IKCtrlData.IKAttachType ikattachType = IKCtrlData.IKAttachType.Point;
  1823. if (tag_data.IsValid("attach_type"))
  1824. {
  1825. ikattachType = (IKCtrlData.IKAttachType)Enum.Parse(typeof(IKCtrlData.IKAttachType), tag_data.GetTagProperty("attach_type").AsString());
  1826. }
  1827. if (ikattachType == IKCtrlData.IKAttachType.NewPoint)
  1828. {
  1829. if (tag_data.IsValid("offset_world"))
  1830. {
  1831. ikdata.posOffsetType = IKCtrlData.PosOffsetType.OffsetWorld;
  1832. }
  1833. else if (tag_data.IsValid("offset_bone"))
  1834. {
  1835. ikdata.posOffsetType = IKCtrlData.PosOffsetType.OffsetBone;
  1836. }
  1837. }
  1838. ikdata.GetIKEnable(ikattachType).Recet();
  1839. if (tag_data.IsValid("disable"))
  1840. {
  1841. string[] array = tag_data.GetTagProperty("disable").AsString().Split(new char[]
  1842. {
  1843. ','
  1844. });
  1845. int i = 0;
  1846. while (i < array.Length)
  1847. {
  1848. string text2 = array[i];
  1849. string text3 = text2.ToLower();
  1850. if (text3 != null)
  1851. {
  1852. if (!(text3 == "x"))
  1853. {
  1854. if (!(text3 == "y"))
  1855. {
  1856. if (text3 == "z")
  1857. {
  1858. ikdata.GetIKEnable(ikattachType).EnableZ = false;
  1859. }
  1860. }
  1861. else
  1862. {
  1863. ikdata.GetIKEnable(ikattachType).EnableY = false;
  1864. }
  1865. }
  1866. else
  1867. {
  1868. ikdata.GetIKEnable(ikattachType).EnableX = false;
  1869. }
  1870. }
  1871. IL_2B6:
  1872. i++;
  1873. continue;
  1874. goto IL_2B6;
  1875. }
  1876. }
  1877. bool do_animation = false;
  1878. if (tag_data.IsValid("do_animation"))
  1879. {
  1880. do_animation = true;
  1881. }
  1882. if (ikattachType == IKCtrlData.IKAttachType.NewPoint && ikdata is HandFootIKData)
  1883. {
  1884. HandFootIKData handFootIKData = ikdata as HandFootIKData;
  1885. handFootIKData.SetPullState(!tag_data.IsValid("pull_off"));
  1886. }
  1887. maidAndMan.IKTargetToOdogu(text, odogu_name, tgt_name, zero, ikattachType, do_animation, timing);
  1888. return false;
  1889. }
  1890. public bool TagIKAttachIKBoneNext(KagTagSupport tag_data)
  1891. {
  1892. this.CheckAbsolutelyNecessaryTag(tag_data, "ikattachbonenext", new string[]
  1893. {
  1894. "src",
  1895. "srcbone",
  1896. "target",
  1897. "targetbone"
  1898. });
  1899. Maid maidAndMan = this.GetMaidAndMan(tag_data.GetTagProperty("src").AsString());
  1900. Maid maidAndMan2 = this.GetMaidAndMan(tag_data.GetTagProperty("target").AsString());
  1901. if (maidAndMan == null || maidAndMan2 == null)
  1902. {
  1903. return false;
  1904. }
  1905. IKCtrlData.IKExecTiming timing = IKCtrlData.IKExecTiming.FlagPositive;
  1906. if (tag_data.IsValid("exectiming"))
  1907. {
  1908. timing = (IKCtrlData.IKExecTiming)Enum.Parse(typeof(IKCtrlData.IKExecTiming), tag_data.GetTagProperty("exectiming").AsString());
  1909. }
  1910. string text = tag_data.GetTagProperty("srcbone").AsString();
  1911. string bone_name = tag_data.GetTagProperty("targetbone").AsString();
  1912. IKCtrlData ikdata = maidAndMan.IKCtrl.GetIKData(text);
  1913. if (!ikdata)
  1914. {
  1915. return false;
  1916. }
  1917. Vector3 zero = Vector3.zero;
  1918. if (tag_data.IsValid("offsetx"))
  1919. {
  1920. zero.x = tag_data.GetTagProperty("offsetx").AsReal();
  1921. }
  1922. if (tag_data.IsValid("offsety"))
  1923. {
  1924. zero.y = tag_data.GetTagProperty("offsety").AsReal();
  1925. }
  1926. if (tag_data.IsValid("offsetz"))
  1927. {
  1928. zero.z = tag_data.GetTagProperty("offsetz").AsReal();
  1929. }
  1930. IKCtrlData.IKAttachType ikattachType = IKCtrlData.IKAttachType.Point;
  1931. if (tag_data.IsValid("attach_type"))
  1932. {
  1933. ikattachType = (IKCtrlData.IKAttachType)Enum.Parse(typeof(IKCtrlData.IKAttachType), tag_data.GetTagProperty("attach_type").AsString());
  1934. }
  1935. if (ikattachType == IKCtrlData.IKAttachType.NewPoint)
  1936. {
  1937. if (tag_data.IsValid("offset_world"))
  1938. {
  1939. ikdata.posOffsetType = IKCtrlData.PosOffsetType.OffsetWorld;
  1940. }
  1941. else if (tag_data.IsValid("offset_bone"))
  1942. {
  1943. ikdata.posOffsetType = IKCtrlData.PosOffsetType.OffsetBone;
  1944. }
  1945. }
  1946. ikdata.GetIKEnable(ikattachType).Recet();
  1947. if (tag_data.IsValid("disable"))
  1948. {
  1949. string[] array = tag_data.GetTagProperty("disable").AsString().Split(new char[]
  1950. {
  1951. ','
  1952. });
  1953. int i = 0;
  1954. while (i < array.Length)
  1955. {
  1956. string text2 = array[i];
  1957. string text3 = text2.ToLower();
  1958. if (text3 != null)
  1959. {
  1960. if (!(text3 == "x"))
  1961. {
  1962. if (!(text3 == "y"))
  1963. {
  1964. if (text3 == "z")
  1965. {
  1966. ikdata.GetIKEnable(ikattachType).EnableZ = false;
  1967. }
  1968. }
  1969. else
  1970. {
  1971. ikdata.GetIKEnable(ikattachType).EnableY = false;
  1972. }
  1973. }
  1974. else
  1975. {
  1976. ikdata.GetIKEnable(ikattachType).EnableX = false;
  1977. }
  1978. }
  1979. IL_2BA:
  1980. i++;
  1981. continue;
  1982. goto IL_2BA;
  1983. }
  1984. }
  1985. bool do_animation = tag_data.IsValid("do_animation");
  1986. if (ikattachType == IKCtrlData.IKAttachType.NewPoint && ikdata is HandFootIKData)
  1987. {
  1988. HandFootIKData handFootIKData = ikdata as HandFootIKData;
  1989. handFootIKData.SetPullState(!tag_data.IsValid("pull_off"));
  1990. }
  1991. maidAndMan.IKTargetToIKBone(text, maidAndMan2, bone_name, zero, ikattachType, do_animation, timing);
  1992. return false;
  1993. }
  1994. public bool TagIKSetPelvisPull(KagTagSupport tag_data)
  1995. {
  1996. this.CheckAbsolutelyNecessaryTag(tag_data, "iksetpelvispull", new string[]
  1997. {
  1998. "src"
  1999. });
  2000. Maid maidAndMan = this.GetMaidAndMan(tag_data.GetTagProperty("src").AsString());
  2001. if (!maidAndMan)
  2002. {
  2003. return false;
  2004. }
  2005. bool pelvisPull = tag_data.IsValid("on");
  2006. maidAndMan.body0.IKCtrl.SetPelvisPull(pelvisPull);
  2007. return false;
  2008. }
  2009. public bool TagAllPos(KagTagSupport tag_data)
  2010. {
  2011. bool flag = false;
  2012. bool flag2 = false;
  2013. Vector3 zero = Vector3.zero;
  2014. Vector3 zero2 = Vector3.zero;
  2015. if (tag_data.IsValid("x"))
  2016. {
  2017. flag = true;
  2018. zero.x = tag_data.GetTagProperty("x").AsReal();
  2019. }
  2020. if (tag_data.IsValid("y"))
  2021. {
  2022. flag = true;
  2023. zero.y = tag_data.GetTagProperty("y").AsReal();
  2024. }
  2025. if (tag_data.IsValid("z"))
  2026. {
  2027. flag = true;
  2028. zero.z = tag_data.GetTagProperty("z").AsReal();
  2029. }
  2030. if (tag_data.IsValid("rx"))
  2031. {
  2032. flag2 = true;
  2033. zero2.x = tag_data.GetTagProperty("rx").AsReal();
  2034. }
  2035. if (tag_data.IsValid("ry"))
  2036. {
  2037. flag2 = true;
  2038. zero2.y = tag_data.GetTagProperty("ry").AsReal();
  2039. }
  2040. if (tag_data.IsValid("rz"))
  2041. {
  2042. flag2 = true;
  2043. zero2.z = tag_data.GetTagProperty("rz").AsReal();
  2044. }
  2045. if (flag)
  2046. {
  2047. GameMain.Instance.CharacterMgr.SetCharaAllPos(zero);
  2048. if (!this.script_mgr_.compatibilityMode)
  2049. {
  2050. for (int i = 0; i < GameMain.Instance.CharacterMgr.GetMaidCount(); i++)
  2051. {
  2052. Maid maid = GameMain.Instance.CharacterMgr.GetMaid(i);
  2053. if (maid != null && maid.body0 != null)
  2054. {
  2055. maid.body0.SetBoneHitHeightY(zero.y);
  2056. }
  2057. }
  2058. }
  2059. }
  2060. if (flag2)
  2061. {
  2062. GameMain.Instance.CharacterMgr.SetCharaAllRot(zero2);
  2063. }
  2064. return false;
  2065. }
  2066. public bool TagAllOffSet(KagTagSupport tag_data)
  2067. {
  2068. bool flag = false;
  2069. bool flag2 = false;
  2070. Vector3 zero = Vector3.zero;
  2071. Vector3 zero2 = Vector3.zero;
  2072. if (tag_data.IsValid("x"))
  2073. {
  2074. flag = true;
  2075. zero.x = tag_data.GetTagProperty("x").AsReal();
  2076. }
  2077. if (tag_data.IsValid("y"))
  2078. {
  2079. flag = true;
  2080. zero.y = tag_data.GetTagProperty("y").AsReal();
  2081. }
  2082. if (tag_data.IsValid("z"))
  2083. {
  2084. flag = true;
  2085. zero.z = tag_data.GetTagProperty("z").AsReal();
  2086. }
  2087. if (tag_data.IsValid("rx"))
  2088. {
  2089. flag2 = true;
  2090. zero2.x = tag_data.GetTagProperty("rx").AsReal();
  2091. }
  2092. if (tag_data.IsValid("ry"))
  2093. {
  2094. flag2 = true;
  2095. zero2.y = tag_data.GetTagProperty("ry").AsReal();
  2096. }
  2097. if (tag_data.IsValid("rz"))
  2098. {
  2099. flag2 = true;
  2100. zero2.z = tag_data.GetTagProperty("rz").AsReal();
  2101. }
  2102. if (flag)
  2103. {
  2104. GameMain.Instance.CharacterMgr.CharaAllOfsetPos(zero);
  2105. }
  2106. if (flag2)
  2107. {
  2108. GameMain.Instance.CharacterMgr.CharaAllOfsetRot(zero2);
  2109. }
  2110. return false;
  2111. }
  2112. public bool TagAddAllOffset(KagTagSupport tag_data)
  2113. {
  2114. bool flag = false;
  2115. bool flag2 = false;
  2116. Vector3 zero = Vector3.zero;
  2117. Vector3 zero2 = Vector3.zero;
  2118. if (tag_data.IsValid("x"))
  2119. {
  2120. flag = true;
  2121. zero.x = tag_data.GetTagProperty("x").AsReal();
  2122. }
  2123. if (tag_data.IsValid("y"))
  2124. {
  2125. flag = true;
  2126. zero.y = tag_data.GetTagProperty("y").AsReal();
  2127. }
  2128. if (tag_data.IsValid("z"))
  2129. {
  2130. flag = true;
  2131. zero.z = tag_data.GetTagProperty("z").AsReal();
  2132. }
  2133. if (tag_data.IsValid("rx"))
  2134. {
  2135. flag2 = true;
  2136. zero2.x = tag_data.GetTagProperty("rx").AsReal();
  2137. }
  2138. if (tag_data.IsValid("ry"))
  2139. {
  2140. flag2 = true;
  2141. zero2.y = tag_data.GetTagProperty("ry").AsReal();
  2142. }
  2143. if (tag_data.IsValid("rz"))
  2144. {
  2145. flag2 = true;
  2146. zero2.z = tag_data.GetTagProperty("rz").AsReal();
  2147. }
  2148. if (flag)
  2149. {
  2150. Vector3 charaAllOfsetPos = GameMain.Instance.CharacterMgr.GetCharaAllOfsetPos();
  2151. GameMain.Instance.CharacterMgr.CharaAllOfsetPos(charaAllOfsetPos + zero);
  2152. }
  2153. if (flag2)
  2154. {
  2155. Vector3 charaAllOfsetRot = GameMain.Instance.CharacterMgr.GetCharaAllOfsetRot();
  2156. GameMain.Instance.CharacterMgr.CharaAllOfsetRot(charaAllOfsetRot + zero2);
  2157. }
  2158. return false;
  2159. }
  2160. public bool TagOffSet(KagTagSupport tag_data)
  2161. {
  2162. Maid maidAndMan = this.GetMaidAndMan(tag_data, true);
  2163. if (maidAndMan == null)
  2164. {
  2165. return false;
  2166. }
  2167. bool flag = false;
  2168. bool flag2 = false;
  2169. Vector3 zero = Vector3.zero;
  2170. Vector3 zero2 = Vector3.zero;
  2171. if (tag_data.IsValid("x"))
  2172. {
  2173. flag = true;
  2174. zero.x = tag_data.GetTagProperty("x").AsReal();
  2175. }
  2176. if (tag_data.IsValid("y"))
  2177. {
  2178. flag = true;
  2179. zero.y = tag_data.GetTagProperty("y").AsReal();
  2180. }
  2181. if (tag_data.IsValid("z"))
  2182. {
  2183. flag = true;
  2184. zero.z = tag_data.GetTagProperty("z").AsReal();
  2185. }
  2186. if (tag_data.IsValid("rx"))
  2187. {
  2188. flag2 = true;
  2189. zero2.x = tag_data.GetTagProperty("rx").AsReal();
  2190. }
  2191. if (tag_data.IsValid("ry"))
  2192. {
  2193. flag2 = true;
  2194. zero2.y = tag_data.GetTagProperty("ry").AsReal();
  2195. }
  2196. if (tag_data.IsValid("rz"))
  2197. {
  2198. flag2 = true;
  2199. zero2.z = tag_data.GetTagProperty("rz").AsReal();
  2200. }
  2201. if (flag)
  2202. {
  2203. maidAndMan.SetPos(zero);
  2204. maidAndMan.baseOffset = zero;
  2205. }
  2206. if (flag2)
  2207. {
  2208. maidAndMan.SetRot(zero2);
  2209. maidAndMan.baseEulerAngles = zero2;
  2210. }
  2211. if (ScriptManager.isGP001Mode)
  2212. {
  2213. maidAndMan.UpdateTransformData();
  2214. }
  2215. return false;
  2216. }
  2217. public bool TagRotatelink(KagTagSupport tag_data)
  2218. {
  2219. Maid maidAndMan = this.GetMaidAndMan(tag_data, true);
  2220. if (maidAndMan == null)
  2221. {
  2222. return false;
  2223. }
  2224. Maid maidAndMan2 = this.GetMaidAndMan(tag_data, false);
  2225. if (maidAndMan2 == null)
  2226. {
  2227. return false;
  2228. }
  2229. maidAndMan.rotateLinkMaid = (maidAndMan2.rotateLinkMaid = string.Empty);
  2230. if (tag_data.IsValid("clear"))
  2231. {
  2232. return false;
  2233. }
  2234. maidAndMan.rotateLinkMaid = maidAndMan2.status.guid;
  2235. maidAndMan2.rotateLinkMaid = maidAndMan.status.guid;
  2236. return false;
  2237. }
  2238. public bool TagAxisRotation(KagTagSupport tag_data)
  2239. {
  2240. bool flag = false;
  2241. Vector3 zero = Vector3.zero;
  2242. if (tag_data.IsValid("rx"))
  2243. {
  2244. flag = true;
  2245. zero.x = tag_data.GetTagProperty("rx").AsReal();
  2246. }
  2247. if (tag_data.IsValid("ry"))
  2248. {
  2249. flag = true;
  2250. zero.y = tag_data.GetTagProperty("ry").AsReal();
  2251. }
  2252. if (tag_data.IsValid("rz"))
  2253. {
  2254. flag = true;
  2255. zero.z = tag_data.GetTagProperty("rz").AsReal();
  2256. }
  2257. if (flag)
  2258. {
  2259. Vector3 charaAllOfsetRot = GameMain.Instance.CharacterMgr.GetCharaAllOfsetRot();
  2260. GameMain.Instance.CharacterMgr.CharaAllOfsetRot(charaAllOfsetRot + zero);
  2261. }
  2262. return true;
  2263. }
  2264. public bool TagAllResetPos(KagTagSupport tag_data)
  2265. {
  2266. GameMain.Instance.CharacterMgr.ResetCharaPosAll();
  2267. return false;
  2268. }
  2269. public bool TagTransform(KagTagSupport tag_data)
  2270. {
  2271. Maid maidAndMan = this.GetMaidAndMan(tag_data, true);
  2272. return maidAndMan == null && false;
  2273. }
  2274. public bool TagPosition(KagTagSupport tag_data)
  2275. {
  2276. Maid maidAndMan = this.GetMaidAndMan(tag_data, true);
  2277. return maidAndMan == null && false;
  2278. }
  2279. public bool TagRotation(KagTagSupport tag_data)
  2280. {
  2281. Maid maidAndMan = this.GetMaidAndMan(tag_data, true);
  2282. return maidAndMan == null && false;
  2283. }
  2284. public bool TagCamera(KagTagSupport tag_data)
  2285. {
  2286. Vector3 zero = Vector3.zero;
  2287. Vector2 zero2 = Vector2.zero;
  2288. float f_fRadius = 0f;
  2289. if (tag_data.IsValid("reset"))
  2290. {
  2291. GameMain.Instance.MainCamera.ResetFromScriptOnTarget();
  2292. return false;
  2293. }
  2294. if (tag_data.IsValid("radius"))
  2295. {
  2296. f_fRadius = tag_data.GetTagProperty("radius").AsReal();
  2297. }
  2298. if (tag_data.IsValid("cx"))
  2299. {
  2300. zero.x = tag_data.GetTagProperty("cx").AsReal();
  2301. }
  2302. if (tag_data.IsValid("cy"))
  2303. {
  2304. zero.y = tag_data.GetTagProperty("cy").AsReal();
  2305. }
  2306. if (tag_data.IsValid("cz"))
  2307. {
  2308. zero.z = tag_data.GetTagProperty("cz").AsReal();
  2309. }
  2310. if (tag_data.IsValid("rx"))
  2311. {
  2312. zero2.x = tag_data.GetTagProperty("rx").AsReal();
  2313. }
  2314. if (tag_data.IsValid("ry"))
  2315. {
  2316. zero2.y = tag_data.GetTagProperty("ry").AsReal();
  2317. }
  2318. GameMain.Instance.MainCamera.SetFromScriptOnTarget(zero, f_fRadius, zero2);
  2319. return false;
  2320. }
  2321. public bool TagCameraChase(KagTagSupport tag_data)
  2322. {
  2323. this.CheckAbsolutelyNecessaryTag(tag_data, "camerachase", new string[]
  2324. {
  2325. "chase"
  2326. });
  2327. Maid maidAndMan = this.GetMaidAndMan(tag_data, true);
  2328. if (maidAndMan == null)
  2329. {
  2330. return false;
  2331. }
  2332. string f_strAttachBone = tag_data.GetTagProperty("chase").AsString();
  2333. Vector3 zero = Vector3.zero;
  2334. if (tag_data.IsValid("offsx"))
  2335. {
  2336. zero.x = tag_data.GetTagProperty("offsx").AsReal();
  2337. }
  2338. if (tag_data.IsValid("offsy"))
  2339. {
  2340. zero.y = tag_data.GetTagProperty("offsy").AsReal();
  2341. }
  2342. if (tag_data.IsValid("offsz"))
  2343. {
  2344. zero.z = tag_data.GetTagProperty("offsz").AsReal();
  2345. }
  2346. bool f_fOnece = true;
  2347. if (tag_data.IsValid("continue"))
  2348. {
  2349. f_fOnece = false;
  2350. }
  2351. int millisecond = 0;
  2352. if (tag_data.IsValid("time"))
  2353. {
  2354. millisecond = tag_data.GetTagProperty("time").AsInteger();
  2355. }
  2356. GameMain.Instance.MainCamera.SetChaseCamera(maidAndMan, f_strAttachBone, zero, f_fOnece, GameUty.MillisecondToSecond(millisecond));
  2357. return false;
  2358. }
  2359. public bool TagCameraChaseStop(KagTagSupport tag_data)
  2360. {
  2361. this.CheckAbsolutelyNecessaryTag(tag_data, "camerachasestop", new string[0]);
  2362. GameMain.Instance.MainCamera.RemoveChaseCameraAll();
  2363. return false;
  2364. }
  2365. public bool TagCameraAnimationStart(KagTagSupport tag_data)
  2366. {
  2367. this.CheckAbsolutelyNecessaryTag(tag_data, "cameraanimationstart", new string[]
  2368. {
  2369. "time"
  2370. });
  2371. bool f_bStart = false;
  2372. Vector3 zero = Vector3.zero;
  2373. Vector3 zero2 = Vector3.zero;
  2374. Vector2 zero3 = Vector2.zero;
  2375. Vector2 zero4 = Vector2.zero;
  2376. float f_fRadius = 0f;
  2377. float f_fSRadius = 0f;
  2378. float f_fTime = GameUty.MillisecondToSecond(tag_data.GetTagProperty("time").AsInteger());
  2379. string f_strEaseType = string.Empty;
  2380. bool f_bSkip = tag_data.IsValid("skip");
  2381. if (tag_data.IsValid("radius"))
  2382. {
  2383. f_fRadius = tag_data.GetTagProperty("radius").AsReal();
  2384. }
  2385. if (tag_data.IsValid("cx"))
  2386. {
  2387. zero.x = tag_data.GetTagProperty("cx").AsReal();
  2388. }
  2389. if (tag_data.IsValid("cy"))
  2390. {
  2391. zero.y = tag_data.GetTagProperty("cy").AsReal();
  2392. }
  2393. if (tag_data.IsValid("cz"))
  2394. {
  2395. zero.z = tag_data.GetTagProperty("cz").AsReal();
  2396. }
  2397. if (tag_data.IsValid("rx"))
  2398. {
  2399. zero3.x = tag_data.GetTagProperty("rx").AsReal();
  2400. }
  2401. if (tag_data.IsValid("ry"))
  2402. {
  2403. zero3.y = tag_data.GetTagProperty("ry").AsReal();
  2404. }
  2405. if (tag_data.IsValid("sradius"))
  2406. {
  2407. f_fSRadius = tag_data.GetTagProperty("sradius").AsReal();
  2408. f_bStart = true;
  2409. }
  2410. if (tag_data.IsValid("scx"))
  2411. {
  2412. zero2.x = tag_data.GetTagProperty("scx").AsReal();
  2413. f_bStart = true;
  2414. }
  2415. if (tag_data.IsValid("scy"))
  2416. {
  2417. zero2.y = tag_data.GetTagProperty("scy").AsReal();
  2418. f_bStart = true;
  2419. }
  2420. if (tag_data.IsValid("scz"))
  2421. {
  2422. zero2.z = tag_data.GetTagProperty("scz").AsReal();
  2423. f_bStart = true;
  2424. }
  2425. if (tag_data.IsValid("srx"))
  2426. {
  2427. zero4.x = tag_data.GetTagProperty("srx").AsReal();
  2428. f_bStart = true;
  2429. }
  2430. if (tag_data.IsValid("sry"))
  2431. {
  2432. zero4.y = tag_data.GetTagProperty("sry").AsReal();
  2433. f_bStart = true;
  2434. }
  2435. if (tag_data.IsValid("easetype"))
  2436. {
  2437. f_strEaseType = tag_data.GetTagProperty("easetype").AsString();
  2438. }
  2439. float f_fDelay = 0f;
  2440. if (tag_data.IsValid("delay"))
  2441. {
  2442. f_fDelay = GameUty.MillisecondToSecond(tag_data.GetTagProperty("delay").AsInteger());
  2443. }
  2444. GameMain.Instance.MainCamera.StartAnimationTo(f_bStart, zero2, f_fSRadius, zero4, zero, f_fRadius, zero3, f_fTime, f_strEaseType, f_bSkip, f_fDelay);
  2445. return false;
  2446. }
  2447. public bool TagCameraControl(KagTagSupport tag_data)
  2448. {
  2449. GameMain.Instance.MainCamera.SetControl(tag_data.IsValid("true"));
  2450. return false;
  2451. }
  2452. public bool TagLightMain(KagTagSupport tag_data)
  2453. {
  2454. Vector3 zero = Vector3.zero;
  2455. float intensity = 0f;
  2456. bool flag = false;
  2457. bool flag2 = false;
  2458. if (tag_data.IsValid("rx"))
  2459. {
  2460. zero.x = tag_data.GetTagProperty("rx").AsReal();
  2461. flag = true;
  2462. }
  2463. if (tag_data.IsValid("ry"))
  2464. {
  2465. zero.y = tag_data.GetTagProperty("ry").AsReal();
  2466. flag = true;
  2467. }
  2468. if (tag_data.IsValid("rz"))
  2469. {
  2470. zero.z = tag_data.GetTagProperty("rz").AsReal();
  2471. flag = true;
  2472. }
  2473. if (tag_data.IsValid("intensity"))
  2474. {
  2475. intensity = tag_data.GetTagProperty("intensity").AsReal();
  2476. flag2 = true;
  2477. }
  2478. if (flag)
  2479. {
  2480. GameMain.Instance.MainLight.SetRotation(zero);
  2481. }
  2482. if (flag2)
  2483. {
  2484. GameMain.Instance.MainLight.SetIntensity(intensity);
  2485. }
  2486. return false;
  2487. }
  2488. public bool TagPlayBgm(KagTagSupport tag_data)
  2489. {
  2490. this.CheckAbsolutelyNecessaryTag(tag_data, "playbgm", new string[]
  2491. {
  2492. "file"
  2493. });
  2494. string text = tag_data.GetTagProperty("file").AsString();
  2495. text = Path.ChangeExtension(text, ".ogg");
  2496. int millisecond = 0;
  2497. if (tag_data.IsValid("fade"))
  2498. {
  2499. millisecond = tag_data.GetTagProperty("fade").AsInteger();
  2500. }
  2501. if (tag_data.IsValid("old"))
  2502. {
  2503. string f_strFileName = Path.GetFileNameWithoutExtension(text) + "_OLD.ogg";
  2504. if (GameUty.FileSystem.IsExistentFile(f_strFileName))
  2505. {
  2506. GameMain.Instance.SoundMgr.PlayBGM(f_strFileName, GameUty.MillisecondToSecond(millisecond), true);
  2507. }
  2508. else
  2509. {
  2510. GameMain.Instance.SoundMgr.PlayBGMLegacy(text, GameUty.MillisecondToSecond(millisecond), true);
  2511. }
  2512. }
  2513. else
  2514. {
  2515. GameMain.Instance.SoundMgr.PlayBGM(text, GameUty.MillisecondToSecond(millisecond), true);
  2516. }
  2517. return false;
  2518. }
  2519. public bool TagStopBgm(KagTagSupport tag_data)
  2520. {
  2521. int millisecond = 0;
  2522. if (tag_data.IsValid("fade"))
  2523. {
  2524. millisecond = tag_data.GetTagProperty("fade").AsInteger();
  2525. }
  2526. GameMain.Instance.SoundMgr.StopBGM(GameUty.MillisecondToSecond(millisecond));
  2527. return false;
  2528. }
  2529. public bool TagPlayEnv(KagTagSupport tag_data)
  2530. {
  2531. this.CheckAbsolutelyNecessaryTag(tag_data, "playenv", new string[]
  2532. {
  2533. "file"
  2534. });
  2535. string text = tag_data.GetTagProperty("file").AsString();
  2536. text = Path.ChangeExtension(text, ".ogg");
  2537. int millisecond = 0;
  2538. if (tag_data.IsValid("fade"))
  2539. {
  2540. millisecond = tag_data.GetTagProperty("fade").AsInteger();
  2541. }
  2542. GameMain.Instance.SoundMgr.PlayEnv(text, GameUty.MillisecondToSecond(millisecond));
  2543. return false;
  2544. }
  2545. public bool TagStopEnv(KagTagSupport tag_data)
  2546. {
  2547. int millisecond = 0;
  2548. if (tag_data.IsValid("fade"))
  2549. {
  2550. millisecond = tag_data.GetTagProperty("fade").AsInteger();
  2551. }
  2552. GameMain.Instance.SoundMgr.StopEnv(GameUty.MillisecondToSecond(millisecond));
  2553. return false;
  2554. }
  2555. public bool TagPlaySe(KagTagSupport tag_data)
  2556. {
  2557. this.CheckAbsolutelyNecessaryTag(tag_data, "playse", new string[]
  2558. {
  2559. "file"
  2560. });
  2561. string bgm_file_name = tag_data.GetTagProperty("file").AsString();
  2562. bgm_file_name = Path.ChangeExtension(bgm_file_name, ".ogg");
  2563. if (bgm_file_name == "SE016.ogg" && !GameMain.Instance.CMSystem.EjaculationSeEnabled)
  2564. {
  2565. return false;
  2566. }
  2567. bool loop = tag_data.IsValid("loop");
  2568. int num = 0;
  2569. if (tag_data.IsValid("wait"))
  2570. {
  2571. num = tag_data.GetTagProperty("wait").AsInteger();
  2572. }
  2573. WaitEventList waitEventList = this.GetWaitEventList("se");
  2574. if (num <= 0)
  2575. {
  2576. GameMain.Instance.SoundMgr.PlaySe(bgm_file_name, loop);
  2577. waitEventList.Clear();
  2578. }
  2579. else
  2580. {
  2581. waitEventList.Add(delegate
  2582. {
  2583. GameMain.Instance.SoundMgr.PlaySe(bgm_file_name, loop);
  2584. }, num);
  2585. }
  2586. return false;
  2587. }
  2588. public bool TagStopSe(KagTagSupport tag_data)
  2589. {
  2590. string text = string.Empty;
  2591. if (tag_data.IsValid("file"))
  2592. {
  2593. text = tag_data.GetTagProperty("file").AsString();
  2594. text = Path.ChangeExtension(text, ".ogg");
  2595. }
  2596. if (!string.IsNullOrEmpty(text))
  2597. {
  2598. GameMain.Instance.SoundMgr.StopSe(text);
  2599. }
  2600. else
  2601. {
  2602. GameMain.Instance.SoundMgr.StopSe();
  2603. }
  2604. return false;
  2605. }
  2606. public bool TagPlayVoice(KagTagSupport tag_data)
  2607. {
  2608. bool result = false;
  2609. this.CheckAbsolutelyNecessaryTag(tag_data, "playvoice", new string[]
  2610. {
  2611. "voice"
  2612. });
  2613. string text = tag_data.GetTagProperty("voice").AsString();
  2614. text = Path.ChangeExtension(text, ".ogg");
  2615. bool flag = tag_data.IsValid("loop");
  2616. int millisecond = 0;
  2617. if (tag_data.IsValid("fade"))
  2618. {
  2619. millisecond = tag_data.GetTagProperty("fade").AsInteger();
  2620. }
  2621. int num = -1;
  2622. if (!tag_data.IsValid("dummy"))
  2623. {
  2624. Maid maidAndMan = this.GetMaidAndMan(tag_data, true);
  2625. if (maidAndMan != null && maidAndMan.Visible)
  2626. {
  2627. maidAndMan.AudioMan.LoadPlay(text, GameUty.MillisecondToSecond(millisecond), true, flag);
  2628. if (maidAndMan.AudioMan.isPlay() && maidAndMan.AudioMan.audiosource.clip != null)
  2629. {
  2630. num = (int)(maidAndMan.AudioMan.audiosource.clip.length * 1000f);
  2631. }
  2632. if (tag_data.IsValid("wait"))
  2633. {
  2634. result = this.SetMaidVoiceWait(maidAndMan);
  2635. }
  2636. }
  2637. else
  2638. {
  2639. int voice_pitch = 50;
  2640. AudioSourceMgr.Type soundType = AudioSourceMgr.Type.Voice;
  2641. if (maidAndMan != null)
  2642. {
  2643. voice_pitch = maidAndMan.VoicePitch;
  2644. soundType = maidAndMan.AudioMan.SoundType;
  2645. }
  2646. GameMain.Instance.SoundMgr.PlayDummyVoice(text, GameUty.MillisecondToSecond(millisecond), true, flag, voice_pitch, soundType);
  2647. }
  2648. }
  2649. else
  2650. {
  2651. GameMain.Instance.SoundMgr.PlayDummyVoice(text, GameUty.MillisecondToSecond(millisecond), true, flag, 50, AudioSourceMgr.Type.Voice);
  2652. if (GameMain.Instance.SoundMgr.m_AudioDummyVoice.isPlay() && GameMain.Instance.SoundMgr.m_AudioDummyVoice.audiosource.clip != null)
  2653. {
  2654. num = (int)(GameMain.Instance.SoundMgr.m_AudioDummyVoice.audiosource.clip.length * 1000f);
  2655. }
  2656. if (tag_data.IsValid("wait"))
  2657. {
  2658. result = this.SetDummyVoiceWait();
  2659. }
  2660. }
  2661. if (!flag && !string.IsNullOrEmpty(this.subtitle_data.text) && (0 <= this.subtitle_data.displayTime || 0 < num))
  2662. {
  2663. SubtitleMovieManager globalInstance = SubtitleMovieManager.GetGlobalInstance(this.subtitle_data.casinoType);
  2664. globalInstance.autoDestroy = true;
  2665. int num2 = (0 > this.subtitle_data.displayTime) ? num : this.subtitle_data.displayTime;
  2666. num2 += this.subtitle_data.addDisplayTime;
  2667. globalInstance.Play(this.subtitle_data.text, num2);
  2668. this.subtitle_data.Clear();
  2669. }
  2670. return result;
  2671. }
  2672. public bool TagStopVoice(KagTagSupport tag_data)
  2673. {
  2674. if (!tag_data.IsValid("dummy"))
  2675. {
  2676. Maid maidAndMan = this.GetMaidAndMan(tag_data, true);
  2677. if (maidAndMan == null)
  2678. {
  2679. return false;
  2680. }
  2681. maidAndMan.AudioMan.Stop();
  2682. }
  2683. else
  2684. {
  2685. GameMain.Instance.SoundMgr.StopDummyVoide();
  2686. }
  2687. return false;
  2688. }
  2689. public bool TagStopSound(KagTagSupport tag_data)
  2690. {
  2691. GameMain.Instance.SoundMgr.StopAll();
  2692. return false;
  2693. }
  2694. public bool TagFade3D(KagTagSupport tag_data)
  2695. {
  2696. this.CheckAbsolutelyNecessaryTag(tag_data, "fade3D", new string[]
  2697. {
  2698. "time"
  2699. });
  2700. int millisecond = tag_data.GetTagProperty("time").AsInteger();
  2701. float f_fTime = GameUty.MillisecondToSecond(millisecond);
  2702. bool flag = tag_data.IsValid("sync");
  2703. if (tag_data.IsValid("in"))
  2704. {
  2705. GameMain.Instance.MainCamera.FadeInNoUI(f_fTime, true);
  2706. }
  2707. else
  2708. {
  2709. GameMain.Instance.MainCamera.FadeOutNoUI(f_fTime, true);
  2710. }
  2711. if (flag)
  2712. {
  2713. this.SetFadeWait(true);
  2714. }
  2715. return flag;
  2716. }
  2717. public bool TagSetBg(KagTagSupport tag_data)
  2718. {
  2719. this.CheckAbsolutelyNecessaryTag(tag_data, "setbg", new string[]
  2720. {
  2721. "file"
  2722. });
  2723. string text = tag_data.GetTagProperty("file").AsString();
  2724. Maid maid = GameMain.Instance.CharacterMgr.GetMaid(0);
  2725. if (0 <= text.IndexOf("?"))
  2726. {
  2727. if (maid != null)
  2728. {
  2729. text = ScriptManager.ReplacePersonal(GameMain.Instance.CharacterMgr.GetMaid(0), text);
  2730. }
  2731. else
  2732. {
  2733. Debug.LogError("@SetBgで指定されたファイルに?がありましたが、スロット0にメイドがいないので性格置換できませんでした");
  2734. }
  2735. }
  2736. GameMain.Instance.BgMgr.ChangeBg(text);
  2737. return false;
  2738. }
  2739. public bool TagDraw2DTex(KagTagSupport tag_data)
  2740. {
  2741. this.CheckAbsolutelyNecessaryTag(tag_data, "draw2dtex", new string[]
  2742. {
  2743. "file",
  2744. "x",
  2745. "y"
  2746. });
  2747. GameObject gameObject = GameObject.Find("__GameMain__/SystemUI Root/MessageWindowPanel/tex2dplate");
  2748. bool flag = false;
  2749. if (gameObject == null)
  2750. {
  2751. gameObject = Utility.CreatePrefab(GameObject.Find("__GameMain__/SystemUI Root"), "System/Prefab/tex2dplate", true);
  2752. gameObject.name = "tex2dplate";
  2753. flag = true;
  2754. }
  2755. UITexture component = gameObject.GetComponent<UITexture>();
  2756. component.mainTexture = Resources.Load<Texture2D>(tag_data.GetTagProperty("file").AsString());
  2757. component.SetDimensions(component.mainTexture.width, component.mainTexture.height);
  2758. Vector3 localPosition = new Vector3((float)(-960 + tag_data.GetTagProperty("x").AsInteger()), (float)(540 - tag_data.GetTagProperty("y").AsInteger()), 0f);
  2759. gameObject.transform.localPosition = localPosition;
  2760. if (flag)
  2761. {
  2762. gameObject.transform.parent = GameObject.Find("__GameMain__/SystemUI Root/MessageWindowPanel").transform;
  2763. }
  2764. return false;
  2765. }
  2766. public bool TagClear2DTex(KagTagSupport tag_data)
  2767. {
  2768. GameObject gameObject = GameObject.Find("__GameMain__/SystemUI Root/MessageWindowPanel/tex2dplate");
  2769. if (gameObject != null)
  2770. {
  2771. UnityEngine.Object.DestroyImmediate(gameObject);
  2772. }
  2773. return false;
  2774. }
  2775. public bool TagItemChange(KagTagSupport tag_data)
  2776. {
  2777. this.CheckAbsolutelyNecessaryTag(tag_data, "itemchange", new string[]
  2778. {
  2779. "category",
  2780. "name"
  2781. });
  2782. Maid maidAndMan = this.GetMaidAndMan(tag_data, true);
  2783. if (maidAndMan == null)
  2784. {
  2785. return false;
  2786. }
  2787. maidAndMan.ItemChangeTemp(tag_data.GetTagProperty("category").AsString().ToLower(), tag_data.GetTagProperty("name").AsString());
  2788. return false;
  2789. }
  2790. public bool TagItemSet(KagTagSupport tag_data)
  2791. {
  2792. this.CheckAbsolutelyNecessaryTag(tag_data, "itemset", new string[]
  2793. {
  2794. "category",
  2795. "item"
  2796. });
  2797. Maid maidAndMan = this.GetMaidAndMan(tag_data, true);
  2798. if (maidAndMan == null)
  2799. {
  2800. return false;
  2801. }
  2802. maidAndMan.SetProp(tag_data.GetTagProperty("category").AsString().ToLower(), tag_data.GetTagProperty("item").AsString(), 0, tag_data.IsValid("temp"), tag_data.IsValid("noscale"));
  2803. return false;
  2804. }
  2805. public bool TagItemReset(KagTagSupport tag_data)
  2806. {
  2807. this.CheckAbsolutelyNecessaryTag(tag_data, "itemreset", new string[0]);
  2808. Maid maidAndMan = this.GetMaidAndMan(tag_data, true);
  2809. if (maidAndMan == null)
  2810. {
  2811. return false;
  2812. }
  2813. if (tag_data.IsValid("allwear"))
  2814. {
  2815. for (int i = 81; i <= 110; i++)
  2816. {
  2817. maidAndMan.ResetProp((MPN)i, true);
  2818. }
  2819. }
  2820. else if (tag_data.IsValid("multi"))
  2821. {
  2822. string text = tag_data.GetTagProperty("multi").AsString();
  2823. string[] array = text.Split(new char[]
  2824. {
  2825. ':'
  2826. });
  2827. foreach (string mpn in array)
  2828. {
  2829. maidAndMan.ResetProp(mpn, true);
  2830. }
  2831. }
  2832. else
  2833. {
  2834. maidAndMan.ResetProp(tag_data.GetTagProperty("category").AsString().ToLower(), true);
  2835. }
  2836. return false;
  2837. }
  2838. public bool TagItemPos(KagTagSupport tag_data)
  2839. {
  2840. this.CheckAbsolutelyNecessaryTag(tag_data, "itempos", new string[]
  2841. {
  2842. "slot",
  2843. "target"
  2844. });
  2845. Maid maidAndMan = this.GetMaidAndMan(tag_data, true);
  2846. if (maidAndMan == null)
  2847. {
  2848. return false;
  2849. }
  2850. string f_strSlotName = tag_data.GetTagProperty("slot").AsString();
  2851. string f_strObjTarget = tag_data.GetTagProperty("target").AsString();
  2852. Vector3 f_vPos = default(Vector3);
  2853. bool flag = false;
  2854. Vector3 f_vRot = default(Vector3);
  2855. bool flag2 = false;
  2856. if (tag_data.IsValid("x"))
  2857. {
  2858. f_vPos.x = tag_data.GetTagProperty("x").AsReal();
  2859. flag = true;
  2860. }
  2861. if (tag_data.IsValid("y"))
  2862. {
  2863. f_vPos.y = tag_data.GetTagProperty("y").AsReal();
  2864. flag = true;
  2865. }
  2866. if (tag_data.IsValid("z"))
  2867. {
  2868. f_vPos.z = tag_data.GetTagProperty("z").AsReal();
  2869. flag = true;
  2870. }
  2871. if (tag_data.IsValid("rx"))
  2872. {
  2873. f_vRot.x = tag_data.GetTagProperty("rx").AsReal();
  2874. flag2 = true;
  2875. }
  2876. if (tag_data.IsValid("ry"))
  2877. {
  2878. f_vRot.y = tag_data.GetTagProperty("ry").AsReal();
  2879. flag2 = true;
  2880. }
  2881. if (tag_data.IsValid("rz"))
  2882. {
  2883. f_vRot.z = tag_data.GetTagProperty("rz").AsReal();
  2884. flag2 = true;
  2885. }
  2886. if (flag)
  2887. {
  2888. maidAndMan.body0.SetSlotOffsetPos(f_strSlotName, f_strObjTarget, f_vPos);
  2889. }
  2890. if (flag2)
  2891. {
  2892. maidAndMan.body0.SetSlotOffsetRot(f_strSlotName, f_strObjTarget, f_vRot);
  2893. }
  2894. return false;
  2895. }
  2896. public bool TagAllProcPropSeqStart(KagTagSupport tag_data)
  2897. {
  2898. Maid maidAndMan = this.GetMaidAndMan(tag_data, true);
  2899. if (maidAndMan == null)
  2900. {
  2901. return false;
  2902. }
  2903. if (tag_data.IsValid("fix"))
  2904. {
  2905. maidAndMan.AllProcProp();
  2906. }
  2907. else
  2908. {
  2909. maidAndMan.AllProcPropSeqStart();
  2910. if (tag_data.IsValid("sync") && maidAndMan.Visible)
  2911. {
  2912. this.SetMaidAllPropSeqWait(maidAndMan);
  2913. return true;
  2914. }
  2915. }
  2916. return false;
  2917. }
  2918. public bool TagItemMask(KagTagSupport tag_data)
  2919. {
  2920. this.CheckAbsolutelyNecessaryTag(tag_data, "itemmask", new string[]
  2921. {
  2922. "slot",
  2923. "hide"
  2924. });
  2925. Maid maidAndMan = this.GetMaidAndMan(tag_data, true);
  2926. if (maidAndMan == null)
  2927. {
  2928. return false;
  2929. }
  2930. string text = tag_data.GetTagProperty("slot").AsString();
  2931. bool f_bVisible = tag_data.GetTagProperty("hide").AsBool();
  2932. TBody.SlotID f_eSlot = TBody.SlotID.accAnl;
  2933. try
  2934. {
  2935. f_eSlot = (TBody.SlotID)Enum.Parse(typeof(TBody.SlotID), text);
  2936. }
  2937. catch
  2938. {
  2939. NDebug.Assert("@itemmask TBody.SlotID enum convert error.\\n" + text, false);
  2940. }
  2941. maidAndMan.body0.SetMask(f_eSlot, f_bVisible);
  2942. return false;
  2943. }
  2944. public bool TagItemMaskMode(KagTagSupport tag_data)
  2945. {
  2946. this.CheckAbsolutelyNecessaryTag(tag_data, "itemmaskmode", new string[]
  2947. {
  2948. "type"
  2949. });
  2950. Maid maidAndMan = this.GetMaidAndMan(tag_data, true);
  2951. if (maidAndMan == null)
  2952. {
  2953. return false;
  2954. }
  2955. string text = tag_data.GetTagProperty("type").AsString();
  2956. TBody.MaskMode maskMode = TBody.MaskMode.None;
  2957. try
  2958. {
  2959. maskMode = (TBody.MaskMode)Enum.Parse(typeof(TBody.MaskMode), text);
  2960. }
  2961. catch
  2962. {
  2963. NDebug.Assert("@itemmaskmode TBody.MaskMode enum convert error.\\n" + text, false);
  2964. }
  2965. maidAndMan.body0.SetMaskMode(maskMode);
  2966. return false;
  2967. }
  2968. public bool TagMaidReset(KagTagSupport tag_data)
  2969. {
  2970. this.CheckAbsolutelyNecessaryTag(tag_data, "maidreset", new string[]
  2971. {
  2972. "maid"
  2973. });
  2974. Maid maidAndMan = this.GetMaidAndMan(tag_data, true);
  2975. if (maidAndMan == null)
  2976. {
  2977. return false;
  2978. }
  2979. maidAndMan.ResetAll();
  2980. return this.SetMaidAllPropSeqWait(maidAndMan);
  2981. }
  2982. public bool TagPropSet(KagTagSupport tag_data)
  2983. {
  2984. this.CheckAbsolutelyNecessaryTag(tag_data, "propset", new string[]
  2985. {
  2986. "category"
  2987. });
  2988. Maid maidAndMan = this.GetMaidAndMan(tag_data, true);
  2989. if (maidAndMan == null)
  2990. {
  2991. return false;
  2992. }
  2993. bool f_bTemp = tag_data.IsValid("temp");
  2994. string text = tag_data.GetTagProperty("category").AsString();
  2995. if (tag_data.IsValid("autofix"))
  2996. {
  2997. string slotname = tag_data.GetTagProperty("slot").AsString();
  2998. TBodySkin slot = maidAndMan.body0.GetSlot(slotname);
  2999. string param = slot.GetParam2("autofix_" + text);
  3000. if (!string.IsNullOrEmpty(param))
  3001. {
  3002. int val = 0;
  3003. if (int.TryParse(param, out val))
  3004. {
  3005. maidAndMan.SetProp(text, val, f_bTemp);
  3006. }
  3007. }
  3008. }
  3009. else if (tag_data.IsValid("val"))
  3010. {
  3011. int val2 = tag_data.GetTagProperty("val").AsInteger();
  3012. maidAndMan.SetProp(text, val2, f_bTemp);
  3013. }
  3014. else
  3015. {
  3016. Debug.LogError("@PropSet には val か autofix のどちらかの指定が必要です。");
  3017. }
  3018. return false;
  3019. }
  3020. public bool TagPropReset(KagTagSupport tag_data)
  3021. {
  3022. this.CheckAbsolutelyNecessaryTag(tag_data, "propreset", new string[]
  3023. {
  3024. "category"
  3025. });
  3026. Maid maidAndMan = this.GetMaidAndMan(tag_data, true);
  3027. if (maidAndMan == null)
  3028. {
  3029. return false;
  3030. }
  3031. string mpn = tag_data.GetTagProperty("category").AsString();
  3032. maidAndMan.ResetProp(mpn, false);
  3033. return false;
  3034. }
  3035. public bool TagAddPrefabBg(KagTagSupport tag_data)
  3036. {
  3037. this.CheckAbsolutelyNecessaryTag(tag_data, "addprefabbg", new string[]
  3038. {
  3039. "name"
  3040. });
  3041. string text = string.Empty;
  3042. string f_strSrc = string.Empty;
  3043. if (tag_data.IsValid("src"))
  3044. {
  3045. text = tag_data.GetTagProperty("src").AsString();
  3046. }
  3047. else if (tag_data.IsValid("ab"))
  3048. {
  3049. f_strSrc = tag_data.GetTagProperty("ab").AsString();
  3050. }
  3051. string f_strName = tag_data.GetTagProperty("name").AsString();
  3052. string f_strDest = string.Empty;
  3053. if (tag_data.IsValid("dest"))
  3054. {
  3055. f_strDest = tag_data.GetTagProperty("dest").AsString();
  3056. }
  3057. Vector3 zero = Vector3.zero;
  3058. Vector3 zero2 = Vector3.zero;
  3059. if (tag_data.IsValid("x"))
  3060. {
  3061. zero.x = tag_data.GetTagProperty("x").AsReal();
  3062. }
  3063. if (tag_data.IsValid("y"))
  3064. {
  3065. zero.y = tag_data.GetTagProperty("y").AsReal();
  3066. }
  3067. if (tag_data.IsValid("z"))
  3068. {
  3069. zero.z = tag_data.GetTagProperty("z").AsReal();
  3070. }
  3071. if (tag_data.IsValid("rx"))
  3072. {
  3073. zero2.x = tag_data.GetTagProperty("rx").AsReal();
  3074. }
  3075. if (tag_data.IsValid("ry"))
  3076. {
  3077. zero2.y = tag_data.GetTagProperty("ry").AsReal();
  3078. }
  3079. if (tag_data.IsValid("rz"))
  3080. {
  3081. zero2.z = tag_data.GetTagProperty("rz").AsReal();
  3082. }
  3083. if (this.script_mgr_.compatibilityMode && text.ToLower() == "odogu_manaita")
  3084. {
  3085. zero = new Vector3(2.2485f, 0.772f, -0.953f);
  3086. }
  3087. if (!string.IsNullOrEmpty(text))
  3088. {
  3089. GameMain.Instance.BgMgr.AddPrefabToBg(text, f_strName, f_strDest, zero, zero2);
  3090. }
  3091. else
  3092. {
  3093. GameMain.Instance.BgMgr.AddAssetsBundleToBg(f_strSrc, f_strName, f_strDest, zero, zero2);
  3094. }
  3095. return false;
  3096. }
  3097. public bool TagSetPrefabBgTransformData(KagTagSupport tag_data)
  3098. {
  3099. this.CheckAbsolutelyNecessaryTag(tag_data, "SetPrefabBgTransformData", new string[]
  3100. {
  3101. "name"
  3102. });
  3103. GameObject prefabFromBg = GameMain.Instance.BgMgr.GetPrefabFromBg(tag_data.GetTagProperty("name").AsString());
  3104. if (prefabFromBg != null)
  3105. {
  3106. Transform transform = prefabFromBg.transform;
  3107. Vector3 localPosition = transform.localPosition;
  3108. Vector3 eulerAngles = transform.localRotation.eulerAngles;
  3109. Vector3 localScale = transform.localScale;
  3110. if (tag_data.IsValid("x"))
  3111. {
  3112. localPosition.x = tag_data.GetTagProperty("x").AsReal();
  3113. }
  3114. if (tag_data.IsValid("y"))
  3115. {
  3116. localPosition.y = tag_data.GetTagProperty("y").AsReal();
  3117. }
  3118. if (tag_data.IsValid("z"))
  3119. {
  3120. localPosition.z = tag_data.GetTagProperty("z").AsReal();
  3121. }
  3122. if (tag_data.IsValid("rx"))
  3123. {
  3124. eulerAngles.x = tag_data.GetTagProperty("rx").AsReal();
  3125. }
  3126. if (tag_data.IsValid("ry"))
  3127. {
  3128. eulerAngles.y = tag_data.GetTagProperty("ry").AsReal();
  3129. }
  3130. if (tag_data.IsValid("rz"))
  3131. {
  3132. eulerAngles.z = tag_data.GetTagProperty("rz").AsReal();
  3133. }
  3134. if (tag_data.IsValid("sx"))
  3135. {
  3136. localScale.x = tag_data.GetTagProperty("sx").AsReal();
  3137. }
  3138. if (tag_data.IsValid("sy"))
  3139. {
  3140. localScale.y = tag_data.GetTagProperty("sy").AsReal();
  3141. }
  3142. if (tag_data.IsValid("sz"))
  3143. {
  3144. localScale.z = tag_data.GetTagProperty("sz").AsReal();
  3145. }
  3146. transform.localPosition = localPosition;
  3147. transform.localRotation = Quaternion.Euler(eulerAngles);
  3148. transform.localScale = localScale;
  3149. }
  3150. return false;
  3151. }
  3152. public bool TagDelPrefabBg(KagTagSupport tag_data)
  3153. {
  3154. this.CheckAbsolutelyNecessaryTag(tag_data, "delprefabBg", new string[]
  3155. {
  3156. "name"
  3157. });
  3158. GameMain.Instance.BgMgr.DelPrefabFromBg(tag_data.GetTagProperty("name").AsString());
  3159. return false;
  3160. }
  3161. public bool TagDelPrefabBgAll(KagTagSupport tag_data)
  3162. {
  3163. GameMain.Instance.BgMgr.DelPrefabFromBgAll();
  3164. return false;
  3165. }
  3166. public bool TagMovePrefabToChara(KagTagSupport tag_data)
  3167. {
  3168. this.CheckAbsolutelyNecessaryTag(tag_data, "moveprefabtochara", new string[]
  3169. {
  3170. "bone",
  3171. "name"
  3172. });
  3173. Maid maidAndMan = this.GetMaidAndMan(tag_data, true);
  3174. if (maidAndMan == null)
  3175. {
  3176. return false;
  3177. }
  3178. string f_strDestBone = tag_data.GetTagProperty("bone").AsString();
  3179. string f_strPrefabName = tag_data.GetTagProperty("name").AsString();
  3180. Vector3 zero = Vector3.zero;
  3181. if (tag_data.IsValid("offsx"))
  3182. {
  3183. zero.x = tag_data.GetTagProperty("offsx").AsReal();
  3184. }
  3185. if (tag_data.IsValid("offsy"))
  3186. {
  3187. zero.y = tag_data.GetTagProperty("offsy").AsReal();
  3188. }
  3189. if (tag_data.IsValid("offsz"))
  3190. {
  3191. zero.z = tag_data.GetTagProperty("offsz").AsReal();
  3192. }
  3193. int millisecond = 0;
  3194. if (tag_data.IsValid("time"))
  3195. {
  3196. millisecond = tag_data.GetTagProperty("time").AsInteger();
  3197. }
  3198. GameMain.Instance.BgMgr.MovePrefabToChara(f_strPrefabName, maidAndMan, f_strDestBone, zero, Vector3.zero, GameUty.MillisecondToSecond(millisecond));
  3199. return false;
  3200. }
  3201. public bool TagAddPrefabWorld(KagTagSupport tag_data)
  3202. {
  3203. return false;
  3204. }
  3205. public bool TagReleasePrefab(KagTagSupport tag_data)
  3206. {
  3207. return false;
  3208. }
  3209. public bool TagPrefabAnimatorSetParam(KagTagSupport tag_data)
  3210. {
  3211. this.CheckAbsolutelyNecessaryTag(tag_data, "name", new string[]
  3212. {
  3213. "param"
  3214. });
  3215. string f_strName = tag_data.GetTagProperty("name").AsString();
  3216. string f_strParam = tag_data.GetTagProperty("param").AsString();
  3217. if (tag_data.IsValid("bool"))
  3218. {
  3219. GameMain.Instance.BgMgr.PrefabAnimatorSetParam<bool>(f_strName, f_strParam, tag_data.GetTagProperty("bool").AsBool());
  3220. }
  3221. else if (tag_data.IsValid("int"))
  3222. {
  3223. GameMain.Instance.BgMgr.PrefabAnimatorSetParam<int>(f_strName, f_strParam, tag_data.GetTagProperty("int").AsInteger());
  3224. }
  3225. else if (tag_data.IsValid("float"))
  3226. {
  3227. GameMain.Instance.BgMgr.PrefabAnimatorSetParam<float>(f_strName, f_strParam, tag_data.GetTagProperty("float").AsReal());
  3228. }
  3229. else if (tag_data.IsValid("trigger"))
  3230. {
  3231. GameMain.Instance.BgMgr.PrefabAnimatorTrigger(f_strName, f_strParam, tag_data.IsValid("reset"));
  3232. }
  3233. return false;
  3234. }
  3235. public bool TagChinko(KagTagSupport tag_data)
  3236. {
  3237. bool chinkoVisible = tag_data.IsValid("on");
  3238. Maid maidAndMan = this.GetMaidAndMan(tag_data, true);
  3239. if (maidAndMan == null || !maidAndMan.boMAN)
  3240. {
  3241. return false;
  3242. }
  3243. maidAndMan.body0.SetChinkoVisible(chinkoVisible);
  3244. return false;
  3245. }
  3246. public bool TagChinSlide(KagTagSupport tag_data)
  3247. {
  3248. if (!Product.isEnglish || Product.isPublic)
  3249. {
  3250. return false;
  3251. }
  3252. if (tag_data.IsValid("stop"))
  3253. {
  3254. List<ChinkoCtrl> list2 = new List<ChinkoCtrl>();
  3255. Action<Maid, List<ChinkoCtrl>> action = delegate(Maid maid, List<ChinkoCtrl> list)
  3256. {
  3257. if (maid != null && maid.body0 != null && maid.body0.isLoadedBody && maid.body0.chinkoCtrl != null)
  3258. {
  3259. list.Add(maid.body0.chinkoCtrl);
  3260. }
  3261. };
  3262. if (tag_data.IsValid("man"))
  3263. {
  3264. action(this.GetMaidAndMan(tag_data, true), list2);
  3265. }
  3266. else
  3267. {
  3268. for (int i = 0; i < GameMain.Instance.CharacterMgr.GetManCount(); i++)
  3269. {
  3270. action(GameMain.Instance.CharacterMgr.GetMan(i), list2);
  3271. }
  3272. }
  3273. foreach (ChinkoCtrl chinkoCtrl in list2)
  3274. {
  3275. chinkoCtrl.StopChinkoSlide();
  3276. }
  3277. }
  3278. else
  3279. {
  3280. this.CheckAbsolutelyNecessaryTag(tag_data, "maid", new string[]
  3281. {
  3282. "man",
  3283. "reg"
  3284. });
  3285. Maid maidAndMan = this.GetMaidAndMan(tag_data, false);
  3286. Maid maidAndMan2 = this.GetMaidAndMan(tag_data, true);
  3287. Vector3 zero = Vector3.zero;
  3288. if (tag_data.IsValid("offset"))
  3289. {
  3290. string text = tag_data.GetTagProperty("offset").AsString();
  3291. string[] array = text.Split(new char[]
  3292. {
  3293. ','
  3294. });
  3295. zero.x = float.Parse(array[0]);
  3296. zero.y = float.Parse(array[1]);
  3297. zero.z = float.Parse(array[2]);
  3298. }
  3299. if (maidAndMan != null && maidAndMan.body0 != null && maidAndMan.body0.isLoadedBody)
  3300. {
  3301. string value = tag_data.GetTagProperty("reg").AsString();
  3302. ChinkoCtrl.TARGET targetId = (ChinkoCtrl.TARGET)Enum.Parse(typeof(ChinkoCtrl.TARGET), value, true);
  3303. if (tag_data.IsValid("apprdist"))
  3304. {
  3305. float num = (float)tag_data.GetTagProperty("apprdist").AsInteger() * 0.01f;
  3306. }
  3307. maidAndMan.body0.chinkoCtrl.StartChinkoSlide(maidAndMan2, targetId, zero, 0.05f);
  3308. }
  3309. }
  3310. return false;
  3311. }
  3312. public bool TagSetLoacalPosition(KagTagSupport tag_data)
  3313. {
  3314. return false;
  3315. }
  3316. public bool TagAddLocalPosition(KagTagSupport tag_data)
  3317. {
  3318. return false;
  3319. }
  3320. public bool TagOpenMouth(KagTagSupport tag_data)
  3321. {
  3322. Maid maidAndMan = this.GetMaidAndMan(tag_data, true);
  3323. if (maidAndMan == null)
  3324. {
  3325. return false;
  3326. }
  3327. if (tag_data.IsValid("open"))
  3328. {
  3329. maidAndMan.OpenMouth(true);
  3330. }
  3331. if (tag_data.IsValid("close"))
  3332. {
  3333. maidAndMan.OpenMouth(false);
  3334. }
  3335. return false;
  3336. }
  3337. public bool TagEyeToPosition(KagTagSupport tag_data)
  3338. {
  3339. Maid maidAndMan = this.GetMaidAndMan(tag_data, true);
  3340. if (maidAndMan == null)
  3341. {
  3342. return false;
  3343. }
  3344. Vector3 f_vecTargetPos = default(Vector3);
  3345. if (tag_data.IsValid("x"))
  3346. {
  3347. f_vecTargetPos.x = tag_data.GetTagProperty("x").AsReal();
  3348. }
  3349. if (tag_data.IsValid("y"))
  3350. {
  3351. f_vecTargetPos.y = tag_data.GetTagProperty("y").AsReal();
  3352. }
  3353. if (tag_data.IsValid("z"))
  3354. {
  3355. f_vecTargetPos.z = tag_data.GetTagProperty("z").AsReal();
  3356. }
  3357. int millisecond = 500;
  3358. if (tag_data.IsValid("blend"))
  3359. {
  3360. millisecond = tag_data.GetTagProperty("blend").AsInteger();
  3361. }
  3362. maidAndMan.EyeToPosition(f_vecTargetPos, GameUty.MillisecondToSecond(millisecond));
  3363. return false;
  3364. }
  3365. public bool TagEyeToTarget(KagTagSupport tag_data)
  3366. {
  3367. Maid maidAndMan = this.GetMaidAndMan(tag_data, true);
  3368. if (maidAndMan == null)
  3369. {
  3370. return false;
  3371. }
  3372. this.CheckAbsolutelyNecessaryTag(tag_data, "eyetotarget", new string[]
  3373. {
  3374. "target"
  3375. });
  3376. Maid maidAndMan2 = this.GetMaidAndMan(tag_data.GetTagProperty("target").AsString());
  3377. int millisecond = 500;
  3378. if (tag_data.IsValid("blend"))
  3379. {
  3380. millisecond = tag_data.GetTagProperty("blend").AsInteger();
  3381. }
  3382. string text = string.Empty;
  3383. if (tag_data.IsValid("bone"))
  3384. {
  3385. text = tag_data.GetTagProperty("bone").AsString();
  3386. }
  3387. if (text == string.Empty)
  3388. {
  3389. maidAndMan.EyeToTarget(maidAndMan2, GameUty.MillisecondToSecond(millisecond), "Bip01 Head");
  3390. }
  3391. else
  3392. {
  3393. maidAndMan.EyeToTarget(maidAndMan2, GameUty.MillisecondToSecond(millisecond), text);
  3394. }
  3395. return false;
  3396. }
  3397. public bool TagEyeToCamera(KagTagSupport tag_data)
  3398. {
  3399. Maid maidAndMan = this.GetMaidAndMan(tag_data, true);
  3400. if (maidAndMan == null)
  3401. {
  3402. return false;
  3403. }
  3404. this.CheckAbsolutelyNecessaryTag(tag_data, "eyetocamera", new string[]
  3405. {
  3406. "move"
  3407. });
  3408. string text = tag_data.GetTagProperty("move").AsString();
  3409. Maid.EyeMoveType f_eType = Maid.EyeMoveType.無し;
  3410. try
  3411. {
  3412. f_eType = (Maid.EyeMoveType)Enum.Parse(typeof(Maid.EyeMoveType), text);
  3413. }
  3414. catch (ArgumentException)
  3415. {
  3416. NDebug.Assert("Maid.EyeMoveType\nenum parse error.[" + text + "]", false);
  3417. }
  3418. int millisecond = 500;
  3419. if (tag_data.IsValid("blend"))
  3420. {
  3421. millisecond = tag_data.GetTagProperty("blend").AsInteger();
  3422. }
  3423. maidAndMan.EyeToCamera(f_eType, GameUty.MillisecondToSecond(millisecond));
  3424. return false;
  3425. }
  3426. public bool TagEyeToReset(KagTagSupport tag_data)
  3427. {
  3428. Maid maidAndMan = this.GetMaidAndMan(tag_data, true);
  3429. if (maidAndMan == null)
  3430. {
  3431. return false;
  3432. }
  3433. int millisecond = 500;
  3434. if (tag_data.IsValid("blend"))
  3435. {
  3436. millisecond = tag_data.GetTagProperty("blend").AsInteger();
  3437. }
  3438. maidAndMan.EyeToReset(GameUty.MillisecondToSecond(millisecond));
  3439. return false;
  3440. }
  3441. public bool TagSetMaidOffsetPos(KagTagSupport tag_data)
  3442. {
  3443. Maid maidAndMan = this.GetMaidAndMan(tag_data, true);
  3444. if (maidAndMan == null)
  3445. {
  3446. return false;
  3447. }
  3448. this.CheckAbsolutelyNecessaryTag(tag_data, "setmaidoffsetpos", new string[]
  3449. {
  3450. "splitnum"
  3451. });
  3452. int f_nCSTSplitNum = tag_data.GetTagProperty("splitnum").AsInteger();
  3453. CharacterMgr.CharaPer f_cIn = BaseKagManager.PerthOffsetPosTagData.CreateCharaPer(this.tjs_, tag_data);
  3454. GameMain.Instance.CharacterMgr.SetMaidOffsetPos(maidAndMan, f_nCSTSplitNum, f_cIn);
  3455. return false;
  3456. }
  3457. public bool TagSetMaidOffsetMultiPos(KagTagSupport tag_data)
  3458. {
  3459. this.CheckAbsolutelyNecessaryTag(tag_data, "setmaidoffsetpos", new string[]
  3460. {
  3461. "splitnum"
  3462. });
  3463. int f_nCSTSplitNum = tag_data.GetTagProperty("splitnum").AsInteger();
  3464. List<KeyValuePair<Maid, CharacterMgr.CharaPer>> list = BaseKagManager.PerthOffsetPosTagData.CreateMultiCharaPer(this.tjs_, tag_data, this);
  3465. GameMain.Instance.CharacterMgr.SetMaidOffsetOther(list, f_nCSTSplitNum);
  3466. if (!this.script_mgr_.compatibilityMode)
  3467. {
  3468. for (int i = 0; i < list.Count; i++)
  3469. {
  3470. Maid targetMaid = list[i].Key;
  3471. if (this.maidOffsetSetList.Find((Maid maid) => maid == targetMaid) == null)
  3472. {
  3473. this.maidOffsetSetList.Add(targetMaid);
  3474. }
  3475. }
  3476. }
  3477. return false;
  3478. }
  3479. public bool TagSetManOffsetPos(KagTagSupport tag_data)
  3480. {
  3481. this.CheckAbsolutelyNecessaryTag(tag_data, "TagSetManOffsetPos", new string[]
  3482. {
  3483. "man",
  3484. "splitnum",
  3485. "target",
  3486. "penisdetail"
  3487. });
  3488. Maid maidAndMan = this.GetMaidAndMan(tag_data, true);
  3489. if (maidAndMan == null)
  3490. {
  3491. return false;
  3492. }
  3493. string tag_str = tag_data.GetTagProperty("target").AsString();
  3494. Maid maidAndMan2 = this.GetMaidAndMan(tag_str);
  3495. int f_nCSTSplitNum = tag_data.GetTagProperty("splitnum").AsInteger();
  3496. bool f_bPenisDetailMode = tag_data.GetTagProperty("penisdetail").AsBool();
  3497. KeyValuePair<CharacterMgr.CharaPer, CharacterMgr.PenisPer> keyValuePair = BaseKagManager.PerthOffsetPosTagData.CreateCharaPerAndPenisPer(this.tjs_, tag_data);
  3498. GameMain.Instance.CharacterMgr.SetManOffsetPos(maidAndMan, maidAndMan2, f_nCSTSplitNum, f_bPenisDetailMode, keyValuePair.Key, keyValuePair.Value);
  3499. if (!this.script_mgr_.compatibilityMode)
  3500. {
  3501. Maid targetMan = maidAndMan;
  3502. if (this.maidOffsetSetList.Find((Maid maid) => maid == targetMan) == null)
  3503. {
  3504. this.maidOffsetSetList.Add(targetMan);
  3505. }
  3506. }
  3507. return false;
  3508. }
  3509. public bool TagSetMaidOffsetPosCategory(KagTagSupport tag_data)
  3510. {
  3511. this.CheckAbsolutelyNecessaryTag(tag_data, "setmaidoffsetposcategory", new string[]
  3512. {
  3513. "category"
  3514. });
  3515. Maid maidAndMan = this.GetMaidAndMan(tag_data, true);
  3516. if (maidAndMan == null)
  3517. {
  3518. return false;
  3519. }
  3520. string category = tag_data.GetTagProperty("category").AsString();
  3521. if (tag_data.IsValid("x"))
  3522. {
  3523. maidAndMan.SetPosOffsetFromUdeSclX(category, tag_data.GetTagProperty("x").AsReal());
  3524. }
  3525. if (tag_data.IsValid("y"))
  3526. {
  3527. maidAndMan.SetPosOffsetFromUdeSclY(category, tag_data.GetTagProperty("y").AsReal());
  3528. }
  3529. if (tag_data.IsValid("z"))
  3530. {
  3531. maidAndMan.SetPosOffsetFromUdeSclZ(category, tag_data.GetTagProperty("z").AsReal());
  3532. }
  3533. return false;
  3534. }
  3535. public bool TagAddPrefabChara(KagTagSupport tag_data)
  3536. {
  3537. this.CheckAbsolutelyNecessaryTag(tag_data, "addprefabchara", new string[]
  3538. {
  3539. "src",
  3540. "bone"
  3541. });
  3542. Maid maidAndMan = this.GetMaidAndMan(tag_data, true);
  3543. if (maidAndMan == null)
  3544. {
  3545. return false;
  3546. }
  3547. string text = tag_data.GetTagProperty("src").AsString();
  3548. string f_strDestBone = tag_data.GetTagProperty("bone").AsString();
  3549. string f_strName = text;
  3550. if (tag_data.IsValid("name"))
  3551. {
  3552. f_strName = tag_data.GetTagProperty("name").AsString();
  3553. }
  3554. Vector3 zero = Vector3.zero;
  3555. Vector3 zero2 = Vector3.zero;
  3556. if (tag_data.IsValid("x"))
  3557. {
  3558. zero.x = tag_data.GetTagProperty("x").AsReal();
  3559. }
  3560. if (tag_data.IsValid("y"))
  3561. {
  3562. zero.y = tag_data.GetTagProperty("y").AsReal();
  3563. }
  3564. if (tag_data.IsValid("z"))
  3565. {
  3566. zero.z = tag_data.GetTagProperty("z").AsReal();
  3567. }
  3568. if (tag_data.IsValid("rx"))
  3569. {
  3570. zero2.x = tag_data.GetTagProperty("rx").AsReal();
  3571. }
  3572. if (tag_data.IsValid("ry"))
  3573. {
  3574. zero2.y = tag_data.GetTagProperty("ry").AsReal();
  3575. }
  3576. if (tag_data.IsValid("rz"))
  3577. {
  3578. zero2.z = tag_data.GetTagProperty("rz").AsReal();
  3579. }
  3580. maidAndMan.AddPrefab(text, f_strName, f_strDestBone, zero, zero2);
  3581. return false;
  3582. }
  3583. public bool TagDelPrefabChara(KagTagSupport tag_data)
  3584. {
  3585. this.CheckAbsolutelyNecessaryTag(tag_data, "delprefabchara", new string[]
  3586. {
  3587. "name"
  3588. });
  3589. Maid maidAndMan = this.GetMaidAndMan(tag_data, true);
  3590. if (maidAndMan == null)
  3591. {
  3592. return false;
  3593. }
  3594. maidAndMan.DelPrefab(tag_data.GetTagProperty("name").AsString());
  3595. return false;
  3596. }
  3597. public bool TagDelPrefabCharaAll(KagTagSupport tag_data)
  3598. {
  3599. Maid maidAndMan = this.GetMaidAndMan(tag_data, true);
  3600. if (maidAndMan == null)
  3601. {
  3602. return false;
  3603. }
  3604. maidAndMan.DelPrefabAll();
  3605. return false;
  3606. }
  3607. public bool TagAnimObjChara(KagTagSupport tag_data)
  3608. {
  3609. this.CheckAbsolutelyNecessaryTag(tag_data, "animobjchara", new string[]
  3610. {
  3611. "name",
  3612. "mot",
  3613. "play",
  3614. "loop"
  3615. });
  3616. Maid maidAndMan = this.GetMaidAndMan(tag_data, true);
  3617. if (maidAndMan == null)
  3618. {
  3619. return false;
  3620. }
  3621. string f_strName = tag_data.GetTagProperty("name").AsString();
  3622. string f_strAnimName = tag_data.GetTagProperty("mot").AsString();
  3623. bool f_bNowPlay = tag_data.GetTagProperty("play").AsBool();
  3624. bool f_bLoop = tag_data.GetTagProperty("loop").AsBool();
  3625. maidAndMan.AnimationObject(f_strName, f_strAnimName, f_bNowPlay, f_bLoop);
  3626. return false;
  3627. }
  3628. public bool TagCharaActivate(KagTagSupport tag_data)
  3629. {
  3630. if (this.script_mgr_.compatibilityMode)
  3631. {
  3632. return this.TagCompatibilityCharaActivate(tag_data);
  3633. }
  3634. GameMain.Instance.ScriptMgr.StopMotionScript();
  3635. int num = 0;
  3636. bool flag = false;
  3637. if (tag_data.IsValid("maid"))
  3638. {
  3639. num = tag_data.GetTagProperty("maid").AsInteger();
  3640. }
  3641. else if (tag_data.IsValid("man"))
  3642. {
  3643. flag = true;
  3644. num = tag_data.GetTagProperty("man").AsInteger();
  3645. }
  3646. else
  3647. {
  3648. NDebug.Assert("@charaactivate error.", false);
  3649. }
  3650. CharacterMgr characterMgr = GameMain.Instance.CharacterMgr;
  3651. Maid maid = null;
  3652. if (tag_data.IsValid("leader"))
  3653. {
  3654. NDebug.Assert(!flag, "@charaactivateのleaderタグはメイド専用です。man指定がされています。");
  3655. for (int i = 0; i < characterMgr.GetStockMaidCount(); i++)
  3656. {
  3657. Maid stockMaid = characterMgr.GetStockMaid(i);
  3658. if (stockMaid != null && stockMaid.status.leader)
  3659. {
  3660. characterMgr.SetActiveMaid(stockMaid, num);
  3661. maid = stockMaid;
  3662. break;
  3663. }
  3664. }
  3665. NDebug.Assert(maid != null, "メイド長を探せませんでした");
  3666. }
  3667. else if (tag_data.IsValid("rank1"))
  3668. {
  3669. NDebug.Assert(!flag, "@charaactivateのrank1タグはメイド専用です。man指定がされています。");
  3670. List<Maid> list = new List<Maid>();
  3671. for (int j = 0; j < characterMgr.GetStockMaidCount(); j++)
  3672. {
  3673. Maid stockMaid2 = characterMgr.GetStockMaid(j);
  3674. if (stockMaid2 != null)
  3675. {
  3676. list.Add(stockMaid2);
  3677. }
  3678. }
  3679. List<Maid> list2 = list;
  3680. if (BaseKagManager.<>f__mg$cache0 == null)
  3681. {
  3682. BaseKagManager.<>f__mg$cache0 = new Comparison<Maid>(CharacterSelectManager.SortMaidRanking);
  3683. }
  3684. list2.Sort(BaseKagManager.<>f__mg$cache0);
  3685. for (int k = 0; k < list.Count; k++)
  3686. {
  3687. if (list[k].status.popularRank == 1)
  3688. {
  3689. characterMgr.SetActiveMaid(list[k], num);
  3690. maid = list[k];
  3691. break;
  3692. }
  3693. }
  3694. }
  3695. else if (tag_data.IsValid("main"))
  3696. {
  3697. Personal.Data data = Personal.GetData(tag_data.GetTagProperty("main").AsString());
  3698. NDebug.Assert(!flag, "@charaactivateのmainタグはメイド専用です。man指定がされています。");
  3699. for (int l = 0; l < characterMgr.GetStockMaidCount(); l++)
  3700. {
  3701. Maid stockMaid3 = characterMgr.GetStockMaid(l);
  3702. if (stockMaid3 != null && stockMaid3.status.mainChara && stockMaid3.status.personal.id == data.id)
  3703. {
  3704. characterMgr.SetActiveMaid(stockMaid3, num);
  3705. maid = stockMaid3;
  3706. break;
  3707. }
  3708. }
  3709. NDebug.Assert(maid != null, data.drawName + "性格のメインキャラを探せませんでした");
  3710. }
  3711. else if (tag_data.IsValid("npc") || tag_data.IsValid("sub"))
  3712. {
  3713. bool flag2 = false;
  3714. if (tag_data.IsValid("sub"))
  3715. {
  3716. string b = tag_data.GetTagProperty("sub").AsString();
  3717. NDebug.Assert(!flag, "@charaactivateのsubタグはメイド専用です。man指定がされています。");
  3718. for (int m = 0; m < characterMgr.GetStockMaidCount(); m++)
  3719. {
  3720. Maid stockMaid4 = characterMgr.GetStockMaid(m);
  3721. if (stockMaid4 != null && stockMaid4.status.heroineType == HeroineType.Sub && stockMaid4.status.subCharaData != null && stockMaid4.status.subCharaData.uniqueName == b)
  3722. {
  3723. characterMgr.SetActiveMaid(stockMaid4, num);
  3724. maid = stockMaid4;
  3725. flag2 = true;
  3726. break;
  3727. }
  3728. }
  3729. }
  3730. if (!flag2)
  3731. {
  3732. string text = (!tag_data.IsValid("sub")) ? tag_data.GetTagProperty("npc").AsString() : tag_data.GetTagProperty("sub").AsString();
  3733. if (SubMaid.Contains(text))
  3734. {
  3735. NDebug.Assert(!flag, "npc指定の男は日対応です[" + text + "]");
  3736. maid = characterMgr.ActivateNpc(num);
  3737. NDebug.Assert(maid.boNPC, "NPCメイドではないメイドにNPCプリセットを適用しようとしました");
  3738. SubMaid.Data.CharacterStatus characterStatus = (!GameMain.Instance.CharacterMgr.status.lockUserDraftMaid) ? SubMaid.GetData(text).status : SubMaid.GetData(text).secondStatus;
  3739. if (characterStatus == null)
  3740. {
  3741. characterStatus = SubMaid.GetData(text).status;
  3742. }
  3743. CharacterMgr.npcDatas[characterStatus.presetName].Apply(maid, false);
  3744. }
  3745. else
  3746. {
  3747. NDebug.Assert(CharacterMgr.npcDatas.ContainsKey(text), "キャラクタープリセット設定[" + text + "]の情報が見つかりませんでした");
  3748. if (!flag)
  3749. {
  3750. maid = characterMgr.ActivateNpc(num);
  3751. }
  3752. else
  3753. {
  3754. maid = characterMgr.GetMan(num);
  3755. NDebug.Assert(maid != null, "男スロット指定が限界数を超えています。指定可能範囲は0~" + 5.ToString() + "までです");
  3756. }
  3757. if (!flag)
  3758. {
  3759. NDebug.Assert(maid.boNPC, "NPCメイドではないメイドにNPCプリセットを適用しようとしました");
  3760. }
  3761. CharacterMgr.npcDatas[text].Apply(maid, false);
  3762. }
  3763. maid.gameObject.name = ((!flag) ? "Maid[" : "Man[") + num.ToString() + "]";
  3764. if (!flag)
  3765. {
  3766. GameObject gameObject = maid.gameObject;
  3767. string name = gameObject.name;
  3768. gameObject.name = string.Concat(new string[]
  3769. {
  3770. name,
  3771. " ",
  3772. maid.status.firstName,
  3773. " ",
  3774. maid.status.lastName
  3775. });
  3776. }
  3777. }
  3778. }
  3779. else if (tag_data.IsValid("slot"))
  3780. {
  3781. NDebug.Assert(!flag, "@charaactivateのslotタグはメイド専用です。man指定がされています。");
  3782. int f_nStockSlot = tag_data.GetTagProperty("slot").AsInteger();
  3783. maid = GameMain.Instance.CharacterMgr.Activate(num, f_nStockSlot, flag, false);
  3784. }
  3785. else if (tag_data.IsValid("swap"))
  3786. {
  3787. int slotNoB = tag_data.GetTagProperty("swap").AsInteger();
  3788. GameMain.Instance.CharacterMgr.SwapActiveSlot(num, slotNoB, flag);
  3789. }
  3790. else
  3791. {
  3792. NDebug.Assert("@charaactivate error.", false);
  3793. }
  3794. bool result = false;
  3795. if (maid != null && !tag_data.IsValid("noload"))
  3796. {
  3797. maid.Visible = true;
  3798. result = this.SetMaidAllPropSeqWait(maid);
  3799. }
  3800. return result;
  3801. }
  3802. public bool TagCompatibilityCharaActivate(KagTagSupport tag_data)
  3803. {
  3804. int num = 0;
  3805. bool flag = false;
  3806. if (tag_data.IsValid("maid"))
  3807. {
  3808. num = tag_data.GetTagProperty("maid").AsInteger();
  3809. }
  3810. else if (tag_data.IsValid("man"))
  3811. {
  3812. flag = true;
  3813. num = tag_data.GetTagProperty("man").AsInteger();
  3814. if (this.script_mgr_.compatibilityMode && 6 <= num)
  3815. {
  3816. num = 5;
  3817. }
  3818. }
  3819. else if (tag_data.IsValid("file"))
  3820. {
  3821. num = 16;
  3822. }
  3823. else
  3824. {
  3825. NDebug.Assert("@charaactivate error.", false);
  3826. }
  3827. Maid maid = null;
  3828. if (tag_data.IsValid("npc") || tag_data.IsValid("file"))
  3829. {
  3830. string text = string.Empty;
  3831. if (tag_data.IsValid("npc"))
  3832. {
  3833. text = tag_data.GetTagProperty("npc").AsString();
  3834. }
  3835. else
  3836. {
  3837. text = tag_data.GetTagProperty("file").AsString();
  3838. }
  3839. if (this.script_mgr_.compatibilityMode)
  3840. {
  3841. if (text == "叔父メイド" || text == "メイド秘書" || text == "エステメイド")
  3842. {
  3843. text = "旧" + text;
  3844. }
  3845. else if (text == "pre_尾高千夏")
  3846. {
  3847. text = "旧千夏";
  3848. }
  3849. else if (text == "その他1")
  3850. {
  3851. text = "客2";
  3852. }
  3853. }
  3854. NDebug.Assert(CharacterMgr.npcDatas.ContainsKey(text), "サブキャラクター[" + text + "]の情報が見つかりませんでした");
  3855. if (!flag)
  3856. {
  3857. maid = GameMain.Instance.CharacterMgr.ActivateNpc(num);
  3858. }
  3859. else
  3860. {
  3861. maid = GameMain.Instance.CharacterMgr.GetMan(num);
  3862. NDebug.Assert(maid != null, "男スロット指定が限界数を超えています。指定可能範囲は0~" + 5.ToString() + "までです");
  3863. }
  3864. if (!flag)
  3865. {
  3866. NDebug.Assert(maid.boNPC, "NPCメイドではないメイドにNPCプリセットを適用しようとしました");
  3867. }
  3868. CharacterMgr.npcDatas[text].Apply(maid, false);
  3869. maid.status.voiceGroup = VoiceGroup.Sub;
  3870. }
  3871. else if (tag_data.IsValid("pc"))
  3872. {
  3873. int f_nStockSlot = tag_data.GetTagProperty("pc").AsInteger();
  3874. maid = GameMain.Instance.CharacterMgr.Activate(num, f_nStockSlot, false, false);
  3875. }
  3876. else
  3877. {
  3878. NDebug.Assert("@charaactivate error.", false);
  3879. }
  3880. bool result = false;
  3881. if (maid != null)
  3882. {
  3883. result = this.SetMaidAllPropSeqWait(maid);
  3884. }
  3885. return result;
  3886. }
  3887. public bool TagConCharaActivateFreeNPC(KagTagSupport tag_data)
  3888. {
  3889. return this.TagCompatibilityCharaActivate(tag_data);
  3890. }
  3891. public bool TagConCharaActivate1stRanking(KagTagSupport tag_data)
  3892. {
  3893. GameMain.Instance.ScriptMgr.StopMotionScript();
  3894. int f_nActiveSlotNo = 0;
  3895. if (tag_data.IsValid("maid"))
  3896. {
  3897. f_nActiveSlotNo = tag_data.GetTagProperty("maid").AsInteger();
  3898. }
  3899. List<Maid> list = new List<Maid>();
  3900. CharacterMgr characterMgr = GameMain.Instance.CharacterMgr;
  3901. for (int i = 0; i < characterMgr.GetStockMaidCount(); i++)
  3902. {
  3903. Maid stockMaid = characterMgr.GetStockMaid(i);
  3904. if (stockMaid != null)
  3905. {
  3906. list.Add(stockMaid);
  3907. }
  3908. }
  3909. List<Maid> list2 = list;
  3910. if (BaseKagManager.<>f__mg$cache1 == null)
  3911. {
  3912. BaseKagManager.<>f__mg$cache1 = new Comparison<Maid>(CharacterSelectManager.SortMaidRanking);
  3913. }
  3914. list2.Sort(BaseKagManager.<>f__mg$cache1);
  3915. bool result = false;
  3916. for (int j = 0; j < list.Count; j++)
  3917. {
  3918. if (list[j].status.popularRank == 1)
  3919. {
  3920. characterMgr.SetActiveMaid(list[j], f_nActiveSlotNo);
  3921. list[j].Visible = true;
  3922. result = this.SetMaidAllPropSeqWait(list[j]);
  3923. break;
  3924. }
  3925. }
  3926. return result;
  3927. }
  3928. public bool TagConCharaActivateLeader(KagTagSupport tag_data)
  3929. {
  3930. GameMain.Instance.ScriptMgr.StopMotionScript();
  3931. int f_nActiveSlotNo = 0;
  3932. if (tag_data.IsValid("maid"))
  3933. {
  3934. f_nActiveSlotNo = tag_data.GetTagProperty("maid").AsInteger();
  3935. }
  3936. bool result = false;
  3937. CharacterMgr characterMgr = GameMain.Instance.CharacterMgr;
  3938. for (int i = 0; i < characterMgr.GetStockMaidCount(); i++)
  3939. {
  3940. Maid stockMaid = characterMgr.GetStockMaid(i);
  3941. if (stockMaid != null && stockMaid.status.leader)
  3942. {
  3943. characterMgr.SetActiveMaid(stockMaid, f_nActiveSlotNo);
  3944. stockMaid.Visible = true;
  3945. result = this.SetMaidAllPropSeqWait(stockMaid);
  3946. break;
  3947. }
  3948. }
  3949. return result;
  3950. }
  3951. public bool TagManPresetMenuLoad(KagTagSupport tag_data)
  3952. {
  3953. int nManNo = 0;
  3954. if (tag_data.IsValid("man"))
  3955. {
  3956. nManNo = tag_data.GetTagProperty("man").AsInteger();
  3957. }
  3958. CharacterMgr characterMgr = GameMain.Instance.CharacterMgr;
  3959. Maid man = characterMgr.GetMan(nManNo);
  3960. if (man != null)
  3961. {
  3962. man.SetUpModel(tag_data.GetTagProperty("file").AsString());
  3963. }
  3964. return false;
  3965. }
  3966. public bool TagCharaDeactivate(KagTagSupport tag_data)
  3967. {
  3968. int num = 0;
  3969. bool flag = false;
  3970. if (tag_data.IsValid("maid"))
  3971. {
  3972. num = tag_data.GetTagProperty("maid").AsInteger();
  3973. }
  3974. else if (tag_data.IsValid("man"))
  3975. {
  3976. flag = true;
  3977. num = tag_data.GetTagProperty("man").AsInteger();
  3978. if (this.script_mgr_.compatibilityMode && 6 <= num)
  3979. {
  3980. num = 5;
  3981. }
  3982. }
  3983. else
  3984. {
  3985. NDebug.Assert("@CharaDeactivate error.", false);
  3986. }
  3987. ScriptManager scriptMgr = GameMain.Instance.ScriptMgr;
  3988. scriptMgr.ClearForcExecWaitEvent();
  3989. foreach (KeyValuePair<int, MotionKagManager> keyValuePair in scriptMgr.kag_mot_dic)
  3990. {
  3991. if (!flag)
  3992. {
  3993. if (keyValuePair.Value.main_maid != null && keyValuePair.Value.main_maid == GameMain.Instance.CharacterMgr.GetMaid(num))
  3994. {
  3995. keyValuePair.Value.ClearMotion();
  3996. keyValuePair.Value.enabled = false;
  3997. }
  3998. }
  3999. else if (!scriptMgr.compatibilityMode)
  4000. {
  4001. Maid man = GameMain.Instance.CharacterMgr.GetMan(num);
  4002. if (man != null && man.body0 != null)
  4003. {
  4004. man.body0.SetChinkoVisible(true);
  4005. }
  4006. if (keyValuePair.Value.main_man != null && keyValuePair.Value.main_man == man)
  4007. {
  4008. keyValuePair.Value.ClearMotion();
  4009. keyValuePair.Value.enabled = false;
  4010. }
  4011. }
  4012. }
  4013. if (!flag)
  4014. {
  4015. GameMain.Instance.CharacterMgr.Deactivate(num, flag);
  4016. }
  4017. else
  4018. {
  4019. GameMain.Instance.CharacterMgr.CharaVisible(num, false, flag);
  4020. }
  4021. return false;
  4022. }
  4023. public bool TagCharaVisible(KagTagSupport tag_data)
  4024. {
  4025. int num = 0;
  4026. bool flag = false;
  4027. if (tag_data.IsValid("maid"))
  4028. {
  4029. num = tag_data.GetTagProperty("maid").AsInteger();
  4030. }
  4031. else if (tag_data.IsValid("man"))
  4032. {
  4033. flag = true;
  4034. num = tag_data.GetTagProperty("man").AsInteger();
  4035. if (this.script_mgr_.compatibilityMode && 6 <= num)
  4036. {
  4037. num = 5;
  4038. }
  4039. }
  4040. else
  4041. {
  4042. NDebug.Assert("@charavisible error.", false);
  4043. }
  4044. bool flag2 = tag_data.IsValid("true");
  4045. Maid maid = GameMain.Instance.CharacterMgr.CharaVisible(num, flag2, flag);
  4046. if (maid == null && this.script_mgr_.compatibilityMode)
  4047. {
  4048. return false;
  4049. }
  4050. NDebug.Assert(maid != null, string.Concat(new object[]
  4051. {
  4052. "@charavisibleエラー。指定の",
  4053. (!flag) ? "メイド" : "男",
  4054. "はいません。スロット番号",
  4055. num
  4056. }));
  4057. if (!this.script_mgr_.compatibilityMode && maid != null && maid.body0 != null && flag && !flag2)
  4058. {
  4059. maid.body0.SetChinkoVisible(true);
  4060. }
  4061. bool result = false;
  4062. if (flag2 && maid != null)
  4063. {
  4064. result = this.SetMaidAllPropSeqWait(maid);
  4065. }
  4066. return result;
  4067. }
  4068. public bool TagCharaVisibleAllOff(KagTagSupport tag_data)
  4069. {
  4070. bool flag = tag_data.IsValid("man");
  4071. bool flag2 = false;
  4072. CharacterMgr characterMgr = GameMain.Instance.CharacterMgr;
  4073. if (!flag)
  4074. {
  4075. for (int i = 0; i < characterMgr.GetMaidCount(); i++)
  4076. {
  4077. if (characterMgr.GetMaid(i) != null)
  4078. {
  4079. characterMgr.CharaVisible(i, flag2, flag);
  4080. }
  4081. }
  4082. }
  4083. else
  4084. {
  4085. for (int j = 0; j < characterMgr.GetManCount(); j++)
  4086. {
  4087. Maid man = characterMgr.GetMan(j);
  4088. if (man != null)
  4089. {
  4090. if (!flag2 && man.body0 != null)
  4091. {
  4092. man.body0.SetChinkoVisible(true);
  4093. }
  4094. characterMgr.CharaVisible(j, flag2, flag);
  4095. }
  4096. }
  4097. }
  4098. return false;
  4099. }
  4100. public bool TagTexMulAdd(KagTagSupport tag_data)
  4101. {
  4102. this.CheckAbsolutelyNecessaryTag(tag_data, "layer", new string[]
  4103. {
  4104. "x",
  4105. "y",
  4106. "r",
  4107. "s"
  4108. });
  4109. Maid maid = this.GetMaidAndMan(tag_data, true);
  4110. if (maid == null)
  4111. {
  4112. return false;
  4113. }
  4114. Func<string, string> func = delegate(string ran_str)
  4115. {
  4116. string[] array5 = ran_str.Split(new char[]
  4117. {
  4118. ':'
  4119. });
  4120. return array5[UnityEngine.Random.Range(0, array5.Length)];
  4121. };
  4122. string slot = "body";
  4123. if (tag_data.IsValid("slot"))
  4124. {
  4125. slot = tag_data.GetTagProperty("slot").AsString();
  4126. }
  4127. int matno = 0;
  4128. if (tag_data.IsValid("matno"))
  4129. {
  4130. matno = tag_data.GetTagProperty("matno").AsInteger();
  4131. }
  4132. string propname = "_MainTex";
  4133. if (tag_data.IsValid("propname"))
  4134. {
  4135. propname = tag_data.GetTagProperty("propname").AsString();
  4136. }
  4137. int layer = tag_data.GetTagProperty("layer").AsInteger();
  4138. string file = string.Empty;
  4139. if (tag_data.IsValid("file"))
  4140. {
  4141. file = tag_data.GetTagProperty("file").AsString();
  4142. }
  4143. else if (tag_data.IsValid("res"))
  4144. {
  4145. file = tag_data.GetTagProperty("res").AsString();
  4146. }
  4147. NDebug.Assert(!string.IsNullOrEmpty(file), "@texmuladd [file] or [res] error.");
  4148. file = func(file);
  4149. if (tag_data.IsValid("res"))
  4150. {
  4151. file = "res:" + file;
  4152. }
  4153. string text = tag_data.GetTagProperty("x").AsString();
  4154. string[] array = text.Split(new char[]
  4155. {
  4156. ':'
  4157. });
  4158. NDebug.Assert(array.Length == 2, "@texmuladd [x] error.");
  4159. int x = UnityEngine.Random.Range(int.Parse(array[0]), int.Parse(array[1]) + 1);
  4160. string text2 = tag_data.GetTagProperty("y").AsString();
  4161. string[] array2 = text2.Split(new char[]
  4162. {
  4163. ':'
  4164. });
  4165. NDebug.Assert(array2.Length == 2, "@texmuladd [y] error.");
  4166. int y = UnityEngine.Random.Range(int.Parse(array2[0]), int.Parse(array2[1]) + 1);
  4167. string text3 = tag_data.GetTagProperty("r").AsString();
  4168. string[] array3 = text3.Split(new char[]
  4169. {
  4170. ':'
  4171. });
  4172. NDebug.Assert(array3.Length == 2, "@texmuladd [r] error.");
  4173. float r = (float)UnityEngine.Random.Range((int)(float.Parse(array3[0]) * 100f), (int)(float.Parse(array3[1]) * 100f + 1f)) / 100f;
  4174. string text4 = tag_data.GetTagProperty("s").AsString();
  4175. string[] array4 = text4.Split(new char[]
  4176. {
  4177. ':'
  4178. });
  4179. NDebug.Assert(array4.Length == 2, "@texmuladd [s] error.");
  4180. float s = (float)UnityEngine.Random.Range((int)(float.Parse(array4[0]) * 100f), (int)(float.Parse(array4[1]) * 100f + 1f)) / 100f;
  4181. int num = 0;
  4182. if (tag_data.IsValid("delay"))
  4183. {
  4184. num = tag_data.GetTagProperty("delay").AsInteger();
  4185. }
  4186. WaitEventList waitEventList = this.GetWaitEventList("tex_mul_add");
  4187. if (num <= 0)
  4188. {
  4189. this.ExecForcWaitEvent();
  4190. if (maid != null && maid.body0 != null && maid.body0.isLoadedBody)
  4191. {
  4192. maid.body0.MulTexSet(slot, matno, propname, layer, file, GameUty.SystemMaterial.Alpha, true, x, y, r, s, false, null, 1f, 1024);
  4193. if (propname == "_MainTex")
  4194. {
  4195. maid.body0.MulTexSet(slot, matno, "_ShadowTex", layer, file, GameUty.SystemMaterial.Alpha, true, x, y, r, s, false, null, 1f, 1024);
  4196. }
  4197. maid.body0.MulTexProc(slot);
  4198. }
  4199. }
  4200. else
  4201. {
  4202. waitEventList.Add(delegate
  4203. {
  4204. if (maid != null && maid.body0 != null && maid.body0.isLoadedBody)
  4205. {
  4206. maid.body0.MulTexSet(slot, matno, propname, layer, file, GameUty.SystemMaterial.Alpha, true, x, y, r, s, false, null, 1f, 1024);
  4207. if (propname == "_MainTex")
  4208. {
  4209. maid.body0.MulTexSet(slot, matno, "_ShadowTex", layer, file, GameUty.SystemMaterial.Alpha, true, x, y, r, s, false, null, 1f, 1024);
  4210. }
  4211. maid.body0.MulTexProc(slot);
  4212. }
  4213. }, num);
  4214. }
  4215. return false;
  4216. }
  4217. public bool TagTexMulDel(KagTagSupport tag_data)
  4218. {
  4219. Maid maidAndMan = this.GetMaidAndMan(tag_data, true);
  4220. if (maidAndMan == null)
  4221. {
  4222. return false;
  4223. }
  4224. int f_nMatNo = 0;
  4225. if (tag_data.IsValid("matno"))
  4226. {
  4227. f_nMatNo = tag_data.GetTagProperty("matno").AsInteger();
  4228. }
  4229. string text = "_MainTex";
  4230. if (tag_data.IsValid("propname"))
  4231. {
  4232. text = tag_data.GetTagProperty("propname").AsString();
  4233. }
  4234. string text2 = "body";
  4235. if (tag_data.IsValid("slot"))
  4236. {
  4237. text2 = tag_data.GetTagProperty("slot").AsString();
  4238. }
  4239. this.script_mgr_.ClearForcExecWaitEvent();
  4240. string text3 = "10:20";
  4241. if (tag_data.IsValid("layer"))
  4242. {
  4243. text3 = tag_data.GetTagProperty("layer").AsString();
  4244. }
  4245. int num = 10;
  4246. int num2 = 20;
  4247. string[] array = text3.Split(new char[]
  4248. {
  4249. ':'
  4250. });
  4251. if (array.Length == 2)
  4252. {
  4253. num = int.Parse(array[0].Trim());
  4254. num2 = int.Parse(array[1].Trim());
  4255. }
  4256. else if (array.Length == 1)
  4257. {
  4258. num2 = (num = int.Parse(array[0].Trim()));
  4259. }
  4260. for (int i = num; i <= num2; i++)
  4261. {
  4262. maidAndMan.body0.MulTexRemove(text2, f_nMatNo, text, i);
  4263. if (text == "_MainTex")
  4264. {
  4265. maidAndMan.body0.MulTexRemove(text2, f_nMatNo, "_ShadowTex", i);
  4266. }
  4267. }
  4268. maidAndMan.Visible = true;
  4269. maidAndMan.body0.MulTexProc(text2);
  4270. return false;
  4271. }
  4272. public bool TagStartDay(KagTagSupport tag_data)
  4273. {
  4274. GameMain.Instance.OnStartDay();
  4275. return false;
  4276. }
  4277. public bool TagEndDay(KagTagSupport tag_data)
  4278. {
  4279. GameMain.Instance.OnEndDay();
  4280. return false;
  4281. }
  4282. public bool TagScheduleStartManage(KagTagSupport tag_data)
  4283. {
  4284. ScheduleAPI.DayStartManage();
  4285. return false;
  4286. }
  4287. public bool TagConUpdateMaidPoint(KagTagSupport tag_data)
  4288. {
  4289. return false;
  4290. }
  4291. public bool TagVRBGChangeInit(KagTagSupport tag_data)
  4292. {
  4293. SceneVRCommunication.Instance.KagBGChangeInit(tag_data.GetTagList());
  4294. return false;
  4295. }
  4296. public bool TagVREventObj(KagTagSupport tag_data)
  4297. {
  4298. string f_strName = tag_data.GetTagProperty("name").AsString();
  4299. int f_nVisible = 0;
  4300. if (tag_data.IsValid("visible"))
  4301. {
  4302. f_nVisible = ((!tag_data.GetTagProperty("visible").AsBool()) ? 2 : 1);
  4303. }
  4304. int f_nTrigger = 0;
  4305. if (tag_data.IsValid("trigger"))
  4306. {
  4307. f_nTrigger = ((!tag_data.GetTagProperty("trigger").AsBool()) ? 2 : 1);
  4308. }
  4309. int f_nGrab = 0;
  4310. if (tag_data.IsValid("grab"))
  4311. {
  4312. f_nGrab = ((!tag_data.GetTagProperty("grab").AsBool()) ? 2 : 1);
  4313. }
  4314. string f_strAnimation = string.Empty;
  4315. if (tag_data.IsValid("animation"))
  4316. {
  4317. f_strAnimation = tag_data.GetTagProperty("animation").AsString();
  4318. }
  4319. SceneVRCommunication.Instance.KagEventObj(f_strName, f_nVisible, f_nTrigger, f_nGrab, f_strAnimation);
  4320. return false;
  4321. }
  4322. public bool TagVREventGroup(KagTagSupport tag_data)
  4323. {
  4324. string f_strName = tag_data.GetTagProperty("name").AsString();
  4325. int f_nVisible = 0;
  4326. if (tag_data.IsValid("visible"))
  4327. {
  4328. f_nVisible = ((!tag_data.GetTagProperty("visible").AsBool()) ? 2 : 1);
  4329. }
  4330. int f_nTrigger = 0;
  4331. if (tag_data.IsValid("trigger"))
  4332. {
  4333. f_nTrigger = ((!tag_data.GetTagProperty("trigger").AsBool()) ? 2 : 1);
  4334. }
  4335. int f_nGrab = 0;
  4336. if (tag_data.IsValid("grab"))
  4337. {
  4338. f_nGrab = ((!tag_data.GetTagProperty("grab").AsBool()) ? 2 : 1);
  4339. }
  4340. SceneVRCommunication.Instance.KagEventObjGroup(f_strName, f_nVisible, f_nTrigger, f_nGrab);
  4341. return false;
  4342. }
  4343. public bool TagVRFreeScene(KagTagSupport tag_data)
  4344. {
  4345. if (tag_data.IsValid("start"))
  4346. {
  4347. SceneVRCommunication.Instance.kagFreeSceneSwitch(true, true, false);
  4348. }
  4349. else if (tag_data.IsValid("end"))
  4350. {
  4351. bool f_bEnableSkip = !tag_data.IsValid("noskip");
  4352. SceneVRCommunication.Instance.kagFreeSceneSwitch(false, f_bEnableSkip, false);
  4353. }
  4354. return false;
  4355. }
  4356. public bool TagVRCamera(KagTagSupport tag_data)
  4357. {
  4358. float num = 0f;
  4359. bool flag = false;
  4360. float x = tag_data.GetTagProperty("x").AsReal();
  4361. float z = tag_data.GetTagProperty("z").AsReal();
  4362. if (tag_data.IsValid("height"))
  4363. {
  4364. num = tag_data.GetTagProperty("height").AsReal();
  4365. }
  4366. else if (tag_data.IsValid("stand"))
  4367. {
  4368. num = GameMain.Instance.CMSystem.VRCameraHeightStandOffs;
  4369. }
  4370. else if (tag_data.IsValid("sit"))
  4371. {
  4372. num = GameMain.Instance.CMSystem.VRCameraHeightSitOffs;
  4373. flag = true;
  4374. }
  4375. bool f_bYFromFloor = true;
  4376. if (tag_data.IsValid("nofloor"))
  4377. {
  4378. f_bYFromFloor = false;
  4379. if (flag)
  4380. {
  4381. num += 0.4f;
  4382. }
  4383. }
  4384. GameMain.Instance.MainCamera.SetRealHeadPos(new Vector3(x, num, z), f_bYFromFloor);
  4385. if (tag_data.IsValid("angle"))
  4386. {
  4387. float y = tag_data.GetTagProperty("angle").AsReal();
  4388. GameMain.Instance.MainCamera.SetRealHeadRot(new Vector3(0f, y, 0f), true);
  4389. }
  4390. return false;
  4391. }
  4392. public bool TagVRTablet(KagTagSupport tag_data)
  4393. {
  4394. if (tag_data.IsValid("show"))
  4395. {
  4396. GameMain.Instance.OvrMgr.OvrCamera.ShowUI(true);
  4397. }
  4398. else if (tag_data.IsValid("hide"))
  4399. {
  4400. GameMain.Instance.OvrMgr.OvrCamera.ShowUI(false);
  4401. }
  4402. if (tag_data.IsValid("reset"))
  4403. {
  4404. float f_fOffsetRotY = 0f;
  4405. if (tag_data.IsValid("rot"))
  4406. {
  4407. f_fOffsetRotY = tag_data.GetTagProperty("rot").AsReal();
  4408. }
  4409. GameMain.Instance.OvrMgr.OvrCamera.UIPosReset(f_fOffsetRotY);
  4410. }
  4411. if (tag_data.IsValid("nomove"))
  4412. {
  4413. bool uiNoMoveMode = tag_data.GetTagProperty("nomove").AsBool();
  4414. SceneVRCommunication.Instance.UiNoMoveMode = uiNoMoveMode;
  4415. }
  4416. if (tag_data.IsValid("nohome"))
  4417. {
  4418. bool uiNoHomeMode = tag_data.GetTagProperty("nohome").AsBool();
  4419. SceneVRCommunication.Instance.UiNoHomeMode = uiNoHomeMode;
  4420. }
  4421. if (tag_data.IsValid("notime"))
  4422. {
  4423. bool uiNoTimeMode = tag_data.GetTagProperty("notime").AsBool();
  4424. SceneVRCommunication.Instance.UiNoTimeMode = uiNoTimeMode;
  4425. }
  4426. return false;
  4427. }
  4428. public bool TagVRChoicesSet(KagTagSupport tag_data)
  4429. {
  4430. int f_nMaidNo = -1;
  4431. VRChoices.SelectPair.Type f_type = VRChoices.SelectPair.Type.Text;
  4432. string f_strRegionSplitOfColon = string.Empty;
  4433. this.CheckAbsolutelyNecessaryTag(tag_data, "text", new string[]
  4434. {
  4435. "label"
  4436. });
  4437. string text = tag_data.GetTagProperty("text").AsString();
  4438. text = ScriptManager.ReplaceCharaName(text);
  4439. string f_strLabel = tag_data.GetTagProperty("label").AsString();
  4440. if (tag_data.IsValid("maid"))
  4441. {
  4442. f_nMaidNo = tag_data.GetTagProperty("maid").AsInteger();
  4443. }
  4444. if (tag_data.IsValid("type"))
  4445. {
  4446. string text2 = tag_data.GetTagProperty("type").AsString();
  4447. if (text2 == "touch")
  4448. {
  4449. f_type = VRChoices.SelectPair.Type.Touch;
  4450. }
  4451. else if (text2 == "look")
  4452. {
  4453. f_type = VRChoices.SelectPair.Type.Look;
  4454. }
  4455. else
  4456. {
  4457. NDebug.Assert("typeに不正な文字列 " + text2, false);
  4458. }
  4459. }
  4460. float f_fTimeOut = -1f;
  4461. if (tag_data.IsValid("time"))
  4462. {
  4463. f_fTimeOut = tag_data.GetTagProperty("time").AsReal();
  4464. }
  4465. if (tag_data.IsValid("region"))
  4466. {
  4467. f_strRegionSplitOfColon = tag_data.GetTagProperty("region").AsString();
  4468. }
  4469. SceneVRCommunication.Instance.Choices.Add(text, f_strLabel, f_nMaidNo, f_type, f_strRegionSplitOfColon, f_fTimeOut);
  4470. return false;
  4471. }
  4472. public bool TagVRChoicesShow(KagTagSupport tag_data)
  4473. {
  4474. if (tag_data.IsValid("end"))
  4475. {
  4476. SceneVRCommunication.Instance.Choices.Finalize(null);
  4477. return false;
  4478. }
  4479. int f_nTimeOutMS = 0;
  4480. string f_strTimeOutLabel = string.Empty;
  4481. int f_nRandom = 0;
  4482. if (tag_data.IsValid("timeout"))
  4483. {
  4484. f_nTimeOutMS = tag_data.GetTagProperty("timeout").AsInteger();
  4485. }
  4486. if (tag_data.IsValid("timeoutlabel"))
  4487. {
  4488. f_strTimeOutLabel = tag_data.GetTagProperty("timeoutlabel").AsString();
  4489. }
  4490. if (tag_data.IsValid("random"))
  4491. {
  4492. f_nRandom = tag_data.GetTagProperty("random").AsInteger();
  4493. }
  4494. SceneVRCommunication.Instance.Choices.Show(f_nTimeOutMS, f_strTimeOutLabel, f_nRandom);
  4495. return true;
  4496. }
  4497. public bool TagVRChoicesShowNonStop(KagTagSupport tag_data)
  4498. {
  4499. if (tag_data.IsValid("end"))
  4500. {
  4501. SceneVRCommunication.Instance.Choices.Finalize(null);
  4502. return false;
  4503. }
  4504. int f_nTimeOutMS = 0;
  4505. string f_strTimeOutLabel = string.Empty;
  4506. int f_nRandom = 0;
  4507. if (tag_data.IsValid("timeout"))
  4508. {
  4509. f_nTimeOutMS = tag_data.GetTagProperty("timeout").AsInteger();
  4510. }
  4511. if (tag_data.IsValid("timeoutlabel"))
  4512. {
  4513. f_strTimeOutLabel = tag_data.GetTagProperty("timeoutlabel").AsString();
  4514. }
  4515. if (tag_data.IsValid("random"))
  4516. {
  4517. f_nRandom = tag_data.GetTagProperty("random").AsInteger();
  4518. }
  4519. SceneVRCommunication.Instance.Choices.Show(f_nTimeOutMS, f_strTimeOutLabel, f_nRandom);
  4520. return false;
  4521. }
  4522. public bool TagVRDoNextTime(KagTagSupport tag_data)
  4523. {
  4524. SceneVRCommunication.Instance.KagDoNextTime();
  4525. return false;
  4526. }
  4527. public bool TagVRResetHeadPos(KagTagSupport tag_data)
  4528. {
  4529. GameMain.Instance.OvrMgr.OvrCamera.ReCallcOffset();
  4530. return false;
  4531. }
  4532. public bool TagVRTouchScript(KagTagSupport tag_data)
  4533. {
  4534. SceneVRCommunication.Instance.TouchComm.Touch_Operator(tag_data);
  4535. return false;
  4536. }
  4537. public bool TagVRDayTimeShow(KagTagSupport tag_data)
  4538. {
  4539. string f_strReturnFile = string.Empty;
  4540. string f_strReturnLabel = string.Empty;
  4541. if (tag_data.IsValid("file"))
  4542. {
  4543. f_strReturnFile = tag_data.GetTagProperty("file").AsString();
  4544. }
  4545. if (tag_data.IsValid("label"))
  4546. {
  4547. f_strReturnLabel = tag_data.GetTagProperty("label").AsString();
  4548. }
  4549. SceneVRCommunication.Instance.KagStartDayTimeShow(f_strReturnFile, f_strReturnLabel);
  4550. return false;
  4551. }
  4552. public bool TagVRDialog(KagTagSupport tag_data)
  4553. {
  4554. string text = string.Empty;
  4555. string f_strLabelOk = string.Empty;
  4556. string f_strLabelCancel = string.Empty;
  4557. string f_strLabelYes = string.Empty;
  4558. string strLabelNo = string.Empty;
  4559. if (tag_data.IsValid("text"))
  4560. {
  4561. text = tag_data.GetTagProperty("text").AsString();
  4562. text = ScriptManager.ReplaceCharaName(text);
  4563. }
  4564. if (tag_data.IsValid("ok"))
  4565. {
  4566. f_strLabelOk = tag_data.GetTagProperty("ok").AsString();
  4567. }
  4568. if (tag_data.IsValid("cancel"))
  4569. {
  4570. f_strLabelCancel = tag_data.GetTagProperty("cancel").AsString();
  4571. }
  4572. if (tag_data.IsValid("yes"))
  4573. {
  4574. f_strLabelYes = tag_data.GetTagProperty("yes").AsString();
  4575. }
  4576. if (tag_data.IsValid("no"))
  4577. {
  4578. strLabelNo = tag_data.GetTagProperty("no").AsString();
  4579. }
  4580. SceneVRCommunication.Instance.KagDialog(text, f_strLabelOk, f_strLabelCancel, f_strLabelYes, strLabelNo);
  4581. return true;
  4582. }
  4583. public bool TagVRStartMovieMusicPlayerTV(KagTagSupport tag_data)
  4584. {
  4585. SceneVRCommunication.Instance.KagStartMovieMusicPlayerTV();
  4586. return false;
  4587. }
  4588. public bool TagVRMovieTV(KagTagSupport tag_data)
  4589. {
  4590. string f_strFileName = string.Empty;
  4591. bool f_bLoop = false;
  4592. bool f_bStart = tag_data.IsValid("start");
  4593. if (tag_data.IsValid("file"))
  4594. {
  4595. f_strFileName = tag_data.GetTagProperty("file").AsString();
  4596. }
  4597. if (tag_data.IsValid("loop"))
  4598. {
  4599. f_bLoop = tag_data.IsValid("loop");
  4600. }
  4601. SceneVRCommunication.Instance.KagVRMovieTV(f_bStart, f_strFileName, f_bLoop);
  4602. return false;
  4603. }
  4604. public bool TagVRPlantWindowShow(KagTagSupport tag_data)
  4605. {
  4606. string strFileName = string.Empty;
  4607. string strLabelOK = string.Empty;
  4608. string strLabelCancel = string.Empty;
  4609. if (tag_data.IsValid("file"))
  4610. {
  4611. strFileName = tag_data.GetTagProperty("file").AsString();
  4612. }
  4613. if (tag_data.IsValid("ok"))
  4614. {
  4615. strLabelOK = tag_data.GetTagProperty("ok").AsString();
  4616. }
  4617. if (tag_data.IsValid("cancel"))
  4618. {
  4619. strLabelCancel = tag_data.GetTagProperty("cancel").AsString();
  4620. }
  4621. SceneVRCommunication.Instance.KagPlantWindowShow(strFileName, strLabelOK, strLabelCancel);
  4622. return false;
  4623. }
  4624. public bool TagVRPlantUpdate(KagTagSupport tag_data)
  4625. {
  4626. SceneVRCommunication.Instance.KagPlantUpdate();
  4627. return false;
  4628. }
  4629. public bool TagVRTutorialStart(KagTagSupport tag_data)
  4630. {
  4631. string f_strReturnLabel = string.Empty;
  4632. if (tag_data.IsValid("end"))
  4633. {
  4634. f_strReturnLabel = tag_data.GetTagProperty("end").AsString();
  4635. }
  4636. SceneVRCommunication.Instance.KagTutorialStart(f_strReturnLabel);
  4637. return true;
  4638. }
  4639. public bool TagVRPhotoModeStart(KagTagSupport tag_data)
  4640. {
  4641. bool f_bStart = true;
  4642. if (tag_data.IsValid("start"))
  4643. {
  4644. f_bStart = true;
  4645. }
  4646. else if (tag_data.IsValid("end"))
  4647. {
  4648. f_bStart = false;
  4649. }
  4650. GameMain.Instance.OvrMgr.OvrCamera.ChangeToCameraMode(f_bStart);
  4651. return false;
  4652. }
  4653. public bool TagVRNoChangeBG(KagTagSupport tag_data)
  4654. {
  4655. bool f_bStart = true;
  4656. if (tag_data.IsValid("start"))
  4657. {
  4658. f_bStart = true;
  4659. }
  4660. else if (tag_data.IsValid("end"))
  4661. {
  4662. f_bStart = false;
  4663. }
  4664. SceneVRCommunication.Instance.KagVRNoChangeBG(f_bStart);
  4665. return false;
  4666. }
  4667. public bool TagVRCamToManHead(KagTagSupport tag_data)
  4668. {
  4669. float f_fTime = 1f;
  4670. if (tag_data.IsValid("time"))
  4671. {
  4672. f_fTime = (float)tag_data.GetTagProperty("time").AsInteger() / 1000f;
  4673. }
  4674. GameMain.Instance.OvrMgr.OvrCamera.PosToManHead(f_fTime);
  4675. return false;
  4676. }
  4677. public bool TagVRTrophyText(KagTagSupport tag_data)
  4678. {
  4679. string f_strText = string.Empty;
  4680. if (tag_data.IsValid("text"))
  4681. {
  4682. f_strText = tag_data.GetTagProperty("text").AsString();
  4683. }
  4684. SceneVRCommunication.Instance.KagVRTrophyGet(f_strText);
  4685. return false;
  4686. }
  4687. public bool TagVRRentalMaidSelectStart(KagTagSupport tag_data)
  4688. {
  4689. SceneVRCommunication.Instance.KagRentalMaidSelectStart();
  4690. return true;
  4691. }
  4692. public bool TagVRTouchUseSelect(KagTagSupport tag_data)
  4693. {
  4694. string f_strReturnLabel = string.Empty;
  4695. if (tag_data.IsValid("end"))
  4696. {
  4697. f_strReturnLabel = tag_data.GetTagProperty("end").AsString();
  4698. }
  4699. SceneVRCommunication.Instance.KagTouchUseSelect(f_strReturnLabel);
  4700. return true;
  4701. }
  4702. public bool TagVRHintShow(KagTagSupport tag_data)
  4703. {
  4704. string f_strHintMsg = string.Empty;
  4705. if (tag_data.IsValid("text"))
  4706. {
  4707. f_strHintMsg = tag_data.GetTagProperty("text").AsString();
  4708. }
  4709. SceneVRCommunication.Instance.KagHintShow(f_strHintMsg);
  4710. return false;
  4711. }
  4712. public bool TagVRKaraokeWindowShow(KagTagSupport tag_data)
  4713. {
  4714. string f_strReturnFile = string.Empty;
  4715. string f_strReturnLabel = string.Empty;
  4716. if (tag_data.IsValid("cancel_file"))
  4717. {
  4718. f_strReturnFile = tag_data.GetTagProperty("cancel_file").AsString();
  4719. }
  4720. if (tag_data.IsValid("cancel_label"))
  4721. {
  4722. f_strReturnLabel = tag_data.GetTagProperty("cancel_label").AsString();
  4723. }
  4724. SceneVRCommunication.Instance.KagKaraokeWindowShow(f_strReturnFile, f_strReturnLabel);
  4725. return false;
  4726. }
  4727. public bool TagDanceResultStart(KagTagSupport tag_data)
  4728. {
  4729. Result_Display.StartDisplay(tag_data.GetTagProperty("label").AsString());
  4730. return false;
  4731. }
  4732. public bool TagSetDanceType(KagTagSupport tag_data)
  4733. {
  4734. if (!tag_data.IsValid("dancetype"))
  4735. {
  4736. return false;
  4737. }
  4738. string value = tag_data.GetTagProperty("dancetype").AsString();
  4739. RhythmAction_Mgr.SetDanceType((RhythmAction_Mgr.DanceType)Enum.Parse(typeof(RhythmAction_Mgr.DanceType), value));
  4740. return false;
  4741. }
  4742. public bool TagCutinTexShoot(KagTagSupport tag_data)
  4743. {
  4744. string cut_name = string.Empty;
  4745. string label = string.Empty;
  4746. if (tag_data.IsValid("cut"))
  4747. {
  4748. cut_name = tag_data.GetTagProperty("cut").AsString();
  4749. }
  4750. if (tag_data.IsValid("label"))
  4751. {
  4752. label = tag_data.GetTagProperty("label").AsString();
  4753. }
  4754. ShootCutInTex.CutInTexShoot(cut_name, label);
  4755. return false;
  4756. }
  4757. public bool TagBattleCutInStart(KagTagSupport tag_data)
  4758. {
  4759. string end_label = string.Empty;
  4760. if (tag_data.IsValid("label"))
  4761. {
  4762. end_label = tag_data.GetTagProperty("label").AsString();
  4763. }
  4764. ConfrontCutIn.CutInStart(end_label);
  4765. return false;
  4766. }
  4767. public bool TagMotionCheckStart(KagTagSupport tag_data)
  4768. {
  4769. MotionAction_Mgr.ResponceStart(tag_data);
  4770. return false;
  4771. }
  4772. public bool TagSetMcSkip(KagTagSupport tag_data)
  4773. {
  4774. if (tag_data.IsValid("end"))
  4775. {
  4776. McSkip.SkipRelease();
  4777. }
  4778. else if (tag_data.IsValid("label"))
  4779. {
  4780. McSkip.SkipWait(tag_data.GetTagProperty("label").AsString());
  4781. }
  4782. return false;
  4783. }
  4784. public bool TagToTitle(KagTagSupport tag_data)
  4785. {
  4786. GameMain.Instance.LoadScene("SceneToTitle");
  4787. GameMain.Instance.MainCamera.FadeOut(0f, false, null, true, default(Color));
  4788. return false;
  4789. }
  4790. public bool TagAddedEventDisplay(KagTagSupport tag_data)
  4791. {
  4792. string label = string.Empty;
  4793. if (tag_data.IsValid("label"))
  4794. {
  4795. label = tag_data.GetTagProperty("label").AsString();
  4796. }
  4797. else
  4798. {
  4799. Debug.LogError("タグ関数.eventrelease:Labelが指定されてません");
  4800. }
  4801. GameMain.Instance.ScenarioSelectMgr.AddedDisplay(label);
  4802. return false;
  4803. }
  4804. public bool TagTutorialStart(KagTagSupport tag_data)
  4805. {
  4806. this.CheckAbsolutelyNecessaryTag(tag_data, "name", new string[0]);
  4807. string sceneName = tag_data.GetTagProperty("name").AsString();
  4808. string returnLabelName = string.Empty;
  4809. if (tag_data.IsValid("end"))
  4810. {
  4811. returnLabelName = tag_data.GetTagProperty("end").AsString();
  4812. }
  4813. bool absoluteCall = tag_data.IsValid("absolute");
  4814. if (uGUITutorialPanel.IsOpened())
  4815. {
  4816. uGUITutorialPanel.CloseTutorial(true, false);
  4817. }
  4818. uGUITutorialPanel.OpenTutorial(sceneName, delegate
  4819. {
  4820. if (!string.IsNullOrEmpty(returnLabelName))
  4821. {
  4822. GameMain.Instance.ScriptMgr.adv_kag.JumpLabel(returnLabelName);
  4823. }
  4824. GameMain.Instance.ScriptMgr.adv_kag.Exec();
  4825. }, absoluteCall);
  4826. return true;
  4827. }
  4828. public bool TagLoadSubtitleFile(KagTagSupport tag_data)
  4829. {
  4830. if (!Product.supportMultiLanguage)
  4831. {
  4832. return false;
  4833. }
  4834. SubtitleMovieManager.DestroyGlobalInstance();
  4835. this.CheckAbsolutelyNecessaryTag(tag_data, "loadsubtitlefile", new string[]
  4836. {
  4837. "file"
  4838. });
  4839. string fileName = Path.ChangeExtension(tag_data.GetTagProperty("file").AsString(), ".ks");
  4840. SubtitleMovieManager globalInstance = SubtitleMovieManager.GetGlobalInstance(false);
  4841. globalInstance.autoDestroy = true;
  4842. globalInstance.LoadSubtitleScriptFile(fileName);
  4843. globalInstance.Play();
  4844. return false;
  4845. }
  4846. public bool TagEndSubtitleDisplay(KagTagSupport tag_data)
  4847. {
  4848. SubtitleMovieManager.DestroyGlobalInstance();
  4849. return false;
  4850. }
  4851. public bool TagSubtitleDisplayForPlayVoice(KagTagSupport tag_data)
  4852. {
  4853. if (!Product.supportMultiLanguage)
  4854. {
  4855. return false;
  4856. }
  4857. this.CheckAbsolutelyNecessaryTag(tag_data, "subtitledisplayforplayvoice", new string[]
  4858. {
  4859. "text"
  4860. });
  4861. this.subtitle_data.text = tag_data.GetTagProperty("text").AsString();
  4862. this.subtitle_data.displayTime = -1;
  4863. if (tag_data.IsValid("addtime"))
  4864. {
  4865. this.subtitle_data.addDisplayTime = tag_data.GetTagProperty("addtime").AsInteger();
  4866. }
  4867. else if (tag_data.IsValid("wait"))
  4868. {
  4869. this.subtitle_data.displayTime = tag_data.GetTagProperty("wait").AsInteger();
  4870. }
  4871. this.subtitle_data.casinoType = tag_data.IsValid("mode_c");
  4872. return false;
  4873. }
  4874. public bool TagSubtitleDisplay(KagTagSupport tag_data)
  4875. {
  4876. if (!Product.supportMultiLanguage)
  4877. {
  4878. return false;
  4879. }
  4880. this.CheckAbsolutelyNecessaryTag(tag_data, "subtitledisplay", new string[]
  4881. {
  4882. "text",
  4883. "time"
  4884. });
  4885. string text = tag_data.GetTagProperty("text").AsString();
  4886. int displayTime = int.Parse(tag_data.GetTagProperty("time").AsString());
  4887. SubtitleMovieManager globalInstance = SubtitleMovieManager.GetGlobalInstance(false);
  4888. globalInstance.autoDestroy = true;
  4889. globalInstance.Play(text, displayTime);
  4890. return false;
  4891. }
  4892. public bool TagKupa(KagTagSupport tag_data)
  4893. {
  4894. if (!Product.isEnglish || Product.isPublic)
  4895. {
  4896. return false;
  4897. }
  4898. List<KupaCtrl> list2 = new List<KupaCtrl>();
  4899. Action<Maid, List<KupaCtrl>> action = delegate(Maid maid, List<KupaCtrl> list)
  4900. {
  4901. if (maid != null && maid.body0 != null && maid.body0.isLoadedBody)
  4902. {
  4903. TBodySkin tbodySkin = maid.body0.goSlot[0];
  4904. if (tbodySkin != null && tbodySkin.kupaCtrl != null)
  4905. {
  4906. list.Add(tbodySkin.kupaCtrl);
  4907. }
  4908. }
  4909. };
  4910. if (tag_data.IsValid("maid") || tag_data.IsValid("man"))
  4911. {
  4912. action(this.GetMaidAndMan(tag_data, true), list2);
  4913. }
  4914. else
  4915. {
  4916. for (int i = 0; i < GameMain.Instance.CharacterMgr.GetMaidCount(); i++)
  4917. {
  4918. action(GameMain.Instance.CharacterMgr.GetMaid(i), list2);
  4919. }
  4920. for (int j = 0; j < GameMain.Instance.CharacterMgr.GetManCount(); j++)
  4921. {
  4922. action(GameMain.Instance.CharacterMgr.GetMan(j), list2);
  4923. }
  4924. }
  4925. if (list2.Count == 0)
  4926. {
  4927. Debug.LogError("TagKupa で maid か man が居ません。");
  4928. return false;
  4929. }
  4930. if (tag_data.IsValid("auto"))
  4931. {
  4932. this.CheckAbsolutelyNecessaryTag(tag_data, "reg", new string[0]);
  4933. string value = tag_data.GetTagProperty("reg").AsString();
  4934. KupaCtrl.OPEN open = (KupaCtrl.OPEN)Enum.Parse(typeof(KupaCtrl.OPEN), value, true);
  4935. float num = (float)tag_data.GetTagProperty("val").AsInteger() * 0.01f;
  4936. float speedIn = 5f;
  4937. if (tag_data.IsValid("speedin"))
  4938. {
  4939. speedIn = (float)tag_data.GetTagProperty("speedin").AsInteger() * 0.01f;
  4940. }
  4941. float sppedOut = 5f;
  4942. if (tag_data.IsValid("speedout"))
  4943. {
  4944. sppedOut = (float)tag_data.GetTagProperty("speedout").AsInteger() * 0.01f;
  4945. }
  4946. float outVal = 0f;
  4947. if (tag_data.IsValid("outval"))
  4948. {
  4949. outVal = (float)tag_data.GetTagProperty("outval").AsInteger() * 0.01f;
  4950. }
  4951. float lengthRatio = 1f;
  4952. if (tag_data.IsValid("lengthlimit"))
  4953. {
  4954. lengthRatio = (float)tag_data.GetTagProperty("lengthlimit").AsInteger() * 0.01f;
  4955. }
  4956. if (open == KupaCtrl.OPEN.CHINKOF || open == KupaCtrl.OPEN.CHINKOS)
  4957. {
  4958. int maid_no = tag_data.GetTagProperty("targetmaid").AsInteger();
  4959. Maid maid2 = this.GetMaid(maid_no);
  4960. string value2 = tag_data.GetTagProperty("targetreg").AsString();
  4961. KupaCtrl.TARGET target = (KupaCtrl.TARGET)Enum.Parse(typeof(KupaCtrl.TARGET), value2, true);
  4962. foreach (KupaCtrl kupaCtrl in list2)
  4963. {
  4964. kupaCtrl.AutoKariStart(open, target, maid2, num, speedIn, sppedOut, outVal, lengthRatio);
  4965. }
  4966. }
  4967. else
  4968. {
  4969. int man_no = tag_data.GetTagProperty("targetman").AsInteger();
  4970. Maid man = this.GetMan(man_no);
  4971. list2[0].AutoKupaStart(open, man, num, speedIn, sppedOut, outVal, lengthRatio);
  4972. }
  4973. }
  4974. else if (tag_data.IsValid("finish"))
  4975. {
  4976. foreach (KupaCtrl kupaCtrl2 in list2)
  4977. {
  4978. if (tag_data.IsValid("reg"))
  4979. {
  4980. string value3 = tag_data.GetTagProperty("reg").AsString();
  4981. KupaCtrl.OPEN reg = (KupaCtrl.OPEN)Enum.Parse(typeof(KupaCtrl.OPEN), value3, true);
  4982. kupaCtrl2.Finish(reg);
  4983. }
  4984. else
  4985. {
  4986. kupaCtrl2.FinishAll();
  4987. }
  4988. }
  4989. }
  4990. else if (tag_data.IsValid("reset"))
  4991. {
  4992. foreach (KupaCtrl kupaCtrl3 in list2)
  4993. {
  4994. if (tag_data.IsValid("reg"))
  4995. {
  4996. string value4 = tag_data.GetTagProperty("reg").AsString();
  4997. KupaCtrl.OPEN reg2 = (KupaCtrl.OPEN)Enum.Parse(typeof(KupaCtrl.OPEN), value4, true);
  4998. kupaCtrl3.Reset(reg2);
  4999. }
  5000. else
  5001. {
  5002. kupaCtrl3.ResetAll();
  5003. }
  5004. }
  5005. }
  5006. else
  5007. {
  5008. this.CheckAbsolutelyNecessaryTag(tag_data, "reg", new string[]
  5009. {
  5010. "val"
  5011. });
  5012. bool add = tag_data.IsValid("add");
  5013. string value5 = tag_data.GetTagProperty("reg").AsString();
  5014. KupaCtrl.OPEN reg3 = (KupaCtrl.OPEN)Enum.Parse(typeof(KupaCtrl.OPEN), value5, true);
  5015. int num2 = 0;
  5016. if (tag_data.IsValid("time"))
  5017. {
  5018. num2 = tag_data.GetTagProperty("time").AsInteger();
  5019. }
  5020. int num3 = 0;
  5021. if (tag_data.IsValid("wait"))
  5022. {
  5023. num3 = tag_data.GetTagProperty("wait").AsInteger();
  5024. }
  5025. int num4 = tag_data.GetTagProperty("val").AsInteger();
  5026. foreach (KupaCtrl kupaCtrl4 in list2)
  5027. {
  5028. kupaCtrl4.KupaStart(reg3, (float)num2 * 0.001f, (float)num3 * 0.001f, (float)num4 * 0.01f, add);
  5029. }
  5030. }
  5031. return false;
  5032. }
  5033. protected bool TagStartTouchMode(KagTagSupport tag_data)
  5034. {
  5035. if (PrivateMaidTouchManager.instance == null)
  5036. {
  5037. return false;
  5038. }
  5039. int nMaidNo = (!tag_data.IsValid("maid")) ? 0 : tag_data.GetTagProperty("maid").AsInteger();
  5040. int id = (!tag_data.IsValid("id")) ? 0 : tag_data.GetTagProperty("id").AsInteger();
  5041. PrivateMaidTouchManager.instance.CallTouchMode(GameMain.Instance.CharacterMgr.GetMaid(nMaidNo), id);
  5042. return false;
  5043. }
  5044. protected virtual void PlayMaidMotion(Maid maid, string fn, bool additive = false, bool loop = false, bool boAddQue = false, float val = 0.5f)
  5045. {
  5046. if (!GameMain.Instance.ScriptMgr.is_motion_blend)
  5047. {
  5048. val = 0f;
  5049. }
  5050. maid.IKCtrl.BlendTime = val;
  5051. maid.CrossFade(fn, this.script_mgr_.file_system, additive, loop, boAddQue, val, 1f);
  5052. }
  5053. protected virtual void PlayMaidMotionAbs(Maid maid, string fn, bool additive = false, bool loop = false, bool boAddQue = false, float val = 0.5f)
  5054. {
  5055. if (!GameMain.Instance.ScriptMgr.is_motion_blend)
  5056. {
  5057. val = 0f;
  5058. }
  5059. maid.CrossFadeAbsolute(fn, this.script_mgr_.file_system, additive, loop, boAddQue, val, 1f);
  5060. }
  5061. public static Maid GetVoiceTargetMaid(KagTagSupport tag_data)
  5062. {
  5063. Maid maid = null;
  5064. CharacterMgr characterMgr = GameMain.Instance.CharacterMgr;
  5065. if (tag_data.IsValid("maid"))
  5066. {
  5067. maid = characterMgr.GetMaid(int.Parse(tag_data.GetTagProperty("maid").AsString()));
  5068. }
  5069. else if (tag_data.IsValid("name") || tag_data.IsValid("real"))
  5070. {
  5071. string text = string.Empty;
  5072. if (tag_data.IsValid("real"))
  5073. {
  5074. text = tag_data.GetTagProperty("real").AsString().Trim();
  5075. }
  5076. else
  5077. {
  5078. text = tag_data.GetTagProperty("name").AsString().Trim();
  5079. }
  5080. KeyValuePair<string, string> translationText = MessageClass.GetTranslationText(text);
  5081. text = translationText.Key;
  5082. if (tag_data.IsValid("real") && text == "フリー" && GameMain.Instance.ScriptMgr.compatibilityMode)
  5083. {
  5084. text = "[HF16]";
  5085. }
  5086. if (text.IndexOf("[HF") == 0)
  5087. {
  5088. string text2 = text.Replace("[HF", string.Empty).Replace("]", string.Empty);
  5089. if (string.IsNullOrEmpty(text2))
  5090. {
  5091. text2 = "0";
  5092. }
  5093. int nMaidNo = int.Parse(text2);
  5094. maid = characterMgr.GetMaid(nMaidNo);
  5095. }
  5096. else
  5097. {
  5098. for (int i = 0; i < characterMgr.GetMaidCount(); i++)
  5099. {
  5100. Maid maid2 = characterMgr.GetMaid(i);
  5101. if (maid2 != null && maid2.boNPC && maid2.status.firstName == text)
  5102. {
  5103. maid = maid2;
  5104. break;
  5105. }
  5106. }
  5107. if (maid == null && Product.supportMultiLanguage)
  5108. {
  5109. text = translationText.Value;
  5110. for (int j = 0; j < characterMgr.GetMaidCount(); j++)
  5111. {
  5112. Maid maid3 = characterMgr.GetMaid(j);
  5113. if (maid3 != null && maid3.boNPC && maid3.status.firstName == text)
  5114. {
  5115. maid = maid3;
  5116. break;
  5117. }
  5118. }
  5119. }
  5120. }
  5121. if (maid == null)
  5122. {
  5123. Debug.LogWarning("ボイス再生対象のメイドを特定できませんでした");
  5124. }
  5125. }
  5126. return maid;
  5127. }
  5128. public Maid GetMaidAndMan(string tag_str)
  5129. {
  5130. int num = 0;
  5131. tag_str = tag_str.ToLower();
  5132. int num2 = tag_str.IndexOf(':');
  5133. if (num2 != -1)
  5134. {
  5135. string[] array = tag_str.Split(new char[]
  5136. {
  5137. ':'
  5138. });
  5139. NDebug.Assert(array.Length == 2, tag_str + "\nメイド,もしくは男の指定が不正です");
  5140. num = int.Parse(array[1]);
  5141. tag_str = array[0];
  5142. }
  5143. if (tag_str == "maid")
  5144. {
  5145. return this.GetMaid(num);
  5146. }
  5147. if (tag_str == "man")
  5148. {
  5149. return this.GetMan(num);
  5150. }
  5151. NDebug.Assert(tag_str + "\nメイド,もしくは男の指定が不正です", false);
  5152. return null;
  5153. }
  5154. public Maid GetMaidAndMan(KagTagSupport tag_data, bool maid_priority = true)
  5155. {
  5156. int num = 0;
  5157. bool flag = false;
  5158. if (maid_priority)
  5159. {
  5160. if (tag_data.IsValid("maid"))
  5161. {
  5162. num = tag_data.GetTagProperty("maid").AsInteger();
  5163. }
  5164. else if (tag_data.IsValid("man"))
  5165. {
  5166. flag = true;
  5167. num = tag_data.GetTagProperty("man").AsInteger();
  5168. if (this.script_mgr_.compatibilityMode && 6 <= num)
  5169. {
  5170. num = 5;
  5171. }
  5172. }
  5173. else
  5174. {
  5175. NDebug.Assert("スクリプトのman/maid指定が不正です。", false);
  5176. }
  5177. }
  5178. else if (tag_data.IsValid("man"))
  5179. {
  5180. flag = true;
  5181. num = tag_data.GetTagProperty("man").AsInteger();
  5182. if (this.script_mgr_.compatibilityMode && 6 <= num)
  5183. {
  5184. num = 5;
  5185. }
  5186. }
  5187. else if (tag_data.IsValid("maid"))
  5188. {
  5189. num = tag_data.GetTagProperty("maid").AsInteger();
  5190. }
  5191. else
  5192. {
  5193. NDebug.Assert("スクリプトのman/maid指定が不正です。", false);
  5194. }
  5195. return flag ? this.GetMan(num) : this.GetMaid(num);
  5196. }
  5197. public virtual Maid GetMaid(int maid_no)
  5198. {
  5199. return GameMain.Instance.CharacterMgr.GetMaid(maid_no);
  5200. }
  5201. public virtual Maid GetMan(int man_no)
  5202. {
  5203. return GameMain.Instance.CharacterMgr.GetMan(man_no);
  5204. }
  5205. protected WaitEventList GetWaitEventList(string list_name)
  5206. {
  5207. if (!this.wait_event_list_.ContainsKey(list_name))
  5208. {
  5209. this.wait_event_list_.Add(list_name, new WaitEventList());
  5210. }
  5211. return this.wait_event_list_[list_name];
  5212. }
  5213. public void CheckAbsolutelyNecessaryTag(KagTagSupport tag_data, string tag_name, params string[] check_tag)
  5214. {
  5215. for (int i = 0; i < check_tag.Length; i++)
  5216. {
  5217. NDebug.Assert(tag_data.IsValid(check_tag[i]), string.Concat(new string[]
  5218. {
  5219. "@",
  5220. tag_name,
  5221. "\n必須タグ[",
  5222. check_tag[i],
  5223. "]が指定されていません"
  5224. }));
  5225. }
  5226. }
  5227. protected bool SetWait(int time, bool skip_possible)
  5228. {
  5229. this.SetExecWait(time, skip_possible);
  5230. return true;
  5231. }
  5232. public void ExecForcWaitEvent()
  5233. {
  5234. WaitEventList waitEventList = this.GetWaitEventList("tex_mul_add");
  5235. if (waitEventList.list == null || waitEventList.list.Count == 0)
  5236. {
  5237. return;
  5238. }
  5239. for (int i = 0; i < waitEventList.list.Count; i++)
  5240. {
  5241. waitEventList.list[i].call_back_delegate();
  5242. }
  5243. waitEventList.Clear();
  5244. }
  5245. public void ClearForcExecWaitEvent()
  5246. {
  5247. WaitEventList waitEventList = this.GetWaitEventList("tex_mul_add");
  5248. if (waitEventList.list == null || waitEventList.list.Count == 0)
  5249. {
  5250. return;
  5251. }
  5252. waitEventList.Clear();
  5253. }
  5254. public void Dispose()
  5255. {
  5256. this.Dispose(true);
  5257. GC.SuppressFinalize(this);
  5258. }
  5259. protected void Dispose(bool is_release_managed_code)
  5260. {
  5261. if (this.is_disposed_)
  5262. {
  5263. return;
  5264. }
  5265. this.wait_event_list_.Clear();
  5266. this.kag_.Dispose();
  5267. this.kag_ = null;
  5268. this.script_mgr_ = null;
  5269. this.is_disposed_ = true;
  5270. }
  5271. public KagScript kag
  5272. {
  5273. get
  5274. {
  5275. return this.kag_;
  5276. }
  5277. }
  5278. protected bool exec_wait_enabled
  5279. {
  5280. get
  5281. {
  5282. return this.exec_wait_data_.use;
  5283. }
  5284. }
  5285. protected bool IsFadeProc()
  5286. {
  5287. return GameMain.Instance.MainCamera.IsFadeProc() || GameMain.Instance.MainCamera.IsFadeProcNoUI();
  5288. }
  5289. private void OnScenarioLoadEvent(string file_name, string label_name)
  5290. {
  5291. this.subtitle_data.Clear();
  5292. }
  5293. public virtual string GetKagClassName()
  5294. {
  5295. return "ベースkag";
  5296. }
  5297. private string ReplaceFileNameCallBack(string file_name)
  5298. {
  5299. Maid maid = this.GetMaid(0);
  5300. if (maid == null)
  5301. {
  5302. return file_name;
  5303. }
  5304. int maidCount = GameMain.Instance.CharacterMgr.GetMaidCount();
  5305. Maid[] array = new Maid[maidCount];
  5306. for (int i = 0; i < maidCount; i++)
  5307. {
  5308. array[i] = this.GetMaid(i);
  5309. }
  5310. return ScriptManager.ReplacePersonal(array, file_name);
  5311. }
  5312. public void Serialize(BinaryWriter binary)
  5313. {
  5314. binary.Write("CM3D2_KAG");
  5315. binary.Write(1510);
  5316. byte[] array = this.kag_.Serialize();
  5317. int value = array.Length;
  5318. binary.Write(value);
  5319. binary.Write(array);
  5320. binary.Write(this.fade_wait_);
  5321. binary.Write(this.enabled);
  5322. }
  5323. public void Deserialize(BinaryReader binary)
  5324. {
  5325. string a = binary.ReadString();
  5326. NDebug.Assert(a == "CM3D2_KAG", "KAGのヘッダーが不正です。");
  5327. int num = binary.ReadInt32();
  5328. int count = binary.ReadInt32();
  5329. byte[] serialize_data = binary.ReadBytes(count);
  5330. this.kag_.Deserialize(serialize_data);
  5331. this.fade_wait_ = binary.ReadBoolean();
  5332. this.enabled = binary.ReadBoolean();
  5333. this.exec_wait_data_.Clear();
  5334. this.wait_event_list_.Clear();
  5335. this.subtitle_data.Clear();
  5336. }
  5337. public bool enabled { get; set; }
  5338. public List<Maid> maidOffsetSetList { get; protected set; }
  5339. protected readonly TJSScript tjs_;
  5340. protected ScriptManager script_mgr_;
  5341. protected KagScript kag_;
  5342. protected bool fade_wait_;
  5343. protected BaseKagManager.ExecWaitData exec_wait_data_ = new BaseKagManager.ExecWaitData();
  5344. protected Dictionary<string, WaitEventList> wait_event_list_ = new Dictionary<string, WaitEventList>();
  5345. protected BaseKagManager.SubtitleData subtitle_data = new BaseKagManager.SubtitleData();
  5346. private bool is_disposed_;
  5347. [CompilerGenerated]
  5348. private static Comparison<Maid> <>f__mg$cache0;
  5349. [CompilerGenerated]
  5350. private static Comparison<Maid> <>f__mg$cache1;
  5351. private class PerthOffsetPosTagData
  5352. {
  5353. public static CharacterMgr.CharaPer CreateCharaPer(TJSScript tjs, KagTagSupport tag_data)
  5354. {
  5355. CharacterMgr.CharaPer charaPer = BaseKagManager.PerthOffsetPosTagData.GetCharaPer(tjs, tag_data, string.Empty);
  5356. NDebug.AssertNull(charaPer != null);
  5357. return charaPer;
  5358. }
  5359. public static List<KeyValuePair<Maid, CharacterMgr.CharaPer>> CreateMultiCharaPer(TJSScript tjs, KagTagSupport tag_data, BaseKagManager kag_mgr)
  5360. {
  5361. List<KeyValuePair<Maid, CharacterMgr.CharaPer>> list = new List<KeyValuePair<Maid, CharacterMgr.CharaPer>>();
  5362. for (int i = 0; i < GameMain.Instance.CharacterMgr.GetMaidCount(); i++)
  5363. {
  5364. CharacterMgr.CharaPer charaPer = BaseKagManager.PerthOffsetPosTagData.GetCharaPer(tjs, tag_data, "-Maid:" + i);
  5365. if (charaPer != null)
  5366. {
  5367. KeyValuePair<Maid, CharacterMgr.CharaPer> item = new KeyValuePair<Maid, CharacterMgr.CharaPer>(kag_mgr.GetMaid(i), charaPer);
  5368. list.Add(item);
  5369. }
  5370. }
  5371. return list;
  5372. }
  5373. public static KeyValuePair<CharacterMgr.CharaPer, CharacterMgr.PenisPer> CreateCharaPerAndPenisPer(TJSScript tjs, KagTagSupport tag_data)
  5374. {
  5375. CharacterMgr.CharaPer charaPer = BaseKagManager.PerthOffsetPosTagData.GetCharaPer(tjs, tag_data, string.Empty);
  5376. if (charaPer == null)
  5377. {
  5378. charaPer = new CharacterMgr.CharaPer();
  5379. }
  5380. CharacterMgr.PenisPer penisPer = BaseKagManager.PerthOffsetPosTagData.GetPenisPer(tjs, tag_data);
  5381. if (penisPer == null)
  5382. {
  5383. penisPer = new CharacterMgr.PenisPer();
  5384. }
  5385. return new KeyValuePair<CharacterMgr.CharaPer, CharacterMgr.PenisPer>(charaPer, penisPer);
  5386. }
  5387. private static CharacterMgr.CharaPer GetCharaPer(TJSScript tjs, KagTagSupport tag_data, string add_tag_string)
  5388. {
  5389. CharacterMgr.CharaPer charaPer = null;
  5390. BaseKagManager.PerthOffsetPosTagData.TagArrayData tagArrayData = BaseKagManager.PerthOffsetPosTagData.TagArrayData.Create(tjs, tag_data, "OffsDouPar" + add_tag_string);
  5391. if (tagArrayData.valid)
  5392. {
  5393. if (charaPer == null)
  5394. {
  5395. charaPer = new CharacterMgr.CharaPer();
  5396. }
  5397. tagArrayData.GetVector3(ref charaPer.vecOffsDouParGreater, ref charaPer.vecOffsDouParLess);
  5398. }
  5399. BaseKagManager.PerthOffsetPosTagData.TagArrayData.Rlease();
  5400. tagArrayData = BaseKagManager.PerthOffsetPosTagData.TagArrayData.Create(tjs, tag_data, "OffsShinCho" + add_tag_string);
  5401. if (tagArrayData.valid)
  5402. {
  5403. if (charaPer == null)
  5404. {
  5405. charaPer = new CharacterMgr.CharaPer();
  5406. }
  5407. tagArrayData.GetVector3(ref charaPer.vecOffsShinChoGreater, ref charaPer.vecOffsShinChoLess);
  5408. }
  5409. BaseKagManager.PerthOffsetPosTagData.TagArrayData.Rlease();
  5410. tagArrayData = BaseKagManager.PerthOffsetPosTagData.TagArrayData.Create(tjs, tag_data, "OffsMuneL" + add_tag_string);
  5411. if (tagArrayData.valid)
  5412. {
  5413. if (charaPer == null)
  5414. {
  5415. charaPer = new CharacterMgr.CharaPer();
  5416. }
  5417. tagArrayData.GetVector3(ref charaPer.vecOffsMuneLGreater, ref charaPer.vecOffsMuneLLess);
  5418. }
  5419. BaseKagManager.PerthOffsetPosTagData.TagArrayData.Rlease();
  5420. tagArrayData = BaseKagManager.PerthOffsetPosTagData.TagArrayData.Create(tjs, tag_data, "HaremDouPer" + add_tag_string);
  5421. if (tagArrayData.valid)
  5422. {
  5423. if (charaPer == null)
  5424. {
  5425. charaPer = new CharacterMgr.CharaPer();
  5426. }
  5427. tagArrayData.GetVector3(ref charaPer.vecHaremDouPerGreater, ref charaPer.vecHaremDouPerLess);
  5428. }
  5429. BaseKagManager.PerthOffsetPosTagData.TagArrayData.Rlease();
  5430. tagArrayData = BaseKagManager.PerthOffsetPosTagData.TagArrayData.Create(tjs, tag_data, "HaremShinCho" + add_tag_string);
  5431. if (tagArrayData.valid)
  5432. {
  5433. if (charaPer == null)
  5434. {
  5435. charaPer = new CharacterMgr.CharaPer();
  5436. }
  5437. tagArrayData.GetVector3(ref charaPer.vecHaremShinChoGreater, ref charaPer.vecHaremShinChoLess);
  5438. }
  5439. BaseKagManager.PerthOffsetPosTagData.TagArrayData.Rlease();
  5440. tagArrayData = BaseKagManager.PerthOffsetPosTagData.TagArrayData.Create(tjs, tag_data, "HaremMuneL" + add_tag_string);
  5441. if (tagArrayData.valid)
  5442. {
  5443. if (charaPer == null)
  5444. {
  5445. charaPer = new CharacterMgr.CharaPer();
  5446. }
  5447. tagArrayData.GetVector3(ref charaPer.vecHaremMuneLGreater, ref charaPer.vecHaremMuneLLess);
  5448. }
  5449. BaseKagManager.PerthOffsetPosTagData.TagArrayData.Rlease();
  5450. return charaPer;
  5451. }
  5452. private static CharacterMgr.PenisPer GetPenisPer(TJSScript tjs, KagTagSupport tag_data)
  5453. {
  5454. CharacterMgr.PenisPer penisPer = null;
  5455. BaseKagManager.PerthOffsetPosTagData.TagArrayData tagArrayData = BaseKagManager.PerthOffsetPosTagData.TagArrayData.Create(tjs, tag_data, "PenisCommonBase");
  5456. if (tagArrayData.valid)
  5457. {
  5458. if (penisPer == null)
  5459. {
  5460. penisPer = new CharacterMgr.PenisPer();
  5461. }
  5462. tagArrayData.GetVector3(ref penisPer.vecPenisCommonBase);
  5463. }
  5464. BaseKagManager.PerthOffsetPosTagData.TagArrayData.Rlease();
  5465. tagArrayData = BaseKagManager.PerthOffsetPosTagData.TagArrayData.Create(tjs, tag_data, "PenisAmend");
  5466. if (tagArrayData.valid)
  5467. {
  5468. if (penisPer == null)
  5469. {
  5470. penisPer = new CharacterMgr.PenisPer();
  5471. }
  5472. tagArrayData.GetVector3(ref penisPer.vecPenisAmend);
  5473. }
  5474. BaseKagManager.PerthOffsetPosTagData.TagArrayData.Rlease();
  5475. tagArrayData = BaseKagManager.PerthOffsetPosTagData.TagArrayData.Create(tjs, tag_data, "PenisDouPer");
  5476. if (tagArrayData.valid)
  5477. {
  5478. if (penisPer == null)
  5479. {
  5480. penisPer = new CharacterMgr.PenisPer();
  5481. }
  5482. tagArrayData.GetVector3(ref penisPer.vecPenisDouPerGreater, ref penisPer.vecPenisDouPerLess);
  5483. }
  5484. BaseKagManager.PerthOffsetPosTagData.TagArrayData.Rlease();
  5485. tagArrayData = BaseKagManager.PerthOffsetPosTagData.TagArrayData.Create(tjs, tag_data, "PenisShincho");
  5486. if (tagArrayData.valid)
  5487. {
  5488. if (penisPer == null)
  5489. {
  5490. penisPer = new CharacterMgr.PenisPer();
  5491. }
  5492. tagArrayData.GetVector3(ref penisPer.vecPenisShinchoGreater, ref penisPer.vecPenisShinchoLess);
  5493. }
  5494. BaseKagManager.PerthOffsetPosTagData.TagArrayData.Rlease();
  5495. return penisPer;
  5496. }
  5497. private class TagArrayData
  5498. {
  5499. private TagArrayData(TJSScript tjs, KagTagSupport tag_data, string tag_name)
  5500. {
  5501. this.tjs_ = tjs;
  5502. this.is_valid_ = tag_data.IsValid(tag_name);
  5503. if (this.is_valid_)
  5504. {
  5505. string eval_str = this.kTjsGlobalVarName + "=" + tag_data.GetTagProperty(tag_name).AsString();
  5506. this.tjs_.EvalScript(eval_str);
  5507. TJSVariant tjsvariant = new TJSVariant();
  5508. this.tjs_.EvalScript(this.kTjsGlobalVarName + ".count", tjsvariant);
  5509. this.array_count_ = tjsvariant.AsInteger();
  5510. tjsvariant.Dispose();
  5511. NDebug.Assert(this.array_count_ == 3 || this.array_count_ == 6, tag_name + "の指定数が不正です(6 or 7 only)");
  5512. }
  5513. }
  5514. public static BaseKagManager.PerthOffsetPosTagData.TagArrayData Create(TJSScript tjs, KagTagSupport tag_data, string tag_name)
  5515. {
  5516. NDebug.Assert(BaseKagManager.PerthOffsetPosTagData.TagArrayData.instans_data_ == null, "TagArrayDataインスタンスの重複");
  5517. tag_name = tag_name.ToLower();
  5518. BaseKagManager.PerthOffsetPosTagData.TagArrayData.instans_data_ = new BaseKagManager.PerthOffsetPosTagData.TagArrayData(tjs, tag_data, tag_name);
  5519. return BaseKagManager.PerthOffsetPosTagData.TagArrayData.instans_data_;
  5520. }
  5521. public static void Rlease()
  5522. {
  5523. if (BaseKagManager.PerthOffsetPosTagData.TagArrayData.instans_data_ == null)
  5524. {
  5525. return;
  5526. }
  5527. BaseKagManager.PerthOffsetPosTagData.TagArrayData.instans_data_.tjs_.EvalScript(BaseKagManager.PerthOffsetPosTagData.TagArrayData.instans_data_.kTjsGlobalVarName + " = void");
  5528. BaseKagManager.PerthOffsetPosTagData.TagArrayData.instans_data_ = null;
  5529. }
  5530. public void GetVector3(ref Vector3 dest)
  5531. {
  5532. if (!this.is_valid_)
  5533. {
  5534. return;
  5535. }
  5536. NDebug.Assert(this.array_count_ == 3, "Vector3*2の要素に対してVector3を1つのみ作成しようとしています");
  5537. using (TJSVariant tjsvariant = new TJSVariant())
  5538. {
  5539. this.tjs_.EvalScript(this.kTjsGlobalVarName + "[0]", tjsvariant);
  5540. dest.x = tjsvariant.AsReal();
  5541. this.tjs_.EvalScript(this.kTjsGlobalVarName + "[1]", tjsvariant);
  5542. dest.y = tjsvariant.AsReal();
  5543. this.tjs_.EvalScript(this.kTjsGlobalVarName + "[2]", tjsvariant);
  5544. dest.z = tjsvariant.AsReal();
  5545. }
  5546. }
  5547. public void GetVector3(ref Vector3 first_dest, ref Vector3 second_dest)
  5548. {
  5549. if (!this.is_valid_)
  5550. {
  5551. return;
  5552. }
  5553. NDebug.Assert(this.array_count_ == 6, "要素xyzのみに対してVector3を2つ作成しようとしています");
  5554. using (TJSVariant tjsvariant = new TJSVariant())
  5555. {
  5556. this.tjs_.EvalScript(this.kTjsGlobalVarName + "[0]", tjsvariant);
  5557. first_dest.x = tjsvariant.AsReal();
  5558. this.tjs_.EvalScript(this.kTjsGlobalVarName + "[1]", tjsvariant);
  5559. first_dest.y = tjsvariant.AsReal();
  5560. this.tjs_.EvalScript(this.kTjsGlobalVarName + "[2]", tjsvariant);
  5561. first_dest.z = tjsvariant.AsReal();
  5562. this.tjs_.EvalScript(this.kTjsGlobalVarName + "[3]", tjsvariant);
  5563. second_dest.x = tjsvariant.AsReal();
  5564. this.tjs_.EvalScript(this.kTjsGlobalVarName + "[4]", tjsvariant);
  5565. second_dest.y = tjsvariant.AsReal();
  5566. this.tjs_.EvalScript(this.kTjsGlobalVarName + "[5]", tjsvariant);
  5567. second_dest.z = tjsvariant.AsReal();
  5568. }
  5569. }
  5570. public int vecotr_element_count
  5571. {
  5572. get
  5573. {
  5574. return (this.array_count_ != 3) ? 2 : 1;
  5575. }
  5576. }
  5577. public int count
  5578. {
  5579. get
  5580. {
  5581. return this.array_count_;
  5582. }
  5583. }
  5584. public bool valid
  5585. {
  5586. get
  5587. {
  5588. return this.is_valid_;
  5589. }
  5590. }
  5591. private string kTjsGlobalVarName = "global.__tmp_array";
  5592. private static BaseKagManager.PerthOffsetPosTagData.TagArrayData instans_data_;
  5593. private TJSScript tjs_;
  5594. private bool is_valid_;
  5595. private int array_count_;
  5596. }
  5597. }
  5598. protected class ExecWaitData
  5599. {
  5600. public virtual bool Check()
  5601. {
  5602. return !this.use || this.wait_time <= GameMain.tick_count - this.start_tick_count;
  5603. }
  5604. public virtual void Clear()
  5605. {
  5606. this.start_tick_count = (this.wait_time = 0);
  5607. this.use = false;
  5608. this.skip_possible = true;
  5609. }
  5610. public int start_tick_count;
  5611. public int wait_time;
  5612. public bool skip_possible;
  5613. public bool use;
  5614. }
  5615. protected class MaidPropSeqWaitData : BaseKagManager.ExecWaitData
  5616. {
  5617. public override bool Check()
  5618. {
  5619. return !this.use || this.maid == null || !this.maid.IsBusy;
  5620. }
  5621. public override void Clear()
  5622. {
  5623. base.Clear();
  5624. this.maid = null;
  5625. }
  5626. public Maid maid;
  5627. }
  5628. protected class MaidVoiceWaitData : BaseKagManager.ExecWaitData
  5629. {
  5630. public override bool Check()
  5631. {
  5632. if (!this.use || this.maid == null)
  5633. {
  5634. return true;
  5635. }
  5636. AudioSourceMgr audioMan = this.maid.AudioMan;
  5637. return audioMan == null || !audioMan.isPlay();
  5638. }
  5639. public override void Clear()
  5640. {
  5641. base.Clear();
  5642. this.maid = null;
  5643. }
  5644. public Maid maid;
  5645. }
  5646. protected class DummyVoiceWaitData : BaseKagManager.ExecWaitData
  5647. {
  5648. public override bool Check()
  5649. {
  5650. return !this.use || !GameMain.Instance.SoundMgr.IsPlayDummyVoice();
  5651. }
  5652. public override void Clear()
  5653. {
  5654. base.Clear();
  5655. }
  5656. }
  5657. protected class SubtitleData
  5658. {
  5659. public SubtitleData()
  5660. {
  5661. this.Clear();
  5662. }
  5663. public void Clear()
  5664. {
  5665. this.text = string.Empty;
  5666. this.displayTime = -1;
  5667. this.addDisplayTime = 0;
  5668. this.casinoType = false;
  5669. }
  5670. public string text;
  5671. public int displayTime;
  5672. public int addDisplayTime;
  5673. public bool casinoType;
  5674. }
  5675. }