BaseKagManager.cs 123 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329330331332333334335336337338339340341342343344345346347348349350351352353354355356357358359360361362363364365366367368369370371372373374375376377378379380381382383384385386387388389390391392393394395396397398399400401402403404405406407408409410411412413414415416417418419420421422423424425426427428429430431432433434435436437438439440441442443444445446447448449450451452453454455456457458459460461462463464465466467468469470471472473474475476477478479480481482483484485486487488489490491492493494495496497498499500501502503504505506507508509510511512513514515516517518519520521522523524525526527528529530531532533534535536537538539540541542543544545546547548549550551552553554555556557558559560561562563564565566567568569570571572573574575576577578579580581582583584585586587588589590591592593594595596597598599600601602603604605606607608609610611612613614615616617618619620621622623624625626627628629630631632633634635636637638639640641642643644645646647648649650651652653654655656657658659660661662663664665666667668669670671672673674675676677678679680681682683684685686687688689690691692693694695696697698699700701702703704705706707708709710711712713714715716717718719720721722723724725726727728729730731732733734735736737738739740741742743744745746747748749750751752753754755756757758759760761762763764765766767768769770771772773774775776777778779780781782783784785786787788789790791792793794795796797798799800801802803804805806807808809810811812813814815816817818819820821822823824825826827828829830831832833834835836837838839840841842843844845846847848849850851852853854855856857858859860861862863864865866867868869870871872873874875876877878879880881882883884885886887888889890891892893894895896897898899900901902903904905906907908909910911912913914915916917918919920921922923924925926927928929930931932933934935936937938939940941942943944945946947948949950951952953954955956957958959960961962963964965966967968969970971972973974975976977978979980981982983984985986987988989990991992993994995996997998999100010011002100310041005100610071008100910101011101210131014101510161017101810191020102110221023102410251026102710281029103010311032103310341035103610371038103910401041104210431044104510461047104810491050105110521053105410551056105710581059106010611062106310641065106610671068106910701071107210731074107510761077107810791080108110821083108410851086108710881089109010911092109310941095109610971098109911001101110211031104110511061107110811091110111111121113111411151116111711181119112011211122112311241125112611271128112911301131113211331134113511361137113811391140114111421143114411451146114711481149115011511152115311541155115611571158115911601161116211631164116511661167116811691170117111721173117411751176117711781179118011811182118311841185118611871188118911901191119211931194119511961197119811991200120112021203120412051206120712081209121012111212121312141215121612171218121912201221122212231224122512261227122812291230123112321233123412351236123712381239124012411242124312441245124612471248124912501251125212531254125512561257125812591260126112621263126412651266126712681269127012711272127312741275127612771278127912801281128212831284128512861287128812891290129112921293129412951296129712981299130013011302130313041305130613071308130913101311131213131314131513161317131813191320132113221323132413251326132713281329133013311332133313341335133613371338133913401341134213431344134513461347134813491350135113521353135413551356135713581359136013611362136313641365136613671368136913701371137213731374137513761377137813791380138113821383138413851386138713881389139013911392139313941395139613971398139914001401140214031404140514061407140814091410141114121413141414151416141714181419142014211422142314241425142614271428142914301431143214331434143514361437143814391440144114421443144414451446144714481449145014511452145314541455145614571458145914601461146214631464146514661467146814691470147114721473147414751476147714781479148014811482148314841485148614871488148914901491149214931494149514961497149814991500150115021503150415051506150715081509151015111512151315141515151615171518151915201521152215231524152515261527152815291530153115321533153415351536153715381539154015411542154315441545154615471548154915501551155215531554155515561557155815591560156115621563156415651566156715681569157015711572157315741575157615771578157915801581158215831584158515861587158815891590159115921593159415951596159715981599160016011602160316041605160616071608160916101611161216131614161516161617161816191620162116221623162416251626162716281629163016311632163316341635163616371638163916401641164216431644164516461647164816491650165116521653165416551656165716581659166016611662166316641665166616671668166916701671167216731674167516761677167816791680168116821683168416851686168716881689169016911692169316941695169616971698169917001701170217031704170517061707170817091710171117121713171417151716171717181719172017211722172317241725172617271728172917301731173217331734173517361737173817391740174117421743174417451746174717481749175017511752175317541755175617571758175917601761176217631764176517661767176817691770177117721773177417751776177717781779178017811782178317841785178617871788178917901791179217931794179517961797179817991800180118021803180418051806180718081809181018111812181318141815181618171818181918201821182218231824182518261827182818291830183118321833183418351836183718381839184018411842184318441845184618471848184918501851185218531854185518561857185818591860186118621863186418651866186718681869187018711872187318741875187618771878187918801881188218831884188518861887188818891890189118921893189418951896189718981899190019011902190319041905190619071908190919101911191219131914191519161917191819191920192119221923192419251926192719281929193019311932193319341935193619371938193919401941194219431944194519461947194819491950195119521953195419551956195719581959196019611962196319641965196619671968196919701971197219731974197519761977197819791980198119821983198419851986198719881989199019911992199319941995199619971998199920002001200220032004200520062007200820092010201120122013201420152016201720182019202020212022202320242025202620272028202920302031203220332034203520362037203820392040204120422043204420452046204720482049205020512052205320542055205620572058205920602061206220632064206520662067206820692070207120722073207420752076207720782079208020812082208320842085208620872088208920902091209220932094209520962097209820992100210121022103210421052106210721082109211021112112211321142115211621172118211921202121212221232124212521262127212821292130213121322133213421352136213721382139214021412142214321442145214621472148214921502151215221532154215521562157215821592160216121622163216421652166216721682169217021712172217321742175217621772178217921802181218221832184218521862187218821892190219121922193219421952196219721982199220022012202220322042205220622072208220922102211221222132214221522162217221822192220222122222223222422252226222722282229223022312232223322342235223622372238223922402241224222432244224522462247224822492250225122522253225422552256225722582259226022612262226322642265226622672268226922702271227222732274227522762277227822792280228122822283228422852286228722882289229022912292229322942295229622972298229923002301230223032304230523062307230823092310231123122313231423152316231723182319232023212322232323242325232623272328232923302331233223332334233523362337233823392340234123422343234423452346234723482349235023512352235323542355235623572358235923602361236223632364236523662367236823692370237123722373237423752376237723782379238023812382238323842385238623872388238923902391239223932394239523962397239823992400240124022403240424052406240724082409241024112412241324142415241624172418241924202421242224232424242524262427242824292430243124322433243424352436243724382439244024412442244324442445244624472448244924502451245224532454245524562457245824592460246124622463246424652466246724682469247024712472247324742475247624772478247924802481248224832484248524862487248824892490249124922493249424952496249724982499250025012502250325042505250625072508250925102511251225132514251525162517251825192520252125222523252425252526252725282529253025312532253325342535253625372538253925402541254225432544254525462547254825492550255125522553255425552556255725582559256025612562256325642565256625672568256925702571257225732574257525762577257825792580258125822583258425852586258725882589259025912592259325942595259625972598259926002601260226032604260526062607260826092610261126122613261426152616261726182619262026212622262326242625262626272628262926302631263226332634263526362637263826392640264126422643264426452646264726482649265026512652265326542655265626572658265926602661266226632664266526662667266826692670267126722673267426752676267726782679268026812682268326842685268626872688268926902691269226932694269526962697269826992700270127022703270427052706270727082709271027112712271327142715271627172718271927202721272227232724272527262727272827292730273127322733273427352736273727382739274027412742274327442745274627472748274927502751275227532754275527562757275827592760276127622763276427652766276727682769277027712772277327742775277627772778277927802781278227832784278527862787278827892790279127922793279427952796279727982799280028012802280328042805280628072808280928102811281228132814281528162817281828192820282128222823282428252826282728282829283028312832283328342835283628372838283928402841284228432844284528462847284828492850285128522853285428552856285728582859286028612862286328642865286628672868286928702871287228732874287528762877287828792880288128822883288428852886288728882889289028912892289328942895289628972898289929002901290229032904290529062907290829092910291129122913291429152916291729182919292029212922292329242925292629272928292929302931293229332934293529362937293829392940294129422943294429452946294729482949295029512952295329542955295629572958295929602961296229632964296529662967296829692970297129722973297429752976297729782979298029812982298329842985298629872988298929902991299229932994299529962997299829993000300130023003300430053006300730083009301030113012301330143015301630173018301930203021302230233024302530263027302830293030303130323033303430353036303730383039304030413042304330443045304630473048304930503051305230533054305530563057305830593060306130623063306430653066306730683069307030713072307330743075307630773078307930803081308230833084308530863087308830893090309130923093309430953096309730983099310031013102310331043105310631073108310931103111311231133114311531163117311831193120312131223123312431253126312731283129313031313132313331343135313631373138313931403141314231433144314531463147314831493150315131523153315431553156315731583159316031613162316331643165316631673168316931703171317231733174317531763177317831793180318131823183318431853186318731883189319031913192319331943195319631973198319932003201320232033204320532063207320832093210321132123213321432153216321732183219322032213222322332243225322632273228322932303231323232333234323532363237323832393240324132423243324432453246324732483249325032513252325332543255325632573258325932603261326232633264326532663267326832693270327132723273327432753276327732783279328032813282328332843285328632873288328932903291329232933294329532963297329832993300330133023303330433053306330733083309331033113312331333143315331633173318331933203321332233233324332533263327332833293330333133323333333433353336333733383339334033413342334333443345334633473348334933503351335233533354335533563357335833593360336133623363336433653366336733683369337033713372337333743375337633773378337933803381338233833384338533863387338833893390339133923393339433953396339733983399340034013402340334043405340634073408340934103411341234133414341534163417341834193420342134223423342434253426342734283429343034313432343334343435343634373438343934403441344234433444344534463447344834493450345134523453345434553456345734583459346034613462346334643465346634673468346934703471347234733474347534763477347834793480348134823483348434853486348734883489349034913492349334943495349634973498349935003501350235033504350535063507350835093510351135123513351435153516351735183519352035213522352335243525352635273528352935303531353235333534353535363537353835393540354135423543354435453546354735483549355035513552355335543555355635573558355935603561356235633564356535663567356835693570357135723573357435753576357735783579358035813582358335843585358635873588358935903591359235933594359535963597359835993600360136023603360436053606360736083609361036113612361336143615361636173618361936203621362236233624362536263627362836293630363136323633363436353636363736383639364036413642364336443645364636473648364936503651365236533654365536563657365836593660366136623663366436653666366736683669367036713672367336743675367636773678367936803681368236833684368536863687368836893690369136923693369436953696369736983699370037013702370337043705370637073708370937103711371237133714371537163717371837193720372137223723372437253726372737283729373037313732373337343735373637373738373937403741374237433744374537463747374837493750375137523753375437553756375737583759376037613762376337643765376637673768376937703771377237733774377537763777377837793780378137823783378437853786378737883789379037913792379337943795379637973798379938003801380238033804380538063807380838093810381138123813381438153816381738183819382038213822382338243825382638273828382938303831383238333834383538363837383838393840384138423843384438453846384738483849385038513852385338543855385638573858385938603861386238633864386538663867386838693870387138723873387438753876387738783879388038813882388338843885388638873888388938903891389238933894389538963897389838993900390139023903390439053906390739083909391039113912391339143915391639173918391939203921392239233924392539263927392839293930393139323933393439353936393739383939394039413942394339443945394639473948394939503951395239533954395539563957395839593960396139623963396439653966396739683969397039713972397339743975397639773978397939803981398239833984398539863987398839893990399139923993399439953996399739983999400040014002400340044005400640074008400940104011401240134014401540164017401840194020402140224023402440254026402740284029403040314032403340344035403640374038403940404041404240434044404540464047404840494050405140524053405440554056405740584059406040614062406340644065406640674068406940704071407240734074407540764077407840794080408140824083408440854086408740884089409040914092409340944095409640974098409941004101410241034104410541064107410841094110411141124113411441154116411741184119412041214122412341244125412641274128412941304131413241334134413541364137413841394140414141424143414441454146414741484149415041514152415341544155415641574158415941604161416241634164416541664167416841694170417141724173417441754176417741784179418041814182418341844185418641874188418941904191419241934194419541964197419841994200420142024203420442054206420742084209421042114212421342144215421642174218421942204221422242234224422542264227422842294230423142324233423442354236423742384239424042414242424342444245424642474248424942504251425242534254425542564257425842594260426142624263426442654266426742684269427042714272427342744275427642774278427942804281428242834284428542864287428842894290429142924293429442954296429742984299430043014302430343044305430643074308430943104311431243134314431543164317431843194320432143224323432443254326432743284329433043314332433343344335433643374338433943404341434243434344434543464347434843494350435143524353435443554356435743584359436043614362436343644365436643674368436943704371437243734374437543764377437843794380438143824383438443854386438743884389439043914392439343944395439643974398439944004401440244034404440544064407440844094410441144124413441444154416441744184419442044214422442344244425442644274428442944304431443244334434443544364437443844394440444144424443444444454446444744484449445044514452445344544455445644574458445944604461446244634464446544664467446844694470447144724473447444754476447744784479448044814482448344844485448644874488
  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("ikattachodogu", new KagScript.KagTagCallBack(this.TagIKAttachOdogu));
  51. this.kag_.AddTagCallBack("allpos", new KagScript.KagTagCallBack(this.TagAllPos));
  52. this.kag_.AddTagCallBack("alloffset", new KagScript.KagTagCallBack(this.TagAllOffSet));
  53. this.kag_.AddTagCallBack("addalloffset", new KagScript.KagTagCallBack(this.TagAddAllOffset));
  54. this.kag_.AddTagCallBack("offset", new KagScript.KagTagCallBack(this.TagOffSet));
  55. this.kag_.AddTagCallBack("allresetpos", new KagScript.KagTagCallBack(this.TagAllResetPos));
  56. this.kag_.AddTagCallBack("transform", new KagScript.KagTagCallBack(this.TagTransform));
  57. this.kag_.AddTagCallBack("position", new KagScript.KagTagCallBack(this.TagPosition));
  58. this.kag_.AddTagCallBack("rotation", new KagScript.KagTagCallBack(this.TagRotation));
  59. this.kag_.AddTagCallBack("camera", new KagScript.KagTagCallBack(this.TagCamera));
  60. this.kag_.AddTagCallBack("camerachase", new KagScript.KagTagCallBack(this.TagCameraChase));
  61. this.kag_.AddTagCallBack("camerachasestop", new KagScript.KagTagCallBack(this.TagCameraChaseStop));
  62. this.kag_.AddTagCallBack("cameraanimationstart", new KagScript.KagTagCallBack(this.TagCameraAnimationStart));
  63. this.kag_.AddTagCallBack("cameracontrol", new KagScript.KagTagCallBack(this.TagCameraControl));
  64. this.kag_.AddTagCallBack("lightmain", new KagScript.KagTagCallBack(this.TagLightMain));
  65. this.kag_.AddTagCallBack("playbgm", new KagScript.KagTagCallBack(this.TagPlayBgm));
  66. this.kag_.AddTagCallBack("stopbgm", new KagScript.KagTagCallBack(this.TagStopBgm));
  67. this.kag_.AddTagCallBack("playenv", new KagScript.KagTagCallBack(this.TagPlayEnv));
  68. this.kag_.AddTagCallBack("stopenv", new KagScript.KagTagCallBack(this.TagStopEnv));
  69. this.kag_.AddTagCallBack("playse", new KagScript.KagTagCallBack(this.TagPlaySe));
  70. this.kag_.AddTagCallBack("stopse", new KagScript.KagTagCallBack(this.TagStopSe));
  71. this.kag_.AddTagCallBack("playvoice", new KagScript.KagTagCallBack(this.TagPlayVoice));
  72. this.kag_.AddTagCallBack("stopvoice", new KagScript.KagTagCallBack(this.TagStopVoice));
  73. this.kag_.AddTagCallBack("stopsound", new KagScript.KagTagCallBack(this.TagStopSound));
  74. this.kag_.AddTagCallBack("fade3d", new KagScript.KagTagCallBack(this.TagFade3D));
  75. this.kag_.AddTagCallBack("setbg", new KagScript.KagTagCallBack(this.TagSetBg));
  76. this.kag_.AddTagCallBack("draw2dtex", new KagScript.KagTagCallBack(this.TagDraw2DTex));
  77. this.kag_.AddTagCallBack("clear2dtex", new KagScript.KagTagCallBack(this.TagClear2DTex));
  78. this.kag_.AddTagCallBack("itemchange", new KagScript.KagTagCallBack(this.TagItemChange));
  79. this.kag_.AddTagCallBack("itemset", new KagScript.KagTagCallBack(this.TagItemSet));
  80. this.kag_.AddTagCallBack("itemreset", new KagScript.KagTagCallBack(this.TagItemReset));
  81. this.kag_.AddTagCallBack("itempos", new KagScript.KagTagCallBack(this.TagItemPos));
  82. this.kag_.AddTagCallBack("allprocpropseqstart", new KagScript.KagTagCallBack(this.TagAllProcPropSeqStart));
  83. this.kag_.AddTagCallBack("itemmask", new KagScript.KagTagCallBack(this.TagItemMask));
  84. this.kag_.AddTagCallBack("itemmaskmode", new KagScript.KagTagCallBack(this.TagItemMaskMode));
  85. this.kag_.AddTagCallBack("maidreset", new KagScript.KagTagCallBack(this.TagMaidReset));
  86. this.kag_.AddTagCallBack("propset", new KagScript.KagTagCallBack(this.TagPropSet));
  87. this.kag_.AddTagCallBack("propreset", new KagScript.KagTagCallBack(this.TagPropReset));
  88. this.kag_.AddTagCallBack("addprefabbg", new KagScript.KagTagCallBack(this.TagAddPrefabBg));
  89. this.kag_.AddTagCallBack("setprefabbgtransformdata", new KagScript.KagTagCallBack(this.TagSetPrefabBgTransformData));
  90. this.kag_.AddTagCallBack("delprefabbg", new KagScript.KagTagCallBack(this.TagDelPrefabBg));
  91. this.kag_.AddTagCallBack("delprefabbgall", new KagScript.KagTagCallBack(this.TagDelPrefabBgAll));
  92. this.kag_.AddTagCallBack("moveprefabtochara", new KagScript.KagTagCallBack(this.TagMovePrefabToChara));
  93. this.kag_.AddTagCallBack("addprefabworld", new KagScript.KagTagCallBack(this.TagAddPrefabWorld));
  94. this.kag_.AddTagCallBack("releaseprefab", new KagScript.KagTagCallBack(this.TagReleasePrefab));
  95. this.kag_.AddTagCallBack("prefabanimatorsetparam", new KagScript.KagTagCallBack(this.TagPrefabAnimatorSetParam));
  96. this.kag_.AddTagCallBack("chinko", new KagScript.KagTagCallBack(this.TagChinko));
  97. this.kag_.AddTagCallBack("setloacalposition", new KagScript.KagTagCallBack(this.TagSetLoacalPosition));
  98. this.kag_.AddTagCallBack("addlocalposition", new KagScript.KagTagCallBack(this.TagAddLocalPosition));
  99. this.kag_.AddTagCallBack("openmouth", new KagScript.KagTagCallBack(this.TagOpenMouth));
  100. this.kag_.AddTagCallBack("eyetoposition", new KagScript.KagTagCallBack(this.TagEyeToPosition));
  101. this.kag_.AddTagCallBack("eyetotarget", new KagScript.KagTagCallBack(this.TagEyeToTarget));
  102. this.kag_.AddTagCallBack("eyetocamera", new KagScript.KagTagCallBack(this.TagEyeToCamera));
  103. this.kag_.AddTagCallBack("eyetoreset", new KagScript.KagTagCallBack(this.TagEyeToReset));
  104. this.kag_.AddTagCallBack("setmaidoffsetpos", new KagScript.KagTagCallBack(this.TagSetMaidOffsetPos));
  105. this.kag_.AddTagCallBack("setmaidoffsetmultipos", new KagScript.KagTagCallBack(this.TagSetMaidOffsetMultiPos));
  106. this.kag_.AddTagCallBack("setmanoffsetpos", new KagScript.KagTagCallBack(this.TagSetManOffsetPos));
  107. this.kag_.AddTagCallBack("setmaidoffsetposcategory", new KagScript.KagTagCallBack(this.TagSetMaidOffsetPosCategory));
  108. this.kag_.AddTagCallBack("addprefabchara", new KagScript.KagTagCallBack(this.TagAddPrefabChara));
  109. this.kag_.AddTagCallBack("delprefabchara", new KagScript.KagTagCallBack(this.TagDelPrefabChara));
  110. this.kag_.AddTagCallBack("delprefabcharaall", new KagScript.KagTagCallBack(this.TagDelPrefabCharaAll));
  111. this.kag_.AddTagCallBack("animobjchara", new KagScript.KagTagCallBack(this.TagAnimObjChara));
  112. this.kag_.AddTagCallBack("charaactivate", new KagScript.KagTagCallBack(this.TagCharaActivate));
  113. this.kag_.AddTagCallBack("charaactivatefreenpc", new KagScript.KagTagCallBack(this.TagConCharaActivateFreeNPC));
  114. this.kag_.AddTagCallBack("CharaActivate1stRanking", new KagScript.KagTagCallBack(this.TagConCharaActivate1stRanking));
  115. this.kag_.AddTagCallBack("CharaActivateLeader", new KagScript.KagTagCallBack(this.TagConCharaActivateLeader));
  116. this.kag_.AddTagCallBack("manpresetmenuload", new KagScript.KagTagCallBack(this.TagManPresetMenuLoad));
  117. this.kag_.AddTagCallBack("charadeactivate", new KagScript.KagTagCallBack(this.TagCharaDeactivate));
  118. this.kag_.AddTagCallBack("charavisible", new KagScript.KagTagCallBack(this.TagCharaVisible));
  119. this.kag_.AddTagCallBack("charavisiblealloff", new KagScript.KagTagCallBack(this.TagCharaVisibleAllOff));
  120. this.kag_.AddTagCallBack("texmuladd", new KagScript.KagTagCallBack(this.TagTexMulAdd));
  121. this.kag_.AddTagCallBack("texmuldel", new KagScript.KagTagCallBack(this.TagTexMulDel));
  122. this.kag_.AddTagCallBack("startday", new KagScript.KagTagCallBack(this.TagStartDay));
  123. this.kag_.AddTagCallBack("schedulestartmanage", new KagScript.KagTagCallBack(this.TagScheduleStartManage));
  124. this.kag_.AddTagCallBack("endday", new KagScript.KagTagCallBack(this.TagEndDay));
  125. this.kag_.AddTagCallBack("updatemaidpoint", new KagScript.KagTagCallBack(this.TagConUpdateMaidPoint));
  126. this.kag_.AddTagCallBack("vrbgchangeinit", new KagScript.KagTagCallBack(this.TagVRBGChangeInit));
  127. this.kag_.AddTagCallBack("vreventobj", new KagScript.KagTagCallBack(this.TagVREventObj));
  128. this.kag_.AddTagCallBack("vreventgroup", new KagScript.KagTagCallBack(this.TagVREventGroup));
  129. this.kag_.AddTagCallBack("vrfreescene", new KagScript.KagTagCallBack(this.TagVRFreeScene));
  130. this.kag_.AddTagCallBack("vrcamera", new KagScript.KagTagCallBack(this.TagVRCamera));
  131. this.kag_.AddTagCallBack("vrtablet", new KagScript.KagTagCallBack(this.TagVRTablet));
  132. this.kag_.AddTagCallBack("vrchoicesset", new KagScript.KagTagCallBack(this.TagVRChoicesSet));
  133. this.kag_.AddTagCallBack("vrchoicesshow", new KagScript.KagTagCallBack(this.TagVRChoicesShow));
  134. this.kag_.AddTagCallBack("vrchoicesshownonstop", new KagScript.KagTagCallBack(this.TagVRChoicesShowNonStop));
  135. this.kag_.AddTagCallBack("vrdonexttime", new KagScript.KagTagCallBack(this.TagVRDoNextTime));
  136. this.kag_.AddTagCallBack("vrresetheadpos", new KagScript.KagTagCallBack(this.TagVRResetHeadPos));
  137. this.kag_.AddTagCallBack("vrtouchscript", new KagScript.KagTagCallBack(this.TagVRTouchScript));
  138. this.kag_.AddTagCallBack("vrdaytimeshow", new KagScript.KagTagCallBack(this.TagVRDayTimeShow));
  139. this.kag_.AddTagCallBack("vrdialog", new KagScript.KagTagCallBack(this.TagVRDialog));
  140. this.kag_.AddTagCallBack("vrstartmoviemusicplayertv", new KagScript.KagTagCallBack(this.TagVRStartMovieMusicPlayerTV));
  141. this.kag_.AddTagCallBack("vrmovietv", new KagScript.KagTagCallBack(this.TagVRMovieTV));
  142. this.kag_.AddTagCallBack("vrplantwindowshow", new KagScript.KagTagCallBack(this.TagVRPlantWindowShow));
  143. this.kag_.AddTagCallBack("vrplantupdate", new KagScript.KagTagCallBack(this.TagVRPlantUpdate));
  144. this.kag_.AddTagCallBack("vrtutorialstart", new KagScript.KagTagCallBack(this.TagVRTutorialStart));
  145. this.kag_.AddTagCallBack("vrphotomodestart", new KagScript.KagTagCallBack(this.TagVRPhotoModeStart));
  146. this.kag_.AddTagCallBack("vrnochangebg", new KagScript.KagTagCallBack(this.TagVRNoChangeBG));
  147. this.kag_.AddTagCallBack("vrcamtomanhead", new KagScript.KagTagCallBack(this.TagVRCamToManHead));
  148. this.kag_.AddTagCallBack("vrtrophytext", new KagScript.KagTagCallBack(this.TagVRTrophyText));
  149. this.kag_.AddTagCallBack("vrrentalmaidselectstart", new KagScript.KagTagCallBack(this.TagVRRentalMaidSelectStart));
  150. this.kag_.AddTagCallBack("vrtouchuseselect", new KagScript.KagTagCallBack(this.TagVRTouchUseSelect));
  151. this.kag_.AddTagCallBack("vrhintshow", new KagScript.KagTagCallBack(this.TagVRHintShow));
  152. this.kag_.AddTagCallBack("vrkaraokewindowshow", new KagScript.KagTagCallBack(this.TagVRKaraokeWindowShow));
  153. this.kag_.AddTagCallBack("danceresult", new KagScript.KagTagCallBack(this.TagDanceResultStart));
  154. this.kag_.AddTagCallBack("setdance", new KagScript.KagTagCallBack(this.TagSetDanceType));
  155. this.kag_.AddTagCallBack("cutinshoot", new KagScript.KagTagCallBack(this.TagCutinTexShoot));
  156. this.kag_.AddTagCallBack("battlecutin", new KagScript.KagTagCallBack(this.TagBattleCutInStart));
  157. this.kag_.AddTagCallBack("motioncheck", new KagScript.KagTagCallBack(this.TagMotionCheckStart));
  158. this.kag_.AddTagCallBack("setmcskip", new KagScript.KagTagCallBack(this.TagSetMcSkip));
  159. this.kag_.AddTagCallBack("addeventdisplay", new KagScript.KagTagCallBack(this.TagAddedEventDisplay));
  160. this.kag_.AddTagCallBack("tutorialstart", new KagScript.KagTagCallBack(this.TagTutorialStart));
  161. }
  162. public virtual void Update()
  163. {
  164. if (!this.enabled)
  165. {
  166. return;
  167. }
  168. if (this.fade_wait_)
  169. {
  170. if (this.IsFadeProc())
  171. {
  172. return;
  173. }
  174. this.fade_wait_ = false;
  175. this.Exec();
  176. }
  177. if (0 < this.wait_event_list_.Count)
  178. {
  179. foreach (KeyValuePair<string, WaitEventList> keyValuePair in this.wait_event_list_)
  180. {
  181. keyValuePair.Value.EventCheck();
  182. }
  183. }
  184. if (this.exec_wait_data_.use && this.exec_wait_data_.Check())
  185. {
  186. this.exec_wait_data_.Clear();
  187. this.Exec();
  188. }
  189. }
  190. public virtual bool Exec()
  191. {
  192. if (!this.enabled)
  193. {
  194. return false;
  195. }
  196. if (this.fade_wait_ && this.IsFadeProc())
  197. {
  198. return false;
  199. }
  200. if (this.exec_wait_data_.use)
  201. {
  202. if (!this.exec_wait_data_.Check())
  203. {
  204. return false;
  205. }
  206. this.exec_wait_data_.Clear();
  207. }
  208. this.maidOffsetSetList.Clear();
  209. return this.kag_.Exec();
  210. }
  211. public virtual bool IsExec()
  212. {
  213. return !this.exec_wait_data_.use && this.enabled;
  214. }
  215. public void SetFadeWait(bool value)
  216. {
  217. this.fade_wait_ = value;
  218. }
  219. public void SetExecWait(int wait_time, bool skip_possible)
  220. {
  221. this.exec_wait_data_.Clear();
  222. if (wait_time <= 0)
  223. {
  224. return;
  225. }
  226. this.exec_wait_data_ = new BaseKagManager.ExecWaitData();
  227. this.exec_wait_data_.wait_time = wait_time;
  228. this.exec_wait_data_.skip_possible = skip_possible;
  229. this.exec_wait_data_.start_tick_count = GameMain.tick_count;
  230. this.exec_wait_data_.use = true;
  231. }
  232. public bool SetMaidAllPropSeqWait(Maid maid)
  233. {
  234. if (maid == null || !maid.IsBusy)
  235. {
  236. return false;
  237. }
  238. this.exec_wait_data_ = new BaseKagManager.MaidPropSeqWaitData
  239. {
  240. skip_possible = false,
  241. use = true,
  242. maid = maid
  243. };
  244. return true;
  245. }
  246. public bool SetMaidVoiceWait(Maid maid)
  247. {
  248. if (maid == null)
  249. {
  250. return false;
  251. }
  252. this.exec_wait_data_ = new BaseKagManager.MaidVoiceWaitData
  253. {
  254. skip_possible = false,
  255. use = true,
  256. maid = maid
  257. };
  258. return true;
  259. }
  260. public bool SetDummyVoiceWait()
  261. {
  262. this.exec_wait_data_ = new BaseKagManager.DummyVoiceWaitData
  263. {
  264. skip_possible = false,
  265. use = true
  266. };
  267. return true;
  268. }
  269. public void ClearExecWait()
  270. {
  271. if (this.exec_wait_data_.use && !this.exec_wait_data_.skip_possible)
  272. {
  273. return;
  274. }
  275. this.exec_wait_data_.Clear();
  276. }
  277. public virtual void LoadScriptFile(string file_name, string label_name = "")
  278. {
  279. WaitEventList waitEventList = this.GetWaitEventList("se");
  280. waitEventList.Clear();
  281. this.exec_wait_data_.Clear();
  282. this.kag_.LoadScenario(file_name);
  283. if (label_name != string.Empty)
  284. {
  285. this.kag_.GoToLabel(label_name);
  286. }
  287. }
  288. public virtual void JumpLabel(string label_name)
  289. {
  290. this.exec_wait_data_.Clear();
  291. if (label_name != string.Empty)
  292. {
  293. this.kag_.GoToLabel(label_name);
  294. }
  295. }
  296. public virtual bool TagWait(KagTagSupport tag_data)
  297. {
  298. this.CheckAbsolutelyNecessaryTag(tag_data, "wait", new string[]
  299. {
  300. "time"
  301. });
  302. this.exec_wait_data_.Clear();
  303. int num = tag_data.GetTagProperty("time").AsInteger();
  304. if (num <= 0)
  305. {
  306. return false;
  307. }
  308. bool skip_possible = !tag_data.IsValid("skip") || tag_data.GetTagProperty("skip").AsBool();
  309. this.SetWait(num, skip_possible);
  310. return true;
  311. }
  312. public bool TagFace(KagTagSupport tag_data)
  313. {
  314. Maid maid = this.GetMaidAndMan(tag_data);
  315. if (maid == null)
  316. {
  317. return false;
  318. }
  319. this.CheckAbsolutelyNecessaryTag(tag_data, "face", new string[]
  320. {
  321. "name"
  322. });
  323. string face_name = tag_data.GetTagProperty("name").AsString();
  324. int num = 0;
  325. if (tag_data.IsValid("wait"))
  326. {
  327. num = tag_data.GetTagProperty("wait").AsInteger();
  328. }
  329. WaitEventList waitEventList = this.GetWaitEventList("face");
  330. if (num <= 0)
  331. {
  332. maid.FaceAnime(face_name, 1f, 0);
  333. waitEventList.Clear();
  334. }
  335. else
  336. {
  337. waitEventList.Add(delegate
  338. {
  339. if (maid != null && maid.body0 != null && maid.body0.isLoadedBody)
  340. {
  341. maid.FaceAnime(face_name, 1f, 0);
  342. }
  343. }, num);
  344. }
  345. return false;
  346. }
  347. public bool TagFaceBlend(KagTagSupport tag_data)
  348. {
  349. this.CheckAbsolutelyNecessaryTag(tag_data, "faceblend", new string[]
  350. {
  351. "name"
  352. });
  353. Maid maidAndMan = this.GetMaidAndMan(tag_data);
  354. if (maidAndMan == null)
  355. {
  356. return false;
  357. }
  358. string text = tag_data.GetTagProperty("name").AsString();
  359. if (text == "なし")
  360. {
  361. text = "無し";
  362. }
  363. maidAndMan.FaceBlend(text);
  364. return false;
  365. }
  366. public bool TagFaceBlend2(KagTagSupport tag_data)
  367. {
  368. Maid maidAndMan = this.GetMaidAndMan(tag_data);
  369. if (maidAndMan == null)
  370. {
  371. return false;
  372. }
  373. if (tag_data.IsValid("reset"))
  374. {
  375. maidAndMan.FaceBlend("無し");
  376. }
  377. else
  378. {
  379. TMorph.AddBlendType addBlendType = TMorph.AddBlendType.None;
  380. if (tag_data.IsValid("頬1") || tag_data.IsValid("頬1"))
  381. {
  382. addBlendType |= TMorph.AddBlendType.Cheek1;
  383. }
  384. if (tag_data.IsValid("頬2") || tag_data.IsValid("頬2"))
  385. {
  386. addBlendType |= TMorph.AddBlendType.Cheek2;
  387. }
  388. if (tag_data.IsValid("頬3") || tag_data.IsValid("頬3"))
  389. {
  390. addBlendType |= TMorph.AddBlendType.Cheek3;
  391. }
  392. if (tag_data.IsValid("涙1") || tag_data.IsValid("涙1"))
  393. {
  394. addBlendType |= TMorph.AddBlendType.Tear1;
  395. }
  396. if (tag_data.IsValid("涙2") || tag_data.IsValid("涙2"))
  397. {
  398. addBlendType |= TMorph.AddBlendType.Tear2;
  399. }
  400. if (tag_data.IsValid("涙3") || tag_data.IsValid("涙3"))
  401. {
  402. addBlendType |= TMorph.AddBlendType.Tear3;
  403. }
  404. if (tag_data.IsValid("ショック"))
  405. {
  406. addBlendType |= TMorph.AddBlendType.Shock;
  407. }
  408. if (tag_data.IsValid("よだれ") || tag_data.IsValid("涎"))
  409. {
  410. addBlendType |= TMorph.AddBlendType.Yodare;
  411. }
  412. if (tag_data.IsValid("赤面"))
  413. {
  414. addBlendType |= TMorph.AddBlendType.Blush;
  415. }
  416. if (tag_data.IsValid("玉涙"))
  417. {
  418. addBlendType |= TMorph.AddBlendType.TearBig;
  419. }
  420. maidAndMan.body0.Face.morph.SetValueOriginalBlendSet(addBlendType);
  421. maidAndMan.FaceBlend("オリジナル");
  422. }
  423. return false;
  424. }
  425. public bool TagStartKuchipakuPattern(KagTagSupport tag_data)
  426. {
  427. this.CheckAbsolutelyNecessaryTag(tag_data, "startkuchipakupattern", new string[]
  428. {
  429. "offsettime",
  430. "pattern"
  431. });
  432. Maid maidAndMan = this.GetMaidAndMan(tag_data);
  433. if (maidAndMan == null)
  434. {
  435. return false;
  436. }
  437. maidAndMan.StartKuchipakuPattern(tag_data.GetTagProperty("offsettime").AsReal(), tag_data.GetTagProperty("pattern").AsString(), false);
  438. return false;
  439. }
  440. public bool TagStopKuchipakuPattern(KagTagSupport tag_data)
  441. {
  442. Maid maidAndMan = this.GetMaidAndMan(tag_data);
  443. if (maidAndMan == null)
  444. {
  445. return false;
  446. }
  447. maidAndMan.StopKuchipakuPattern();
  448. return false;
  449. }
  450. public bool TagLipsync(KagTagSupport tag_data)
  451. {
  452. Maid maidAndMan = this.GetMaidAndMan(tag_data);
  453. if (maidAndMan == null)
  454. {
  455. return false;
  456. }
  457. maidAndMan.Lipsync(tag_data.IsValid("on"));
  458. return false;
  459. }
  460. public bool TagMotion(KagTagSupport tag_data)
  461. {
  462. string text = tag_data.GetTagProperty("mot").AsString() + ".anm";
  463. Maid maid = this.GetMaidAndMan(tag_data);
  464. if (maid == null)
  465. {
  466. return false;
  467. }
  468. this.CheckAbsolutelyNecessaryTag(tag_data, "motion", new string[]
  469. {
  470. "mot"
  471. });
  472. string play_motion_name = tag_data.GetTagProperty("mot").AsString() + ".anm";
  473. int blend = 500;
  474. if (tag_data.IsValid("blend"))
  475. {
  476. blend = tag_data.GetTagProperty("blend").AsInteger();
  477. }
  478. bool loop = false;
  479. if (tag_data.IsValid("loop"))
  480. {
  481. loop = tag_data.GetTagProperty("loop").AsBool();
  482. }
  483. int num = 0;
  484. if (tag_data.IsValid("wait"))
  485. {
  486. num = tag_data.GetTagProperty("wait").AsInteger();
  487. }
  488. WaitEventList waitEventList = this.GetWaitEventList("motion");
  489. if (num <= 0)
  490. {
  491. if (maid.Visible)
  492. {
  493. this.PlayMaidMotion(maid, play_motion_name, false, loop, false, GameUty.MillisecondToSecond(blend));
  494. }
  495. waitEventList.Clear();
  496. }
  497. else
  498. {
  499. waitEventList.Add(delegate
  500. {
  501. if (maid != null && maid.Visible && maid.body0 != null && maid.body0.isLoadedBody)
  502. {
  503. this.PlayMaidMotion(maid, play_motion_name, false, loop, false, GameUty.MillisecondToSecond(blend));
  504. }
  505. }, num);
  506. }
  507. return false;
  508. }
  509. public bool TagMotionNext(KagTagSupport tag_data)
  510. {
  511. Maid maid = this.GetMaidAndMan(tag_data);
  512. if (maid == null)
  513. {
  514. return false;
  515. }
  516. this.CheckAbsolutelyNecessaryTag(tag_data, "motionnext", new string[]
  517. {
  518. "mot"
  519. });
  520. string play_motion_name = tag_data.GetTagProperty("mot").AsString() + ".anm";
  521. int blend = 500;
  522. if (tag_data.IsValid("blend"))
  523. {
  524. blend = tag_data.GetTagProperty("blend").AsInteger();
  525. }
  526. bool loop = false;
  527. if (tag_data.IsValid("loop"))
  528. {
  529. loop = tag_data.GetTagProperty("loop").AsBool();
  530. }
  531. WaitEventList waitEventList = this.GetWaitEventList("motion");
  532. if (waitEventList.list.Count <= 0)
  533. {
  534. if (maid.Visible)
  535. {
  536. this.PlayMaidMotion(maid, play_motion_name, false, loop, true, GameUty.MillisecondToSecond(blend));
  537. }
  538. waitEventList.Clear();
  539. }
  540. else
  541. {
  542. int wait_time = waitEventList.list[waitEventList.list.Count - 1].wait_time;
  543. waitEventList.Add(delegate
  544. {
  545. if (maid != null && maid.Visible)
  546. {
  547. this.PlayMaidMotion(maid, play_motion_name, false, loop, true, GameUty.MillisecondToSecond(blend));
  548. }
  549. }, wait_time);
  550. }
  551. return false;
  552. }
  553. public bool TagMotionNextAbs(KagTagSupport tag_data)
  554. {
  555. Maid maid = this.GetMaidAndMan(tag_data);
  556. if (maid == null)
  557. {
  558. return false;
  559. }
  560. this.CheckAbsolutelyNecessaryTag(tag_data, "motionnextabs", new string[]
  561. {
  562. "mot"
  563. });
  564. string play_motion_name = tag_data.GetTagProperty("mot").AsString() + ".anm";
  565. int blend = 500;
  566. if (tag_data.IsValid("blend"))
  567. {
  568. blend = tag_data.GetTagProperty("blend").AsInteger();
  569. }
  570. bool loop = false;
  571. if (tag_data.IsValid("loop"))
  572. {
  573. loop = tag_data.GetTagProperty("loop").AsBool();
  574. }
  575. WaitEventList waitEventList = this.GetWaitEventList("motion");
  576. if (waitEventList.list.Count <= 0)
  577. {
  578. if (maid.Visible)
  579. {
  580. this.PlayMaidMotionAbs(maid, play_motion_name, false, loop, true, GameUty.MillisecondToSecond(blend));
  581. }
  582. waitEventList.Clear();
  583. }
  584. else
  585. {
  586. int wait_time = waitEventList.list[waitEventList.list.Count - 1].wait_time;
  587. waitEventList.Add(delegate
  588. {
  589. if (maid != null && maid.Visible)
  590. {
  591. this.PlayMaidMotionAbs(maid, play_motion_name, false, loop, true, GameUty.MillisecondToSecond(blend));
  592. }
  593. }, wait_time);
  594. }
  595. return false;
  596. }
  597. public bool TagMotionStop(KagTagSupport tag_data)
  598. {
  599. Maid maidAndMan = this.GetMaidAndMan(tag_data);
  600. if (maidAndMan == null)
  601. {
  602. return false;
  603. }
  604. maidAndMan.StopAnime(string.Empty);
  605. WaitEventList waitEventList = this.GetWaitEventList("motion");
  606. waitEventList.Clear();
  607. return false;
  608. }
  609. public bool TagMotionLayerStop(KagTagSupport tag_data)
  610. {
  611. Maid maidAndMan = this.GetMaidAndMan(tag_data);
  612. if (maidAndMan == null)
  613. {
  614. return false;
  615. }
  616. if (tag_data.IsValid("layer"))
  617. {
  618. string[] array = tag_data.GetTagProperty("layer").AsString().Split(new char[]
  619. {
  620. ','
  621. });
  622. for (int i = 0; i < array.Length; i++)
  623. {
  624. maidAndMan.body0.StopAnimeLayer(int.Parse(array[i]));
  625. }
  626. }
  627. if (tag_data.IsValid("range"))
  628. {
  629. string[] array2 = tag_data.GetTagProperty("range").AsString().Split(new char[]
  630. {
  631. '-'
  632. });
  633. NDebug.Assert(array2.Length == 2, "motionlayerstopのrange設定が不正です.個数不一致");
  634. int num = int.Parse(array2[0]);
  635. int num2 = int.Parse(array2[1]);
  636. NDebug.Assert(num <= num2, "motionlayerstopのrange設定が不正です.範囲不一致");
  637. for (int j = num; j <= num2; j++)
  638. {
  639. maidAndMan.body0.StopAnimeLayer(j);
  640. }
  641. }
  642. return false;
  643. }
  644. public bool TagMotionAutoTwist(KagTagSupport tag_data)
  645. {
  646. Maid maid = this.GetMaidAndMan(tag_data);
  647. if (maid == null)
  648. {
  649. return false;
  650. }
  651. Func<string, Maid.AutoTwist[], bool> func = delegate(string tag_name, Maid.AutoTwist[] change_type_array)
  652. {
  653. bool flag = tag_data.IsValid(tag_name);
  654. if (flag && change_type_array != null)
  655. {
  656. string a = tag_data.GetTagProperty(tag_name).AsString();
  657. bool f_bEnable = a == "on";
  658. for (int i = 0; i < change_type_array.Length; i++)
  659. {
  660. maid.SetAutoTwist(change_type_array[i], f_bEnable);
  661. }
  662. }
  663. return flag;
  664. };
  665. if (!func("kata", new Maid.AutoTwist[]
  666. {
  667. Maid.AutoTwist.ShoulderL,
  668. Maid.AutoTwist.ShoulderR
  669. }))
  670. {
  671. func("kata_r", new Maid.AutoTwist[]
  672. {
  673. Maid.AutoTwist.ShoulderR
  674. });
  675. func("kata_l", new Maid.AutoTwist[1]);
  676. }
  677. if (!func("tekubi", new Maid.AutoTwist[]
  678. {
  679. Maid.AutoTwist.WristL,
  680. Maid.AutoTwist.WristR
  681. }))
  682. {
  683. func("tekubi_r", new Maid.AutoTwist[]
  684. {
  685. Maid.AutoTwist.WristR
  686. });
  687. func("tekubi_l", new Maid.AutoTwist[]
  688. {
  689. Maid.AutoTwist.WristL
  690. });
  691. }
  692. if (!func("momo", new Maid.AutoTwist[]
  693. {
  694. Maid.AutoTwist.ThighL,
  695. Maid.AutoTwist.ThighR
  696. }))
  697. {
  698. func("momo_r", new Maid.AutoTwist[]
  699. {
  700. Maid.AutoTwist.ThighR
  701. });
  702. func("momo_l", new Maid.AutoTwist[]
  703. {
  704. Maid.AutoTwist.ThighL
  705. });
  706. }
  707. return false;
  708. }
  709. public bool TagMotionBlendEnabled(KagTagSupport tag_data)
  710. {
  711. bool is_motion_blend = true;
  712. if (tag_data.IsValid("false"))
  713. {
  714. is_motion_blend = false;
  715. }
  716. this.script_mgr_.is_motion_blend = is_motion_blend;
  717. return false;
  718. }
  719. public bool TagMotionScript(KagTagSupport tag_data)
  720. {
  721. string maid_guid = string.Empty;
  722. if (tag_data.IsValid("maid"))
  723. {
  724. Maid maidAndMan = this.GetMaidAndMan(tag_data);
  725. if (maidAndMan != null)
  726. {
  727. maid_guid = maidAndMan.status.guid;
  728. }
  729. }
  730. string man_guid = string.Empty;
  731. if (tag_data.IsValid("man"))
  732. {
  733. Maid maidAndMan2 = this.GetMaidAndMan(tag_data);
  734. if (maidAndMan2 != null)
  735. {
  736. man_guid = maidAndMan2.status.guid;
  737. }
  738. }
  739. this.CheckAbsolutelyNecessaryTag(tag_data, "motionscript", new string[]
  740. {
  741. "file"
  742. });
  743. string file_name = tag_data.GetTagProperty("file").AsString() + ".ks";
  744. string label_name = string.Empty;
  745. if (tag_data.IsValid("label"))
  746. {
  747. label_name = tag_data.GetTagProperty("label").AsString();
  748. }
  749. int num = 0;
  750. if (tag_data.IsValid("wait"))
  751. {
  752. num = tag_data.GetTagProperty("wait").AsInteger();
  753. }
  754. bool vailed_pos = !tag_data.IsValid("npos");
  755. int sloat = 0;
  756. if (tag_data.IsValid("sloat"))
  757. {
  758. sloat = tag_data.GetTagProperty("sloat").AsInteger();
  759. }
  760. WaitEventList waitEventList = this.GetWaitEventList("motion_script");
  761. if (num <= 0)
  762. {
  763. this.script_mgr_.LoadMotionScript(sloat, false, file_name, label_name, maid_guid, man_guid, false, vailed_pos);
  764. waitEventList.Clear();
  765. if (this.script_mgr_.is_motion_all_prop_seq && this.script_mgr_.motion_all_prop_seq_maid != null)
  766. {
  767. this.script_mgr_.motion_all_prop_seq_maid.AllProcPropSeqStart();
  768. this.SetMaidAllPropSeqWait(this.script_mgr_.motion_all_prop_seq_maid);
  769. this.script_mgr_.motion_all_prop_seq_maid = null;
  770. this.script_mgr_.is_motion_all_prop_seq = false;
  771. return true;
  772. }
  773. }
  774. else
  775. {
  776. waitEventList.Add(delegate
  777. {
  778. Maid maid = null;
  779. for (int i = 0; i < GameMain.Instance.CharacterMgr.GetMaidCount(); i++)
  780. {
  781. Maid maid2 = GameMain.Instance.CharacterMgr.GetMaid(i);
  782. if (maid2 != null && maid2.status.guid == maid_guid)
  783. {
  784. maid = maid2;
  785. break;
  786. }
  787. }
  788. if (maid != null && maid.body0 != null && maid.body0.isLoadedBody)
  789. {
  790. this.script_mgr_.LoadMotionScript(sloat, false, file_name, label_name, maid_guid, man_guid, false, vailed_pos);
  791. NDebug.Assert(!this.script_mgr_.is_motion_all_prop_seq, "motionscript wait内でのAllProcPropSeqStartはできません");
  792. }
  793. }, num);
  794. }
  795. return false;
  796. }
  797. public bool TagItemAnime(KagTagSupport tag_data)
  798. {
  799. this.CheckAbsolutelyNecessaryTag(tag_data, "itemanime", new string[]
  800. {
  801. "slot"
  802. });
  803. Maid maidAndMan = this.GetMaidAndMan(tag_data);
  804. if (maidAndMan == null)
  805. {
  806. return false;
  807. }
  808. TBody.SlotID f_slot = (TBody.SlotID)Enum.Parse(typeof(TBody.SlotID), tag_data.GetTagProperty("slot").AsString(), true);
  809. string f_strAnimName = tag_data.GetTagProperty("file").AsString();
  810. maidAndMan.body0.ItemAnimationLoad(f_slot, f_strAnimName);
  811. if (tag_data.IsValid("start"))
  812. {
  813. maidAndMan.body0.ItemAnimationPlay(f_slot, f_strAnimName, tag_data.IsValid("loop"));
  814. }
  815. else if (tag_data.IsValid("stop"))
  816. {
  817. maidAndMan.body0.ItemAnimationStop(f_slot);
  818. }
  819. return false;
  820. }
  821. public bool TagHairPhisics(KagTagSupport tag_data)
  822. {
  823. this.CheckAbsolutelyNecessaryTag(tag_data, "hairphisics", new string[]
  824. {
  825. "hairr"
  826. });
  827. Maid maidAndMan = this.GetMaidAndMan(tag_data);
  828. if (maidAndMan == null)
  829. {
  830. return false;
  831. }
  832. string text = tag_data.GetTagProperty("hairr").AsString();
  833. if (text == "normal")
  834. {
  835. maidAndMan.SetModeHairR(TBody.ModeHirR.Normal);
  836. }
  837. else if (text == "nofront")
  838. {
  839. maidAndMan.SetModeHairR(TBody.ModeHirR.NoFront);
  840. }
  841. else
  842. {
  843. NDebug.Assert("hairrの指定[" + text + "]は間違っています", false);
  844. }
  845. return false;
  846. }
  847. public bool TagBustMove(KagTagSupport tag_data)
  848. {
  849. this.CheckAbsolutelyNecessaryTag(tag_data, "bustmove", new string[]
  850. {
  851. "move"
  852. });
  853. Maid maidAndMan = this.GetMaidAndMan(tag_data);
  854. if (maidAndMan == null)
  855. {
  856. return false;
  857. }
  858. string a = tag_data.GetTagProperty("move").AsString().ToLower();
  859. if (a == "stop")
  860. {
  861. maidAndMan.body0.MuneYureL(0f);
  862. maidAndMan.body0.MuneYureR(0f);
  863. }
  864. else if (a == "lstop")
  865. {
  866. maidAndMan.body0.MuneYureL(0f);
  867. }
  868. else if (a == "rstop")
  869. {
  870. maidAndMan.body0.MuneYureR(0f);
  871. }
  872. else if (a == "non")
  873. {
  874. maidAndMan.body0.MuneYureL(1f);
  875. maidAndMan.body0.MuneYureR(1f);
  876. }
  877. return false;
  878. }
  879. public bool TagPhisicsHit(KagTagSupport tag_data)
  880. {
  881. this.CheckAbsolutelyNecessaryTag(tag_data, "phisicshit", new string[]
  882. {
  883. "height"
  884. });
  885. Maid maidAndMan = this.GetMaidAndMan(tag_data);
  886. if (maidAndMan == null)
  887. {
  888. return false;
  889. }
  890. maidAndMan.body0.SetBoneHitHeightY(tag_data.GetTagProperty("height").AsReal());
  891. return false;
  892. }
  893. public bool TagIKAttachPoint(KagTagSupport tag_data)
  894. {
  895. this.CheckAbsolutelyNecessaryTag(tag_data, "ikattachpoint", new string[]
  896. {
  897. "src",
  898. "srcbone",
  899. "target",
  900. "targetobj",
  901. "targetpoint"
  902. });
  903. Maid maidAndMan = this.GetMaidAndMan(tag_data.GetTagProperty("src").AsString());
  904. Maid maidAndMan2 = this.GetMaidAndMan(tag_data.GetTagProperty("target").AsString());
  905. if (maidAndMan == null || maidAndMan2 == null)
  906. {
  907. return false;
  908. }
  909. string strMyHand = tag_data.GetTagProperty("srcbone").AsString();
  910. string f_strTargetAttachPointName = tag_data.GetTagProperty("targetpoint").AsString();
  911. string f_strTargetSlotName = tag_data.GetTagProperty("targetobj").AsString();
  912. Vector3 zero = Vector3.zero;
  913. if (tag_data.IsValid("offsetx"))
  914. {
  915. zero.x = tag_data.GetTagProperty("offsetx").AsReal();
  916. }
  917. if (tag_data.IsValid("offsety"))
  918. {
  919. zero.y = tag_data.GetTagProperty("offsety").AsReal();
  920. }
  921. if (tag_data.IsValid("offsetz"))
  922. {
  923. zero.z = tag_data.GetTagProperty("offsetz").AsReal();
  924. }
  925. IKMgrData.IKAttachType attach_type = IKMgrData.IKAttachType.Point;
  926. if (tag_data.IsValid("attach_type"))
  927. {
  928. attach_type = (IKMgrData.IKAttachType)Enum.Parse(typeof(IKMgrData.IKAttachType), tag_data.GetTagProperty("attach_type").AsString());
  929. }
  930. string axisbone = string.Empty;
  931. if (tag_data.IsValid("axisbone"))
  932. {
  933. axisbone = tag_data.GetTagProperty("axisbone").AsString();
  934. }
  935. maidAndMan.IKTargetToAttachPoint(strMyHand, maidAndMan2, f_strTargetSlotName, f_strTargetAttachPointName, zero, attach_type, axisbone);
  936. return false;
  937. }
  938. public bool TagIKAttachBone(KagTagSupport tag_data)
  939. {
  940. this.CheckAbsolutelyNecessaryTag(tag_data, "ikattachbone", new string[]
  941. {
  942. "src",
  943. "srcbone",
  944. "target",
  945. "targetbone"
  946. });
  947. Maid maidAndMan = this.GetMaidAndMan(tag_data.GetTagProperty("src").AsString());
  948. Maid maidAndMan2 = this.GetMaidAndMan(tag_data.GetTagProperty("target").AsString());
  949. if (maidAndMan == null || maidAndMan2 == null)
  950. {
  951. return false;
  952. }
  953. string strMyHand = tag_data.GetTagProperty("srcbone").AsString();
  954. string f_strTargetBoneName = tag_data.GetTagProperty("targetbone").AsString();
  955. bool search_sm = tag_data.IsValid("Search_SM_Body");
  956. Vector3 zero = Vector3.zero;
  957. if (tag_data.IsValid("offsetx"))
  958. {
  959. zero.x = tag_data.GetTagProperty("offsetx").AsReal();
  960. }
  961. if (tag_data.IsValid("offsety"))
  962. {
  963. zero.y = tag_data.GetTagProperty("offsety").AsReal();
  964. }
  965. if (tag_data.IsValid("offsetz"))
  966. {
  967. zero.z = tag_data.GetTagProperty("offsetz").AsReal();
  968. }
  969. IKMgrData.IKAttachType attach_type = IKMgrData.IKAttachType.Point;
  970. if (tag_data.IsValid("attach_type"))
  971. {
  972. attach_type = (IKMgrData.IKAttachType)Enum.Parse(typeof(IKMgrData.IKAttachType), tag_data.GetTagProperty("attach_type").AsString());
  973. }
  974. maidAndMan.IKTargetToBone(strMyHand, maidAndMan2, f_strTargetBoneName, zero, attach_type, search_sm);
  975. return false;
  976. }
  977. public bool TagIKDetach(KagTagSupport tag_data)
  978. {
  979. this.CheckAbsolutelyNecessaryTag(tag_data, "ikdetach", new string[]
  980. {
  981. "src",
  982. "srcbone"
  983. });
  984. Maid maidAndMan = this.GetMaidAndMan(tag_data.GetTagProperty("src").AsString());
  985. if (maidAndMan == null)
  986. {
  987. return false;
  988. }
  989. string text = tag_data.GetTagProperty("srcbone").AsString();
  990. if (text == null)
  991. {
  992. text = string.Empty;
  993. }
  994. maidAndMan.IKTargetToBone(text, null, "無し", Vector3.zero, IKMgrData.IKAttachType.Point, false);
  995. return false;
  996. }
  997. public bool TagIKAttachOdogu(KagTagSupport tag_data)
  998. {
  999. this.CheckAbsolutelyNecessaryTag(tag_data, "ikattachodogu", new string[]
  1000. {
  1001. "src",
  1002. "srcbone",
  1003. "odogu"
  1004. });
  1005. Maid maidAndMan = this.GetMaidAndMan(tag_data.GetTagProperty("src").AsString());
  1006. if (!maidAndMan)
  1007. {
  1008. return false;
  1009. }
  1010. string strMyHand = tag_data.GetTagProperty("srcbone").AsString();
  1011. string odogu_name = tag_data.GetTagProperty("odogu").AsString();
  1012. string tgt_name = string.Empty;
  1013. if (tag_data.IsValid("target"))
  1014. {
  1015. tgt_name = tag_data.GetTagProperty("target").AsString();
  1016. }
  1017. Vector3 zero = Vector3.zero;
  1018. if (tag_data.IsValid("offsetx"))
  1019. {
  1020. zero.x = tag_data.GetTagProperty("offsetx").AsReal();
  1021. }
  1022. if (tag_data.IsValid("offsety"))
  1023. {
  1024. zero.y = tag_data.GetTagProperty("offsety").AsReal();
  1025. }
  1026. if (tag_data.IsValid("offsetz"))
  1027. {
  1028. zero.z = tag_data.GetTagProperty("offsetz").AsReal();
  1029. }
  1030. IKMgrData.IKAttachType attach_type = IKMgrData.IKAttachType.Point;
  1031. if (tag_data.IsValid("attach_type"))
  1032. {
  1033. attach_type = (IKMgrData.IKAttachType)Enum.Parse(typeof(IKMgrData.IKAttachType), tag_data.GetTagProperty("attach_type").AsString());
  1034. }
  1035. maidAndMan.IKTargetToOdogu(strMyHand, odogu_name, tgt_name, zero, attach_type);
  1036. return false;
  1037. }
  1038. public bool TagAllPos(KagTagSupport tag_data)
  1039. {
  1040. bool flag = false;
  1041. bool flag2 = false;
  1042. Vector3 zero = Vector3.zero;
  1043. Vector3 zero2 = Vector3.zero;
  1044. if (tag_data.IsValid("x"))
  1045. {
  1046. flag = true;
  1047. zero.x = tag_data.GetTagProperty("x").AsReal();
  1048. }
  1049. if (tag_data.IsValid("y"))
  1050. {
  1051. flag = true;
  1052. zero.y = tag_data.GetTagProperty("y").AsReal();
  1053. }
  1054. if (tag_data.IsValid("z"))
  1055. {
  1056. flag = true;
  1057. zero.z = tag_data.GetTagProperty("z").AsReal();
  1058. }
  1059. if (tag_data.IsValid("rx"))
  1060. {
  1061. flag2 = true;
  1062. zero2.x = tag_data.GetTagProperty("rx").AsReal();
  1063. }
  1064. if (tag_data.IsValid("ry"))
  1065. {
  1066. flag2 = true;
  1067. zero2.y = tag_data.GetTagProperty("ry").AsReal();
  1068. }
  1069. if (tag_data.IsValid("rz"))
  1070. {
  1071. flag2 = true;
  1072. zero2.z = tag_data.GetTagProperty("rz").AsReal();
  1073. }
  1074. if (flag)
  1075. {
  1076. GameMain.Instance.CharacterMgr.SetCharaAllPos(zero);
  1077. if (!this.script_mgr_.compatibilityMode)
  1078. {
  1079. for (int i = 0; i < GameMain.Instance.CharacterMgr.GetMaidCount(); i++)
  1080. {
  1081. Maid maid = GameMain.Instance.CharacterMgr.GetMaid(i);
  1082. if (maid != null && maid.body0 != null)
  1083. {
  1084. maid.body0.SetBoneHitHeightY(zero.y);
  1085. }
  1086. }
  1087. }
  1088. }
  1089. if (flag2)
  1090. {
  1091. GameMain.Instance.CharacterMgr.SetCharaAllRot(zero2);
  1092. }
  1093. return false;
  1094. }
  1095. public bool TagAllOffSet(KagTagSupport tag_data)
  1096. {
  1097. bool flag = false;
  1098. bool flag2 = false;
  1099. Vector3 zero = Vector3.zero;
  1100. Vector3 zero2 = Vector3.zero;
  1101. if (tag_data.IsValid("x"))
  1102. {
  1103. flag = true;
  1104. zero.x = tag_data.GetTagProperty("x").AsReal();
  1105. }
  1106. if (tag_data.IsValid("y"))
  1107. {
  1108. flag = true;
  1109. zero.y = tag_data.GetTagProperty("y").AsReal();
  1110. }
  1111. if (tag_data.IsValid("z"))
  1112. {
  1113. flag = true;
  1114. zero.z = tag_data.GetTagProperty("z").AsReal();
  1115. }
  1116. if (tag_data.IsValid("rx"))
  1117. {
  1118. flag2 = true;
  1119. zero2.x = tag_data.GetTagProperty("rx").AsReal();
  1120. }
  1121. if (tag_data.IsValid("ry"))
  1122. {
  1123. flag2 = true;
  1124. zero2.y = tag_data.GetTagProperty("ry").AsReal();
  1125. }
  1126. if (tag_data.IsValid("rz"))
  1127. {
  1128. flag2 = true;
  1129. zero2.z = tag_data.GetTagProperty("rz").AsReal();
  1130. }
  1131. if (flag)
  1132. {
  1133. GameMain.Instance.CharacterMgr.CharaAllOfsetPos(zero);
  1134. }
  1135. if (flag2)
  1136. {
  1137. GameMain.Instance.CharacterMgr.CharaAllOfsetRot(zero2);
  1138. }
  1139. return false;
  1140. }
  1141. public bool TagAddAllOffset(KagTagSupport tag_data)
  1142. {
  1143. bool flag = false;
  1144. bool flag2 = false;
  1145. Vector3 zero = Vector3.zero;
  1146. Vector3 zero2 = Vector3.zero;
  1147. if (tag_data.IsValid("x"))
  1148. {
  1149. flag = true;
  1150. zero.x = tag_data.GetTagProperty("x").AsReal();
  1151. }
  1152. if (tag_data.IsValid("y"))
  1153. {
  1154. flag = true;
  1155. zero.y = tag_data.GetTagProperty("y").AsReal();
  1156. }
  1157. if (tag_data.IsValid("z"))
  1158. {
  1159. flag = true;
  1160. zero.z = tag_data.GetTagProperty("z").AsReal();
  1161. }
  1162. if (tag_data.IsValid("rx"))
  1163. {
  1164. flag2 = true;
  1165. zero2.x = tag_data.GetTagProperty("rx").AsReal();
  1166. }
  1167. if (tag_data.IsValid("ry"))
  1168. {
  1169. flag2 = true;
  1170. zero2.y = tag_data.GetTagProperty("ry").AsReal();
  1171. }
  1172. if (tag_data.IsValid("rz"))
  1173. {
  1174. flag2 = true;
  1175. zero2.z = tag_data.GetTagProperty("rz").AsReal();
  1176. }
  1177. if (flag)
  1178. {
  1179. Vector3 charaAllOfsetPos = GameMain.Instance.CharacterMgr.GetCharaAllOfsetPos();
  1180. GameMain.Instance.CharacterMgr.CharaAllOfsetPos(charaAllOfsetPos + zero);
  1181. }
  1182. if (flag2)
  1183. {
  1184. Vector3 charaAllOfsetRot = GameMain.Instance.CharacterMgr.GetCharaAllOfsetRot();
  1185. GameMain.Instance.CharacterMgr.CharaAllOfsetRot(charaAllOfsetRot + zero2);
  1186. }
  1187. return false;
  1188. }
  1189. public bool TagOffSet(KagTagSupport tag_data)
  1190. {
  1191. Maid maidAndMan = this.GetMaidAndMan(tag_data);
  1192. if (maidAndMan == null)
  1193. {
  1194. return false;
  1195. }
  1196. bool flag = false;
  1197. bool flag2 = false;
  1198. Vector3 zero = Vector3.zero;
  1199. Vector3 zero2 = Vector3.zero;
  1200. if (tag_data.IsValid("x"))
  1201. {
  1202. flag = true;
  1203. zero.x = tag_data.GetTagProperty("x").AsReal();
  1204. }
  1205. if (tag_data.IsValid("y"))
  1206. {
  1207. flag = true;
  1208. zero.y = tag_data.GetTagProperty("y").AsReal();
  1209. }
  1210. if (tag_data.IsValid("z"))
  1211. {
  1212. flag = true;
  1213. zero.z = tag_data.GetTagProperty("z").AsReal();
  1214. }
  1215. if (tag_data.IsValid("rx"))
  1216. {
  1217. flag2 = true;
  1218. zero2.x = tag_data.GetTagProperty("rx").AsReal();
  1219. }
  1220. if (tag_data.IsValid("ry"))
  1221. {
  1222. flag2 = true;
  1223. zero2.y = tag_data.GetTagProperty("ry").AsReal();
  1224. }
  1225. if (tag_data.IsValid("rz"))
  1226. {
  1227. flag2 = true;
  1228. zero2.z = tag_data.GetTagProperty("rz").AsReal();
  1229. }
  1230. if (flag)
  1231. {
  1232. maidAndMan.SetPos(zero);
  1233. }
  1234. if (flag2)
  1235. {
  1236. maidAndMan.SetRot(zero2);
  1237. }
  1238. return false;
  1239. }
  1240. public bool TagAllResetPos(KagTagSupport tag_data)
  1241. {
  1242. GameMain.Instance.CharacterMgr.ResetCharaPosAll();
  1243. return false;
  1244. }
  1245. public bool TagTransform(KagTagSupport tag_data)
  1246. {
  1247. Maid maidAndMan = this.GetMaidAndMan(tag_data);
  1248. return maidAndMan == null && false;
  1249. }
  1250. public bool TagPosition(KagTagSupport tag_data)
  1251. {
  1252. Maid maidAndMan = this.GetMaidAndMan(tag_data);
  1253. return maidAndMan == null && false;
  1254. }
  1255. public bool TagRotation(KagTagSupport tag_data)
  1256. {
  1257. Maid maidAndMan = this.GetMaidAndMan(tag_data);
  1258. return maidAndMan == null && false;
  1259. }
  1260. public bool TagCamera(KagTagSupport tag_data)
  1261. {
  1262. Vector3 zero = Vector3.zero;
  1263. Vector2 zero2 = Vector2.zero;
  1264. float f_fRadius = 0f;
  1265. if (tag_data.IsValid("reset"))
  1266. {
  1267. GameMain.Instance.MainCamera.ResetFromScriptOnTarget();
  1268. return false;
  1269. }
  1270. if (tag_data.IsValid("radius"))
  1271. {
  1272. f_fRadius = tag_data.GetTagProperty("radius").AsReal();
  1273. }
  1274. if (tag_data.IsValid("cx"))
  1275. {
  1276. zero.x = tag_data.GetTagProperty("cx").AsReal();
  1277. }
  1278. if (tag_data.IsValid("cy"))
  1279. {
  1280. zero.y = tag_data.GetTagProperty("cy").AsReal();
  1281. }
  1282. if (tag_data.IsValid("cz"))
  1283. {
  1284. zero.z = tag_data.GetTagProperty("cz").AsReal();
  1285. }
  1286. if (tag_data.IsValid("rx"))
  1287. {
  1288. zero2.x = tag_data.GetTagProperty("rx").AsReal();
  1289. }
  1290. if (tag_data.IsValid("ry"))
  1291. {
  1292. zero2.y = tag_data.GetTagProperty("ry").AsReal();
  1293. }
  1294. GameMain.Instance.MainCamera.SetFromScriptOnTarget(zero, f_fRadius, zero2);
  1295. return false;
  1296. }
  1297. public bool TagCameraChase(KagTagSupport tag_data)
  1298. {
  1299. this.CheckAbsolutelyNecessaryTag(tag_data, "camerachase", new string[]
  1300. {
  1301. "chase"
  1302. });
  1303. Maid maidAndMan = this.GetMaidAndMan(tag_data);
  1304. if (maidAndMan == null)
  1305. {
  1306. return false;
  1307. }
  1308. string f_strAttachBone = tag_data.GetTagProperty("chase").AsString();
  1309. Vector3 zero = Vector3.zero;
  1310. if (tag_data.IsValid("offsx"))
  1311. {
  1312. zero.x = tag_data.GetTagProperty("offsx").AsReal();
  1313. }
  1314. if (tag_data.IsValid("offsy"))
  1315. {
  1316. zero.y = tag_data.GetTagProperty("offsy").AsReal();
  1317. }
  1318. if (tag_data.IsValid("offsz"))
  1319. {
  1320. zero.z = tag_data.GetTagProperty("offsz").AsReal();
  1321. }
  1322. bool f_fOnece = true;
  1323. if (tag_data.IsValid("continue"))
  1324. {
  1325. f_fOnece = false;
  1326. }
  1327. int millisecond = 0;
  1328. if (tag_data.IsValid("time"))
  1329. {
  1330. millisecond = tag_data.GetTagProperty("time").AsInteger();
  1331. }
  1332. GameMain.Instance.MainCamera.SetChaseCamera(maidAndMan, f_strAttachBone, zero, f_fOnece, GameUty.MillisecondToSecond(millisecond));
  1333. return false;
  1334. }
  1335. public bool TagCameraChaseStop(KagTagSupport tag_data)
  1336. {
  1337. this.CheckAbsolutelyNecessaryTag(tag_data, "camerachasestop", new string[0]);
  1338. GameMain.Instance.MainCamera.RemoveChaseCameraAll();
  1339. return false;
  1340. }
  1341. public bool TagCameraAnimationStart(KagTagSupport tag_data)
  1342. {
  1343. this.CheckAbsolutelyNecessaryTag(tag_data, "cameraanimationstart", new string[]
  1344. {
  1345. "time"
  1346. });
  1347. bool f_bStart = false;
  1348. Vector3 zero = Vector3.zero;
  1349. Vector3 zero2 = Vector3.zero;
  1350. Vector2 zero3 = Vector2.zero;
  1351. Vector2 zero4 = Vector2.zero;
  1352. float f_fRadius = 0f;
  1353. float f_fSRadius = 0f;
  1354. float f_fTime = GameUty.MillisecondToSecond(tag_data.GetTagProperty("time").AsInteger());
  1355. string f_strEaseType = string.Empty;
  1356. bool f_bSkip = tag_data.IsValid("skip");
  1357. if (tag_data.IsValid("radius"))
  1358. {
  1359. f_fRadius = tag_data.GetTagProperty("radius").AsReal();
  1360. }
  1361. if (tag_data.IsValid("cx"))
  1362. {
  1363. zero.x = tag_data.GetTagProperty("cx").AsReal();
  1364. }
  1365. if (tag_data.IsValid("cy"))
  1366. {
  1367. zero.y = tag_data.GetTagProperty("cy").AsReal();
  1368. }
  1369. if (tag_data.IsValid("cz"))
  1370. {
  1371. zero.z = tag_data.GetTagProperty("cz").AsReal();
  1372. }
  1373. if (tag_data.IsValid("rx"))
  1374. {
  1375. zero3.x = tag_data.GetTagProperty("rx").AsReal();
  1376. }
  1377. if (tag_data.IsValid("ry"))
  1378. {
  1379. zero3.y = tag_data.GetTagProperty("ry").AsReal();
  1380. }
  1381. if (tag_data.IsValid("sradius"))
  1382. {
  1383. f_fSRadius = tag_data.GetTagProperty("sradius").AsReal();
  1384. f_bStart = true;
  1385. }
  1386. if (tag_data.IsValid("scx"))
  1387. {
  1388. zero2.x = tag_data.GetTagProperty("scx").AsReal();
  1389. f_bStart = true;
  1390. }
  1391. if (tag_data.IsValid("scy"))
  1392. {
  1393. zero2.y = tag_data.GetTagProperty("scy").AsReal();
  1394. f_bStart = true;
  1395. }
  1396. if (tag_data.IsValid("scz"))
  1397. {
  1398. zero2.z = tag_data.GetTagProperty("scz").AsReal();
  1399. f_bStart = true;
  1400. }
  1401. if (tag_data.IsValid("srx"))
  1402. {
  1403. zero4.x = tag_data.GetTagProperty("srx").AsReal();
  1404. f_bStart = true;
  1405. }
  1406. if (tag_data.IsValid("sry"))
  1407. {
  1408. zero4.y = tag_data.GetTagProperty("sry").AsReal();
  1409. f_bStart = true;
  1410. }
  1411. if (tag_data.IsValid("easetype"))
  1412. {
  1413. f_strEaseType = tag_data.GetTagProperty("easetype").AsString();
  1414. }
  1415. float f_fDelay = 0f;
  1416. if (tag_data.IsValid("delay"))
  1417. {
  1418. f_fDelay = GameUty.MillisecondToSecond(tag_data.GetTagProperty("delay").AsInteger());
  1419. }
  1420. GameMain.Instance.MainCamera.StartAnimationTo(f_bStart, zero2, f_fSRadius, zero4, zero, f_fRadius, zero3, f_fTime, f_strEaseType, f_bSkip, f_fDelay);
  1421. return false;
  1422. }
  1423. public bool TagCameraControl(KagTagSupport tag_data)
  1424. {
  1425. GameMain.Instance.MainCamera.SetControl(tag_data.IsValid("true"));
  1426. return false;
  1427. }
  1428. public bool TagLightMain(KagTagSupport tag_data)
  1429. {
  1430. Vector3 zero = Vector3.zero;
  1431. float intensity = 0f;
  1432. bool flag = false;
  1433. bool flag2 = false;
  1434. if (tag_data.IsValid("rx"))
  1435. {
  1436. zero.x = tag_data.GetTagProperty("rx").AsReal();
  1437. flag = true;
  1438. }
  1439. if (tag_data.IsValid("ry"))
  1440. {
  1441. zero.y = tag_data.GetTagProperty("ry").AsReal();
  1442. flag = true;
  1443. }
  1444. if (tag_data.IsValid("rz"))
  1445. {
  1446. zero.z = tag_data.GetTagProperty("rz").AsReal();
  1447. flag = true;
  1448. }
  1449. if (tag_data.IsValid("intensity"))
  1450. {
  1451. intensity = tag_data.GetTagProperty("intensity").AsReal();
  1452. flag2 = true;
  1453. }
  1454. if (flag)
  1455. {
  1456. GameMain.Instance.MainLight.SetRotation(zero);
  1457. }
  1458. if (flag2)
  1459. {
  1460. GameMain.Instance.MainLight.SetIntensity(intensity);
  1461. }
  1462. return false;
  1463. }
  1464. public bool TagPlayBgm(KagTagSupport tag_data)
  1465. {
  1466. this.CheckAbsolutelyNecessaryTag(tag_data, "playbgm", new string[]
  1467. {
  1468. "file"
  1469. });
  1470. string text = tag_data.GetTagProperty("file").AsString();
  1471. text = Path.ChangeExtension(text, ".ogg");
  1472. int millisecond = 0;
  1473. if (tag_data.IsValid("fade"))
  1474. {
  1475. millisecond = tag_data.GetTagProperty("fade").AsInteger();
  1476. }
  1477. if (tag_data.IsValid("old"))
  1478. {
  1479. string f_strFileName = Path.GetFileNameWithoutExtension(text) + "_OLD.ogg";
  1480. if (GameUty.FileSystem.IsExistentFile(f_strFileName))
  1481. {
  1482. GameMain.Instance.SoundMgr.PlayBGM(f_strFileName, GameUty.MillisecondToSecond(millisecond), true);
  1483. }
  1484. else
  1485. {
  1486. GameMain.Instance.SoundMgr.PlayBGMLegacy(text, GameUty.MillisecondToSecond(millisecond), true);
  1487. }
  1488. }
  1489. else
  1490. {
  1491. GameMain.Instance.SoundMgr.PlayBGM(text, GameUty.MillisecondToSecond(millisecond), true);
  1492. }
  1493. return false;
  1494. }
  1495. public bool TagStopBgm(KagTagSupport tag_data)
  1496. {
  1497. int millisecond = 0;
  1498. if (tag_data.IsValid("fade"))
  1499. {
  1500. millisecond = tag_data.GetTagProperty("fade").AsInteger();
  1501. }
  1502. GameMain.Instance.SoundMgr.StopBGM(GameUty.MillisecondToSecond(millisecond));
  1503. return false;
  1504. }
  1505. public bool TagPlayEnv(KagTagSupport tag_data)
  1506. {
  1507. this.CheckAbsolutelyNecessaryTag(tag_data, "playenv", new string[]
  1508. {
  1509. "file"
  1510. });
  1511. string text = tag_data.GetTagProperty("file").AsString();
  1512. text = Path.ChangeExtension(text, ".ogg");
  1513. int millisecond = 0;
  1514. if (tag_data.IsValid("fade"))
  1515. {
  1516. millisecond = tag_data.GetTagProperty("fade").AsInteger();
  1517. }
  1518. GameMain.Instance.SoundMgr.PlayEnv(text, GameUty.MillisecondToSecond(millisecond));
  1519. return false;
  1520. }
  1521. public bool TagStopEnv(KagTagSupport tag_data)
  1522. {
  1523. int millisecond = 0;
  1524. if (tag_data.IsValid("fade"))
  1525. {
  1526. millisecond = tag_data.GetTagProperty("fade").AsInteger();
  1527. }
  1528. GameMain.Instance.SoundMgr.StopEnv(GameUty.MillisecondToSecond(millisecond));
  1529. return false;
  1530. }
  1531. public bool TagPlaySe(KagTagSupport tag_data)
  1532. {
  1533. this.CheckAbsolutelyNecessaryTag(tag_data, "playse", new string[]
  1534. {
  1535. "file"
  1536. });
  1537. string bgm_file_name = tag_data.GetTagProperty("file").AsString();
  1538. bgm_file_name = Path.ChangeExtension(bgm_file_name, ".ogg");
  1539. if (bgm_file_name == "SE016.ogg" && !GameMain.Instance.CMSystem.EjaculationSeEnabled)
  1540. {
  1541. return false;
  1542. }
  1543. bool loop = tag_data.IsValid("loop");
  1544. int num = 0;
  1545. if (tag_data.IsValid("wait"))
  1546. {
  1547. num = tag_data.GetTagProperty("wait").AsInteger();
  1548. }
  1549. WaitEventList waitEventList = this.GetWaitEventList("se");
  1550. if (num <= 0)
  1551. {
  1552. GameMain.Instance.SoundMgr.PlaySe(bgm_file_name, loop);
  1553. waitEventList.Clear();
  1554. }
  1555. else
  1556. {
  1557. waitEventList.Add(delegate
  1558. {
  1559. GameMain.Instance.SoundMgr.PlaySe(bgm_file_name, loop);
  1560. }, num);
  1561. }
  1562. return false;
  1563. }
  1564. public bool TagStopSe(KagTagSupport tag_data)
  1565. {
  1566. string text = string.Empty;
  1567. if (tag_data.IsValid("file"))
  1568. {
  1569. text = tag_data.GetTagProperty("file").AsString();
  1570. text = Path.ChangeExtension(text, ".ogg");
  1571. }
  1572. if (!string.IsNullOrEmpty(text))
  1573. {
  1574. GameMain.Instance.SoundMgr.StopSe(text);
  1575. }
  1576. else
  1577. {
  1578. GameMain.Instance.SoundMgr.StopSe();
  1579. }
  1580. return false;
  1581. }
  1582. public bool TagPlayVoice(KagTagSupport tag_data)
  1583. {
  1584. bool result = false;
  1585. this.CheckAbsolutelyNecessaryTag(tag_data, "playvoice", new string[]
  1586. {
  1587. "voice"
  1588. });
  1589. string text = tag_data.GetTagProperty("voice").AsString();
  1590. text = Path.ChangeExtension(text, ".ogg");
  1591. bool f_bLoop = tag_data.IsValid("loop");
  1592. int millisecond = 0;
  1593. if (tag_data.IsValid("fade"))
  1594. {
  1595. millisecond = tag_data.GetTagProperty("fade").AsInteger();
  1596. }
  1597. if (!tag_data.IsValid("dummy"))
  1598. {
  1599. Maid maidAndMan = this.GetMaidAndMan(tag_data);
  1600. if (maidAndMan != null && maidAndMan.Visible)
  1601. {
  1602. maidAndMan.AudioMan.LoadPlay(text, GameUty.MillisecondToSecond(millisecond), true, f_bLoop);
  1603. if (tag_data.IsValid("wait"))
  1604. {
  1605. result = this.SetMaidVoiceWait(maidAndMan);
  1606. }
  1607. }
  1608. else
  1609. {
  1610. GameMain.Instance.SoundMgr.PlayDummyVoice(text, GameUty.MillisecondToSecond(millisecond), true, f_bLoop, 50);
  1611. }
  1612. }
  1613. else
  1614. {
  1615. GameMain.Instance.SoundMgr.PlayDummyVoice(text, GameUty.MillisecondToSecond(millisecond), true, f_bLoop, 50);
  1616. if (tag_data.IsValid("wait"))
  1617. {
  1618. result = this.SetDummyVoiceWait();
  1619. }
  1620. }
  1621. return result;
  1622. }
  1623. public bool TagStopVoice(KagTagSupport tag_data)
  1624. {
  1625. if (!tag_data.IsValid("dummy"))
  1626. {
  1627. Maid maidAndMan = this.GetMaidAndMan(tag_data);
  1628. if (maidAndMan == null)
  1629. {
  1630. return false;
  1631. }
  1632. maidAndMan.AudioMan.Stop();
  1633. }
  1634. else
  1635. {
  1636. GameMain.Instance.SoundMgr.StopDummyVoide();
  1637. }
  1638. return false;
  1639. }
  1640. public bool TagStopSound(KagTagSupport tag_data)
  1641. {
  1642. GameMain.Instance.SoundMgr.StopAll();
  1643. return false;
  1644. }
  1645. public bool TagFade3D(KagTagSupport tag_data)
  1646. {
  1647. this.CheckAbsolutelyNecessaryTag(tag_data, "fade3D", new string[]
  1648. {
  1649. "time"
  1650. });
  1651. int millisecond = tag_data.GetTagProperty("time").AsInteger();
  1652. float f_fTime = GameUty.MillisecondToSecond(millisecond);
  1653. bool flag = tag_data.IsValid("sync");
  1654. if (tag_data.IsValid("in"))
  1655. {
  1656. GameMain.Instance.MainCamera.FadeInNoUI(f_fTime, true);
  1657. }
  1658. else
  1659. {
  1660. GameMain.Instance.MainCamera.FadeOutNoUI(f_fTime, true);
  1661. }
  1662. if (flag)
  1663. {
  1664. this.SetFadeWait(true);
  1665. }
  1666. return flag;
  1667. }
  1668. public bool TagSetBg(KagTagSupport tag_data)
  1669. {
  1670. this.CheckAbsolutelyNecessaryTag(tag_data, "setbg", new string[]
  1671. {
  1672. "file"
  1673. });
  1674. string text = tag_data.GetTagProperty("file").AsString();
  1675. Maid maid = GameMain.Instance.CharacterMgr.GetMaid(0);
  1676. if (0 <= text.IndexOf("?"))
  1677. {
  1678. if (maid != null)
  1679. {
  1680. text = ScriptManager.ReplacePersonal(GameMain.Instance.CharacterMgr.GetMaid(0), text);
  1681. }
  1682. else
  1683. {
  1684. Debug.LogError("@SetBgで指定されたファイルに?がありましたが、スロット0にメイドがいないので性格置換できませんでした");
  1685. }
  1686. }
  1687. GameMain.Instance.BgMgr.ChangeBg(text);
  1688. return false;
  1689. }
  1690. public bool TagDraw2DTex(KagTagSupport tag_data)
  1691. {
  1692. this.CheckAbsolutelyNecessaryTag(tag_data, "draw2dtex", new string[]
  1693. {
  1694. "file",
  1695. "x",
  1696. "y"
  1697. });
  1698. GameObject gameObject = GameObject.Find("__GameMain__/SystemUI Root/MessageWindowPanel/tex2dplate");
  1699. bool flag = false;
  1700. if (gameObject == null)
  1701. {
  1702. gameObject = Utility.CreatePrefab(GameObject.Find("__GameMain__/SystemUI Root"), "System/Prefab/tex2dplate", true);
  1703. gameObject.name = "tex2dplate";
  1704. flag = true;
  1705. }
  1706. UITexture component = gameObject.GetComponent<UITexture>();
  1707. component.mainTexture = Resources.Load<Texture2D>(tag_data.GetTagProperty("file").AsString());
  1708. component.SetDimensions(component.mainTexture.width, component.mainTexture.height);
  1709. Vector3 localPosition = new Vector3((float)(-960 + tag_data.GetTagProperty("x").AsInteger()), (float)(540 - tag_data.GetTagProperty("y").AsInteger()), 0f);
  1710. gameObject.transform.localPosition = localPosition;
  1711. if (flag)
  1712. {
  1713. gameObject.transform.parent = GameObject.Find("__GameMain__/SystemUI Root/MessageWindowPanel").transform;
  1714. }
  1715. return false;
  1716. }
  1717. public bool TagClear2DTex(KagTagSupport tag_data)
  1718. {
  1719. GameObject gameObject = GameObject.Find("__GameMain__/SystemUI Root/MessageWindowPanel/tex2dplate");
  1720. if (gameObject != null)
  1721. {
  1722. UnityEngine.Object.DestroyImmediate(gameObject);
  1723. }
  1724. return false;
  1725. }
  1726. public bool TagItemChange(KagTagSupport tag_data)
  1727. {
  1728. this.CheckAbsolutelyNecessaryTag(tag_data, "itemchange", new string[]
  1729. {
  1730. "category",
  1731. "name"
  1732. });
  1733. Maid maidAndMan = this.GetMaidAndMan(tag_data);
  1734. if (maidAndMan == null)
  1735. {
  1736. return false;
  1737. }
  1738. maidAndMan.ItemChangeTemp(tag_data.GetTagProperty("category").AsString().ToLower(), tag_data.GetTagProperty("name").AsString());
  1739. return false;
  1740. }
  1741. public bool TagItemSet(KagTagSupport tag_data)
  1742. {
  1743. this.CheckAbsolutelyNecessaryTag(tag_data, "itemset", new string[]
  1744. {
  1745. "category",
  1746. "item"
  1747. });
  1748. Maid maidAndMan = this.GetMaidAndMan(tag_data);
  1749. if (maidAndMan == null)
  1750. {
  1751. return false;
  1752. }
  1753. maidAndMan.SetProp(tag_data.GetTagProperty("category").AsString().ToLower(), tag_data.GetTagProperty("item").AsString(), 0, tag_data.IsValid("temp"), tag_data.IsValid("noscale"));
  1754. return false;
  1755. }
  1756. public bool TagItemReset(KagTagSupport tag_data)
  1757. {
  1758. this.CheckAbsolutelyNecessaryTag(tag_data, "itemreset", new string[0]);
  1759. Maid maidAndMan = this.GetMaidAndMan(tag_data);
  1760. if (maidAndMan == null)
  1761. {
  1762. return false;
  1763. }
  1764. if (tag_data.IsValid("allwear"))
  1765. {
  1766. for (int i = 53; i <= 82; i++)
  1767. {
  1768. maidAndMan.ResetProp((MPN)i, true);
  1769. }
  1770. }
  1771. else if (tag_data.IsValid("multi"))
  1772. {
  1773. string text = tag_data.GetTagProperty("multi").AsString();
  1774. string[] array = text.Split(new char[]
  1775. {
  1776. ':'
  1777. });
  1778. foreach (string mpn in array)
  1779. {
  1780. maidAndMan.ResetProp(mpn, true);
  1781. }
  1782. }
  1783. else
  1784. {
  1785. maidAndMan.ResetProp(tag_data.GetTagProperty("category").AsString().ToLower(), true);
  1786. }
  1787. return false;
  1788. }
  1789. public bool TagItemPos(KagTagSupport tag_data)
  1790. {
  1791. this.CheckAbsolutelyNecessaryTag(tag_data, "itempos", new string[]
  1792. {
  1793. "slot",
  1794. "target"
  1795. });
  1796. Maid maidAndMan = this.GetMaidAndMan(tag_data);
  1797. if (maidAndMan == null)
  1798. {
  1799. return false;
  1800. }
  1801. string f_strSlotName = tag_data.GetTagProperty("slot").AsString();
  1802. string f_strObjTarget = tag_data.GetTagProperty("target").AsString();
  1803. Vector3 f_vPos = default(Vector3);
  1804. bool flag = false;
  1805. Vector3 f_vRot = default(Vector3);
  1806. bool flag2 = false;
  1807. if (tag_data.IsValid("x"))
  1808. {
  1809. f_vPos.x = tag_data.GetTagProperty("x").AsReal();
  1810. flag = true;
  1811. }
  1812. if (tag_data.IsValid("y"))
  1813. {
  1814. f_vPos.y = tag_data.GetTagProperty("y").AsReal();
  1815. flag = true;
  1816. }
  1817. if (tag_data.IsValid("z"))
  1818. {
  1819. f_vPos.z = tag_data.GetTagProperty("z").AsReal();
  1820. flag = true;
  1821. }
  1822. if (tag_data.IsValid("rx"))
  1823. {
  1824. f_vRot.x = tag_data.GetTagProperty("rx").AsReal();
  1825. flag2 = true;
  1826. }
  1827. if (tag_data.IsValid("ry"))
  1828. {
  1829. f_vRot.y = tag_data.GetTagProperty("ry").AsReal();
  1830. flag2 = true;
  1831. }
  1832. if (tag_data.IsValid("rz"))
  1833. {
  1834. f_vRot.z = tag_data.GetTagProperty("rz").AsReal();
  1835. flag2 = true;
  1836. }
  1837. if (flag)
  1838. {
  1839. maidAndMan.body0.SetSlotOffsetPos(f_strSlotName, f_strObjTarget, f_vPos);
  1840. }
  1841. if (flag2)
  1842. {
  1843. maidAndMan.body0.SetSlotOffsetRot(f_strSlotName, f_strObjTarget, f_vRot);
  1844. }
  1845. return false;
  1846. }
  1847. public bool TagAllProcPropSeqStart(KagTagSupport tag_data)
  1848. {
  1849. Maid maidAndMan = this.GetMaidAndMan(tag_data);
  1850. if (maidAndMan == null)
  1851. {
  1852. return false;
  1853. }
  1854. if (tag_data.IsValid("fix"))
  1855. {
  1856. maidAndMan.AllProcProp();
  1857. }
  1858. else
  1859. {
  1860. maidAndMan.AllProcPropSeqStart();
  1861. if (tag_data.IsValid("sync") && maidAndMan.Visible)
  1862. {
  1863. this.SetMaidAllPropSeqWait(maidAndMan);
  1864. return true;
  1865. }
  1866. }
  1867. return false;
  1868. }
  1869. public bool TagItemMask(KagTagSupport tag_data)
  1870. {
  1871. this.CheckAbsolutelyNecessaryTag(tag_data, "itemmask", new string[]
  1872. {
  1873. "slot",
  1874. "hide"
  1875. });
  1876. Maid maidAndMan = this.GetMaidAndMan(tag_data);
  1877. if (maidAndMan == null)
  1878. {
  1879. return false;
  1880. }
  1881. string text = tag_data.GetTagProperty("slot").AsString();
  1882. bool f_bVisible = tag_data.GetTagProperty("hide").AsBool();
  1883. TBody.SlotID f_eSlot = TBody.SlotID.accAnl;
  1884. try
  1885. {
  1886. f_eSlot = (TBody.SlotID)Enum.Parse(typeof(TBody.SlotID), text);
  1887. }
  1888. catch
  1889. {
  1890. NDebug.Assert("@itemmask TBody.SlotID enum convert error.\\n" + text, false);
  1891. }
  1892. maidAndMan.body0.SetMask(f_eSlot, f_bVisible);
  1893. return false;
  1894. }
  1895. public bool TagItemMaskMode(KagTagSupport tag_data)
  1896. {
  1897. this.CheckAbsolutelyNecessaryTag(tag_data, "itemmaskmode", new string[]
  1898. {
  1899. "type"
  1900. });
  1901. Maid maidAndMan = this.GetMaidAndMan(tag_data);
  1902. if (maidAndMan == null)
  1903. {
  1904. return false;
  1905. }
  1906. string text = tag_data.GetTagProperty("type").AsString();
  1907. TBody.MaskMode maskMode = TBody.MaskMode.None;
  1908. try
  1909. {
  1910. maskMode = (TBody.MaskMode)Enum.Parse(typeof(TBody.MaskMode), text);
  1911. }
  1912. catch
  1913. {
  1914. NDebug.Assert("@itemmaskmode TBody.MaskMode enum convert error.\\n" + text, false);
  1915. }
  1916. maidAndMan.body0.SetMaskMode(maskMode);
  1917. return false;
  1918. }
  1919. public bool TagMaidReset(KagTagSupport tag_data)
  1920. {
  1921. this.CheckAbsolutelyNecessaryTag(tag_data, "maidreset", new string[]
  1922. {
  1923. "maid"
  1924. });
  1925. Maid maidAndMan = this.GetMaidAndMan(tag_data);
  1926. if (maidAndMan == null)
  1927. {
  1928. return false;
  1929. }
  1930. maidAndMan.ResetAll();
  1931. return this.SetMaidAllPropSeqWait(maidAndMan);
  1932. }
  1933. public bool TagPropSet(KagTagSupport tag_data)
  1934. {
  1935. this.CheckAbsolutelyNecessaryTag(tag_data, "propset", new string[]
  1936. {
  1937. "category"
  1938. });
  1939. Maid maidAndMan = this.GetMaidAndMan(tag_data);
  1940. if (maidAndMan == null)
  1941. {
  1942. return false;
  1943. }
  1944. bool f_bTemp = tag_data.IsValid("temp");
  1945. string text = tag_data.GetTagProperty("category").AsString();
  1946. if (tag_data.IsValid("autofix"))
  1947. {
  1948. string slotname = tag_data.GetTagProperty("slot").AsString();
  1949. TBodySkin slot = maidAndMan.body0.GetSlot(slotname);
  1950. string param = slot.GetParam2("autofix_" + text);
  1951. if (!string.IsNullOrEmpty(param))
  1952. {
  1953. int val = 0;
  1954. if (int.TryParse(param, out val))
  1955. {
  1956. maidAndMan.SetProp(text, val, f_bTemp);
  1957. }
  1958. }
  1959. }
  1960. else if (tag_data.IsValid("val"))
  1961. {
  1962. int val2 = tag_data.GetTagProperty("val").AsInteger();
  1963. maidAndMan.SetProp(text, val2, f_bTemp);
  1964. }
  1965. else
  1966. {
  1967. Debug.LogError("@PropSet には val か autofix のどちらかの指定が必要です。");
  1968. }
  1969. return false;
  1970. }
  1971. public bool TagPropReset(KagTagSupport tag_data)
  1972. {
  1973. this.CheckAbsolutelyNecessaryTag(tag_data, "propreset", new string[]
  1974. {
  1975. "category"
  1976. });
  1977. Maid maidAndMan = this.GetMaidAndMan(tag_data);
  1978. if (maidAndMan == null)
  1979. {
  1980. return false;
  1981. }
  1982. string mpn = tag_data.GetTagProperty("category").AsString();
  1983. maidAndMan.ResetProp(mpn, false);
  1984. return false;
  1985. }
  1986. public bool TagAddPrefabBg(KagTagSupport tag_data)
  1987. {
  1988. this.CheckAbsolutelyNecessaryTag(tag_data, "addprefabbg", new string[]
  1989. {
  1990. "name"
  1991. });
  1992. string text = string.Empty;
  1993. string f_strSrc = string.Empty;
  1994. if (tag_data.IsValid("src"))
  1995. {
  1996. text = tag_data.GetTagProperty("src").AsString();
  1997. }
  1998. else if (tag_data.IsValid("ab"))
  1999. {
  2000. f_strSrc = tag_data.GetTagProperty("ab").AsString();
  2001. }
  2002. string f_strName = tag_data.GetTagProperty("name").AsString();
  2003. string f_strDest = string.Empty;
  2004. if (tag_data.IsValid("dest"))
  2005. {
  2006. f_strDest = tag_data.GetTagProperty("dest").AsString();
  2007. }
  2008. Vector3 zero = Vector3.zero;
  2009. Vector3 zero2 = Vector3.zero;
  2010. if (tag_data.IsValid("x"))
  2011. {
  2012. zero.x = tag_data.GetTagProperty("x").AsReal();
  2013. }
  2014. if (tag_data.IsValid("y"))
  2015. {
  2016. zero.y = tag_data.GetTagProperty("y").AsReal();
  2017. }
  2018. if (tag_data.IsValid("z"))
  2019. {
  2020. zero.z = tag_data.GetTagProperty("z").AsReal();
  2021. }
  2022. if (tag_data.IsValid("rx"))
  2023. {
  2024. zero2.x = tag_data.GetTagProperty("rx").AsReal();
  2025. }
  2026. if (tag_data.IsValid("ry"))
  2027. {
  2028. zero2.y = tag_data.GetTagProperty("ry").AsReal();
  2029. }
  2030. if (tag_data.IsValid("rz"))
  2031. {
  2032. zero2.z = tag_data.GetTagProperty("rz").AsReal();
  2033. }
  2034. if (this.script_mgr_.compatibilityMode && text.ToLower() == "odogu_manaita")
  2035. {
  2036. zero = new Vector3(2.2485f, 0.772f, -0.953f);
  2037. }
  2038. if (!string.IsNullOrEmpty(text))
  2039. {
  2040. GameMain.Instance.BgMgr.AddPrefabToBg(text, f_strName, f_strDest, zero, zero2);
  2041. }
  2042. else
  2043. {
  2044. GameMain.Instance.BgMgr.AddAssetsBundleToBg(f_strSrc, f_strName, f_strDest, zero, zero2);
  2045. }
  2046. return false;
  2047. }
  2048. public bool TagSetPrefabBgTransformData(KagTagSupport tag_data)
  2049. {
  2050. this.CheckAbsolutelyNecessaryTag(tag_data, "SetPrefabBgTransformData", new string[]
  2051. {
  2052. "name"
  2053. });
  2054. GameObject prefabFromBg = GameMain.Instance.BgMgr.GetPrefabFromBg(tag_data.GetTagProperty("name").AsString());
  2055. if (prefabFromBg != null)
  2056. {
  2057. Transform transform = prefabFromBg.transform;
  2058. Vector3 localPosition = transform.localPosition;
  2059. Vector3 eulerAngles = transform.localRotation.eulerAngles;
  2060. Vector3 localScale = transform.localScale;
  2061. if (tag_data.IsValid("x"))
  2062. {
  2063. localPosition.x = tag_data.GetTagProperty("x").AsReal();
  2064. }
  2065. if (tag_data.IsValid("y"))
  2066. {
  2067. localPosition.y = tag_data.GetTagProperty("y").AsReal();
  2068. }
  2069. if (tag_data.IsValid("z"))
  2070. {
  2071. localPosition.z = tag_data.GetTagProperty("z").AsReal();
  2072. }
  2073. if (tag_data.IsValid("rx"))
  2074. {
  2075. eulerAngles.x = tag_data.GetTagProperty("rx").AsReal();
  2076. }
  2077. if (tag_data.IsValid("ry"))
  2078. {
  2079. eulerAngles.y = tag_data.GetTagProperty("ry").AsReal();
  2080. }
  2081. if (tag_data.IsValid("rz"))
  2082. {
  2083. eulerAngles.z = tag_data.GetTagProperty("rz").AsReal();
  2084. }
  2085. if (tag_data.IsValid("sx"))
  2086. {
  2087. localScale.x = tag_data.GetTagProperty("sx").AsReal();
  2088. }
  2089. if (tag_data.IsValid("sy"))
  2090. {
  2091. localScale.y = tag_data.GetTagProperty("sy").AsReal();
  2092. }
  2093. if (tag_data.IsValid("sz"))
  2094. {
  2095. localScale.z = tag_data.GetTagProperty("sz").AsReal();
  2096. }
  2097. transform.localPosition = localPosition;
  2098. transform.localRotation = Quaternion.Euler(eulerAngles);
  2099. transform.localScale = localScale;
  2100. }
  2101. return false;
  2102. }
  2103. public bool TagDelPrefabBg(KagTagSupport tag_data)
  2104. {
  2105. this.CheckAbsolutelyNecessaryTag(tag_data, "delprefabBg", new string[]
  2106. {
  2107. "name"
  2108. });
  2109. GameMain.Instance.BgMgr.DelPrefabFromBg(tag_data.GetTagProperty("name").AsString());
  2110. return false;
  2111. }
  2112. public bool TagDelPrefabBgAll(KagTagSupport tag_data)
  2113. {
  2114. GameMain.Instance.BgMgr.DelPrefabFromBgAll();
  2115. return false;
  2116. }
  2117. public bool TagMovePrefabToChara(KagTagSupport tag_data)
  2118. {
  2119. this.CheckAbsolutelyNecessaryTag(tag_data, "moveprefabtochara", new string[]
  2120. {
  2121. "bone",
  2122. "name"
  2123. });
  2124. Maid maidAndMan = this.GetMaidAndMan(tag_data);
  2125. if (maidAndMan == null)
  2126. {
  2127. return false;
  2128. }
  2129. string f_strDestBone = tag_data.GetTagProperty("bone").AsString();
  2130. string f_strPrefabName = tag_data.GetTagProperty("name").AsString();
  2131. Vector3 zero = Vector3.zero;
  2132. if (tag_data.IsValid("offsx"))
  2133. {
  2134. zero.x = tag_data.GetTagProperty("offsx").AsReal();
  2135. }
  2136. if (tag_data.IsValid("offsy"))
  2137. {
  2138. zero.y = tag_data.GetTagProperty("offsy").AsReal();
  2139. }
  2140. if (tag_data.IsValid("offsz"))
  2141. {
  2142. zero.z = tag_data.GetTagProperty("offsz").AsReal();
  2143. }
  2144. int millisecond = 0;
  2145. if (tag_data.IsValid("time"))
  2146. {
  2147. millisecond = tag_data.GetTagProperty("time").AsInteger();
  2148. }
  2149. GameMain.Instance.BgMgr.MovePrefabToChara(f_strPrefabName, maidAndMan, f_strDestBone, zero, Vector3.zero, GameUty.MillisecondToSecond(millisecond));
  2150. return false;
  2151. }
  2152. public bool TagAddPrefabWorld(KagTagSupport tag_data)
  2153. {
  2154. return false;
  2155. }
  2156. public bool TagReleasePrefab(KagTagSupport tag_data)
  2157. {
  2158. return false;
  2159. }
  2160. public bool TagPrefabAnimatorSetParam(KagTagSupport tag_data)
  2161. {
  2162. this.CheckAbsolutelyNecessaryTag(tag_data, "name", new string[]
  2163. {
  2164. "param"
  2165. });
  2166. string f_strName = tag_data.GetTagProperty("name").AsString();
  2167. string f_strParam = tag_data.GetTagProperty("param").AsString();
  2168. if (tag_data.IsValid("bool"))
  2169. {
  2170. GameMain.Instance.BgMgr.PrefabAnimatorSetParam<bool>(f_strName, f_strParam, tag_data.GetTagProperty("bool").AsBool());
  2171. }
  2172. else if (tag_data.IsValid("int"))
  2173. {
  2174. GameMain.Instance.BgMgr.PrefabAnimatorSetParam<int>(f_strName, f_strParam, tag_data.GetTagProperty("int").AsInteger());
  2175. }
  2176. else if (tag_data.IsValid("float"))
  2177. {
  2178. GameMain.Instance.BgMgr.PrefabAnimatorSetParam<float>(f_strName, f_strParam, tag_data.GetTagProperty("float").AsReal());
  2179. }
  2180. else if (tag_data.IsValid("trigger"))
  2181. {
  2182. GameMain.Instance.BgMgr.PrefabAnimatorTrigger(f_strName, f_strParam, tag_data.IsValid("reset"));
  2183. }
  2184. return false;
  2185. }
  2186. public bool TagChinko(KagTagSupport tag_data)
  2187. {
  2188. bool chinkoVisible = tag_data.IsValid("on");
  2189. Maid maidAndMan = this.GetMaidAndMan(tag_data);
  2190. if (maidAndMan == null || !maidAndMan.boMAN)
  2191. {
  2192. return false;
  2193. }
  2194. maidAndMan.body0.SetChinkoVisible(chinkoVisible);
  2195. return false;
  2196. }
  2197. public bool TagSetLoacalPosition(KagTagSupport tag_data)
  2198. {
  2199. return false;
  2200. }
  2201. public bool TagAddLocalPosition(KagTagSupport tag_data)
  2202. {
  2203. return false;
  2204. }
  2205. public bool TagOpenMouth(KagTagSupport tag_data)
  2206. {
  2207. Maid maidAndMan = this.GetMaidAndMan(tag_data);
  2208. if (maidAndMan == null)
  2209. {
  2210. return false;
  2211. }
  2212. if (tag_data.IsValid("open"))
  2213. {
  2214. maidAndMan.OpenMouth(true);
  2215. }
  2216. if (tag_data.IsValid("close"))
  2217. {
  2218. maidAndMan.OpenMouth(false);
  2219. }
  2220. return false;
  2221. }
  2222. public bool TagEyeToPosition(KagTagSupport tag_data)
  2223. {
  2224. Maid maidAndMan = this.GetMaidAndMan(tag_data);
  2225. if (maidAndMan == null)
  2226. {
  2227. return false;
  2228. }
  2229. Vector3 f_vecTargetPos = default(Vector3);
  2230. if (tag_data.IsValid("x"))
  2231. {
  2232. f_vecTargetPos.x = tag_data.GetTagProperty("x").AsReal();
  2233. }
  2234. if (tag_data.IsValid("y"))
  2235. {
  2236. f_vecTargetPos.y = tag_data.GetTagProperty("y").AsReal();
  2237. }
  2238. if (tag_data.IsValid("z"))
  2239. {
  2240. f_vecTargetPos.z = tag_data.GetTagProperty("z").AsReal();
  2241. }
  2242. int millisecond = 500;
  2243. if (tag_data.IsValid("blend"))
  2244. {
  2245. millisecond = tag_data.GetTagProperty("blend").AsInteger();
  2246. }
  2247. maidAndMan.EyeToPosition(f_vecTargetPos, GameUty.MillisecondToSecond(millisecond));
  2248. return false;
  2249. }
  2250. public bool TagEyeToTarget(KagTagSupport tag_data)
  2251. {
  2252. Maid maidAndMan = this.GetMaidAndMan(tag_data);
  2253. if (maidAndMan == null)
  2254. {
  2255. return false;
  2256. }
  2257. this.CheckAbsolutelyNecessaryTag(tag_data, "eyetotarget", new string[]
  2258. {
  2259. "target"
  2260. });
  2261. Maid maidAndMan2 = this.GetMaidAndMan(tag_data.GetTagProperty("target").AsString());
  2262. int millisecond = 500;
  2263. if (tag_data.IsValid("blend"))
  2264. {
  2265. millisecond = tag_data.GetTagProperty("blend").AsInteger();
  2266. }
  2267. string text = string.Empty;
  2268. if (tag_data.IsValid("bone"))
  2269. {
  2270. text = tag_data.GetTagProperty("bone").AsString();
  2271. }
  2272. if (text == string.Empty)
  2273. {
  2274. maidAndMan.EyeToTarget(maidAndMan2, GameUty.MillisecondToSecond(millisecond), "Bip01 Head");
  2275. }
  2276. else
  2277. {
  2278. maidAndMan.EyeToTarget(maidAndMan2, GameUty.MillisecondToSecond(millisecond), text);
  2279. }
  2280. return false;
  2281. }
  2282. public bool TagEyeToCamera(KagTagSupport tag_data)
  2283. {
  2284. Maid maidAndMan = this.GetMaidAndMan(tag_data);
  2285. if (maidAndMan == null)
  2286. {
  2287. return false;
  2288. }
  2289. this.CheckAbsolutelyNecessaryTag(tag_data, "eyetocamera", new string[]
  2290. {
  2291. "move"
  2292. });
  2293. string text = tag_data.GetTagProperty("move").AsString();
  2294. Maid.EyeMoveType f_eType = Maid.EyeMoveType.無し;
  2295. try
  2296. {
  2297. f_eType = (Maid.EyeMoveType)Enum.Parse(typeof(Maid.EyeMoveType), text);
  2298. }
  2299. catch (ArgumentException)
  2300. {
  2301. NDebug.Assert("Maid.EyeMoveType\nenum parse error.[" + text + "]", false);
  2302. }
  2303. int millisecond = 500;
  2304. if (tag_data.IsValid("blend"))
  2305. {
  2306. millisecond = tag_data.GetTagProperty("blend").AsInteger();
  2307. }
  2308. maidAndMan.EyeToCamera(f_eType, GameUty.MillisecondToSecond(millisecond));
  2309. return false;
  2310. }
  2311. public bool TagEyeToReset(KagTagSupport tag_data)
  2312. {
  2313. Maid maidAndMan = this.GetMaidAndMan(tag_data);
  2314. if (maidAndMan == null)
  2315. {
  2316. return false;
  2317. }
  2318. int millisecond = 500;
  2319. if (tag_data.IsValid("blend"))
  2320. {
  2321. millisecond = tag_data.GetTagProperty("blend").AsInteger();
  2322. }
  2323. maidAndMan.EyeToReset(GameUty.MillisecondToSecond(millisecond));
  2324. return false;
  2325. }
  2326. public bool TagSetMaidOffsetPos(KagTagSupport tag_data)
  2327. {
  2328. Maid maidAndMan = this.GetMaidAndMan(tag_data);
  2329. if (maidAndMan == null)
  2330. {
  2331. return false;
  2332. }
  2333. this.CheckAbsolutelyNecessaryTag(tag_data, "setmaidoffsetpos", new string[]
  2334. {
  2335. "splitnum"
  2336. });
  2337. int f_nCSTSplitNum = tag_data.GetTagProperty("splitnum").AsInteger();
  2338. CharacterMgr.CharaPer f_cIn = BaseKagManager.PerthOffsetPosTagData.CreateCharaPer(this.tjs_, tag_data);
  2339. GameMain.Instance.CharacterMgr.SetMaidOffsetPos(maidAndMan, f_nCSTSplitNum, f_cIn);
  2340. return false;
  2341. }
  2342. public bool TagSetMaidOffsetMultiPos(KagTagSupport tag_data)
  2343. {
  2344. this.CheckAbsolutelyNecessaryTag(tag_data, "setmaidoffsetpos", new string[]
  2345. {
  2346. "splitnum"
  2347. });
  2348. int f_nCSTSplitNum = tag_data.GetTagProperty("splitnum").AsInteger();
  2349. List<KeyValuePair<Maid, CharacterMgr.CharaPer>> list = BaseKagManager.PerthOffsetPosTagData.CreateMultiCharaPer(this.tjs_, tag_data, this);
  2350. GameMain.Instance.CharacterMgr.SetMaidOffsetOther(list, f_nCSTSplitNum);
  2351. if (!this.script_mgr_.compatibilityMode)
  2352. {
  2353. for (int i = 0; i < list.Count; i++)
  2354. {
  2355. Maid targetMaid = list[i].Key;
  2356. if (this.maidOffsetSetList.Find((Maid maid) => maid == targetMaid) == null)
  2357. {
  2358. this.maidOffsetSetList.Add(targetMaid);
  2359. }
  2360. }
  2361. }
  2362. return false;
  2363. }
  2364. public bool TagSetManOffsetPos(KagTagSupport tag_data)
  2365. {
  2366. this.CheckAbsolutelyNecessaryTag(tag_data, "TagSetManOffsetPos", new string[]
  2367. {
  2368. "man",
  2369. "splitnum",
  2370. "target",
  2371. "penisdetail"
  2372. });
  2373. Maid maidAndMan = this.GetMaidAndMan(tag_data);
  2374. if (maidAndMan == null)
  2375. {
  2376. return false;
  2377. }
  2378. string tag_str = tag_data.GetTagProperty("target").AsString();
  2379. Maid maidAndMan2 = this.GetMaidAndMan(tag_str);
  2380. int f_nCSTSplitNum = tag_data.GetTagProperty("splitnum").AsInteger();
  2381. bool f_bPenisDetailMode = tag_data.GetTagProperty("penisdetail").AsBool();
  2382. KeyValuePair<CharacterMgr.CharaPer, CharacterMgr.PenisPer> keyValuePair = BaseKagManager.PerthOffsetPosTagData.CreateCharaPerAndPenisPer(this.tjs_, tag_data);
  2383. GameMain.Instance.CharacterMgr.SetManOffsetPos(maidAndMan, maidAndMan2, f_nCSTSplitNum, f_bPenisDetailMode, keyValuePair.Key, keyValuePair.Value);
  2384. if (!this.script_mgr_.compatibilityMode)
  2385. {
  2386. Maid targetMan = maidAndMan;
  2387. if (this.maidOffsetSetList.Find((Maid maid) => maid == targetMan) == null)
  2388. {
  2389. this.maidOffsetSetList.Add(targetMan);
  2390. }
  2391. }
  2392. return false;
  2393. }
  2394. public bool TagSetMaidOffsetPosCategory(KagTagSupport tag_data)
  2395. {
  2396. this.CheckAbsolutelyNecessaryTag(tag_data, "setmaidoffsetposcategory", new string[]
  2397. {
  2398. "category"
  2399. });
  2400. Maid maidAndMan = this.GetMaidAndMan(tag_data);
  2401. if (maidAndMan == null)
  2402. {
  2403. return false;
  2404. }
  2405. string category = tag_data.GetTagProperty("category").AsString();
  2406. if (tag_data.IsValid("x"))
  2407. {
  2408. maidAndMan.SetPosOffsetFromUdeSclX(category, tag_data.GetTagProperty("x").AsReal());
  2409. }
  2410. if (tag_data.IsValid("y"))
  2411. {
  2412. maidAndMan.SetPosOffsetFromUdeSclY(category, tag_data.GetTagProperty("y").AsReal());
  2413. }
  2414. if (tag_data.IsValid("z"))
  2415. {
  2416. maidAndMan.SetPosOffsetFromUdeSclZ(category, tag_data.GetTagProperty("z").AsReal());
  2417. }
  2418. return false;
  2419. }
  2420. public bool TagAddPrefabChara(KagTagSupport tag_data)
  2421. {
  2422. this.CheckAbsolutelyNecessaryTag(tag_data, "addprefabchara", new string[]
  2423. {
  2424. "src",
  2425. "bone"
  2426. });
  2427. Maid maidAndMan = this.GetMaidAndMan(tag_data);
  2428. if (maidAndMan == null)
  2429. {
  2430. return false;
  2431. }
  2432. string text = tag_data.GetTagProperty("src").AsString();
  2433. string f_strDestBone = tag_data.GetTagProperty("bone").AsString();
  2434. string f_strName = text;
  2435. if (tag_data.IsValid("name"))
  2436. {
  2437. f_strName = tag_data.GetTagProperty("name").AsString();
  2438. }
  2439. Vector3 zero = Vector3.zero;
  2440. Vector3 zero2 = Vector3.zero;
  2441. if (tag_data.IsValid("x"))
  2442. {
  2443. zero.x = tag_data.GetTagProperty("x").AsReal();
  2444. }
  2445. if (tag_data.IsValid("y"))
  2446. {
  2447. zero.y = tag_data.GetTagProperty("y").AsReal();
  2448. }
  2449. if (tag_data.IsValid("z"))
  2450. {
  2451. zero.z = tag_data.GetTagProperty("z").AsReal();
  2452. }
  2453. if (tag_data.IsValid("rx"))
  2454. {
  2455. zero2.x = tag_data.GetTagProperty("rx").AsReal();
  2456. }
  2457. if (tag_data.IsValid("ry"))
  2458. {
  2459. zero2.y = tag_data.GetTagProperty("ry").AsReal();
  2460. }
  2461. if (tag_data.IsValid("rz"))
  2462. {
  2463. zero2.z = tag_data.GetTagProperty("rz").AsReal();
  2464. }
  2465. maidAndMan.AddPrefab(text, f_strName, f_strDestBone, zero, zero2);
  2466. return false;
  2467. }
  2468. public bool TagDelPrefabChara(KagTagSupport tag_data)
  2469. {
  2470. this.CheckAbsolutelyNecessaryTag(tag_data, "delprefabchara", new string[]
  2471. {
  2472. "name"
  2473. });
  2474. Maid maidAndMan = this.GetMaidAndMan(tag_data);
  2475. if (maidAndMan == null)
  2476. {
  2477. return false;
  2478. }
  2479. maidAndMan.DelPrefab(tag_data.GetTagProperty("name").AsString());
  2480. return false;
  2481. }
  2482. public bool TagDelPrefabCharaAll(KagTagSupport tag_data)
  2483. {
  2484. Maid maidAndMan = this.GetMaidAndMan(tag_data);
  2485. if (maidAndMan == null)
  2486. {
  2487. return false;
  2488. }
  2489. maidAndMan.DelPrefabAll();
  2490. return false;
  2491. }
  2492. public bool TagAnimObjChara(KagTagSupport tag_data)
  2493. {
  2494. this.CheckAbsolutelyNecessaryTag(tag_data, "animobjchara", new string[]
  2495. {
  2496. "name",
  2497. "mot",
  2498. "play",
  2499. "loop"
  2500. });
  2501. Maid maidAndMan = this.GetMaidAndMan(tag_data);
  2502. if (maidAndMan == null)
  2503. {
  2504. return false;
  2505. }
  2506. string f_strName = tag_data.GetTagProperty("name").AsString();
  2507. string f_strAnimName = tag_data.GetTagProperty("mot").AsString();
  2508. bool f_bNowPlay = tag_data.GetTagProperty("play").AsBool();
  2509. bool f_bLoop = tag_data.GetTagProperty("loop").AsBool();
  2510. maidAndMan.AnimationObject(f_strName, f_strAnimName, f_bNowPlay, f_bLoop);
  2511. return false;
  2512. }
  2513. public bool TagCharaActivate(KagTagSupport tag_data)
  2514. {
  2515. if (this.script_mgr_.compatibilityMode)
  2516. {
  2517. return this.TagCompatibilityCharaActivate(tag_data);
  2518. }
  2519. GameMain.Instance.ScriptMgr.StopMotionScript();
  2520. int num = 0;
  2521. bool flag = false;
  2522. if (tag_data.IsValid("maid"))
  2523. {
  2524. num = tag_data.GetTagProperty("maid").AsInteger();
  2525. }
  2526. else if (tag_data.IsValid("man"))
  2527. {
  2528. flag = true;
  2529. num = tag_data.GetTagProperty("man").AsInteger();
  2530. }
  2531. else
  2532. {
  2533. NDebug.Assert("@charaactivate error.", false);
  2534. }
  2535. CharacterMgr characterMgr = GameMain.Instance.CharacterMgr;
  2536. Maid maid = null;
  2537. if (tag_data.IsValid("leader"))
  2538. {
  2539. NDebug.Assert(!flag, "@charaactivateのleaderタグはメイド専用です。man指定がされています。");
  2540. for (int i = 0; i < characterMgr.GetStockMaidCount(); i++)
  2541. {
  2542. Maid stockMaid = characterMgr.GetStockMaid(i);
  2543. if (stockMaid != null && stockMaid.status.leader)
  2544. {
  2545. characterMgr.SetActiveMaid(stockMaid, num);
  2546. maid = stockMaid;
  2547. break;
  2548. }
  2549. }
  2550. NDebug.Assert(maid != null, "メイド長を探せませんでした");
  2551. }
  2552. else if (tag_data.IsValid("rank1"))
  2553. {
  2554. NDebug.Assert(!flag, "@charaactivateのrank1タグはメイド専用です。man指定がされています。");
  2555. List<Maid> list = new List<Maid>();
  2556. for (int j = 0; j < characterMgr.GetStockMaidCount(); j++)
  2557. {
  2558. Maid stockMaid2 = characterMgr.GetStockMaid(j);
  2559. if (stockMaid2 != null)
  2560. {
  2561. list.Add(stockMaid2);
  2562. }
  2563. }
  2564. List<Maid> list2 = list;
  2565. if (BaseKagManager.<>f__mg$cache0 == null)
  2566. {
  2567. BaseKagManager.<>f__mg$cache0 = new Comparison<Maid>(CharacterSelectManager.SortMaidRanking);
  2568. }
  2569. list2.Sort(BaseKagManager.<>f__mg$cache0);
  2570. for (int k = 0; k < list.Count; k++)
  2571. {
  2572. if (list[k].status.popularRank == 1)
  2573. {
  2574. characterMgr.SetActiveMaid(list[k], num);
  2575. maid = list[k];
  2576. break;
  2577. }
  2578. }
  2579. }
  2580. else if (tag_data.IsValid("main"))
  2581. {
  2582. Personal.Data data = Personal.GetData(tag_data.GetTagProperty("main").AsString());
  2583. NDebug.Assert(!flag, "@charaactivateのmainタグはメイド専用です。man指定がされています。");
  2584. for (int l = 0; l < characterMgr.GetStockMaidCount(); l++)
  2585. {
  2586. Maid stockMaid3 = characterMgr.GetStockMaid(l);
  2587. if (stockMaid3 != null && stockMaid3.status.mainChara && stockMaid3.status.personal.id == data.id)
  2588. {
  2589. characterMgr.SetActiveMaid(stockMaid3, num);
  2590. maid = stockMaid3;
  2591. break;
  2592. }
  2593. }
  2594. NDebug.Assert(maid != null, data.drawName + "性格のメインキャラを探せませんでした");
  2595. }
  2596. else if (tag_data.IsValid("npc"))
  2597. {
  2598. string text = tag_data.GetTagProperty("npc").AsString();
  2599. if (SubMaid.Contains(text))
  2600. {
  2601. NDebug.Assert(!flag, "npc指定の男は日対応です[" + text + "]");
  2602. maid = characterMgr.ActivateNpc(num);
  2603. NDebug.Assert(maid.boNPC, "NPCメイドではないメイドにNPCプリセットを適用しようとしました");
  2604. SubMaid.Data.CharacterStatus characterStatus = (!GameMain.Instance.CharacterMgr.status.lockUserDraftMaid) ? SubMaid.GetData(text).status : SubMaid.GetData(text).secondStatus;
  2605. if (characterStatus == null)
  2606. {
  2607. characterStatus = SubMaid.GetData(text).status;
  2608. }
  2609. CharacterMgr.npcDatas[characterStatus.presetName].Apply(maid, false);
  2610. }
  2611. else
  2612. {
  2613. NDebug.Assert(CharacterMgr.npcDatas.ContainsKey(text), "キャラクタープリセット設定[" + text + "]の情報が見つかりませんでした");
  2614. if (!flag)
  2615. {
  2616. maid = characterMgr.ActivateNpc(num);
  2617. }
  2618. else
  2619. {
  2620. maid = characterMgr.GetMan(num);
  2621. NDebug.Assert(maid != null, "男スロット指定が限界数を超えています。指定可能範囲は0~" + 5.ToString() + "までです");
  2622. }
  2623. if (!flag)
  2624. {
  2625. NDebug.Assert(maid.boNPC, "NPCメイドではないメイドにNPCプリセットを適用しようとしました");
  2626. }
  2627. CharacterMgr.npcDatas[text].Apply(maid, false);
  2628. }
  2629. maid.gameObject.name = ((!flag) ? "Maid[" : "Man[") + num.ToString() + "]";
  2630. if (!flag)
  2631. {
  2632. GameObject gameObject = maid.gameObject;
  2633. string name = gameObject.name;
  2634. gameObject.name = string.Concat(new string[]
  2635. {
  2636. name,
  2637. " ",
  2638. maid.status.firstName,
  2639. " ",
  2640. maid.status.lastName
  2641. });
  2642. }
  2643. }
  2644. else if (tag_data.IsValid("sub"))
  2645. {
  2646. string b = tag_data.GetTagProperty("sub").AsString();
  2647. NDebug.Assert(!flag, "@charaactivateのsubタグはメイド専用です。man指定がされています。");
  2648. for (int m = 0; m < characterMgr.GetStockMaidCount(); m++)
  2649. {
  2650. Maid stockMaid4 = characterMgr.GetStockMaid(m);
  2651. if (stockMaid4 != null && stockMaid4.status.heroineType == HeroineType.Sub && stockMaid4.status.subCharaData != null && stockMaid4.status.subCharaData.uniqueName == b)
  2652. {
  2653. characterMgr.SetActiveMaid(stockMaid4, num);
  2654. maid = stockMaid4;
  2655. break;
  2656. }
  2657. }
  2658. }
  2659. else if (tag_data.IsValid("slot"))
  2660. {
  2661. NDebug.Assert(!flag, "@charaactivateのslotタグはメイド専用です。man指定がされています。");
  2662. int f_nStockSlot = tag_data.GetTagProperty("slot").AsInteger();
  2663. maid = GameMain.Instance.CharacterMgr.Activate(num, f_nStockSlot, flag, false);
  2664. }
  2665. else if (tag_data.IsValid("swap"))
  2666. {
  2667. int slotNoB = tag_data.GetTagProperty("swap").AsInteger();
  2668. GameMain.Instance.CharacterMgr.SwapActiveSlot(num, slotNoB, flag);
  2669. }
  2670. else
  2671. {
  2672. NDebug.Assert("@charaactivate error.", false);
  2673. }
  2674. bool result = false;
  2675. if (maid != null && !tag_data.IsValid("noload"))
  2676. {
  2677. maid.Visible = true;
  2678. result = this.SetMaidAllPropSeqWait(maid);
  2679. }
  2680. return result;
  2681. }
  2682. public bool TagCompatibilityCharaActivate(KagTagSupport tag_data)
  2683. {
  2684. int num = 0;
  2685. bool flag = false;
  2686. if (tag_data.IsValid("maid"))
  2687. {
  2688. num = tag_data.GetTagProperty("maid").AsInteger();
  2689. }
  2690. else if (tag_data.IsValid("man"))
  2691. {
  2692. flag = true;
  2693. num = tag_data.GetTagProperty("man").AsInteger();
  2694. if (this.script_mgr_.compatibilityMode && 6 <= num)
  2695. {
  2696. num = 5;
  2697. }
  2698. }
  2699. else if (tag_data.IsValid("file"))
  2700. {
  2701. num = 16;
  2702. }
  2703. else
  2704. {
  2705. NDebug.Assert("@charaactivate error.", false);
  2706. }
  2707. Maid maid = null;
  2708. if (tag_data.IsValid("npc") || tag_data.IsValid("file"))
  2709. {
  2710. string text = string.Empty;
  2711. if (tag_data.IsValid("npc"))
  2712. {
  2713. text = tag_data.GetTagProperty("npc").AsString();
  2714. }
  2715. else
  2716. {
  2717. text = tag_data.GetTagProperty("file").AsString();
  2718. }
  2719. if (this.script_mgr_.compatibilityMode)
  2720. {
  2721. if (text == "叔父メイド" || text == "メイド秘書" || text == "エステメイド")
  2722. {
  2723. text = "旧" + text;
  2724. }
  2725. else if (text == "pre_尾高千夏")
  2726. {
  2727. text = "旧千夏";
  2728. }
  2729. else if (text == "その他1")
  2730. {
  2731. text = "客2";
  2732. }
  2733. }
  2734. NDebug.Assert(CharacterMgr.npcDatas.ContainsKey(text), "サブキャラクター[" + text + "]の情報が見つかりませんでした");
  2735. if (!flag)
  2736. {
  2737. maid = GameMain.Instance.CharacterMgr.ActivateNpc(num);
  2738. }
  2739. else
  2740. {
  2741. maid = GameMain.Instance.CharacterMgr.GetMan(num);
  2742. NDebug.Assert(maid != null, "男スロット指定が限界数を超えています。指定可能範囲は0~" + 5.ToString() + "までです");
  2743. }
  2744. if (!flag)
  2745. {
  2746. NDebug.Assert(maid.boNPC, "NPCメイドではないメイドにNPCプリセットを適用しようとしました");
  2747. }
  2748. CharacterMgr.npcDatas[text].Apply(maid, false);
  2749. }
  2750. else if (tag_data.IsValid("pc"))
  2751. {
  2752. int f_nStockSlot = tag_data.GetTagProperty("pc").AsInteger();
  2753. maid = GameMain.Instance.CharacterMgr.Activate(num, f_nStockSlot, false, false);
  2754. }
  2755. else
  2756. {
  2757. NDebug.Assert("@charaactivate error.", false);
  2758. }
  2759. bool result = false;
  2760. if (maid != null)
  2761. {
  2762. result = this.SetMaidAllPropSeqWait(maid);
  2763. }
  2764. return result;
  2765. }
  2766. public bool TagConCharaActivateFreeNPC(KagTagSupport tag_data)
  2767. {
  2768. return this.TagCompatibilityCharaActivate(tag_data);
  2769. }
  2770. public bool TagConCharaActivate1stRanking(KagTagSupport tag_data)
  2771. {
  2772. GameMain.Instance.ScriptMgr.StopMotionScript();
  2773. int f_nActiveSlotNo = 0;
  2774. if (tag_data.IsValid("maid"))
  2775. {
  2776. f_nActiveSlotNo = tag_data.GetTagProperty("maid").AsInteger();
  2777. }
  2778. List<Maid> list = new List<Maid>();
  2779. CharacterMgr characterMgr = GameMain.Instance.CharacterMgr;
  2780. for (int i = 0; i < characterMgr.GetStockMaidCount(); i++)
  2781. {
  2782. Maid stockMaid = characterMgr.GetStockMaid(i);
  2783. if (stockMaid != null)
  2784. {
  2785. list.Add(stockMaid);
  2786. }
  2787. }
  2788. List<Maid> list2 = list;
  2789. if (BaseKagManager.<>f__mg$cache1 == null)
  2790. {
  2791. BaseKagManager.<>f__mg$cache1 = new Comparison<Maid>(CharacterSelectManager.SortMaidRanking);
  2792. }
  2793. list2.Sort(BaseKagManager.<>f__mg$cache1);
  2794. bool result = false;
  2795. for (int j = 0; j < list.Count; j++)
  2796. {
  2797. if (list[j].status.popularRank == 1)
  2798. {
  2799. characterMgr.SetActiveMaid(list[j], f_nActiveSlotNo);
  2800. list[j].Visible = true;
  2801. result = this.SetMaidAllPropSeqWait(list[j]);
  2802. break;
  2803. }
  2804. }
  2805. return result;
  2806. }
  2807. public bool TagConCharaActivateLeader(KagTagSupport tag_data)
  2808. {
  2809. GameMain.Instance.ScriptMgr.StopMotionScript();
  2810. int f_nActiveSlotNo = 0;
  2811. if (tag_data.IsValid("maid"))
  2812. {
  2813. f_nActiveSlotNo = tag_data.GetTagProperty("maid").AsInteger();
  2814. }
  2815. bool result = false;
  2816. CharacterMgr characterMgr = GameMain.Instance.CharacterMgr;
  2817. for (int i = 0; i < characterMgr.GetStockMaidCount(); i++)
  2818. {
  2819. Maid stockMaid = characterMgr.GetStockMaid(i);
  2820. if (stockMaid != null && stockMaid.status.leader)
  2821. {
  2822. characterMgr.SetActiveMaid(stockMaid, f_nActiveSlotNo);
  2823. stockMaid.Visible = true;
  2824. result = this.SetMaidAllPropSeqWait(stockMaid);
  2825. break;
  2826. }
  2827. }
  2828. return result;
  2829. }
  2830. public bool TagManPresetMenuLoad(KagTagSupport tag_data)
  2831. {
  2832. int nManNo = 0;
  2833. if (tag_data.IsValid("man"))
  2834. {
  2835. nManNo = tag_data.GetTagProperty("man").AsInteger();
  2836. }
  2837. CharacterMgr characterMgr = GameMain.Instance.CharacterMgr;
  2838. Maid man = characterMgr.GetMan(nManNo);
  2839. if (man != null)
  2840. {
  2841. man.SetUpModel(tag_data.GetTagProperty("file").AsString());
  2842. }
  2843. return false;
  2844. }
  2845. public bool TagCharaDeactivate(KagTagSupport tag_data)
  2846. {
  2847. int num = 0;
  2848. bool flag = false;
  2849. if (tag_data.IsValid("maid"))
  2850. {
  2851. num = tag_data.GetTagProperty("maid").AsInteger();
  2852. }
  2853. else if (tag_data.IsValid("man"))
  2854. {
  2855. flag = true;
  2856. num = tag_data.GetTagProperty("man").AsInteger();
  2857. if (this.script_mgr_.compatibilityMode && 6 <= num)
  2858. {
  2859. num = 5;
  2860. }
  2861. }
  2862. else
  2863. {
  2864. NDebug.Assert("@CharaDeactivate error.", false);
  2865. }
  2866. ScriptManager scriptMgr = GameMain.Instance.ScriptMgr;
  2867. scriptMgr.ClearForcExecWaitEvent();
  2868. foreach (KeyValuePair<int, MotionKagManager> keyValuePair in scriptMgr.kag_mot_dic)
  2869. {
  2870. if (!flag)
  2871. {
  2872. if (keyValuePair.Value.main_maid != null && keyValuePair.Value.main_maid == GameMain.Instance.CharacterMgr.GetMaid(num))
  2873. {
  2874. keyValuePair.Value.ClearMotion();
  2875. keyValuePair.Value.enabled = false;
  2876. }
  2877. }
  2878. else if (!scriptMgr.compatibilityMode)
  2879. {
  2880. Maid man = GameMain.Instance.CharacterMgr.GetMan(num);
  2881. if (man != null && man.body0 != null)
  2882. {
  2883. man.body0.SetChinkoVisible(true);
  2884. }
  2885. if (keyValuePair.Value.main_man != null && keyValuePair.Value.main_man == man)
  2886. {
  2887. keyValuePair.Value.ClearMotion();
  2888. keyValuePair.Value.enabled = false;
  2889. }
  2890. }
  2891. }
  2892. if (!flag)
  2893. {
  2894. GameMain.Instance.CharacterMgr.Deactivate(num, flag);
  2895. }
  2896. else
  2897. {
  2898. GameMain.Instance.CharacterMgr.CharaVisible(num, false, flag);
  2899. }
  2900. return false;
  2901. }
  2902. public bool TagCharaVisible(KagTagSupport tag_data)
  2903. {
  2904. int num = 0;
  2905. bool flag = false;
  2906. if (tag_data.IsValid("maid"))
  2907. {
  2908. num = tag_data.GetTagProperty("maid").AsInteger();
  2909. }
  2910. else if (tag_data.IsValid("man"))
  2911. {
  2912. flag = true;
  2913. num = tag_data.GetTagProperty("man").AsInteger();
  2914. if (this.script_mgr_.compatibilityMode && 6 <= num)
  2915. {
  2916. num = 5;
  2917. }
  2918. }
  2919. else
  2920. {
  2921. NDebug.Assert("@charavisible error.", false);
  2922. }
  2923. bool flag2 = tag_data.IsValid("true");
  2924. Maid maid = GameMain.Instance.CharacterMgr.CharaVisible(num, flag2, flag);
  2925. if (maid == null && this.script_mgr_.compatibilityMode)
  2926. {
  2927. return false;
  2928. }
  2929. NDebug.Assert(maid != null, string.Concat(new object[]
  2930. {
  2931. "@charavisibleエラー。指定の",
  2932. (!flag) ? "メイド" : "男",
  2933. "はいません。スロット番号",
  2934. num
  2935. }));
  2936. if (!this.script_mgr_.compatibilityMode && maid != null && maid.body0 != null && flag && !flag2)
  2937. {
  2938. maid.body0.SetChinkoVisible(true);
  2939. }
  2940. bool result = false;
  2941. if (flag2 && maid != null)
  2942. {
  2943. result = this.SetMaidAllPropSeqWait(maid);
  2944. }
  2945. return result;
  2946. }
  2947. public bool TagCharaVisibleAllOff(KagTagSupport tag_data)
  2948. {
  2949. bool flag = tag_data.IsValid("man");
  2950. bool flag2 = false;
  2951. CharacterMgr characterMgr = GameMain.Instance.CharacterMgr;
  2952. if (!flag)
  2953. {
  2954. for (int i = 0; i < characterMgr.GetMaidCount(); i++)
  2955. {
  2956. if (characterMgr.GetMaid(i) != null)
  2957. {
  2958. characterMgr.CharaVisible(i, flag2, flag);
  2959. }
  2960. }
  2961. }
  2962. else
  2963. {
  2964. for (int j = 0; j < characterMgr.GetManCount(); j++)
  2965. {
  2966. Maid man = characterMgr.GetMan(j);
  2967. if (man != null)
  2968. {
  2969. if (!flag2 && man.body0 != null)
  2970. {
  2971. man.body0.SetChinkoVisible(true);
  2972. }
  2973. characterMgr.CharaVisible(j, flag2, flag);
  2974. }
  2975. }
  2976. }
  2977. return false;
  2978. }
  2979. public bool TagTexMulAdd(KagTagSupport tag_data)
  2980. {
  2981. this.CheckAbsolutelyNecessaryTag(tag_data, "layer", new string[]
  2982. {
  2983. "x",
  2984. "y",
  2985. "r",
  2986. "s"
  2987. });
  2988. Maid maid = this.GetMaidAndMan(tag_data);
  2989. if (maid == null)
  2990. {
  2991. return false;
  2992. }
  2993. Func<string, string> func = delegate(string ran_str)
  2994. {
  2995. string[] array5 = ran_str.Split(new char[]
  2996. {
  2997. ':'
  2998. });
  2999. return array5[UnityEngine.Random.Range(0, array5.Length)];
  3000. };
  3001. string slot = "body";
  3002. if (tag_data.IsValid("slot"))
  3003. {
  3004. slot = tag_data.GetTagProperty("slot").AsString();
  3005. }
  3006. int matno = 0;
  3007. if (tag_data.IsValid("matno"))
  3008. {
  3009. matno = tag_data.GetTagProperty("matno").AsInteger();
  3010. }
  3011. string propname = "_MainTex";
  3012. if (tag_data.IsValid("propname"))
  3013. {
  3014. propname = tag_data.GetTagProperty("propname").AsString();
  3015. }
  3016. int layer = tag_data.GetTagProperty("layer").AsInteger();
  3017. string file = string.Empty;
  3018. if (tag_data.IsValid("file"))
  3019. {
  3020. file = tag_data.GetTagProperty("file").AsString();
  3021. }
  3022. else if (tag_data.IsValid("res"))
  3023. {
  3024. file = tag_data.GetTagProperty("res").AsString();
  3025. }
  3026. NDebug.Assert(!string.IsNullOrEmpty(file), "@texmuladd [file] or [res] error.");
  3027. file = func(file);
  3028. if (tag_data.IsValid("res"))
  3029. {
  3030. file = "res:" + file;
  3031. }
  3032. string text = tag_data.GetTagProperty("x").AsString();
  3033. string[] array = text.Split(new char[]
  3034. {
  3035. ':'
  3036. });
  3037. NDebug.Assert(array.Length == 2, "@texmuladd [x] error.");
  3038. int x = UnityEngine.Random.Range(int.Parse(array[0]), int.Parse(array[1]) + 1);
  3039. string text2 = tag_data.GetTagProperty("y").AsString();
  3040. string[] array2 = text2.Split(new char[]
  3041. {
  3042. ':'
  3043. });
  3044. NDebug.Assert(array2.Length == 2, "@texmuladd [y] error.");
  3045. int y = UnityEngine.Random.Range(int.Parse(array2[0]), int.Parse(array2[1]) + 1);
  3046. string text3 = tag_data.GetTagProperty("r").AsString();
  3047. string[] array3 = text3.Split(new char[]
  3048. {
  3049. ':'
  3050. });
  3051. NDebug.Assert(array3.Length == 2, "@texmuladd [r] error.");
  3052. float r = (float)UnityEngine.Random.Range((int)(float.Parse(array3[0]) * 100f), (int)(float.Parse(array3[1]) * 100f + 1f)) / 100f;
  3053. string text4 = tag_data.GetTagProperty("s").AsString();
  3054. string[] array4 = text4.Split(new char[]
  3055. {
  3056. ':'
  3057. });
  3058. NDebug.Assert(array4.Length == 2, "@texmuladd [s] error.");
  3059. float s = (float)UnityEngine.Random.Range((int)(float.Parse(array4[0]) * 100f), (int)(float.Parse(array4[1]) * 100f + 1f)) / 100f;
  3060. int num = 0;
  3061. if (tag_data.IsValid("delay"))
  3062. {
  3063. num = tag_data.GetTagProperty("delay").AsInteger();
  3064. }
  3065. WaitEventList waitEventList = this.GetWaitEventList("tex_mul_add");
  3066. if (num <= 0)
  3067. {
  3068. this.ExecForcWaitEvent();
  3069. if (maid != null && maid.body0 != null && maid.body0.isLoadedBody)
  3070. {
  3071. maid.body0.MulTexSet(slot, matno, propname, layer, file, GameUty.SystemMaterial.Alpha, true, x, y, r, s, false, null, 1f, 1024);
  3072. if (propname == "_MainTex")
  3073. {
  3074. maid.body0.MulTexSet(slot, matno, "_ShadowTex", layer, file, GameUty.SystemMaterial.Alpha, true, x, y, r, s, false, null, 1f, 1024);
  3075. }
  3076. maid.body0.MulTexProc(slot);
  3077. }
  3078. }
  3079. else
  3080. {
  3081. waitEventList.Add(delegate
  3082. {
  3083. if (maid != null && maid.body0 != null && maid.body0.isLoadedBody)
  3084. {
  3085. maid.body0.MulTexSet(slot, matno, propname, layer, file, GameUty.SystemMaterial.Alpha, true, x, y, r, s, false, null, 1f, 1024);
  3086. if (propname == "_MainTex")
  3087. {
  3088. maid.body0.MulTexSet(slot, matno, "_ShadowTex", layer, file, GameUty.SystemMaterial.Alpha, true, x, y, r, s, false, null, 1f, 1024);
  3089. }
  3090. maid.body0.MulTexProc(slot);
  3091. }
  3092. }, num);
  3093. }
  3094. return false;
  3095. }
  3096. public bool TagTexMulDel(KagTagSupport tag_data)
  3097. {
  3098. Maid maidAndMan = this.GetMaidAndMan(tag_data);
  3099. if (maidAndMan == null)
  3100. {
  3101. return false;
  3102. }
  3103. int f_nMatNo = 0;
  3104. if (tag_data.IsValid("matno"))
  3105. {
  3106. f_nMatNo = tag_data.GetTagProperty("matno").AsInteger();
  3107. }
  3108. string text = "_MainTex";
  3109. if (tag_data.IsValid("propname"))
  3110. {
  3111. text = tag_data.GetTagProperty("propname").AsString();
  3112. }
  3113. string text2 = "body";
  3114. if (tag_data.IsValid("slot"))
  3115. {
  3116. text2 = tag_data.GetTagProperty("slot").AsString();
  3117. }
  3118. this.script_mgr_.ClearForcExecWaitEvent();
  3119. string text3 = "10:20";
  3120. if (tag_data.IsValid("layer"))
  3121. {
  3122. text3 = tag_data.GetTagProperty("layer").AsString();
  3123. }
  3124. int num = 10;
  3125. int num2 = 20;
  3126. string[] array = text3.Split(new char[]
  3127. {
  3128. ':'
  3129. });
  3130. if (array.Length == 2)
  3131. {
  3132. num = int.Parse(array[0].Trim());
  3133. num2 = int.Parse(array[1].Trim());
  3134. }
  3135. else if (array.Length == 1)
  3136. {
  3137. num2 = (num = int.Parse(array[0].Trim()));
  3138. }
  3139. for (int i = num; i <= num2; i++)
  3140. {
  3141. maidAndMan.body0.MulTexRemove(text2, f_nMatNo, text, i);
  3142. if (text == "_MainTex")
  3143. {
  3144. maidAndMan.body0.MulTexRemove(text2, f_nMatNo, "_ShadowTex", i);
  3145. }
  3146. }
  3147. maidAndMan.Visible = true;
  3148. maidAndMan.body0.MulTexProc(text2);
  3149. return false;
  3150. }
  3151. public bool TagStartDay(KagTagSupport tag_data)
  3152. {
  3153. GameMain.Instance.OnStartDay();
  3154. return false;
  3155. }
  3156. public bool TagEndDay(KagTagSupport tag_data)
  3157. {
  3158. GameMain.Instance.OnEndDay();
  3159. return false;
  3160. }
  3161. public bool TagScheduleStartManage(KagTagSupport tag_data)
  3162. {
  3163. ScheduleAPI.DayStartManage();
  3164. return false;
  3165. }
  3166. public bool TagConUpdateMaidPoint(KagTagSupport tag_data)
  3167. {
  3168. return false;
  3169. }
  3170. public bool TagVRBGChangeInit(KagTagSupport tag_data)
  3171. {
  3172. SceneVRCommunication.Instance.KagBGChangeInit(tag_data.GetTagList());
  3173. return false;
  3174. }
  3175. public bool TagVREventObj(KagTagSupport tag_data)
  3176. {
  3177. string f_strName = tag_data.GetTagProperty("name").AsString();
  3178. int f_nVisible = 0;
  3179. if (tag_data.IsValid("visible"))
  3180. {
  3181. f_nVisible = ((!tag_data.GetTagProperty("visible").AsBool()) ? 2 : 1);
  3182. }
  3183. int f_nTrigger = 0;
  3184. if (tag_data.IsValid("trigger"))
  3185. {
  3186. f_nTrigger = ((!tag_data.GetTagProperty("trigger").AsBool()) ? 2 : 1);
  3187. }
  3188. int f_nGrab = 0;
  3189. if (tag_data.IsValid("grab"))
  3190. {
  3191. f_nGrab = ((!tag_data.GetTagProperty("grab").AsBool()) ? 2 : 1);
  3192. }
  3193. string f_strAnimation = string.Empty;
  3194. if (tag_data.IsValid("animation"))
  3195. {
  3196. f_strAnimation = tag_data.GetTagProperty("animation").AsString();
  3197. }
  3198. SceneVRCommunication.Instance.KagEventObj(f_strName, f_nVisible, f_nTrigger, f_nGrab, f_strAnimation);
  3199. return false;
  3200. }
  3201. public bool TagVREventGroup(KagTagSupport tag_data)
  3202. {
  3203. string f_strName = tag_data.GetTagProperty("name").AsString();
  3204. int f_nVisible = 0;
  3205. if (tag_data.IsValid("visible"))
  3206. {
  3207. f_nVisible = ((!tag_data.GetTagProperty("visible").AsBool()) ? 2 : 1);
  3208. }
  3209. int f_nTrigger = 0;
  3210. if (tag_data.IsValid("trigger"))
  3211. {
  3212. f_nTrigger = ((!tag_data.GetTagProperty("trigger").AsBool()) ? 2 : 1);
  3213. }
  3214. int f_nGrab = 0;
  3215. if (tag_data.IsValid("grab"))
  3216. {
  3217. f_nGrab = ((!tag_data.GetTagProperty("grab").AsBool()) ? 2 : 1);
  3218. }
  3219. SceneVRCommunication.Instance.KagEventObjGroup(f_strName, f_nVisible, f_nTrigger, f_nGrab);
  3220. return false;
  3221. }
  3222. public bool TagVRFreeScene(KagTagSupport tag_data)
  3223. {
  3224. if (tag_data.IsValid("start"))
  3225. {
  3226. SceneVRCommunication.Instance.kagFreeSceneSwitch(true, true, false);
  3227. }
  3228. else if (tag_data.IsValid("end"))
  3229. {
  3230. bool f_bEnableSkip = !tag_data.IsValid("noskip");
  3231. SceneVRCommunication.Instance.kagFreeSceneSwitch(false, f_bEnableSkip, false);
  3232. }
  3233. return false;
  3234. }
  3235. public bool TagVRCamera(KagTagSupport tag_data)
  3236. {
  3237. float num = 0f;
  3238. bool flag = false;
  3239. float x = tag_data.GetTagProperty("x").AsReal();
  3240. float z = tag_data.GetTagProperty("z").AsReal();
  3241. if (tag_data.IsValid("height"))
  3242. {
  3243. num = tag_data.GetTagProperty("height").AsReal();
  3244. }
  3245. else if (tag_data.IsValid("stand"))
  3246. {
  3247. num = GameMain.Instance.CMSystem.VRCameraHeightStandOffs;
  3248. }
  3249. else if (tag_data.IsValid("sit"))
  3250. {
  3251. num = GameMain.Instance.CMSystem.VRCameraHeightSitOffs;
  3252. flag = true;
  3253. }
  3254. bool f_bYFromFloor = true;
  3255. if (tag_data.IsValid("nofloor"))
  3256. {
  3257. f_bYFromFloor = false;
  3258. if (flag)
  3259. {
  3260. num += 0.4f;
  3261. }
  3262. }
  3263. GameMain.Instance.MainCamera.SetRealHeadPos(new Vector3(x, num, z), f_bYFromFloor);
  3264. if (tag_data.IsValid("angle"))
  3265. {
  3266. float y = tag_data.GetTagProperty("angle").AsReal();
  3267. GameMain.Instance.MainCamera.SetRealHeadRot(new Vector3(0f, y, 0f), true);
  3268. }
  3269. return false;
  3270. }
  3271. public bool TagVRTablet(KagTagSupport tag_data)
  3272. {
  3273. if (tag_data.IsValid("show"))
  3274. {
  3275. GameMain.Instance.OvrMgr.OvrCamera.ShowUI(true);
  3276. }
  3277. else if (tag_data.IsValid("hide"))
  3278. {
  3279. GameMain.Instance.OvrMgr.OvrCamera.ShowUI(false);
  3280. }
  3281. if (tag_data.IsValid("reset"))
  3282. {
  3283. float f_fOffsetRotY = 0f;
  3284. if (tag_data.IsValid("rot"))
  3285. {
  3286. f_fOffsetRotY = tag_data.GetTagProperty("rot").AsReal();
  3287. }
  3288. GameMain.Instance.OvrMgr.OvrCamera.UIPosReset(f_fOffsetRotY);
  3289. }
  3290. if (tag_data.IsValid("nomove"))
  3291. {
  3292. bool uiNoMoveMode = tag_data.GetTagProperty("nomove").AsBool();
  3293. SceneVRCommunication.Instance.UiNoMoveMode = uiNoMoveMode;
  3294. }
  3295. if (tag_data.IsValid("nohome"))
  3296. {
  3297. bool uiNoHomeMode = tag_data.GetTagProperty("nohome").AsBool();
  3298. SceneVRCommunication.Instance.UiNoHomeMode = uiNoHomeMode;
  3299. }
  3300. if (tag_data.IsValid("notime"))
  3301. {
  3302. bool uiNoTimeMode = tag_data.GetTagProperty("notime").AsBool();
  3303. SceneVRCommunication.Instance.UiNoTimeMode = uiNoTimeMode;
  3304. }
  3305. return false;
  3306. }
  3307. public bool TagVRChoicesSet(KagTagSupport tag_data)
  3308. {
  3309. int f_nMaidNo = -1;
  3310. VRChoices.SelectPair.Type f_type = VRChoices.SelectPair.Type.Text;
  3311. string f_strRegionSplitOfColon = string.Empty;
  3312. this.CheckAbsolutelyNecessaryTag(tag_data, "text", new string[]
  3313. {
  3314. "label"
  3315. });
  3316. string text = tag_data.GetTagProperty("text").AsString();
  3317. text = ScriptManager.ReplaceCharaName(text);
  3318. string f_strLabel = tag_data.GetTagProperty("label").AsString();
  3319. if (tag_data.IsValid("maid"))
  3320. {
  3321. f_nMaidNo = tag_data.GetTagProperty("maid").AsInteger();
  3322. }
  3323. if (tag_data.IsValid("type"))
  3324. {
  3325. string text2 = tag_data.GetTagProperty("type").AsString();
  3326. if (text2 == "touch")
  3327. {
  3328. f_type = VRChoices.SelectPair.Type.Touch;
  3329. }
  3330. else if (text2 == "look")
  3331. {
  3332. f_type = VRChoices.SelectPair.Type.Look;
  3333. }
  3334. else
  3335. {
  3336. NDebug.Assert("typeに不正な文字列 " + text2, false);
  3337. }
  3338. }
  3339. float f_fTimeOut = -1f;
  3340. if (tag_data.IsValid("time"))
  3341. {
  3342. f_fTimeOut = tag_data.GetTagProperty("time").AsReal();
  3343. }
  3344. if (tag_data.IsValid("region"))
  3345. {
  3346. f_strRegionSplitOfColon = tag_data.GetTagProperty("region").AsString();
  3347. }
  3348. SceneVRCommunication.Instance.Choices.Add(text, f_strLabel, f_nMaidNo, f_type, f_strRegionSplitOfColon, f_fTimeOut);
  3349. return false;
  3350. }
  3351. public bool TagVRChoicesShow(KagTagSupport tag_data)
  3352. {
  3353. if (tag_data.IsValid("end"))
  3354. {
  3355. SceneVRCommunication.Instance.Choices.Finalize(null);
  3356. return false;
  3357. }
  3358. int f_nTimeOutMS = 0;
  3359. string f_strTimeOutLabel = string.Empty;
  3360. int f_nRandom = 0;
  3361. if (tag_data.IsValid("timeout"))
  3362. {
  3363. f_nTimeOutMS = tag_data.GetTagProperty("timeout").AsInteger();
  3364. }
  3365. if (tag_data.IsValid("timeoutlabel"))
  3366. {
  3367. f_strTimeOutLabel = tag_data.GetTagProperty("timeoutlabel").AsString();
  3368. }
  3369. if (tag_data.IsValid("random"))
  3370. {
  3371. f_nRandom = tag_data.GetTagProperty("random").AsInteger();
  3372. }
  3373. SceneVRCommunication.Instance.Choices.Show(f_nTimeOutMS, f_strTimeOutLabel, f_nRandom);
  3374. return true;
  3375. }
  3376. public bool TagVRChoicesShowNonStop(KagTagSupport tag_data)
  3377. {
  3378. if (tag_data.IsValid("end"))
  3379. {
  3380. SceneVRCommunication.Instance.Choices.Finalize(null);
  3381. return false;
  3382. }
  3383. int f_nTimeOutMS = 0;
  3384. string f_strTimeOutLabel = string.Empty;
  3385. int f_nRandom = 0;
  3386. if (tag_data.IsValid("timeout"))
  3387. {
  3388. f_nTimeOutMS = tag_data.GetTagProperty("timeout").AsInteger();
  3389. }
  3390. if (tag_data.IsValid("timeoutlabel"))
  3391. {
  3392. f_strTimeOutLabel = tag_data.GetTagProperty("timeoutlabel").AsString();
  3393. }
  3394. if (tag_data.IsValid("random"))
  3395. {
  3396. f_nRandom = tag_data.GetTagProperty("random").AsInteger();
  3397. }
  3398. SceneVRCommunication.Instance.Choices.Show(f_nTimeOutMS, f_strTimeOutLabel, f_nRandom);
  3399. return false;
  3400. }
  3401. public bool TagVRDoNextTime(KagTagSupport tag_data)
  3402. {
  3403. SceneVRCommunication.Instance.KagDoNextTime();
  3404. return false;
  3405. }
  3406. public bool TagVRResetHeadPos(KagTagSupport tag_data)
  3407. {
  3408. GameMain.Instance.OvrMgr.OvrCamera.ReCallcOffset();
  3409. return false;
  3410. }
  3411. public bool TagVRTouchScript(KagTagSupport tag_data)
  3412. {
  3413. SceneVRCommunication.Instance.TouchComm.Touch_Operator(tag_data);
  3414. return false;
  3415. }
  3416. public bool TagVRDayTimeShow(KagTagSupport tag_data)
  3417. {
  3418. string f_strReturnFile = string.Empty;
  3419. string f_strReturnLabel = string.Empty;
  3420. if (tag_data.IsValid("file"))
  3421. {
  3422. f_strReturnFile = tag_data.GetTagProperty("file").AsString();
  3423. }
  3424. if (tag_data.IsValid("label"))
  3425. {
  3426. f_strReturnLabel = tag_data.GetTagProperty("label").AsString();
  3427. }
  3428. SceneVRCommunication.Instance.KagStartDayTimeShow(f_strReturnFile, f_strReturnLabel);
  3429. return false;
  3430. }
  3431. public bool TagVRDialog(KagTagSupport tag_data)
  3432. {
  3433. string text = string.Empty;
  3434. string f_strLabelOk = string.Empty;
  3435. string f_strLabelCancel = string.Empty;
  3436. string f_strLabelYes = string.Empty;
  3437. string strLabelNo = string.Empty;
  3438. if (tag_data.IsValid("text"))
  3439. {
  3440. text = tag_data.GetTagProperty("text").AsString();
  3441. text = ScriptManager.ReplaceCharaName(text);
  3442. }
  3443. if (tag_data.IsValid("ok"))
  3444. {
  3445. f_strLabelOk = tag_data.GetTagProperty("ok").AsString();
  3446. }
  3447. if (tag_data.IsValid("cancel"))
  3448. {
  3449. f_strLabelCancel = tag_data.GetTagProperty("cancel").AsString();
  3450. }
  3451. if (tag_data.IsValid("yes"))
  3452. {
  3453. f_strLabelYes = tag_data.GetTagProperty("yes").AsString();
  3454. }
  3455. if (tag_data.IsValid("no"))
  3456. {
  3457. strLabelNo = tag_data.GetTagProperty("no").AsString();
  3458. }
  3459. SceneVRCommunication.Instance.KagDialog(text, f_strLabelOk, f_strLabelCancel, f_strLabelYes, strLabelNo);
  3460. return true;
  3461. }
  3462. public bool TagVRStartMovieMusicPlayerTV(KagTagSupport tag_data)
  3463. {
  3464. SceneVRCommunication.Instance.KagStartMovieMusicPlayerTV();
  3465. return false;
  3466. }
  3467. public bool TagVRMovieTV(KagTagSupport tag_data)
  3468. {
  3469. string f_strFileName = string.Empty;
  3470. bool f_bLoop = false;
  3471. bool f_bStart = tag_data.IsValid("start");
  3472. if (tag_data.IsValid("file"))
  3473. {
  3474. f_strFileName = tag_data.GetTagProperty("file").AsString();
  3475. }
  3476. if (tag_data.IsValid("loop"))
  3477. {
  3478. f_bLoop = tag_data.IsValid("loop");
  3479. }
  3480. SceneVRCommunication.Instance.KagVRMovieTV(f_bStart, f_strFileName, f_bLoop);
  3481. return false;
  3482. }
  3483. public bool TagVRPlantWindowShow(KagTagSupport tag_data)
  3484. {
  3485. string strFileName = string.Empty;
  3486. string strLabelOK = string.Empty;
  3487. string strLabelCancel = string.Empty;
  3488. if (tag_data.IsValid("file"))
  3489. {
  3490. strFileName = tag_data.GetTagProperty("file").AsString();
  3491. }
  3492. if (tag_data.IsValid("ok"))
  3493. {
  3494. strLabelOK = tag_data.GetTagProperty("ok").AsString();
  3495. }
  3496. if (tag_data.IsValid("cancel"))
  3497. {
  3498. strLabelCancel = tag_data.GetTagProperty("cancel").AsString();
  3499. }
  3500. SceneVRCommunication.Instance.KagPlantWindowShow(strFileName, strLabelOK, strLabelCancel);
  3501. return false;
  3502. }
  3503. public bool TagVRPlantUpdate(KagTagSupport tag_data)
  3504. {
  3505. SceneVRCommunication.Instance.KagPlantUpdate();
  3506. return false;
  3507. }
  3508. public bool TagVRTutorialStart(KagTagSupport tag_data)
  3509. {
  3510. string f_strReturnLabel = string.Empty;
  3511. if (tag_data.IsValid("end"))
  3512. {
  3513. f_strReturnLabel = tag_data.GetTagProperty("end").AsString();
  3514. }
  3515. SceneVRCommunication.Instance.KagTutorialStart(f_strReturnLabel);
  3516. return true;
  3517. }
  3518. public bool TagVRPhotoModeStart(KagTagSupport tag_data)
  3519. {
  3520. bool f_bStart = true;
  3521. if (tag_data.IsValid("start"))
  3522. {
  3523. f_bStart = true;
  3524. }
  3525. else if (tag_data.IsValid("end"))
  3526. {
  3527. f_bStart = false;
  3528. }
  3529. GameMain.Instance.OvrMgr.OvrCamera.ChangeToCameraMode(f_bStart);
  3530. return false;
  3531. }
  3532. public bool TagVRNoChangeBG(KagTagSupport tag_data)
  3533. {
  3534. bool f_bStart = true;
  3535. if (tag_data.IsValid("start"))
  3536. {
  3537. f_bStart = true;
  3538. }
  3539. else if (tag_data.IsValid("end"))
  3540. {
  3541. f_bStart = false;
  3542. }
  3543. SceneVRCommunication.Instance.KagVRNoChangeBG(f_bStart);
  3544. return false;
  3545. }
  3546. public bool TagVRCamToManHead(KagTagSupport tag_data)
  3547. {
  3548. float f_fTime = 1f;
  3549. if (tag_data.IsValid("time"))
  3550. {
  3551. f_fTime = (float)tag_data.GetTagProperty("time").AsInteger() / 1000f;
  3552. }
  3553. GameMain.Instance.OvrMgr.OvrCamera.PosToManHead(f_fTime);
  3554. return false;
  3555. }
  3556. public bool TagVRTrophyText(KagTagSupport tag_data)
  3557. {
  3558. string f_strText = string.Empty;
  3559. if (tag_data.IsValid("text"))
  3560. {
  3561. f_strText = tag_data.GetTagProperty("text").AsString();
  3562. }
  3563. SceneVRCommunication.Instance.KagVRTrophyGet(f_strText);
  3564. return false;
  3565. }
  3566. public bool TagVRRentalMaidSelectStart(KagTagSupport tag_data)
  3567. {
  3568. SceneVRCommunication.Instance.KagRentalMaidSelectStart();
  3569. return true;
  3570. }
  3571. public bool TagVRTouchUseSelect(KagTagSupport tag_data)
  3572. {
  3573. string f_strReturnLabel = string.Empty;
  3574. if (tag_data.IsValid("end"))
  3575. {
  3576. f_strReturnLabel = tag_data.GetTagProperty("end").AsString();
  3577. }
  3578. SceneVRCommunication.Instance.KagTouchUseSelect(f_strReturnLabel);
  3579. return true;
  3580. }
  3581. public bool TagVRHintShow(KagTagSupport tag_data)
  3582. {
  3583. string f_strHintMsg = string.Empty;
  3584. if (tag_data.IsValid("text"))
  3585. {
  3586. f_strHintMsg = tag_data.GetTagProperty("text").AsString();
  3587. }
  3588. SceneVRCommunication.Instance.KagHintShow(f_strHintMsg);
  3589. return false;
  3590. }
  3591. public bool TagVRKaraokeWindowShow(KagTagSupport tag_data)
  3592. {
  3593. string f_strReturnFile = string.Empty;
  3594. string f_strReturnLabel = string.Empty;
  3595. if (tag_data.IsValid("cancel_file"))
  3596. {
  3597. f_strReturnFile = tag_data.GetTagProperty("cancel_file").AsString();
  3598. }
  3599. if (tag_data.IsValid("cancel_label"))
  3600. {
  3601. f_strReturnLabel = tag_data.GetTagProperty("cancel_label").AsString();
  3602. }
  3603. SceneVRCommunication.Instance.KagKaraokeWindowShow(f_strReturnFile, f_strReturnLabel);
  3604. return false;
  3605. }
  3606. public bool TagDanceResultStart(KagTagSupport tag_data)
  3607. {
  3608. Result_Display.StartDisplay(tag_data.GetTagProperty("label").AsString());
  3609. return false;
  3610. }
  3611. public bool TagSetDanceType(KagTagSupport tag_data)
  3612. {
  3613. if (!tag_data.IsValid("dancetype"))
  3614. {
  3615. return false;
  3616. }
  3617. string value = tag_data.GetTagProperty("dancetype").AsString();
  3618. RhythmAction_Mgr.SetDanceType((RhythmAction_Mgr.DanceType)Enum.Parse(typeof(RhythmAction_Mgr.DanceType), value));
  3619. return false;
  3620. }
  3621. public bool TagCutinTexShoot(KagTagSupport tag_data)
  3622. {
  3623. string cut_name = string.Empty;
  3624. string label = string.Empty;
  3625. if (tag_data.IsValid("cut"))
  3626. {
  3627. cut_name = tag_data.GetTagProperty("cut").AsString();
  3628. }
  3629. if (tag_data.IsValid("label"))
  3630. {
  3631. label = tag_data.GetTagProperty("label").AsString();
  3632. }
  3633. ShootCutInTex.CutInTexShoot(cut_name, label);
  3634. return false;
  3635. }
  3636. public bool TagBattleCutInStart(KagTagSupport tag_data)
  3637. {
  3638. string end_label = string.Empty;
  3639. if (tag_data.IsValid("label"))
  3640. {
  3641. end_label = tag_data.GetTagProperty("label").AsString();
  3642. }
  3643. ConfrontCutIn.CutInStart(end_label);
  3644. return false;
  3645. }
  3646. public bool TagMotionCheckStart(KagTagSupport tag_data)
  3647. {
  3648. MotionAction_Mgr.ResponceStart(tag_data);
  3649. return false;
  3650. }
  3651. public bool TagSetMcSkip(KagTagSupport tag_data)
  3652. {
  3653. if (tag_data.IsValid("end"))
  3654. {
  3655. McSkip.SkipRelease();
  3656. }
  3657. else if (tag_data.IsValid("label"))
  3658. {
  3659. McSkip.SkipWait(tag_data.GetTagProperty("label").AsString());
  3660. }
  3661. return false;
  3662. }
  3663. public bool TagAddedEventDisplay(KagTagSupport tag_data)
  3664. {
  3665. string label = string.Empty;
  3666. if (tag_data.IsValid("label"))
  3667. {
  3668. label = tag_data.GetTagProperty("label").AsString();
  3669. }
  3670. else
  3671. {
  3672. Debug.LogError("タグ関数.eventrelease:Labelが指定されてません");
  3673. }
  3674. GameMain.Instance.ScenarioSelectMgr.AddedDisplay(label);
  3675. return false;
  3676. }
  3677. public bool TagTutorialStart(KagTagSupport tag_data)
  3678. {
  3679. this.CheckAbsolutelyNecessaryTag(tag_data, "name", new string[0]);
  3680. string sceneName = tag_data.GetTagProperty("name").AsString();
  3681. string returnLabelName = string.Empty;
  3682. if (tag_data.IsValid("end"))
  3683. {
  3684. returnLabelName = tag_data.GetTagProperty("end").AsString();
  3685. }
  3686. bool absoluteCall = tag_data.IsValid("absolute");
  3687. if (uGUITutorialPanel.IsOpened())
  3688. {
  3689. uGUITutorialPanel.CloseTutorial(true, false);
  3690. }
  3691. uGUITutorialPanel.OpenTutorial(sceneName, delegate
  3692. {
  3693. if (!string.IsNullOrEmpty(returnLabelName))
  3694. {
  3695. GameMain.Instance.ScriptMgr.adv_kag.JumpLabel(returnLabelName);
  3696. }
  3697. GameMain.Instance.ScriptMgr.adv_kag.Exec();
  3698. }, absoluteCall);
  3699. return true;
  3700. }
  3701. protected virtual void PlayMaidMotion(Maid maid, string fn, bool additive = false, bool loop = false, bool boAddQue = false, float val = 0.5f)
  3702. {
  3703. if (!GameMain.Instance.ScriptMgr.is_motion_blend)
  3704. {
  3705. val = 0f;
  3706. }
  3707. maid.CrossFade(fn, this.script_mgr_.file_system, additive, loop, boAddQue, val, 1f);
  3708. }
  3709. protected virtual void PlayMaidMotionAbs(Maid maid, string fn, bool additive = false, bool loop = false, bool boAddQue = false, float val = 0.5f)
  3710. {
  3711. if (!GameMain.Instance.ScriptMgr.is_motion_blend)
  3712. {
  3713. val = 0f;
  3714. }
  3715. maid.CrossFadeAbsolute(fn, this.script_mgr_.file_system, additive, loop, boAddQue, val, 1f);
  3716. }
  3717. public static Maid GetVoiceTargetMaid(KagTagSupport tag_data)
  3718. {
  3719. Maid maid = null;
  3720. CharacterMgr characterMgr = GameMain.Instance.CharacterMgr;
  3721. if (tag_data.IsValid("maid"))
  3722. {
  3723. maid = characterMgr.GetMaid(int.Parse(tag_data.GetTagProperty("maid").AsString()));
  3724. }
  3725. else if (tag_data.IsValid("name") || tag_data.IsValid("real"))
  3726. {
  3727. string text = string.Empty;
  3728. if (tag_data.IsValid("real"))
  3729. {
  3730. text = tag_data.GetTagProperty("real").AsString().Trim();
  3731. }
  3732. else
  3733. {
  3734. text = tag_data.GetTagProperty("name").AsString().Trim();
  3735. }
  3736. if (tag_data.IsValid("real") && text == "フリー" && GameMain.Instance.ScriptMgr.compatibilityMode)
  3737. {
  3738. text = "[HF16]";
  3739. }
  3740. if (text.IndexOf("[HF") == 0)
  3741. {
  3742. string text2 = text.Replace("[HF", string.Empty).Replace("]", string.Empty);
  3743. if (string.IsNullOrEmpty(text2))
  3744. {
  3745. text2 = "0";
  3746. }
  3747. int nMaidNo = int.Parse(text2);
  3748. maid = characterMgr.GetMaid(nMaidNo);
  3749. }
  3750. else
  3751. {
  3752. for (int i = 0; i < characterMgr.GetMaidCount(); i++)
  3753. {
  3754. Maid maid2 = characterMgr.GetMaid(i);
  3755. if (maid2 != null && maid2.boNPC && maid2.status.firstName == text)
  3756. {
  3757. maid = maid2;
  3758. break;
  3759. }
  3760. }
  3761. }
  3762. if (maid == null)
  3763. {
  3764. Debug.LogWarning("ボイス再生対象のメイドを特定できませんでした");
  3765. }
  3766. }
  3767. return maid;
  3768. }
  3769. public Maid GetMaidAndMan(string tag_str)
  3770. {
  3771. int num = 0;
  3772. tag_str = tag_str.ToLower();
  3773. int num2 = tag_str.IndexOf(':');
  3774. if (num2 != -1)
  3775. {
  3776. string[] array = tag_str.Split(new char[]
  3777. {
  3778. ':'
  3779. });
  3780. NDebug.Assert(array.Length == 2, tag_str + "\nメイド,もしくは男の指定が不正です");
  3781. num = int.Parse(array[1]);
  3782. tag_str = array[0];
  3783. }
  3784. if (tag_str == "maid")
  3785. {
  3786. return this.GetMaid(num);
  3787. }
  3788. if (tag_str == "man")
  3789. {
  3790. return this.GetMan(num);
  3791. }
  3792. NDebug.Assert(tag_str + "\nメイド,もしくは男の指定が不正です", false);
  3793. return null;
  3794. }
  3795. public Maid GetMaidAndMan(KagTagSupport tag_data)
  3796. {
  3797. int num = 0;
  3798. bool flag = false;
  3799. if (tag_data.IsValid("maid"))
  3800. {
  3801. num = tag_data.GetTagProperty("maid").AsInteger();
  3802. }
  3803. else if (tag_data.IsValid("man"))
  3804. {
  3805. flag = true;
  3806. num = tag_data.GetTagProperty("man").AsInteger();
  3807. if (this.script_mgr_.compatibilityMode && 6 <= num)
  3808. {
  3809. num = 5;
  3810. }
  3811. }
  3812. else
  3813. {
  3814. NDebug.Assert("スクリプトのman/maid指定が不正です。", false);
  3815. }
  3816. return flag ? this.GetMan(num) : this.GetMaid(num);
  3817. }
  3818. public virtual Maid GetMaid(int maid_no)
  3819. {
  3820. return GameMain.Instance.CharacterMgr.GetMaid(maid_no);
  3821. }
  3822. public virtual Maid GetMan(int man_no)
  3823. {
  3824. return GameMain.Instance.CharacterMgr.GetMan(man_no);
  3825. }
  3826. protected WaitEventList GetWaitEventList(string list_name)
  3827. {
  3828. if (!this.wait_event_list_.ContainsKey(list_name))
  3829. {
  3830. this.wait_event_list_.Add(list_name, new WaitEventList());
  3831. }
  3832. return this.wait_event_list_[list_name];
  3833. }
  3834. public void CheckAbsolutelyNecessaryTag(KagTagSupport tag_data, string tag_name, params string[] check_tag)
  3835. {
  3836. for (int i = 0; i < check_tag.Length; i++)
  3837. {
  3838. NDebug.Assert(tag_data.IsValid(check_tag[i]), string.Concat(new string[]
  3839. {
  3840. "@",
  3841. tag_name,
  3842. "\n必須タグ[",
  3843. check_tag[i],
  3844. "]が指定されていません"
  3845. }));
  3846. }
  3847. }
  3848. protected bool SetWait(int time, bool skip_possible)
  3849. {
  3850. this.SetExecWait(time, skip_possible);
  3851. return true;
  3852. }
  3853. public void ExecForcWaitEvent()
  3854. {
  3855. WaitEventList waitEventList = this.GetWaitEventList("tex_mul_add");
  3856. if (waitEventList.list == null || waitEventList.list.Count == 0)
  3857. {
  3858. return;
  3859. }
  3860. for (int i = 0; i < waitEventList.list.Count; i++)
  3861. {
  3862. waitEventList.list[i].call_back_delegate();
  3863. }
  3864. waitEventList.Clear();
  3865. }
  3866. public void ClearForcExecWaitEvent()
  3867. {
  3868. WaitEventList waitEventList = this.GetWaitEventList("tex_mul_add");
  3869. if (waitEventList.list == null || waitEventList.list.Count == 0)
  3870. {
  3871. return;
  3872. }
  3873. waitEventList.Clear();
  3874. }
  3875. public void Dispose()
  3876. {
  3877. this.Dispose(true);
  3878. GC.SuppressFinalize(this);
  3879. }
  3880. protected void Dispose(bool is_release_managed_code)
  3881. {
  3882. if (this.is_disposed_)
  3883. {
  3884. return;
  3885. }
  3886. this.wait_event_list_.Clear();
  3887. this.kag_.Dispose();
  3888. this.kag_ = null;
  3889. this.script_mgr_ = null;
  3890. this.is_disposed_ = true;
  3891. }
  3892. public KagScript kag
  3893. {
  3894. get
  3895. {
  3896. return this.kag_;
  3897. }
  3898. }
  3899. protected bool exec_wait_enabled
  3900. {
  3901. get
  3902. {
  3903. return this.exec_wait_data_.use;
  3904. }
  3905. }
  3906. protected bool IsFadeProc()
  3907. {
  3908. return GameMain.Instance.MainCamera.IsFadeProc() || GameMain.Instance.MainCamera.IsFadeProcNoUI();
  3909. }
  3910. private void OnScenarioLoadEvent(string file_name, string label_name)
  3911. {
  3912. }
  3913. public virtual string GetKagClassName()
  3914. {
  3915. return "ベースkag";
  3916. }
  3917. private string ReplaceFileNameCallBack(string file_name)
  3918. {
  3919. Maid maid = this.GetMaid(0);
  3920. if (maid == null)
  3921. {
  3922. return file_name;
  3923. }
  3924. int maidCount = GameMain.Instance.CharacterMgr.GetMaidCount();
  3925. Maid[] array = new Maid[maidCount];
  3926. for (int i = 0; i < maidCount; i++)
  3927. {
  3928. array[i] = this.GetMaid(i);
  3929. }
  3930. return ScriptManager.ReplacePersonal(array, file_name);
  3931. }
  3932. public void Serialize(BinaryWriter binary)
  3933. {
  3934. binary.Write("CM3D2_KAG");
  3935. binary.Write(1150);
  3936. byte[] array = this.kag_.Serialize();
  3937. int value = array.Length;
  3938. binary.Write(value);
  3939. binary.Write(array);
  3940. binary.Write(this.fade_wait_);
  3941. binary.Write(this.enabled);
  3942. }
  3943. public void Deserialize(BinaryReader binary)
  3944. {
  3945. string a = binary.ReadString();
  3946. NDebug.Assert(a == "CM3D2_KAG", "KAGのヘッダーが不正です。");
  3947. int num = binary.ReadInt32();
  3948. int count = binary.ReadInt32();
  3949. byte[] serialize_data = binary.ReadBytes(count);
  3950. this.kag_.Deserialize(serialize_data);
  3951. this.fade_wait_ = binary.ReadBoolean();
  3952. this.enabled = binary.ReadBoolean();
  3953. this.exec_wait_data_.Clear();
  3954. this.wait_event_list_.Clear();
  3955. }
  3956. public bool enabled { get; set; }
  3957. public List<Maid> maidOffsetSetList { get; protected set; }
  3958. protected readonly TJSScript tjs_;
  3959. protected ScriptManager script_mgr_;
  3960. protected KagScript kag_;
  3961. protected bool fade_wait_;
  3962. protected BaseKagManager.ExecWaitData exec_wait_data_ = new BaseKagManager.ExecWaitData();
  3963. protected Dictionary<string, WaitEventList> wait_event_list_ = new Dictionary<string, WaitEventList>();
  3964. private bool is_disposed_;
  3965. [CompilerGenerated]
  3966. private static Comparison<Maid> <>f__mg$cache0;
  3967. [CompilerGenerated]
  3968. private static Comparison<Maid> <>f__mg$cache1;
  3969. private class PerthOffsetPosTagData
  3970. {
  3971. public static CharacterMgr.CharaPer CreateCharaPer(TJSScript tjs, KagTagSupport tag_data)
  3972. {
  3973. CharacterMgr.CharaPer charaPer = BaseKagManager.PerthOffsetPosTagData.GetCharaPer(tjs, tag_data, string.Empty);
  3974. NDebug.AssertNull(charaPer != null);
  3975. return charaPer;
  3976. }
  3977. public static List<KeyValuePair<Maid, CharacterMgr.CharaPer>> CreateMultiCharaPer(TJSScript tjs, KagTagSupport tag_data, BaseKagManager kag_mgr)
  3978. {
  3979. List<KeyValuePair<Maid, CharacterMgr.CharaPer>> list = new List<KeyValuePair<Maid, CharacterMgr.CharaPer>>();
  3980. for (int i = 0; i < GameMain.Instance.CharacterMgr.GetMaidCount(); i++)
  3981. {
  3982. CharacterMgr.CharaPer charaPer = BaseKagManager.PerthOffsetPosTagData.GetCharaPer(tjs, tag_data, "-Maid:" + i);
  3983. if (charaPer != null)
  3984. {
  3985. KeyValuePair<Maid, CharacterMgr.CharaPer> item = new KeyValuePair<Maid, CharacterMgr.CharaPer>(kag_mgr.GetMaid(i), charaPer);
  3986. list.Add(item);
  3987. }
  3988. }
  3989. return list;
  3990. }
  3991. public static KeyValuePair<CharacterMgr.CharaPer, CharacterMgr.PenisPer> CreateCharaPerAndPenisPer(TJSScript tjs, KagTagSupport tag_data)
  3992. {
  3993. CharacterMgr.CharaPer charaPer = BaseKagManager.PerthOffsetPosTagData.GetCharaPer(tjs, tag_data, string.Empty);
  3994. if (charaPer == null)
  3995. {
  3996. charaPer = new CharacterMgr.CharaPer();
  3997. }
  3998. CharacterMgr.PenisPer penisPer = BaseKagManager.PerthOffsetPosTagData.GetPenisPer(tjs, tag_data);
  3999. if (penisPer == null)
  4000. {
  4001. penisPer = new CharacterMgr.PenisPer();
  4002. }
  4003. return new KeyValuePair<CharacterMgr.CharaPer, CharacterMgr.PenisPer>(charaPer, penisPer);
  4004. }
  4005. private static CharacterMgr.CharaPer GetCharaPer(TJSScript tjs, KagTagSupport tag_data, string add_tag_string)
  4006. {
  4007. CharacterMgr.CharaPer charaPer = null;
  4008. BaseKagManager.PerthOffsetPosTagData.TagArrayData tagArrayData = BaseKagManager.PerthOffsetPosTagData.TagArrayData.Create(tjs, tag_data, "OffsDouPar" + add_tag_string);
  4009. if (tagArrayData.valid)
  4010. {
  4011. if (charaPer == null)
  4012. {
  4013. charaPer = new CharacterMgr.CharaPer();
  4014. }
  4015. tagArrayData.GetVector3(ref charaPer.vecOffsDouParGreater, ref charaPer.vecOffsDouParLess);
  4016. }
  4017. BaseKagManager.PerthOffsetPosTagData.TagArrayData.Rlease();
  4018. tagArrayData = BaseKagManager.PerthOffsetPosTagData.TagArrayData.Create(tjs, tag_data, "OffsShinCho" + add_tag_string);
  4019. if (tagArrayData.valid)
  4020. {
  4021. if (charaPer == null)
  4022. {
  4023. charaPer = new CharacterMgr.CharaPer();
  4024. }
  4025. tagArrayData.GetVector3(ref charaPer.vecOffsShinChoGreater, ref charaPer.vecOffsShinChoLess);
  4026. }
  4027. BaseKagManager.PerthOffsetPosTagData.TagArrayData.Rlease();
  4028. tagArrayData = BaseKagManager.PerthOffsetPosTagData.TagArrayData.Create(tjs, tag_data, "OffsMuneL" + add_tag_string);
  4029. if (tagArrayData.valid)
  4030. {
  4031. if (charaPer == null)
  4032. {
  4033. charaPer = new CharacterMgr.CharaPer();
  4034. }
  4035. tagArrayData.GetVector3(ref charaPer.vecOffsMuneLGreater, ref charaPer.vecOffsMuneLLess);
  4036. }
  4037. BaseKagManager.PerthOffsetPosTagData.TagArrayData.Rlease();
  4038. tagArrayData = BaseKagManager.PerthOffsetPosTagData.TagArrayData.Create(tjs, tag_data, "HaremDouPer" + add_tag_string);
  4039. if (tagArrayData.valid)
  4040. {
  4041. if (charaPer == null)
  4042. {
  4043. charaPer = new CharacterMgr.CharaPer();
  4044. }
  4045. tagArrayData.GetVector3(ref charaPer.vecHaremDouPerGreater, ref charaPer.vecHaremDouPerLess);
  4046. }
  4047. BaseKagManager.PerthOffsetPosTagData.TagArrayData.Rlease();
  4048. tagArrayData = BaseKagManager.PerthOffsetPosTagData.TagArrayData.Create(tjs, tag_data, "HaremShinCho" + add_tag_string);
  4049. if (tagArrayData.valid)
  4050. {
  4051. if (charaPer == null)
  4052. {
  4053. charaPer = new CharacterMgr.CharaPer();
  4054. }
  4055. tagArrayData.GetVector3(ref charaPer.vecHaremShinChoGreater, ref charaPer.vecHaremShinChoLess);
  4056. }
  4057. BaseKagManager.PerthOffsetPosTagData.TagArrayData.Rlease();
  4058. tagArrayData = BaseKagManager.PerthOffsetPosTagData.TagArrayData.Create(tjs, tag_data, "HaremMuneL" + add_tag_string);
  4059. if (tagArrayData.valid)
  4060. {
  4061. if (charaPer == null)
  4062. {
  4063. charaPer = new CharacterMgr.CharaPer();
  4064. }
  4065. tagArrayData.GetVector3(ref charaPer.vecHaremMuneLGreater, ref charaPer.vecHaremMuneLLess);
  4066. }
  4067. BaseKagManager.PerthOffsetPosTagData.TagArrayData.Rlease();
  4068. return charaPer;
  4069. }
  4070. private static CharacterMgr.PenisPer GetPenisPer(TJSScript tjs, KagTagSupport tag_data)
  4071. {
  4072. CharacterMgr.PenisPer penisPer = null;
  4073. BaseKagManager.PerthOffsetPosTagData.TagArrayData tagArrayData = BaseKagManager.PerthOffsetPosTagData.TagArrayData.Create(tjs, tag_data, "PenisCommonBase");
  4074. if (tagArrayData.valid)
  4075. {
  4076. if (penisPer == null)
  4077. {
  4078. penisPer = new CharacterMgr.PenisPer();
  4079. }
  4080. tagArrayData.GetVector3(ref penisPer.vecPenisCommonBase);
  4081. }
  4082. BaseKagManager.PerthOffsetPosTagData.TagArrayData.Rlease();
  4083. tagArrayData = BaseKagManager.PerthOffsetPosTagData.TagArrayData.Create(tjs, tag_data, "PenisAmend");
  4084. if (tagArrayData.valid)
  4085. {
  4086. if (penisPer == null)
  4087. {
  4088. penisPer = new CharacterMgr.PenisPer();
  4089. }
  4090. tagArrayData.GetVector3(ref penisPer.vecPenisAmend);
  4091. }
  4092. BaseKagManager.PerthOffsetPosTagData.TagArrayData.Rlease();
  4093. tagArrayData = BaseKagManager.PerthOffsetPosTagData.TagArrayData.Create(tjs, tag_data, "PenisDouPer");
  4094. if (tagArrayData.valid)
  4095. {
  4096. if (penisPer == null)
  4097. {
  4098. penisPer = new CharacterMgr.PenisPer();
  4099. }
  4100. tagArrayData.GetVector3(ref penisPer.vecPenisDouPerGreater, ref penisPer.vecPenisDouPerLess);
  4101. }
  4102. BaseKagManager.PerthOffsetPosTagData.TagArrayData.Rlease();
  4103. tagArrayData = BaseKagManager.PerthOffsetPosTagData.TagArrayData.Create(tjs, tag_data, "PenisShincho");
  4104. if (tagArrayData.valid)
  4105. {
  4106. if (penisPer == null)
  4107. {
  4108. penisPer = new CharacterMgr.PenisPer();
  4109. }
  4110. tagArrayData.GetVector3(ref penisPer.vecPenisShinchoGreater, ref penisPer.vecPenisShinchoLess);
  4111. }
  4112. BaseKagManager.PerthOffsetPosTagData.TagArrayData.Rlease();
  4113. return penisPer;
  4114. }
  4115. private class TagArrayData
  4116. {
  4117. private TagArrayData(TJSScript tjs, KagTagSupport tag_data, string tag_name)
  4118. {
  4119. this.tjs_ = tjs;
  4120. this.is_valid_ = tag_data.IsValid(tag_name);
  4121. if (this.is_valid_)
  4122. {
  4123. string eval_str = this.kTjsGlobalVarName + "=" + tag_data.GetTagProperty(tag_name).AsString();
  4124. this.tjs_.EvalScript(eval_str);
  4125. TJSVariant tjsvariant = new TJSVariant();
  4126. this.tjs_.EvalScript(this.kTjsGlobalVarName + ".count", tjsvariant);
  4127. this.array_count_ = tjsvariant.AsInteger();
  4128. tjsvariant.Dispose();
  4129. NDebug.Assert(this.array_count_ == 3 || this.array_count_ == 6, tag_name + "の指定数が不正です(6 or 7 only)");
  4130. }
  4131. }
  4132. public static BaseKagManager.PerthOffsetPosTagData.TagArrayData Create(TJSScript tjs, KagTagSupport tag_data, string tag_name)
  4133. {
  4134. NDebug.Assert(BaseKagManager.PerthOffsetPosTagData.TagArrayData.instans_data_ == null, "TagArrayDataインスタンスの重複");
  4135. tag_name = tag_name.ToLower();
  4136. BaseKagManager.PerthOffsetPosTagData.TagArrayData.instans_data_ = new BaseKagManager.PerthOffsetPosTagData.TagArrayData(tjs, tag_data, tag_name);
  4137. return BaseKagManager.PerthOffsetPosTagData.TagArrayData.instans_data_;
  4138. }
  4139. public static void Rlease()
  4140. {
  4141. if (BaseKagManager.PerthOffsetPosTagData.TagArrayData.instans_data_ == null)
  4142. {
  4143. return;
  4144. }
  4145. BaseKagManager.PerthOffsetPosTagData.TagArrayData.instans_data_.tjs_.EvalScript(BaseKagManager.PerthOffsetPosTagData.TagArrayData.instans_data_.kTjsGlobalVarName + " = void");
  4146. BaseKagManager.PerthOffsetPosTagData.TagArrayData.instans_data_ = null;
  4147. }
  4148. public void GetVector3(ref Vector3 dest)
  4149. {
  4150. if (!this.is_valid_)
  4151. {
  4152. return;
  4153. }
  4154. NDebug.Assert(this.array_count_ == 3, "Vector3*2の要素に対してVector3を1つのみ作成しようとしています");
  4155. using (TJSVariant tjsvariant = new TJSVariant())
  4156. {
  4157. this.tjs_.EvalScript(this.kTjsGlobalVarName + "[0]", tjsvariant);
  4158. dest.x = tjsvariant.AsReal();
  4159. this.tjs_.EvalScript(this.kTjsGlobalVarName + "[1]", tjsvariant);
  4160. dest.y = tjsvariant.AsReal();
  4161. this.tjs_.EvalScript(this.kTjsGlobalVarName + "[2]", tjsvariant);
  4162. dest.z = tjsvariant.AsReal();
  4163. }
  4164. }
  4165. public void GetVector3(ref Vector3 first_dest, ref Vector3 second_dest)
  4166. {
  4167. if (!this.is_valid_)
  4168. {
  4169. return;
  4170. }
  4171. NDebug.Assert(this.array_count_ == 6, "要素xyzのみに対してVector3を2つ作成しようとしています");
  4172. using (TJSVariant tjsvariant = new TJSVariant())
  4173. {
  4174. this.tjs_.EvalScript(this.kTjsGlobalVarName + "[0]", tjsvariant);
  4175. first_dest.x = tjsvariant.AsReal();
  4176. this.tjs_.EvalScript(this.kTjsGlobalVarName + "[1]", tjsvariant);
  4177. first_dest.y = tjsvariant.AsReal();
  4178. this.tjs_.EvalScript(this.kTjsGlobalVarName + "[2]", tjsvariant);
  4179. first_dest.z = tjsvariant.AsReal();
  4180. this.tjs_.EvalScript(this.kTjsGlobalVarName + "[3]", tjsvariant);
  4181. second_dest.x = tjsvariant.AsReal();
  4182. this.tjs_.EvalScript(this.kTjsGlobalVarName + "[4]", tjsvariant);
  4183. second_dest.y = tjsvariant.AsReal();
  4184. this.tjs_.EvalScript(this.kTjsGlobalVarName + "[5]", tjsvariant);
  4185. second_dest.z = tjsvariant.AsReal();
  4186. }
  4187. }
  4188. public int vecotr_element_count
  4189. {
  4190. get
  4191. {
  4192. return (this.array_count_ != 3) ? 2 : 1;
  4193. }
  4194. }
  4195. public int count
  4196. {
  4197. get
  4198. {
  4199. return this.array_count_;
  4200. }
  4201. }
  4202. public bool valid
  4203. {
  4204. get
  4205. {
  4206. return this.is_valid_;
  4207. }
  4208. }
  4209. private string kTjsGlobalVarName = "global.__tmp_array";
  4210. private static BaseKagManager.PerthOffsetPosTagData.TagArrayData instans_data_;
  4211. private TJSScript tjs_;
  4212. private bool is_valid_;
  4213. private int array_count_;
  4214. }
  4215. }
  4216. protected class ExecWaitData
  4217. {
  4218. public virtual bool Check()
  4219. {
  4220. return !this.use || this.wait_time <= GameMain.tick_count - this.start_tick_count;
  4221. }
  4222. public virtual void Clear()
  4223. {
  4224. this.start_tick_count = (this.wait_time = 0);
  4225. this.use = false;
  4226. this.skip_possible = true;
  4227. }
  4228. public int start_tick_count;
  4229. public int wait_time;
  4230. public bool skip_possible;
  4231. public bool use;
  4232. }
  4233. protected class MaidPropSeqWaitData : BaseKagManager.ExecWaitData
  4234. {
  4235. public override bool Check()
  4236. {
  4237. return !this.use || this.maid == null || !this.maid.IsBusy;
  4238. }
  4239. public override void Clear()
  4240. {
  4241. base.Clear();
  4242. this.maid = null;
  4243. }
  4244. public Maid maid;
  4245. }
  4246. protected class MaidVoiceWaitData : BaseKagManager.ExecWaitData
  4247. {
  4248. public override bool Check()
  4249. {
  4250. if (!this.use || this.maid == null)
  4251. {
  4252. return true;
  4253. }
  4254. AudioSourceMgr audioMan = this.maid.AudioMan;
  4255. return audioMan == null || !audioMan.isPlay();
  4256. }
  4257. public override void Clear()
  4258. {
  4259. base.Clear();
  4260. this.maid = null;
  4261. }
  4262. public Maid maid;
  4263. }
  4264. protected class DummyVoiceWaitData : BaseKagManager.ExecWaitData
  4265. {
  4266. public override bool Check()
  4267. {
  4268. return !this.use || !GameMain.Instance.SoundMgr.IsPlayDummyVoice();
  4269. }
  4270. public override void Clear()
  4271. {
  4272. base.Clear();
  4273. }
  4274. }
  4275. }