123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329330331332333334335336337338339340341342343344345346347348349350351352353354355356357358359360361362363364365366367368369370371372373374375376377378379380381382383384385386387388389390391392393394395396397398399400401402403404405406407408409410411412413414415416417418419420421422423424425426427428429430431432433434435436437438439440441442443444445446447448449450451452453454455456457458459460461462463464465466467468469470471472473474475476477478479480481482483484485486487488489490491492493494495496497498499500501502503504505506507508509510511512513514515516517518519520521522523524525526527528529530531532533534535536537538539540541542543544545546547548549550551552553554555556557558559560561562563564565566567568569570571572573574575576577578579580581582583584585586587588589590591592593594595596597598599600601602603604605606607608609610611612613614615616617618619620621622623624625626627628629630631632633634635636637638639640641642643644645646647648649650651652653654655656657658659660661662663664665666667668669670671672673674675676677678679680681682683684685686687688689690691692693694695696697698699700701702703704705706707708709710711712713714715716717718719720721722723724725726727728729730731732733734735736737738739740741742743744745746747748749750751752753754755756757758759760761762763764765766767768769770771772773774775776777778779780781782783784785786787788789790791792793794795796797798799800801802803804805806807808809810811812813814815816817818819820821822823824825826827828829830831832833834835836837838839840841842843844845846847848849850851852853854855856857858859860861862863864865866867868869870871872873874875876877878879880881882883884885886887888889890891892893894895896897898899900901902903904905906907908909910911912913914915916917918919920921922923924925926927928929930931932933934935936937938939940941942943944945946947948949950951952953954955956957958959960961962963964965966967968969970971972973974975976977978979980981982983984985986987988989990991992993994995996997998999100010011002100310041005100610071008100910101011101210131014101510161017101810191020102110221023102410251026102710281029103010311032103310341035103610371038103910401041104210431044104510461047104810491050105110521053105410551056105710581059106010611062106310641065106610671068106910701071107210731074107510761077107810791080108110821083108410851086108710881089109010911092109310941095109610971098109911001101110211031104110511061107110811091110111111121113111411151116111711181119112011211122112311241125112611271128112911301131113211331134113511361137113811391140114111421143114411451146114711481149115011511152115311541155115611571158115911601161116211631164116511661167116811691170117111721173117411751176117711781179118011811182118311841185118611871188118911901191119211931194119511961197119811991200120112021203120412051206120712081209121012111212121312141215121612171218121912201221122212231224122512261227122812291230123112321233123412351236123712381239124012411242124312441245124612471248124912501251125212531254125512561257125812591260126112621263126412651266126712681269127012711272127312741275127612771278127912801281128212831284128512861287128812891290129112921293129412951296129712981299130013011302130313041305130613071308130913101311131213131314131513161317131813191320132113221323132413251326132713281329133013311332133313341335133613371338133913401341134213431344134513461347134813491350135113521353135413551356135713581359136013611362136313641365136613671368136913701371137213731374137513761377137813791380138113821383138413851386138713881389139013911392139313941395139613971398139914001401140214031404140514061407140814091410141114121413141414151416141714181419142014211422142314241425142614271428142914301431143214331434143514361437143814391440144114421443144414451446144714481449145014511452145314541455145614571458145914601461146214631464146514661467146814691470147114721473147414751476147714781479148014811482148314841485148614871488148914901491149214931494149514961497149814991500150115021503150415051506150715081509151015111512151315141515151615171518151915201521152215231524152515261527152815291530153115321533153415351536153715381539154015411542154315441545154615471548154915501551155215531554155515561557155815591560156115621563156415651566156715681569157015711572157315741575157615771578157915801581158215831584158515861587158815891590159115921593159415951596159715981599160016011602160316041605160616071608160916101611161216131614161516161617161816191620162116221623162416251626162716281629163016311632163316341635163616371638163916401641164216431644164516461647164816491650165116521653165416551656165716581659166016611662166316641665166616671668166916701671167216731674167516761677167816791680168116821683168416851686168716881689169016911692169316941695169616971698169917001701170217031704170517061707170817091710171117121713171417151716171717181719172017211722172317241725172617271728172917301731173217331734173517361737173817391740174117421743174417451746174717481749175017511752175317541755175617571758175917601761176217631764176517661767176817691770177117721773177417751776177717781779178017811782178317841785178617871788178917901791179217931794179517961797179817991800180118021803180418051806180718081809181018111812181318141815181618171818181918201821182218231824182518261827182818291830183118321833183418351836183718381839184018411842184318441845184618471848184918501851185218531854185518561857185818591860186118621863186418651866186718681869187018711872187318741875187618771878187918801881188218831884188518861887188818891890189118921893189418951896189718981899190019011902190319041905190619071908190919101911191219131914191519161917191819191920192119221923192419251926192719281929193019311932193319341935193619371938193919401941194219431944194519461947194819491950195119521953195419551956195719581959196019611962196319641965196619671968196919701971197219731974197519761977197819791980198119821983198419851986198719881989199019911992199319941995199619971998199920002001200220032004200520062007200820092010201120122013201420152016201720182019202020212022202320242025202620272028202920302031203220332034203520362037203820392040204120422043204420452046204720482049205020512052205320542055205620572058205920602061206220632064206520662067206820692070207120722073207420752076207720782079208020812082208320842085208620872088208920902091209220932094209520962097209820992100210121022103210421052106210721082109211021112112211321142115211621172118211921202121212221232124212521262127212821292130213121322133213421352136213721382139214021412142214321442145214621472148214921502151215221532154215521562157215821592160216121622163216421652166216721682169217021712172217321742175217621772178217921802181218221832184218521862187218821892190219121922193219421952196219721982199220022012202220322042205220622072208220922102211221222132214221522162217221822192220222122222223222422252226222722282229223022312232223322342235223622372238223922402241224222432244224522462247224822492250225122522253225422552256225722582259226022612262226322642265226622672268226922702271227222732274227522762277227822792280228122822283228422852286228722882289229022912292229322942295229622972298229923002301230223032304230523062307230823092310231123122313231423152316231723182319232023212322232323242325232623272328232923302331233223332334233523362337233823392340234123422343234423452346234723482349235023512352235323542355235623572358235923602361236223632364236523662367236823692370237123722373237423752376237723782379238023812382238323842385238623872388238923902391239223932394239523962397239823992400240124022403240424052406240724082409241024112412241324142415241624172418241924202421242224232424242524262427242824292430243124322433243424352436243724382439244024412442244324442445244624472448244924502451245224532454245524562457245824592460246124622463246424652466246724682469247024712472247324742475247624772478247924802481248224832484248524862487248824892490249124922493249424952496249724982499250025012502250325042505250625072508250925102511251225132514251525162517251825192520252125222523252425252526252725282529253025312532253325342535253625372538253925402541254225432544254525462547254825492550255125522553255425552556255725582559256025612562256325642565256625672568256925702571257225732574257525762577257825792580258125822583258425852586258725882589259025912592259325942595259625972598259926002601260226032604260526062607260826092610261126122613261426152616261726182619262026212622262326242625262626272628262926302631263226332634263526362637263826392640264126422643264426452646264726482649265026512652265326542655265626572658265926602661266226632664266526662667266826692670267126722673267426752676267726782679268026812682268326842685268626872688268926902691269226932694269526962697269826992700270127022703270427052706270727082709271027112712271327142715271627172718271927202721272227232724272527262727272827292730273127322733273427352736273727382739274027412742274327442745274627472748274927502751275227532754275527562757275827592760276127622763276427652766276727682769277027712772277327742775277627772778277927802781278227832784278527862787278827892790279127922793279427952796279727982799280028012802280328042805280628072808280928102811281228132814281528162817281828192820282128222823282428252826282728282829283028312832283328342835283628372838283928402841284228432844284528462847284828492850285128522853285428552856285728582859286028612862286328642865286628672868286928702871287228732874287528762877287828792880288128822883288428852886288728882889289028912892289328942895289628972898289929002901290229032904290529062907290829092910291129122913291429152916291729182919292029212922292329242925292629272928292929302931293229332934293529362937293829392940294129422943294429452946294729482949295029512952295329542955295629572958295929602961296229632964296529662967296829692970297129722973297429752976297729782979298029812982298329842985298629872988298929902991299229932994299529962997299829993000300130023003300430053006300730083009301030113012301330143015301630173018301930203021302230233024302530263027302830293030303130323033303430353036303730383039304030413042304330443045304630473048304930503051305230533054305530563057305830593060306130623063306430653066306730683069307030713072307330743075307630773078307930803081308230833084308530863087308830893090309130923093309430953096309730983099310031013102310331043105310631073108310931103111311231133114311531163117311831193120312131223123312431253126312731283129313031313132313331343135313631373138313931403141314231433144314531463147314831493150315131523153315431553156315731583159316031613162316331643165316631673168316931703171317231733174317531763177317831793180318131823183318431853186318731883189319031913192319331943195319631973198319932003201320232033204320532063207320832093210321132123213321432153216321732183219322032213222322332243225322632273228322932303231323232333234323532363237323832393240324132423243324432453246324732483249325032513252325332543255325632573258325932603261326232633264326532663267326832693270327132723273327432753276327732783279328032813282328332843285328632873288328932903291329232933294329532963297329832993300330133023303330433053306330733083309331033113312331333143315331633173318331933203321332233233324332533263327332833293330333133323333333433353336333733383339334033413342334333443345334633473348334933503351335233533354335533563357335833593360336133623363336433653366336733683369337033713372337333743375337633773378337933803381338233833384338533863387338833893390339133923393339433953396339733983399340034013402340334043405340634073408340934103411341234133414341534163417341834193420342134223423342434253426342734283429343034313432343334343435343634373438343934403441344234433444344534463447344834493450345134523453345434553456345734583459346034613462346334643465346634673468346934703471347234733474347534763477347834793480348134823483348434853486348734883489349034913492349334943495349634973498349935003501350235033504350535063507350835093510351135123513351435153516351735183519352035213522352335243525352635273528352935303531353235333534353535363537353835393540354135423543354435453546354735483549355035513552355335543555355635573558355935603561356235633564356535663567356835693570357135723573357435753576357735783579358035813582358335843585358635873588358935903591359235933594359535963597359835993600360136023603360436053606360736083609361036113612361336143615361636173618361936203621362236233624362536263627362836293630363136323633363436353636363736383639364036413642364336443645364636473648364936503651365236533654365536563657365836593660366136623663366436653666366736683669367036713672367336743675367636773678367936803681368236833684368536863687368836893690369136923693369436953696369736983699370037013702370337043705370637073708370937103711371237133714371537163717371837193720372137223723372437253726372737283729373037313732373337343735373637373738373937403741374237433744374537463747374837493750375137523753375437553756375737583759376037613762376337643765376637673768376937703771377237733774377537763777377837793780378137823783378437853786378737883789379037913792379337943795379637973798379938003801380238033804380538063807380838093810381138123813381438153816381738183819382038213822382338243825382638273828382938303831383238333834383538363837383838393840384138423843384438453846384738483849385038513852385338543855385638573858385938603861386238633864386538663867386838693870387138723873387438753876387738783879388038813882388338843885388638873888388938903891389238933894389538963897389838993900390139023903390439053906390739083909391039113912391339143915391639173918391939203921392239233924392539263927392839293930393139323933393439353936393739383939394039413942394339443945394639473948394939503951395239533954395539563957395839593960396139623963396439653966396739683969397039713972397339743975397639773978397939803981398239833984398539863987398839893990399139923993399439953996399739983999400040014002400340044005400640074008400940104011401240134014401540164017401840194020402140224023402440254026402740284029403040314032403340344035403640374038403940404041404240434044404540464047404840494050405140524053405440554056405740584059406040614062406340644065406640674068406940704071407240734074407540764077407840794080408140824083408440854086408740884089409040914092409340944095409640974098409941004101410241034104410541064107410841094110411141124113411441154116411741184119412041214122412341244125412641274128412941304131413241334134413541364137413841394140414141424143414441454146414741484149415041514152415341544155415641574158415941604161416241634164416541664167416841694170417141724173417441754176417741784179418041814182418341844185418641874188418941904191419241934194419541964197419841994200420142024203420442054206420742084209421042114212421342144215421642174218421942204221422242234224422542264227422842294230423142324233423442354236423742384239424042414242424342444245424642474248424942504251425242534254425542564257425842594260426142624263426442654266426742684269427042714272427342744275427642774278427942804281428242834284428542864287428842894290429142924293429442954296429742984299430043014302430343044305430643074308430943104311431243134314431543164317431843194320432143224323432443254326432743284329433043314332433343344335433643374338433943404341434243434344434543464347434843494350435143524353435443554356435743584359436043614362436343644365436643674368436943704371437243734374437543764377437843794380438143824383438443854386438743884389439043914392439343944395439643974398439944004401440244034404440544064407440844094410441144124413441444154416441744184419442044214422442344244425442644274428442944304431443244334434443544364437443844394440444144424443444444454446444744484449445044514452445344544455445644574458445944604461446244634464446544664467446844694470447144724473447444754476447744784479448044814482448344844485448644874488448944904491449244934494449544964497449844994500450145024503450445054506450745084509451045114512451345144515451645174518451945204521452245234524452545264527452845294530453145324533453445354536453745384539454045414542454345444545454645474548454945504551455245534554455545564557455845594560456145624563456445654566456745684569457045714572457345744575457645774578457945804581458245834584458545864587458845894590459145924593459445954596459745984599460046014602460346044605460646074608460946104611461246134614461546164617461846194620462146224623462446254626462746284629463046314632463346344635463646374638463946404641464246434644464546464647464846494650465146524653465446554656465746584659466046614662466346644665466646674668466946704671467246734674467546764677467846794680468146824683468446854686468746884689469046914692469346944695469646974698469947004701470247034704470547064707470847094710471147124713471447154716471747184719472047214722472347244725472647274728472947304731473247334734473547364737473847394740474147424743474447454746474747484749475047514752475347544755475647574758475947604761476247634764476547664767476847694770477147724773477447754776477747784779478047814782478347844785478647874788478947904791479247934794479547964797479847994800480148024803480448054806480748084809481048114812481348144815481648174818481948204821482248234824482548264827482848294830483148324833483448354836483748384839484048414842484348444845484648474848484948504851485248534854485548564857485848594860486148624863486448654866486748684869487048714872487348744875487648774878487948804881488248834884488548864887488848894890489148924893489448954896489748984899490049014902490349044905490649074908490949104911491249134914491549164917491849194920492149224923492449254926492749284929493049314932493349344935493649374938493949404941494249434944494549464947494849494950495149524953495449554956495749584959496049614962496349644965496649674968496949704971497249734974497549764977497849794980498149824983498449854986498749884989499049914992499349944995499649974998499950005001500250035004500550065007500850095010501150125013501450155016501750185019502050215022502350245025502650275028502950305031503250335034503550365037503850395040504150425043504450455046504750485049505050515052505350545055505650575058505950605061506250635064506550665067506850695070507150725073507450755076507750785079508050815082508350845085508650875088508950905091509250935094509550965097509850995100510151025103510451055106510751085109511051115112511351145115511651175118511951205121512251235124512551265127512851295130513151325133513451355136513751385139514051415142514351445145514651475148514951505151515251535154515551565157515851595160516151625163516451655166516751685169517051715172517351745175517651775178517951805181518251835184518551865187518851895190519151925193519451955196519751985199520052015202520352045205520652075208520952105211521252135214521552165217521852195220522152225223522452255226522752285229523052315232523352345235523652375238523952405241524252435244524552465247524852495250525152525253525452555256525752585259526052615262526352645265526652675268526952705271527252735274527552765277527852795280528152825283528452855286528752885289529052915292529352945295529652975298529953005301530253035304530553065307530853095310531153125313531453155316531753185319532053215322532353245325532653275328532953305331533253335334533553365337533853395340534153425343534453455346534753485349535053515352535353545355535653575358535953605361536253635364536553665367536853695370537153725373537453755376537753785379538053815382538353845385538653875388538953905391539253935394539553965397539853995400540154025403540454055406540754085409541054115412541354145415541654175418541954205421542254235424542554265427542854295430543154325433543454355436543754385439544054415442544354445445544654475448544954505451545254535454545554565457545854595460546154625463546454655466546754685469547054715472547354745475547654775478547954805481548254835484548554865487548854895490549154925493549454955496549754985499550055015502550355045505550655075508550955105511551255135514551555165517551855195520552155225523552455255526552755285529553055315532553355345535553655375538553955405541554255435544554555465547554855495550555155525553555455555556555755585559556055615562556355645565556655675568556955705571557255735574557555765577557855795580558155825583558455855586558755885589559055915592559355945595559655975598559956005601560256035604560556065607560856095610561156125613561456155616561756185619562056215622562356245625562656275628562956305631563256335634563556365637563856395640564156425643564456455646564756485649565056515652565356545655565656575658565956605661566256635664566556665667566856695670567156725673567456755676567756785679568056815682568356845685568656875688568956905691569256935694569556965697569856995700570157025703570457055706570757085709571057115712571357145715571657175718571957205721572257235724572557265727572857295730573157325733573457355736573757385739574057415742574357445745574657475748574957505751575257535754575557565757575857595760576157625763576457655766576757685769577057715772577357745775577657775778577957805781578257835784578557865787578857895790579157925793579457955796579757985799580058015802580358045805580658075808580958105811581258135814581558165817581858195820582158225823582458255826582758285829583058315832583358345835583658375838583958405841584258435844584558465847584858495850585158525853585458555856585758585859586058615862586358645865586658675868586958705871587258735874587558765877587858795880588158825883588458855886588758885889589058915892589358945895589658975898589959005901590259035904590559065907590859095910591159125913591459155916 |
- using System;
- using System.Collections.Generic;
- using System.IO;
- using System.Runtime.CompilerServices;
- using MaidStatus;
- using Schedule;
- using script;
- using UnityEngine;
- using wf;
- public class BaseKagManager : IDisposable
- {
- public BaseKagManager(TJSScript tjs, ScriptManager script_mgr)
- {
- NDebug.AssertNull(tjs != null);
- this.maidOffsetSetList = new List<Maid>();
- this.tjs_ = tjs;
- this.script_mgr_ = script_mgr;
- this.kag_ = new KagScript(this.tjs_);
- this.kag_.SetReplaceEvent(new KagScript.ReplaceCallBack(this.ReplaceFileNameCallBack));
- this.kag_.onScenarioLoadEventList.Add(new KagScript.OnScenarioLoadCallBack(this.OnScenarioLoadEvent));
- this.exec_wait_data_.Clear();
- }
- ~BaseKagManager()
- {
- this.Dispose(false);
- }
- public virtual void Initialize()
- {
- this.kag_.AddTagCallBack("wait", new KagScript.KagTagCallBack(this.TagWait));
- this.kag_.AddTagCallBack("face", new KagScript.KagTagCallBack(this.TagFace));
- this.kag_.AddTagCallBack("faceblend", new KagScript.KagTagCallBack(this.TagFaceBlend));
- this.kag_.AddTagCallBack("faceblend2", new KagScript.KagTagCallBack(this.TagFaceBlend2));
- this.kag_.AddTagCallBack("startkuchipakupattern", new KagScript.KagTagCallBack(this.TagStartKuchipakuPattern));
- this.kag_.AddTagCallBack("stopkuchipakupattern", new KagScript.KagTagCallBack(this.TagStopKuchipakuPattern));
- this.kag_.AddTagCallBack("motion", new KagScript.KagTagCallBack(this.TagMotion));
- this.kag_.AddTagCallBack("motionnext", new KagScript.KagTagCallBack(this.TagMotionNext));
- this.kag_.AddTagCallBack("motionnextabs", new KagScript.KagTagCallBack(this.TagMotionNextAbs));
- this.kag_.AddTagCallBack("motionstop", new KagScript.KagTagCallBack(this.TagMotionStop));
- this.kag_.AddTagCallBack("motionlayerstop", new KagScript.KagTagCallBack(this.TagMotionLayerStop));
- this.kag_.AddTagCallBack("motionautotwist", new KagScript.KagTagCallBack(this.TagMotionAutoTwist));
- this.kag_.AddTagCallBack("motionblendenabled", new KagScript.KagTagCallBack(this.TagMotionBlendEnabled));
- this.kag_.AddTagCallBack("motionscript", new KagScript.KagTagCallBack(this.TagMotionScript));
- this.kag_.AddTagCallBack("itemanime", new KagScript.KagTagCallBack(this.TagItemAnime));
- this.kag_.AddTagCallBack("hairphisics", new KagScript.KagTagCallBack(this.TagHairPhisics));
- this.kag_.AddTagCallBack("bustmove", new KagScript.KagTagCallBack(this.TagBustMove));
- this.kag_.AddTagCallBack("phisicshit", new KagScript.KagTagCallBack(this.TagPhisicsHit));
- this.kag_.AddTagCallBack("ikattachpoint", new KagScript.KagTagCallBack(this.TagIKAttachPoint));
- this.kag_.AddTagCallBack("ikattachbone", new KagScript.KagTagCallBack(this.TagIKAttachBone));
- this.kag_.AddTagCallBack("ikdetach", new KagScript.KagTagCallBack(this.TagIKDetach));
- this.kag_.AddTagCallBack("allikdetach", new KagScript.KagTagCallBack(this.TagAllIKDetach));
- this.kag_.AddTagCallBack("ikattachodogu", new KagScript.KagTagCallBack(this.TagIKAttachOdogu));
- this.kag_.AddTagCallBack("ikattachikbone", new KagScript.KagTagCallBack(this.TagIKAttachIKBone));
- this.kag_.AddTagCallBack("iksetbodypos", new KagScript.KagTagCallBack(this.TagIKSetBodyPos));
- this.kag_.AddTagCallBack("ikcheckthrough", new KagScript.KagTagCallBack(this.TagIKCheckThrough));
- this.kag_.AddTagCallBack("ikbendbonectrl", new KagScript.KagTagCallBack(this.TagIKBendBoneCtrl));
- this.kag_.AddTagCallBack("nextikflag", new KagScript.KagTagCallBack(this.TagNextIKFlag));
- this.kag_.AddTagCallBack("ikattachpointnext", new KagScript.KagTagCallBack(this.TagIKAttachPointNext));
- this.kag_.AddTagCallBack("ikattachbonenext", new KagScript.KagTagCallBack(this.TagIKAttachBoneNext));
- this.kag_.AddTagCallBack("ikattachodogunext", new KagScript.KagTagCallBack(this.TagIKAttachOdoguNext));
- this.kag_.AddTagCallBack("ikattachikbonenext", new KagScript.KagTagCallBack(this.TagIKAttachIKBoneNext));
- this.kag_.AddTagCallBack("iksetpelvispull", new KagScript.KagTagCallBack(this.TagIKSetPelvisPull));
- this.kag_.AddTagCallBack("allpos", new KagScript.KagTagCallBack(this.TagAllPos));
- this.kag_.AddTagCallBack("alloffset", new KagScript.KagTagCallBack(this.TagAllOffSet));
- this.kag_.AddTagCallBack("addalloffset", new KagScript.KagTagCallBack(this.TagAddAllOffset));
- this.kag_.AddTagCallBack("offset", new KagScript.KagTagCallBack(this.TagOffSet));
- this.kag_.AddTagCallBack("rotatelink", new KagScript.KagTagCallBack(this.TagRotatelink));
- this.kag_.AddTagCallBack("allresetpos", new KagScript.KagTagCallBack(this.TagAllResetPos));
- this.kag_.AddTagCallBack("transform", new KagScript.KagTagCallBack(this.TagTransform));
- this.kag_.AddTagCallBack("position", new KagScript.KagTagCallBack(this.TagPosition));
- this.kag_.AddTagCallBack("rotation", new KagScript.KagTagCallBack(this.TagRotation));
- this.kag_.AddTagCallBack("camera", new KagScript.KagTagCallBack(this.TagCamera));
- this.kag_.AddTagCallBack("camerachase", new KagScript.KagTagCallBack(this.TagCameraChase));
- this.kag_.AddTagCallBack("camerachasestop", new KagScript.KagTagCallBack(this.TagCameraChaseStop));
- this.kag_.AddTagCallBack("cameraanimationstart", new KagScript.KagTagCallBack(this.TagCameraAnimationStart));
- this.kag_.AddTagCallBack("cameracontrol", new KagScript.KagTagCallBack(this.TagCameraControl));
- this.kag_.AddTagCallBack("lightmain", new KagScript.KagTagCallBack(this.TagLightMain));
- this.kag_.AddTagCallBack("playbgm", new KagScript.KagTagCallBack(this.TagPlayBgm));
- this.kag_.AddTagCallBack("stopbgm", new KagScript.KagTagCallBack(this.TagStopBgm));
- this.kag_.AddTagCallBack("playenv", new KagScript.KagTagCallBack(this.TagPlayEnv));
- this.kag_.AddTagCallBack("stopenv", new KagScript.KagTagCallBack(this.TagStopEnv));
- this.kag_.AddTagCallBack("playse", new KagScript.KagTagCallBack(this.TagPlaySe));
- this.kag_.AddTagCallBack("stopse", new KagScript.KagTagCallBack(this.TagStopSe));
- this.kag_.AddTagCallBack("playvoice", new KagScript.KagTagCallBack(this.TagPlayVoice));
- this.kag_.AddTagCallBack("stopvoice", new KagScript.KagTagCallBack(this.TagStopVoice));
- this.kag_.AddTagCallBack("stopsound", new KagScript.KagTagCallBack(this.TagStopSound));
- this.kag_.AddTagCallBack("fade3d", new KagScript.KagTagCallBack(this.TagFade3D));
- this.kag_.AddTagCallBack("setbg", new KagScript.KagTagCallBack(this.TagSetBg));
- this.kag_.AddTagCallBack("draw2dtex", new KagScript.KagTagCallBack(this.TagDraw2DTex));
- this.kag_.AddTagCallBack("clear2dtex", new KagScript.KagTagCallBack(this.TagClear2DTex));
- this.kag_.AddTagCallBack("itemchange", new KagScript.KagTagCallBack(this.TagItemChange));
- this.kag_.AddTagCallBack("itemset", new KagScript.KagTagCallBack(this.TagItemSet));
- this.kag_.AddTagCallBack("itemreset", new KagScript.KagTagCallBack(this.TagItemReset));
- this.kag_.AddTagCallBack("itempos", new KagScript.KagTagCallBack(this.TagItemPos));
- this.kag_.AddTagCallBack("allprocpropseqstart", new KagScript.KagTagCallBack(this.TagAllProcPropSeqStart));
- this.kag_.AddTagCallBack("itemmask", new KagScript.KagTagCallBack(this.TagItemMask));
- this.kag_.AddTagCallBack("itemmaskmode", new KagScript.KagTagCallBack(this.TagItemMaskMode));
- this.kag_.AddTagCallBack("maidreset", new KagScript.KagTagCallBack(this.TagMaidReset));
- this.kag_.AddTagCallBack("propset", new KagScript.KagTagCallBack(this.TagPropSet));
- this.kag_.AddTagCallBack("propreset", new KagScript.KagTagCallBack(this.TagPropReset));
- this.kag_.AddTagCallBack("addprefabbg", new KagScript.KagTagCallBack(this.TagAddPrefabBg));
- this.kag_.AddTagCallBack("setprefabbgtransformdata", new KagScript.KagTagCallBack(this.TagSetPrefabBgTransformData));
- this.kag_.AddTagCallBack("delprefabbg", new KagScript.KagTagCallBack(this.TagDelPrefabBg));
- this.kag_.AddTagCallBack("delprefabbgall", new KagScript.KagTagCallBack(this.TagDelPrefabBgAll));
- this.kag_.AddTagCallBack("moveprefabtochara", new KagScript.KagTagCallBack(this.TagMovePrefabToChara));
- this.kag_.AddTagCallBack("addprefabworld", new KagScript.KagTagCallBack(this.TagAddPrefabWorld));
- this.kag_.AddTagCallBack("releaseprefab", new KagScript.KagTagCallBack(this.TagReleasePrefab));
- this.kag_.AddTagCallBack("prefabanimatorsetparam", new KagScript.KagTagCallBack(this.TagPrefabAnimatorSetParam));
- this.kag_.AddTagCallBack("chinko", new KagScript.KagTagCallBack(this.TagChinko));
- this.kag_.AddTagCallBack("chinslide", new KagScript.KagTagCallBack(this.TagChinSlide));
- this.kag_.AddTagCallBack("setloacalposition", new KagScript.KagTagCallBack(this.TagSetLoacalPosition));
- this.kag_.AddTagCallBack("addlocalposition", new KagScript.KagTagCallBack(this.TagAddLocalPosition));
- this.kag_.AddTagCallBack("openmouth", new KagScript.KagTagCallBack(this.TagOpenMouth));
- this.kag_.AddTagCallBack("eyetoposition", new KagScript.KagTagCallBack(this.TagEyeToPosition));
- this.kag_.AddTagCallBack("eyetotarget", new KagScript.KagTagCallBack(this.TagEyeToTarget));
- this.kag_.AddTagCallBack("eyetocamera", new KagScript.KagTagCallBack(this.TagEyeToCamera));
- this.kag_.AddTagCallBack("eyetoreset", new KagScript.KagTagCallBack(this.TagEyeToReset));
- this.kag_.AddTagCallBack("setmaidoffsetpos", new KagScript.KagTagCallBack(this.TagSetMaidOffsetPos));
- this.kag_.AddTagCallBack("setmaidoffsetmultipos", new KagScript.KagTagCallBack(this.TagSetMaidOffsetMultiPos));
- this.kag_.AddTagCallBack("setmanoffsetpos", new KagScript.KagTagCallBack(this.TagSetManOffsetPos));
- this.kag_.AddTagCallBack("setmaidoffsetposcategory", new KagScript.KagTagCallBack(this.TagSetMaidOffsetPosCategory));
- this.kag_.AddTagCallBack("addprefabchara", new KagScript.KagTagCallBack(this.TagAddPrefabChara));
- this.kag_.AddTagCallBack("delprefabchara", new KagScript.KagTagCallBack(this.TagDelPrefabChara));
- this.kag_.AddTagCallBack("delprefabcharaall", new KagScript.KagTagCallBack(this.TagDelPrefabCharaAll));
- this.kag_.AddTagCallBack("animobjchara", new KagScript.KagTagCallBack(this.TagAnimObjChara));
- this.kag_.AddTagCallBack("charaactivate", new KagScript.KagTagCallBack(this.TagCharaActivate));
- this.kag_.AddTagCallBack("charaactivatefreenpc", new KagScript.KagTagCallBack(this.TagConCharaActivateFreeNPC));
- this.kag_.AddTagCallBack("CharaActivate1stRanking", new KagScript.KagTagCallBack(this.TagConCharaActivate1stRanking));
- this.kag_.AddTagCallBack("CharaActivateLeader", new KagScript.KagTagCallBack(this.TagConCharaActivateLeader));
- this.kag_.AddTagCallBack("manpresetmenuload", new KagScript.KagTagCallBack(this.TagManPresetMenuLoad));
- this.kag_.AddTagCallBack("charadeactivate", new KagScript.KagTagCallBack(this.TagCharaDeactivate));
- this.kag_.AddTagCallBack("charavisible", new KagScript.KagTagCallBack(this.TagCharaVisible));
- this.kag_.AddTagCallBack("charavisiblealloff", new KagScript.KagTagCallBack(this.TagCharaVisibleAllOff));
- this.kag_.AddTagCallBack("texmuladd", new KagScript.KagTagCallBack(this.TagTexMulAdd));
- this.kag_.AddTagCallBack("texmuldel", new KagScript.KagTagCallBack(this.TagTexMulDel));
- this.kag_.AddTagCallBack("startday", new KagScript.KagTagCallBack(this.TagStartDay));
- this.kag_.AddTagCallBack("schedulestartmanage", new KagScript.KagTagCallBack(this.TagScheduleStartManage));
- this.kag_.AddTagCallBack("endday", new KagScript.KagTagCallBack(this.TagEndDay));
- this.kag_.AddTagCallBack("updatemaidpoint", new KagScript.KagTagCallBack(this.TagConUpdateMaidPoint));
- this.kag_.AddTagCallBack("vrbgchangeinit", new KagScript.KagTagCallBack(this.TagVRBGChangeInit));
- this.kag_.AddTagCallBack("vreventobj", new KagScript.KagTagCallBack(this.TagVREventObj));
- this.kag_.AddTagCallBack("vreventgroup", new KagScript.KagTagCallBack(this.TagVREventGroup));
- this.kag_.AddTagCallBack("vrfreescene", new KagScript.KagTagCallBack(this.TagVRFreeScene));
- this.kag_.AddTagCallBack("vrcamera", new KagScript.KagTagCallBack(this.TagVRCamera));
- this.kag_.AddTagCallBack("vrtablet", new KagScript.KagTagCallBack(this.TagVRTablet));
- this.kag_.AddTagCallBack("vrchoicesset", new KagScript.KagTagCallBack(this.TagVRChoicesSet));
- this.kag_.AddTagCallBack("vrchoicesshow", new KagScript.KagTagCallBack(this.TagVRChoicesShow));
- this.kag_.AddTagCallBack("vrchoicesshownonstop", new KagScript.KagTagCallBack(this.TagVRChoicesShowNonStop));
- this.kag_.AddTagCallBack("vrdonexttime", new KagScript.KagTagCallBack(this.TagVRDoNextTime));
- this.kag_.AddTagCallBack("vrresetheadpos", new KagScript.KagTagCallBack(this.TagVRResetHeadPos));
- this.kag_.AddTagCallBack("vrtouchscript", new KagScript.KagTagCallBack(this.TagVRTouchScript));
- this.kag_.AddTagCallBack("vrdaytimeshow", new KagScript.KagTagCallBack(this.TagVRDayTimeShow));
- this.kag_.AddTagCallBack("vrdialog", new KagScript.KagTagCallBack(this.TagVRDialog));
- this.kag_.AddTagCallBack("vrstartmoviemusicplayertv", new KagScript.KagTagCallBack(this.TagVRStartMovieMusicPlayerTV));
- this.kag_.AddTagCallBack("vrmovietv", new KagScript.KagTagCallBack(this.TagVRMovieTV));
- this.kag_.AddTagCallBack("vrplantwindowshow", new KagScript.KagTagCallBack(this.TagVRPlantWindowShow));
- this.kag_.AddTagCallBack("vrplantupdate", new KagScript.KagTagCallBack(this.TagVRPlantUpdate));
- this.kag_.AddTagCallBack("vrtutorialstart", new KagScript.KagTagCallBack(this.TagVRTutorialStart));
- this.kag_.AddTagCallBack("vrphotomodestart", new KagScript.KagTagCallBack(this.TagVRPhotoModeStart));
- this.kag_.AddTagCallBack("vrnochangebg", new KagScript.KagTagCallBack(this.TagVRNoChangeBG));
- this.kag_.AddTagCallBack("vrcamtomanhead", new KagScript.KagTagCallBack(this.TagVRCamToManHead));
- this.kag_.AddTagCallBack("vrtrophytext", new KagScript.KagTagCallBack(this.TagVRTrophyText));
- this.kag_.AddTagCallBack("vrrentalmaidselectstart", new KagScript.KagTagCallBack(this.TagVRRentalMaidSelectStart));
- this.kag_.AddTagCallBack("vrtouchuseselect", new KagScript.KagTagCallBack(this.TagVRTouchUseSelect));
- this.kag_.AddTagCallBack("vrhintshow", new KagScript.KagTagCallBack(this.TagVRHintShow));
- this.kag_.AddTagCallBack("vrkaraokewindowshow", new KagScript.KagTagCallBack(this.TagVRKaraokeWindowShow));
- this.kag_.AddTagCallBack("danceresult", new KagScript.KagTagCallBack(this.TagDanceResultStart));
- this.kag_.AddTagCallBack("setdance", new KagScript.KagTagCallBack(this.TagSetDanceType));
- this.kag_.AddTagCallBack("cutinshoot", new KagScript.KagTagCallBack(this.TagCutinTexShoot));
- this.kag_.AddTagCallBack("battlecutin", new KagScript.KagTagCallBack(this.TagBattleCutInStart));
- this.kag_.AddTagCallBack("motioncheck", new KagScript.KagTagCallBack(this.TagMotionCheckStart));
- this.kag_.AddTagCallBack("setmcskip", new KagScript.KagTagCallBack(this.TagSetMcSkip));
- this.kag_.AddTagCallBack("totitle", new KagScript.KagTagCallBack(this.TagToTitle));
- this.kag_.AddTagCallBack("addeventdisplay", new KagScript.KagTagCallBack(this.TagAddedEventDisplay));
- this.kag_.AddTagCallBack("tutorialstart", new KagScript.KagTagCallBack(this.TagTutorialStart));
- this.kag_.AddTagCallBack("loadsubtitlefile", new KagScript.KagTagCallBack(this.TagLoadSubtitleFile));
- this.kag_.AddTagCallBack("endsubtitledisplay", new KagScript.KagTagCallBack(this.TagEndSubtitleDisplay));
- this.kag_.AddTagCallBack("subtitledisplayforplayvoice", new KagScript.KagTagCallBack(this.TagSubtitleDisplayForPlayVoice));
- this.kag_.AddTagCallBack("subtitledisplay", new KagScript.KagTagCallBack(this.TagSubtitleDisplay));
- this.kag_.AddTagCallBack("kupa", new KagScript.KagTagCallBack(this.TagKupa));
- this.kag_.AddTagCallBack("starttouchmode", new KagScript.KagTagCallBack(this.TagStartTouchMode));
- }
- public virtual void Update()
- {
- if (!this.enabled)
- {
- return;
- }
- if (this.fade_wait_)
- {
- if (this.IsFadeProc())
- {
- return;
- }
- this.fade_wait_ = false;
- this.Exec();
- }
- if (0 < this.wait_event_list_.Count)
- {
- foreach (KeyValuePair<string, WaitEventList> keyValuePair in this.wait_event_list_)
- {
- keyValuePair.Value.EventCheck();
- }
- }
- if (this.exec_wait_data_.use && this.exec_wait_data_.Check())
- {
- this.exec_wait_data_.Clear();
- this.Exec();
- }
- }
- public virtual bool Exec()
- {
- if (!this.enabled)
- {
- return false;
- }
- if (this.fade_wait_ && this.IsFadeProc())
- {
- return false;
- }
- if (this.exec_wait_data_.use)
- {
- if (!this.exec_wait_data_.Check())
- {
- return false;
- }
- this.exec_wait_data_.Clear();
- }
- this.maidOffsetSetList.Clear();
- return this.kag_.Exec();
- }
- public virtual bool IsExec()
- {
- return !this.exec_wait_data_.use && this.enabled;
- }
- public void SetFadeWait(bool value)
- {
- this.fade_wait_ = value;
- }
- public void SetExecWait(int wait_time, bool skip_possible)
- {
- this.exec_wait_data_.Clear();
- if (wait_time <= 0)
- {
- return;
- }
- this.exec_wait_data_ = new BaseKagManager.ExecWaitData();
- this.exec_wait_data_.wait_time = wait_time;
- this.exec_wait_data_.skip_possible = skip_possible;
- this.exec_wait_data_.start_tick_count = GameMain.tick_count;
- this.exec_wait_data_.use = true;
- }
- public bool SetMaidAllPropSeqWait(Maid maid)
- {
- if (maid == null || !maid.IsBusy)
- {
- return false;
- }
- this.exec_wait_data_ = new BaseKagManager.MaidPropSeqWaitData
- {
- skip_possible = false,
- use = true,
- maid = maid
- };
- return true;
- }
- public bool SetMaidVoiceWait(Maid maid)
- {
- if (maid == null)
- {
- return false;
- }
- this.exec_wait_data_ = new BaseKagManager.MaidVoiceWaitData
- {
- skip_possible = false,
- use = true,
- maid = maid
- };
- return true;
- }
- public bool SetDummyVoiceWait()
- {
- this.exec_wait_data_ = new BaseKagManager.DummyVoiceWaitData
- {
- skip_possible = false,
- use = true
- };
- return true;
- }
- public void ClearExecWait()
- {
- if (this.exec_wait_data_.use && !this.exec_wait_data_.skip_possible)
- {
- return;
- }
- this.exec_wait_data_.Clear();
- }
- public virtual void LoadScriptFile(string file_name, string label_name = "")
- {
- WaitEventList waitEventList = this.GetWaitEventList("se");
- waitEventList.Clear();
- this.exec_wait_data_.Clear();
- this.kag_.LoadScenario(file_name);
- if (label_name != string.Empty)
- {
- this.kag_.GoToLabel(label_name);
- }
- }
- public virtual void JumpLabel(string label_name)
- {
- this.exec_wait_data_.Clear();
- if (label_name != string.Empty)
- {
- this.kag_.GoToLabel(label_name);
- }
- }
- public virtual bool TagWait(KagTagSupport tag_data)
- {
- this.CheckAbsolutelyNecessaryTag(tag_data, "wait", new string[]
- {
- "time"
- });
- this.exec_wait_data_.Clear();
- int num = tag_data.GetTagProperty("time").AsInteger();
- if (num <= 0)
- {
- return false;
- }
- bool skip_possible = !tag_data.IsValid("skip") || tag_data.GetTagProperty("skip").AsBool();
- this.SetWait(num, skip_possible);
- return true;
- }
- public bool TagFace(KagTagSupport tag_data)
- {
- Maid maid = this.GetMaidAndMan(tag_data, true);
- if (maid == null)
- {
- return false;
- }
- this.CheckAbsolutelyNecessaryTag(tag_data, "face", new string[]
- {
- "name"
- });
- string face_name = tag_data.GetTagProperty("name").AsString();
- int num = 0;
- if (tag_data.IsValid("wait"))
- {
- num = tag_data.GetTagProperty("wait").AsInteger();
- }
- WaitEventList waitEventList = this.GetWaitEventList("face");
- if (num <= 0)
- {
- maid.FaceAnime(face_name, 1f, 0);
- waitEventList.Clear();
- }
- else
- {
- waitEventList.Add(delegate
- {
- if (maid != null && maid.body0 != null && maid.body0.isLoadedBody)
- {
- maid.FaceAnime(face_name, 1f, 0);
- }
- }, num);
- }
- return false;
- }
- public bool TagFaceBlend(KagTagSupport tag_data)
- {
- this.CheckAbsolutelyNecessaryTag(tag_data, "faceblend", new string[]
- {
- "name"
- });
- Maid maidAndMan = this.GetMaidAndMan(tag_data, true);
- if (maidAndMan == null)
- {
- return false;
- }
- string text = tag_data.GetTagProperty("name").AsString();
- if (text == "なし")
- {
- text = "無し";
- }
- maidAndMan.FaceBlend(text);
- return false;
- }
- public bool TagFaceBlend2(KagTagSupport tag_data)
- {
- Maid maidAndMan = this.GetMaidAndMan(tag_data, true);
- if (maidAndMan == null)
- {
- return false;
- }
- if (tag_data.IsValid("reset"))
- {
- maidAndMan.FaceBlend("無し");
- }
- else
- {
- TMorph.AddBlendType addBlendType = TMorph.AddBlendType.None;
- if (tag_data.IsValid("頬1") || tag_data.IsValid("頬1"))
- {
- addBlendType |= TMorph.AddBlendType.Cheek1;
- }
- if (tag_data.IsValid("頬2") || tag_data.IsValid("頬2"))
- {
- addBlendType |= TMorph.AddBlendType.Cheek2;
- }
- if (tag_data.IsValid("頬3") || tag_data.IsValid("頬3"))
- {
- addBlendType |= TMorph.AddBlendType.Cheek3;
- }
- if (tag_data.IsValid("涙1") || tag_data.IsValid("涙1"))
- {
- addBlendType |= TMorph.AddBlendType.Tear1;
- }
- if (tag_data.IsValid("涙2") || tag_data.IsValid("涙2"))
- {
- addBlendType |= TMorph.AddBlendType.Tear2;
- }
- if (tag_data.IsValid("涙3") || tag_data.IsValid("涙3"))
- {
- addBlendType |= TMorph.AddBlendType.Tear3;
- }
- if (tag_data.IsValid("ショック"))
- {
- addBlendType |= TMorph.AddBlendType.Shock;
- }
- if (tag_data.IsValid("よだれ") || tag_data.IsValid("涎"))
- {
- addBlendType |= TMorph.AddBlendType.Yodare;
- }
- if (tag_data.IsValid("赤面"))
- {
- addBlendType |= TMorph.AddBlendType.Blush;
- }
- if (tag_data.IsValid("玉涙"))
- {
- addBlendType |= TMorph.AddBlendType.TearBig;
- }
- maidAndMan.body0.Face.morph.SetValueOriginalBlendSet(addBlendType);
- maidAndMan.FaceBlend("オリジナル");
- }
- return false;
- }
- public bool TagStartKuchipakuPattern(KagTagSupport tag_data)
- {
- this.CheckAbsolutelyNecessaryTag(tag_data, "startkuchipakupattern", new string[]
- {
- "offsettime",
- "pattern"
- });
- Maid maidAndMan = this.GetMaidAndMan(tag_data, true);
- if (maidAndMan == null)
- {
- return false;
- }
- maidAndMan.StartKuchipakuPattern(tag_data.GetTagProperty("offsettime").AsReal(), tag_data.GetTagProperty("pattern").AsString(), false);
- return false;
- }
- public bool TagStopKuchipakuPattern(KagTagSupport tag_data)
- {
- Maid maidAndMan = this.GetMaidAndMan(tag_data, true);
- if (maidAndMan == null)
- {
- return false;
- }
- maidAndMan.StopKuchipakuPattern();
- return false;
- }
- public bool TagLipsync(KagTagSupport tag_data)
- {
- Maid maidAndMan = this.GetMaidAndMan(tag_data, true);
- if (maidAndMan == null)
- {
- return false;
- }
- maidAndMan.Lipsync(tag_data.IsValid("on"));
- return false;
- }
- public bool TagMotion(KagTagSupport tag_data)
- {
- string text = tag_data.GetTagProperty("mot").AsString() + ".anm";
- Maid maid = this.GetMaidAndMan(tag_data, true);
- if (maid == null)
- {
- return false;
- }
- this.CheckAbsolutelyNecessaryTag(tag_data, "motion", new string[]
- {
- "mot"
- });
- string play_motion_name = tag_data.GetTagProperty("mot").AsString() + ".anm";
- int blend = 500;
- if (tag_data.IsValid("blend"))
- {
- blend = tag_data.GetTagProperty("blend").AsInteger();
- }
- bool loop = false;
- if (tag_data.IsValid("loop"))
- {
- loop = tag_data.GetTagProperty("loop").AsBool();
- }
- int num = 0;
- if (tag_data.IsValid("wait"))
- {
- num = tag_data.GetTagProperty("wait").AsInteger();
- }
- WaitEventList waitEventList = this.GetWaitEventList("motion");
- if (num <= 0)
- {
- if (maid.Visible)
- {
- this.PlayMaidMotion(maid, play_motion_name, false, loop, false, GameUty.MillisecondToSecond(blend));
- }
- waitEventList.Clear();
- }
- else
- {
- waitEventList.Add(delegate
- {
- if (maid != null && maid.Visible && maid.body0 != null && maid.body0.isLoadedBody)
- {
- this.PlayMaidMotion(maid, play_motion_name, false, loop, false, GameUty.MillisecondToSecond(blend));
- }
- }, num);
- }
- return false;
- }
- public bool TagMotionNext(KagTagSupport tag_data)
- {
- Maid maid = this.GetMaidAndMan(tag_data, true);
- if (maid == null)
- {
- return false;
- }
- this.CheckAbsolutelyNecessaryTag(tag_data, "motionnext", new string[]
- {
- "mot"
- });
- string play_motion_name = tag_data.GetTagProperty("mot").AsString() + ".anm";
- int blend = 500;
- if (tag_data.IsValid("blend"))
- {
- blend = tag_data.GetTagProperty("blend").AsInteger();
- }
- bool loop = false;
- if (tag_data.IsValid("loop"))
- {
- loop = tag_data.GetTagProperty("loop").AsBool();
- }
- WaitEventList waitEventList = this.GetWaitEventList("motion");
- if (waitEventList.list.Count <= 0)
- {
- if (maid.Visible)
- {
- this.PlayMaidMotion(maid, play_motion_name, false, loop, true, GameUty.MillisecondToSecond(blend));
- }
- waitEventList.Clear();
- }
- else
- {
- int wait_time = waitEventList.list[waitEventList.list.Count - 1].wait_time;
- waitEventList.Add(delegate
- {
- if (maid != null && maid.Visible)
- {
- this.PlayMaidMotion(maid, play_motion_name, false, loop, true, GameUty.MillisecondToSecond(blend));
- }
- }, wait_time);
- }
- return false;
- }
- public bool TagMotionNextAbs(KagTagSupport tag_data)
- {
- Maid maid = this.GetMaidAndMan(tag_data, true);
- if (maid == null)
- {
- return false;
- }
- this.CheckAbsolutelyNecessaryTag(tag_data, "motionnextabs", new string[]
- {
- "mot"
- });
- string play_motion_name = tag_data.GetTagProperty("mot").AsString() + ".anm";
- int blend = 500;
- if (tag_data.IsValid("blend"))
- {
- blend = tag_data.GetTagProperty("blend").AsInteger();
- }
- bool loop = false;
- if (tag_data.IsValid("loop"))
- {
- loop = tag_data.GetTagProperty("loop").AsBool();
- }
- WaitEventList waitEventList = this.GetWaitEventList("motion");
- if (waitEventList.list.Count <= 0)
- {
- if (maid.Visible)
- {
- this.PlayMaidMotionAbs(maid, play_motion_name, false, loop, true, GameUty.MillisecondToSecond(blend));
- }
- waitEventList.Clear();
- }
- else
- {
- int wait_time = waitEventList.list[waitEventList.list.Count - 1].wait_time;
- waitEventList.Add(delegate
- {
- if (maid != null && maid.Visible)
- {
- this.PlayMaidMotionAbs(maid, play_motion_name, false, loop, true, GameUty.MillisecondToSecond(blend));
- }
- }, wait_time);
- }
- return false;
- }
- public bool TagMotionStop(KagTagSupport tag_data)
- {
- Maid maidAndMan = this.GetMaidAndMan(tag_data, true);
- if (maidAndMan == null)
- {
- return false;
- }
- maidAndMan.StopAnime(string.Empty);
- WaitEventList waitEventList = this.GetWaitEventList("motion");
- waitEventList.Clear();
- return false;
- }
- public bool TagMotionLayerStop(KagTagSupport tag_data)
- {
- Maid maidAndMan = this.GetMaidAndMan(tag_data, true);
- if (maidAndMan == null)
- {
- return false;
- }
- if (tag_data.IsValid("layer"))
- {
- string[] array = tag_data.GetTagProperty("layer").AsString().Split(new char[]
- {
- ','
- });
- for (int i = 0; i < array.Length; i++)
- {
- maidAndMan.body0.StopAnimeLayer(int.Parse(array[i]));
- }
- }
- if (tag_data.IsValid("range"))
- {
- string[] array2 = tag_data.GetTagProperty("range").AsString().Split(new char[]
- {
- '-'
- });
- NDebug.Assert(array2.Length == 2, "motionlayerstopのrange設定が不正です.個数不一致");
- int num = int.Parse(array2[0]);
- int num2 = int.Parse(array2[1]);
- NDebug.Assert(num <= num2, "motionlayerstopのrange設定が不正です.範囲不一致");
- for (int j = num; j <= num2; j++)
- {
- maidAndMan.body0.StopAnimeLayer(j);
- }
- }
- return false;
- }
- public bool TagMotionAutoTwist(KagTagSupport tag_data)
- {
- Maid maid = this.GetMaidAndMan(tag_data, true);
- if (maid == null)
- {
- return false;
- }
- Func<string, Maid.AutoTwist[], bool> func = delegate(string tag_name, Maid.AutoTwist[] change_type_array)
- {
- bool flag = tag_data.IsValid(tag_name);
- if (flag && change_type_array != null)
- {
- string a = tag_data.GetTagProperty(tag_name).AsString();
- bool f_bEnable = a == "on";
- for (int i = 0; i < change_type_array.Length; i++)
- {
- maid.SetAutoTwist(change_type_array[i], f_bEnable);
- }
- }
- return flag;
- };
- if (!func("kata", new Maid.AutoTwist[]
- {
- Maid.AutoTwist.ShoulderL,
- Maid.AutoTwist.ShoulderR
- }))
- {
- func("kata_r", new Maid.AutoTwist[]
- {
- Maid.AutoTwist.ShoulderR
- });
- func("kata_l", new Maid.AutoTwist[1]);
- }
- if (!func("tekubi", new Maid.AutoTwist[]
- {
- Maid.AutoTwist.WristL,
- Maid.AutoTwist.WristR
- }))
- {
- func("tekubi_r", new Maid.AutoTwist[]
- {
- Maid.AutoTwist.WristR
- });
- func("tekubi_l", new Maid.AutoTwist[]
- {
- Maid.AutoTwist.WristL
- });
- }
- if (!func("momo", new Maid.AutoTwist[]
- {
- Maid.AutoTwist.ThighL,
- Maid.AutoTwist.ThighR
- }))
- {
- func("momo_r", new Maid.AutoTwist[]
- {
- Maid.AutoTwist.ThighR
- });
- func("momo_l", new Maid.AutoTwist[]
- {
- Maid.AutoTwist.ThighL
- });
- }
- return false;
- }
- public bool TagMotionBlendEnabled(KagTagSupport tag_data)
- {
- bool is_motion_blend = true;
- if (tag_data.IsValid("false"))
- {
- is_motion_blend = false;
- }
- this.script_mgr_.is_motion_blend = is_motion_blend;
- return false;
- }
- public bool TagMotionScript(KagTagSupport tag_data)
- {
- string maid_guid = string.Empty;
- if (tag_data.IsValid("maid"))
- {
- Maid maidAndMan = this.GetMaidAndMan(tag_data, true);
- if (maidAndMan != null)
- {
- maid_guid = maidAndMan.status.guid;
- }
- }
- string man_guid = string.Empty;
- if (tag_data.IsValid("man"))
- {
- Maid maidAndMan2 = this.GetMaidAndMan(tag_data, false);
- if (maidAndMan2 != null)
- {
- man_guid = maidAndMan2.status.guid;
- }
- }
- this.CheckAbsolutelyNecessaryTag(tag_data, "motionscript", new string[]
- {
- "file"
- });
- string file_name = tag_data.GetTagProperty("file").AsString() + ".ks";
- string label_name = string.Empty;
- if (tag_data.IsValid("label"))
- {
- label_name = tag_data.GetTagProperty("label").AsString();
- }
- int num = 0;
- if (tag_data.IsValid("wait"))
- {
- num = tag_data.GetTagProperty("wait").AsInteger();
- }
- bool vailed_pos = !tag_data.IsValid("npos");
- int sloat = 0;
- if (tag_data.IsValid("sloat"))
- {
- sloat = tag_data.GetTagProperty("sloat").AsInteger();
- }
- WaitEventList waitEventList = this.GetWaitEventList("motion_script");
- if (num <= 0)
- {
- this.script_mgr_.LoadMotionScript(sloat, false, file_name, label_name, maid_guid, man_guid, false, vailed_pos, false);
- waitEventList.Clear();
- if (this.script_mgr_.is_motion_all_prop_seq && this.script_mgr_.motion_all_prop_seq_maid != null)
- {
- this.script_mgr_.motion_all_prop_seq_maid.AllProcPropSeqStart();
- this.SetMaidAllPropSeqWait(this.script_mgr_.motion_all_prop_seq_maid);
- this.script_mgr_.motion_all_prop_seq_maid = null;
- this.script_mgr_.is_motion_all_prop_seq = false;
- return true;
- }
- }
- else
- {
- waitEventList.Add(delegate
- {
- Maid maid = null;
- for (int i = 0; i < GameMain.Instance.CharacterMgr.GetMaidCount(); i++)
- {
- Maid maid2 = GameMain.Instance.CharacterMgr.GetMaid(i);
- if (maid2 != null && maid2.status.guid == maid_guid)
- {
- maid = maid2;
- break;
- }
- }
- if (maid != null && maid.body0 != null && maid.body0.isLoadedBody)
- {
- this.script_mgr_.LoadMotionScript(sloat, false, file_name, label_name, maid_guid, man_guid, false, vailed_pos, false);
- NDebug.Assert(!this.script_mgr_.is_motion_all_prop_seq, "motionscript wait内でのAllProcPropSeqStartはできません");
- }
- }, num);
- }
- return false;
- }
- public bool TagItemAnime(KagTagSupport tag_data)
- {
- this.CheckAbsolutelyNecessaryTag(tag_data, "itemanime", new string[]
- {
- "slot"
- });
- Maid maidAndMan = this.GetMaidAndMan(tag_data, true);
- if (maidAndMan == null)
- {
- return false;
- }
- TBody.SlotID f_slot = (TBody.SlotID)Enum.Parse(typeof(TBody.SlotID), tag_data.GetTagProperty("slot").AsString(), true);
- string f_strAnimName = tag_data.GetTagProperty("file").AsString();
- maidAndMan.body0.ItemAnimationLoad(f_slot, f_strAnimName);
- if (tag_data.IsValid("start"))
- {
- maidAndMan.body0.ItemAnimationPlay(f_slot, f_strAnimName, tag_data.IsValid("loop"));
- }
- else if (tag_data.IsValid("stop"))
- {
- maidAndMan.body0.ItemAnimationStop(f_slot);
- }
- return false;
- }
- public bool TagHairPhisics(KagTagSupport tag_data)
- {
- this.CheckAbsolutelyNecessaryTag(tag_data, "hairphisics", new string[]
- {
- "hairr"
- });
- Maid maidAndMan = this.GetMaidAndMan(tag_data, true);
- if (maidAndMan == null)
- {
- return false;
- }
- string text = tag_data.GetTagProperty("hairr").AsString();
- if (text == "normal")
- {
- maidAndMan.SetModeHairR(TBody.ModeHirR.Normal);
- }
- else if (text == "nofront")
- {
- maidAndMan.SetModeHairR(TBody.ModeHirR.NoFront);
- }
- else
- {
- NDebug.Assert("hairrの指定[" + text + "]は間違っています", false);
- }
- return false;
- }
- public bool TagBustMove(KagTagSupport tag_data)
- {
- this.CheckAbsolutelyNecessaryTag(tag_data, "bustmove", new string[]
- {
- "move"
- });
- Maid maidAndMan = this.GetMaidAndMan(tag_data, true);
- if (maidAndMan == null)
- {
- return false;
- }
- string a = tag_data.GetTagProperty("move").AsString().ToLower();
- if (a == "stop")
- {
- maidAndMan.body0.MuneYureL(0f);
- maidAndMan.body0.MuneYureR(0f);
- }
- else if (a == "lstop")
- {
- maidAndMan.body0.MuneYureL(0f);
- }
- else if (a == "rstop")
- {
- maidAndMan.body0.MuneYureR(0f);
- }
- else if (a == "non")
- {
- maidAndMan.body0.MuneYureL(1f);
- maidAndMan.body0.MuneYureR(1f);
- }
- return false;
- }
- public bool TagPhisicsHit(KagTagSupport tag_data)
- {
- this.CheckAbsolutelyNecessaryTag(tag_data, "phisicshit", new string[]
- {
- "height"
- });
- Maid maidAndMan = this.GetMaidAndMan(tag_data, true);
- if (maidAndMan == null)
- {
- return false;
- }
- maidAndMan.body0.SetBoneHitHeightY(tag_data.GetTagProperty("height").AsReal());
- return false;
- }
- public bool TagIKAttachPoint(KagTagSupport tag_data)
- {
- this.CheckAbsolutelyNecessaryTag(tag_data, "ikattachpoint", new string[]
- {
- "src",
- "srcbone",
- "target",
- "targetobj",
- "targetpoint"
- });
- Maid maidAndMan = this.GetMaidAndMan(tag_data.GetTagProperty("src").AsString());
- Maid maidAndMan2 = this.GetMaidAndMan(tag_data.GetTagProperty("target").AsString());
- if (maidAndMan == null || maidAndMan2 == null)
- {
- return false;
- }
- string text = tag_data.GetTagProperty("srcbone").AsString();
- string attachpoint_name = tag_data.GetTagProperty("targetpoint").AsString();
- string tgt_name = tag_data.GetTagProperty("targetobj").AsString();
- IKCtrlData ikdata = maidAndMan.IKCtrl.GetIKData(text);
- if (!ikdata)
- {
- return false;
- }
- Vector3 zero = Vector3.zero;
- if (tag_data.IsValid("offsetx"))
- {
- zero.x = tag_data.GetTagProperty("offsetx").AsReal();
- }
- if (tag_data.IsValid("offsety"))
- {
- zero.y = tag_data.GetTagProperty("offsety").AsReal();
- }
- if (tag_data.IsValid("offsetz"))
- {
- zero.z = tag_data.GetTagProperty("offsetz").AsReal();
- }
- IKCtrlData.IKAttachType ikattachType = IKCtrlData.IKAttachType.Point;
- if (tag_data.IsValid("attach_type"))
- {
- ikattachType = (IKCtrlData.IKAttachType)Enum.Parse(typeof(IKCtrlData.IKAttachType), tag_data.GetTagProperty("attach_type").AsString());
- }
- if (ikattachType == IKCtrlData.IKAttachType.NewPoint)
- {
- if (tag_data.IsValid("offset_world"))
- {
- ikdata.posOffsetType = IKCtrlData.PosOffsetType.OffsetWorld;
- }
- else if (tag_data.IsValid("offset_bone"))
- {
- ikdata.posOffsetType = IKCtrlData.PosOffsetType.OffsetBone;
- }
- }
- ikdata.GetIKEnable(ikattachType).Recet();
- if (tag_data.IsValid("disable"))
- {
- string[] array = tag_data.GetTagProperty("disable").AsString().Split(new char[]
- {
- ','
- });
- int i = 0;
- while (i < array.Length)
- {
- string text2 = array[i];
- string text3 = text2.ToLower();
- if (text3 != null)
- {
- if (!(text3 == "x"))
- {
- if (!(text3 == "y"))
- {
- if (text3 == "z")
- {
- ikdata.GetIKEnable(ikattachType).EnableZ = false;
- }
- }
- else
- {
- ikdata.GetIKEnable(ikattachType).EnableY = false;
- }
- }
- else
- {
- ikdata.GetIKEnable(ikattachType).EnableX = false;
- }
- }
- IL_29C:
- i++;
- continue;
- goto IL_29C;
- }
- }
- string axisbone = string.Empty;
- if (tag_data.IsValid("axisbone"))
- {
- axisbone = tag_data.GetTagProperty("axisbone").AsString();
- }
- bool do_animation = false;
- if (tag_data.IsValid("do_animation"))
- {
- do_animation = true;
- }
- if (ikattachType == IKCtrlData.IKAttachType.NewPoint && ikdata is HandFootIKData)
- {
- HandFootIKData handFootIKData = ikdata as HandFootIKData;
- handFootIKData.SetPullState(!tag_data.IsValid("pull_off"));
- }
- maidAndMan.IKTargetToAttachPoint(text, maidAndMan2, tgt_name, attachpoint_name, zero, ikattachType, axisbone, do_animation, IKCtrlData.IKExecTiming.Normal);
- return false;
- }
- public bool TagIKAttachBone(KagTagSupport tag_data)
- {
- this.CheckAbsolutelyNecessaryTag(tag_data, "ikattachbone", new string[]
- {
- "src",
- "srcbone",
- "target",
- "targetbone"
- });
- Maid maidAndMan = this.GetMaidAndMan(tag_data.GetTagProperty("src").AsString());
- Maid maidAndMan2 = this.GetMaidAndMan(tag_data.GetTagProperty("target").AsString());
- if (maidAndMan == null || maidAndMan2 == null)
- {
- return false;
- }
- string text = tag_data.GetTagProperty("srcbone").AsString();
- string tgtbone_name = tag_data.GetTagProperty("targetbone").AsString();
- IKCtrlData ikdata = maidAndMan.IKCtrl.GetIKData(text);
- if (!ikdata)
- {
- return false;
- }
- bool search_sm = tag_data.IsValid("Search_SM_Body");
- Vector3 zero = Vector3.zero;
- if (tag_data.IsValid("offsetx"))
- {
- zero.x = tag_data.GetTagProperty("offsetx").AsReal();
- }
- if (tag_data.IsValid("offsety"))
- {
- zero.y = tag_data.GetTagProperty("offsety").AsReal();
- }
- if (tag_data.IsValid("offsetz"))
- {
- zero.z = tag_data.GetTagProperty("offsetz").AsReal();
- }
- IKCtrlData.IKAttachType ikattachType = IKCtrlData.IKAttachType.Point;
- if (tag_data.IsValid("attach_type"))
- {
- ikattachType = (IKCtrlData.IKAttachType)Enum.Parse(typeof(IKCtrlData.IKAttachType), tag_data.GetTagProperty("attach_type").AsString());
- }
- if (ikattachType == IKCtrlData.IKAttachType.NewPoint)
- {
- if (tag_data.IsValid("offset_world"))
- {
- ikdata.posOffsetType = IKCtrlData.PosOffsetType.OffsetWorld;
- }
- else if (tag_data.IsValid("offset_bone"))
- {
- ikdata.posOffsetType = IKCtrlData.PosOffsetType.OffsetBone;
- }
- }
- ikdata.GetIKEnable(ikattachType).Recet();
- if (tag_data.IsValid("disable"))
- {
- string[] array = tag_data.GetTagProperty("disable").AsString().Split(new char[]
- {
- ','
- });
- int i = 0;
- while (i < array.Length)
- {
- string text2 = array[i];
- string text3 = text2.ToLower();
- if (text3 != null)
- {
- if (!(text3 == "x"))
- {
- if (!(text3 == "y"))
- {
- if (text3 == "z")
- {
- ikdata.GetIKEnable(ikattachType).EnableZ = false;
- }
- }
- else
- {
- ikdata.GetIKEnable(ikattachType).EnableY = false;
- }
- }
- else
- {
- ikdata.GetIKEnable(ikattachType).EnableX = false;
- }
- }
- IL_28F:
- i++;
- continue;
- goto IL_28F;
- }
- }
- bool do_animation = false;
- if (tag_data.IsValid("do_animation"))
- {
- do_animation = true;
- }
- if (ikattachType == IKCtrlData.IKAttachType.NewPoint && ikdata is HandFootIKData)
- {
- HandFootIKData handFootIKData = ikdata as HandFootIKData;
- handFootIKData.SetPullState(!tag_data.IsValid("pull_off"));
- }
- maidAndMan.IKTargetToBone(text, maidAndMan2, tgtbone_name, zero, ikattachType, search_sm, do_animation, IKCtrlData.IKExecTiming.Normal);
- return false;
- }
- public bool TagIKDetach(KagTagSupport tag_data)
- {
- this.CheckAbsolutelyNecessaryTag(tag_data, "ikdetach", new string[]
- {
- "src",
- "srcbone"
- });
- Maid maidAndMan = this.GetMaidAndMan(tag_data.GetTagProperty("src").AsString());
- if (maidAndMan == null)
- {
- return false;
- }
- string text = tag_data.GetTagProperty("srcbone").AsString();
- IKCtrlData ikdata = maidAndMan.IKCtrl.GetIKData(text);
- if (!ikdata)
- {
- return false;
- }
- maidAndMan.IKDetach(text);
- return false;
- }
- public bool TagAllIKDetach(KagTagSupport tag_data)
- {
- this.CheckAbsolutelyNecessaryTag(tag_data, "allikdetach", new string[]
- {
- "src"
- });
- Maid maidAndMan = this.GetMaidAndMan(tag_data.GetTagProperty("src").AsString());
- if (maidAndMan == null)
- {
- return false;
- }
- float blendtime = 0f;
- if (tag_data.IsValid("blendtime"))
- {
- blendtime = GameUty.MillisecondToSecond(tag_data.GetTagProperty("blendtime").AsInteger());
- }
- maidAndMan.AllIKDetach(blendtime);
- return false;
- }
- public bool TagIKAttachOdogu(KagTagSupport tag_data)
- {
- this.CheckAbsolutelyNecessaryTag(tag_data, "ikattachodogu", new string[]
- {
- "src",
- "srcbone",
- "odogu"
- });
- Maid maidAndMan = this.GetMaidAndMan(tag_data.GetTagProperty("src").AsString());
- if (!maidAndMan)
- {
- return false;
- }
- string text = tag_data.GetTagProperty("srcbone").AsString();
- string odogu_name = tag_data.GetTagProperty("odogu").AsString();
- IKCtrlData ikdata = maidAndMan.IKCtrl.GetIKData(text);
- if (!ikdata)
- {
- return false;
- }
- string tgt_name = string.Empty;
- if (tag_data.IsValid("target"))
- {
- tgt_name = tag_data.GetTagProperty("target").AsString();
- }
- Vector3 zero = Vector3.zero;
- if (tag_data.IsValid("offsetx"))
- {
- zero.x = tag_data.GetTagProperty("offsetx").AsReal();
- }
- if (tag_data.IsValid("offsety"))
- {
- zero.y = tag_data.GetTagProperty("offsety").AsReal();
- }
- if (tag_data.IsValid("offsetz"))
- {
- zero.z = tag_data.GetTagProperty("offsetz").AsReal();
- }
- IKCtrlData.IKAttachType ikattachType = IKCtrlData.IKAttachType.Point;
- if (tag_data.IsValid("attach_type"))
- {
- ikattachType = (IKCtrlData.IKAttachType)Enum.Parse(typeof(IKCtrlData.IKAttachType), tag_data.GetTagProperty("attach_type").AsString());
- }
- if (ikattachType == IKCtrlData.IKAttachType.NewPoint)
- {
- if (tag_data.IsValid("offset_world"))
- {
- ikdata.posOffsetType = IKCtrlData.PosOffsetType.OffsetWorld;
- }
- else if (tag_data.IsValid("offset_bone"))
- {
- ikdata.posOffsetType = IKCtrlData.PosOffsetType.OffsetBone;
- }
- }
- ikdata.GetIKEnable(ikattachType).Recet();
- if (tag_data.IsValid("disable"))
- {
- string[] array = tag_data.GetTagProperty("disable").AsString().Split(new char[]
- {
- ','
- });
- int i = 0;
- while (i < array.Length)
- {
- string text2 = array[i];
- string text3 = text2.ToLower();
- if (text3 != null)
- {
- if (!(text3 == "x"))
- {
- if (!(text3 == "y"))
- {
- if (text3 == "z")
- {
- ikdata.GetIKEnable(ikattachType).EnableZ = false;
- }
- }
- else
- {
- ikdata.GetIKEnable(ikattachType).EnableY = false;
- }
- }
- else
- {
- ikdata.GetIKEnable(ikattachType).EnableX = false;
- }
- }
- IL_277:
- i++;
- continue;
- goto IL_277;
- }
- }
- bool do_animation = false;
- if (tag_data.IsValid("do_animation"))
- {
- do_animation = true;
- }
- if (ikattachType == IKCtrlData.IKAttachType.NewPoint && ikdata is HandFootIKData)
- {
- HandFootIKData handFootIKData = ikdata as HandFootIKData;
- handFootIKData.SetPullState(!tag_data.IsValid("pull_off"));
- }
- maidAndMan.IKTargetToOdogu(text, odogu_name, tgt_name, zero, ikattachType, do_animation, IKCtrlData.IKExecTiming.Normal);
- return false;
- }
- public bool TagIKAttachIKBone(KagTagSupport tag_data)
- {
- this.CheckAbsolutelyNecessaryTag(tag_data, "ikattachbone", new string[]
- {
- "src",
- "srcbone",
- "target",
- "targetbone"
- });
- Maid maidAndMan = this.GetMaidAndMan(tag_data.GetTagProperty("src").AsString());
- Maid maidAndMan2 = this.GetMaidAndMan(tag_data.GetTagProperty("target").AsString());
- if (maidAndMan == null || maidAndMan2 == null)
- {
- return false;
- }
- string text = tag_data.GetTagProperty("srcbone").AsString();
- string bone_name = tag_data.GetTagProperty("targetbone").AsString();
- IKCtrlData ikdata = maidAndMan.IKCtrl.GetIKData(text);
- if (!ikdata)
- {
- return false;
- }
- Vector3 zero = Vector3.zero;
- if (tag_data.IsValid("offsetx"))
- {
- zero.x = tag_data.GetTagProperty("offsetx").AsReal();
- }
- if (tag_data.IsValid("offsety"))
- {
- zero.y = tag_data.GetTagProperty("offsety").AsReal();
- }
- if (tag_data.IsValid("offsetz"))
- {
- zero.z = tag_data.GetTagProperty("offsetz").AsReal();
- }
- IKCtrlData.IKAttachType ikattachType = IKCtrlData.IKAttachType.Point;
- if (tag_data.IsValid("attach_type"))
- {
- ikattachType = (IKCtrlData.IKAttachType)Enum.Parse(typeof(IKCtrlData.IKAttachType), tag_data.GetTagProperty("attach_type").AsString());
- }
- if (ikattachType == IKCtrlData.IKAttachType.NewPoint)
- {
- if (tag_data.IsValid("offset_world"))
- {
- ikdata.posOffsetType = IKCtrlData.PosOffsetType.OffsetWorld;
- }
- else if (tag_data.IsValid("offset_bone"))
- {
- ikdata.posOffsetType = IKCtrlData.PosOffsetType.OffsetBone;
- }
- }
- ikdata.GetIKEnable(ikattachType).Recet();
- if (tag_data.IsValid("disable"))
- {
- string[] array = tag_data.GetTagProperty("disable").AsString().Split(new char[]
- {
- ','
- });
- int i = 0;
- while (i < array.Length)
- {
- string text2 = array[i];
- string text3 = text2.ToLower();
- if (text3 != null)
- {
- if (!(text3 == "x"))
- {
- if (!(text3 == "y"))
- {
- if (text3 == "z")
- {
- ikdata.GetIKEnable(ikattachType).EnableZ = false;
- }
- }
- else
- {
- ikdata.GetIKEnable(ikattachType).EnableY = false;
- }
- }
- else
- {
- ikdata.GetIKEnable(ikattachType).EnableX = false;
- }
- }
- IL_282:
- i++;
- continue;
- goto IL_282;
- }
- }
- bool do_animation = tag_data.IsValid("do_animation");
- if (ikattachType == IKCtrlData.IKAttachType.NewPoint && ikdata is HandFootIKData)
- {
- HandFootIKData handFootIKData = ikdata as HandFootIKData;
- handFootIKData.SetPullState(!tag_data.IsValid("pull_off"));
- }
- maidAndMan.IKTargetToIKBone(text, maidAndMan2, bone_name, zero, ikattachType, do_animation, IKCtrlData.IKExecTiming.Normal);
- return false;
- }
- public bool TagIKSetBodyPos(KagTagSupport tag_data)
- {
- this.CheckAbsolutelyNecessaryTag(tag_data, "iksetbodypos", new string[]
- {
- "src",
- "srcbone",
- "target",
- "targetbone"
- });
- Maid maidAndMan = this.GetMaidAndMan(tag_data.GetTagProperty("src").AsString());
- Maid maidAndMan2 = this.GetMaidAndMan(tag_data.GetTagProperty("target").AsString());
- if (maidAndMan == null || maidAndMan2 == null)
- {
- return false;
- }
- string tgtbone_name = tag_data.GetTagProperty("targetbone").AsString();
- Vector3 zero = Vector3.zero;
- if (tag_data.IsValid("offsetx"))
- {
- zero.x = tag_data.GetTagProperty("offsetx").AsReal();
- }
- if (tag_data.IsValid("offsety"))
- {
- zero.y = tag_data.GetTagProperty("offsety").AsReal();
- }
- if (tag_data.IsValid("offsetz"))
- {
- zero.z = tag_data.GetTagProperty("offsetz").AsReal();
- }
- IKCtrlData.IKAttachType attach_type = IKCtrlData.IKAttachType.NewPoint;
- bool search_sm = tag_data.IsValid("Search_SM_Body");
- maidAndMan.IKCtrl.BodyCtrlData.OffsetEnable.Recet();
- if (tag_data.IsValid("disable"))
- {
- string[] array = tag_data.GetTagProperty("disable").AsString().Split(new char[]
- {
- ','
- });
- int i = 0;
- while (i < array.Length)
- {
- string text = array[i];
- string text2 = text.ToLower();
- if (text2 != null)
- {
- if (!(text2 == "x"))
- {
- if (!(text2 == "y"))
- {
- if (text2 == "z")
- {
- maidAndMan.IKCtrl.BodyCtrlData.OffsetEnable.EnableZ = false;
- }
- }
- else
- {
- maidAndMan.IKCtrl.BodyCtrlData.OffsetEnable.EnableY = false;
- }
- }
- else
- {
- maidAndMan.IKCtrl.BodyCtrlData.OffsetEnable.EnableX = false;
- }
- }
- IL_20A:
- i++;
- continue;
- goto IL_20A;
- }
- }
- if (tag_data.IsValid("heighttype"))
- {
- BodyCtrlData.HeightFitType heightFit = (BodyCtrlData.HeightFitType)Enum.Parse(typeof(BodyCtrlData.HeightFitType), tag_data.GetTagProperty("heighttype").AsString());
- maidAndMan.IKCtrl.BodyCtrlData.HeightFit = heightFit;
- }
- maidAndMan.IKCtrl.BodyCtrlData.PosBaseBone = maidAndMan.body0.GetBone(tag_data.GetTagProperty("srcbone").AsString());
- maidAndMan.IKCtrl.BodyCtrlData.posOffsetType = IKCtrlData.PosOffsetType.OffsetWorld;
- maidAndMan.IKTargetToBone("体全体", maidAndMan2, tgtbone_name, zero, attach_type, search_sm, false, IKCtrlData.IKExecTiming.Normal);
- return false;
- }
- public bool TagIKCheckThrough(KagTagSupport tag_data)
- {
- this.CheckAbsolutelyNecessaryTag(tag_data, "ikcheckthrough", new string[]
- {
- "src",
- "srcbone",
- "checkobj"
- });
- Maid maidAndMan = this.GetMaidAndMan(tag_data.GetTagProperty("src").AsString());
- if (maidAndMan == null)
- {
- return false;
- }
- string tag_name = tag_data.GetTagProperty("srcbone").AsString();
- HandFootIKData ikdata = maidAndMan.IKCtrl.GetIKData<HandFootIKData>(tag_name);
- if (tag_data.IsValid("correctbone"))
- {
- ikdata.ToCorrectBone = maidAndMan.body0.GetBone(tag_data.GetTagProperty("correctbone").AsString());
- }
- string text = tag_data.GetTagProperty("checkobj").AsString();
- float weight = 1f;
- if (tag_data.IsValid("bendweight"))
- {
- weight = tag_data.GetTagProperty("bendweight").AsReal();
- }
- HandFootIKData.BorderCorrectData borderCorrectData;
- if (text.Contains("Floor"))
- {
- borderCorrectData = ikdata.FloorCorrect;
- }
- else
- {
- if (!text.Contains("Wall"))
- {
- Debug.LogErrorFormat("{0}は定義できません", new object[]
- {
- text
- });
- return false;
- }
- borderCorrectData = ikdata.WallCorrect;
- }
- if (tag_data.IsValid("correcttype"))
- {
- ikdata.CorrectType = (HandFootIKData.BorderCorrectType)Enum.Parse(typeof(HandFootIKData.BorderCorrectType), tag_data.GetTagProperty("correcttype").AsString());
- }
- ikdata.Chain.bendConstraint.weight = weight;
- borderCorrectData.Enable = true;
- borderCorrectData.Border = float.Parse(text.Split(new char[]
- {
- ':'
- })[1]);
- return false;
- }
- public bool TagIKBendBoneCtrl(KagTagSupport tag_data)
- {
- return false;
- }
- public bool TagNextIKFlag(KagTagSupport tag_data)
- {
- this.CheckAbsolutelyNecessaryTag(tag_data, "nextikflag", new string[]
- {
- "src",
- "srcbone",
- "flagobj"
- });
- Maid maidAndMan = this.GetMaidAndMan(tag_data.GetTagProperty("src").AsString());
- if (maidAndMan == null)
- {
- return false;
- }
- string tag_name = tag_data.GetTagProperty("srcbone").AsString();
- IKCtrlData ik_data = maidAndMan.IKCtrl.GetIKData(tag_name);
- if (!ik_data)
- {
- return false;
- }
- Action<IKCtrlData.IKAttachType> action = delegate(IKCtrlData.IKAttachType attach_type)
- {
- if (tag_data.IsValid("axis"))
- {
- ik_data.GetFlagData(attach_type).Axis = KasaiUtility.Vec3Parse(tag_data.GetTagProperty("axis").AsString(), ',');
- }
- if (tag_data.IsValid("value"))
- {
- ik_data.GetFlagData(attach_type).OnValue = tag_data.GetTagProperty("value").AsReal();
- }
- ik_data.GetFlagData(attach_type).BlendCtrlSelf = tag_data.IsValid("blendself");
- string name = tag_data.GetTagProperty("flagobj").AsString();
- ik_data.SetFlagTarget(attach_type, name);
- };
- if (tag_data.IsValid("attach_type"))
- {
- IKCtrlData.IKAttachType obj = (IKCtrlData.IKAttachType)Enum.Parse(typeof(IKCtrlData.IKAttachType), tag_data.GetTagProperty("attach_type").AsString());
- action(obj);
- }
- else
- {
- action(IKCtrlData.IKAttachType.NewPoint);
- action(IKCtrlData.IKAttachType.Rotate);
- }
- return false;
- }
- public bool TagIKAttachPointNext(KagTagSupport tag_data)
- {
- this.CheckAbsolutelyNecessaryTag(tag_data, "ikattachpointnext", new string[]
- {
- "src",
- "srcbone",
- "target",
- "targetobj",
- "targetpoint"
- });
- Maid maidAndMan = this.GetMaidAndMan(tag_data.GetTagProperty("src").AsString());
- Maid maidAndMan2 = this.GetMaidAndMan(tag_data.GetTagProperty("target").AsString());
- if (maidAndMan == null || maidAndMan2 == null)
- {
- return false;
- }
- IKCtrlData.IKExecTiming timing = IKCtrlData.IKExecTiming.FlagPositive;
- if (tag_data.IsValid("exectiming"))
- {
- timing = (IKCtrlData.IKExecTiming)Enum.Parse(typeof(IKCtrlData.IKExecTiming), tag_data.GetTagProperty("exectiming").AsString());
- }
- string text = tag_data.GetTagProperty("srcbone").AsString();
- string attachpoint_name = tag_data.GetTagProperty("targetpoint").AsString();
- string tgt_name = tag_data.GetTagProperty("targetobj").AsString();
- IKCtrlData ikdata = maidAndMan.IKCtrl.GetIKData(text);
- if (!ikdata)
- {
- return false;
- }
- Vector3 zero = Vector3.zero;
- if (tag_data.IsValid("offsetx"))
- {
- zero.x = tag_data.GetTagProperty("offsetx").AsReal();
- }
- if (tag_data.IsValid("offsety"))
- {
- zero.y = tag_data.GetTagProperty("offsety").AsReal();
- }
- if (tag_data.IsValid("offsetz"))
- {
- zero.z = tag_data.GetTagProperty("offsetz").AsReal();
- }
- IKCtrlData.IKAttachType ikattachType = IKCtrlData.IKAttachType.Point;
- if (tag_data.IsValid("attach_type"))
- {
- ikattachType = (IKCtrlData.IKAttachType)Enum.Parse(typeof(IKCtrlData.IKAttachType), tag_data.GetTagProperty("attach_type").AsString());
- }
- if (ikattachType == IKCtrlData.IKAttachType.NewPoint)
- {
- if (tag_data.IsValid("offset_world"))
- {
- ikdata.posOffsetType = IKCtrlData.PosOffsetType.OffsetWorld;
- }
- else if (tag_data.IsValid("offset_bone"))
- {
- ikdata.posOffsetType = IKCtrlData.PosOffsetType.OffsetBone;
- }
- }
- ikdata.GetIKEnable(ikattachType).Recet();
- if (tag_data.IsValid("disable"))
- {
- string[] array = tag_data.GetTagProperty("disable").AsString().Split(new char[]
- {
- ','
- });
- int i = 0;
- while (i < array.Length)
- {
- string text2 = array[i];
- string text3 = text2.ToLower();
- if (text3 != null)
- {
- if (!(text3 == "x"))
- {
- if (!(text3 == "y"))
- {
- if (text3 == "z")
- {
- ikdata.GetIKEnable(ikattachType).EnableZ = false;
- }
- }
- else
- {
- ikdata.GetIKEnable(ikattachType).EnableY = false;
- }
- }
- else
- {
- ikdata.GetIKEnable(ikattachType).EnableX = false;
- }
- }
- IL_2D4:
- i++;
- continue;
- goto IL_2D4;
- }
- }
- string axisbone = string.Empty;
- if (tag_data.IsValid("axisbone"))
- {
- axisbone = tag_data.GetTagProperty("axisbone").AsString();
- }
- bool do_animation = false;
- if (tag_data.IsValid("do_animation"))
- {
- do_animation = true;
- }
- if (ikattachType == IKCtrlData.IKAttachType.NewPoint && ikdata is HandFootIKData)
- {
- HandFootIKData handFootIKData = ikdata as HandFootIKData;
- handFootIKData.SetPullState(!tag_data.IsValid("pull_off"));
- }
- maidAndMan.IKTargetToAttachPoint(text, maidAndMan2, tgt_name, attachpoint_name, zero, ikattachType, axisbone, do_animation, timing);
- return false;
- }
- public bool TagIKAttachBoneNext(KagTagSupport tag_data)
- {
- this.CheckAbsolutelyNecessaryTag(tag_data, "ikattachbonenext", new string[]
- {
- "src",
- "srcbone",
- "target",
- "targetbone"
- });
- Maid maidAndMan = this.GetMaidAndMan(tag_data.GetTagProperty("src").AsString());
- Maid maidAndMan2 = this.GetMaidAndMan(tag_data.GetTagProperty("target").AsString());
- if (maidAndMan == null || maidAndMan2 == null)
- {
- return false;
- }
- IKCtrlData.IKExecTiming timing = IKCtrlData.IKExecTiming.FlagPositive;
- if (tag_data.IsValid("exectiming"))
- {
- timing = (IKCtrlData.IKExecTiming)Enum.Parse(typeof(IKCtrlData.IKExecTiming), tag_data.GetTagProperty("exectiming").AsString());
- }
- string text = tag_data.GetTagProperty("srcbone").AsString();
- string tgtbone_name = tag_data.GetTagProperty("targetbone").AsString();
- IKCtrlData ikdata = maidAndMan.IKCtrl.GetIKData(text);
- if (!ikdata)
- {
- return false;
- }
- bool search_sm = tag_data.IsValid("Search_SM_Body");
- Vector3 zero = Vector3.zero;
- if (tag_data.IsValid("offsetx"))
- {
- zero.x = tag_data.GetTagProperty("offsetx").AsReal();
- }
- if (tag_data.IsValid("offsety"))
- {
- zero.y = tag_data.GetTagProperty("offsety").AsReal();
- }
- if (tag_data.IsValid("offsetz"))
- {
- zero.z = tag_data.GetTagProperty("offsetz").AsReal();
- }
- IKCtrlData.IKAttachType ikattachType = IKCtrlData.IKAttachType.Point;
- if (tag_data.IsValid("attach_type"))
- {
- ikattachType = (IKCtrlData.IKAttachType)Enum.Parse(typeof(IKCtrlData.IKAttachType), tag_data.GetTagProperty("attach_type").AsString());
- }
- if (ikattachType == IKCtrlData.IKAttachType.NewPoint)
- {
- if (tag_data.IsValid("offset_world"))
- {
- ikdata.posOffsetType = IKCtrlData.PosOffsetType.OffsetWorld;
- }
- else if (tag_data.IsValid("offset_bone"))
- {
- ikdata.posOffsetType = IKCtrlData.PosOffsetType.OffsetBone;
- }
- }
- ikdata.GetIKEnable(ikattachType).Recet();
- if (tag_data.IsValid("disable"))
- {
- string[] array = tag_data.GetTagProperty("disable").AsString().Split(new char[]
- {
- ','
- });
- int i = 0;
- while (i < array.Length)
- {
- string text2 = array[i];
- string text3 = text2.ToLower();
- if (text3 != null)
- {
- if (!(text3 == "x"))
- {
- if (!(text3 == "y"))
- {
- if (text3 == "z")
- {
- ikdata.GetIKEnable(ikattachType).EnableZ = false;
- }
- }
- else
- {
- ikdata.GetIKEnable(ikattachType).EnableY = false;
- }
- }
- else
- {
- ikdata.GetIKEnable(ikattachType).EnableX = false;
- }
- }
- IL_2C7:
- i++;
- continue;
- goto IL_2C7;
- }
- }
- bool do_animation = false;
- if (tag_data.IsValid("do_animation"))
- {
- do_animation = true;
- }
- if (ikattachType == IKCtrlData.IKAttachType.NewPoint && ikdata is HandFootIKData)
- {
- HandFootIKData handFootIKData = ikdata as HandFootIKData;
- handFootIKData.SetPullState(!tag_data.IsValid("pull_off"));
- }
- maidAndMan.IKTargetToBone(text, maidAndMan2, tgtbone_name, zero, ikattachType, search_sm, do_animation, timing);
- return false;
- }
- public bool TagIKAttachOdoguNext(KagTagSupport tag_data)
- {
- this.CheckAbsolutelyNecessaryTag(tag_data, "ikattachodogunext", new string[]
- {
- "src",
- "srcbone",
- "odogu"
- });
- Maid maidAndMan = this.GetMaidAndMan(tag_data.GetTagProperty("src").AsString());
- if (!maidAndMan)
- {
- return false;
- }
- IKCtrlData.IKExecTiming timing = IKCtrlData.IKExecTiming.FlagPositive;
- if (tag_data.IsValid("exectiming"))
- {
- timing = (IKCtrlData.IKExecTiming)Enum.Parse(typeof(IKCtrlData.IKExecTiming), tag_data.GetTagProperty("exectiming").AsString());
- }
- string text = tag_data.GetTagProperty("srcbone").AsString();
- string odogu_name = tag_data.GetTagProperty("odogu").AsString();
- IKCtrlData ikdata = maidAndMan.IKCtrl.GetIKData(text);
- if (!ikdata)
- {
- return false;
- }
- string tgt_name = string.Empty;
- if (tag_data.IsValid("target"))
- {
- tgt_name = tag_data.GetTagProperty("target").AsString();
- }
- Vector3 zero = Vector3.zero;
- if (tag_data.IsValid("offsetx"))
- {
- zero.x = tag_data.GetTagProperty("offsetx").AsReal();
- }
- if (tag_data.IsValid("offsety"))
- {
- zero.y = tag_data.GetTagProperty("offsety").AsReal();
- }
- if (tag_data.IsValid("offsetz"))
- {
- zero.z = tag_data.GetTagProperty("offsetz").AsReal();
- }
- IKCtrlData.IKAttachType ikattachType = IKCtrlData.IKAttachType.Point;
- if (tag_data.IsValid("attach_type"))
- {
- ikattachType = (IKCtrlData.IKAttachType)Enum.Parse(typeof(IKCtrlData.IKAttachType), tag_data.GetTagProperty("attach_type").AsString());
- }
- if (ikattachType == IKCtrlData.IKAttachType.NewPoint)
- {
- if (tag_data.IsValid("offset_world"))
- {
- ikdata.posOffsetType = IKCtrlData.PosOffsetType.OffsetWorld;
- }
- else if (tag_data.IsValid("offset_bone"))
- {
- ikdata.posOffsetType = IKCtrlData.PosOffsetType.OffsetBone;
- }
- }
- ikdata.GetIKEnable(ikattachType).Recet();
- if (tag_data.IsValid("disable"))
- {
- string[] array = tag_data.GetTagProperty("disable").AsString().Split(new char[]
- {
- ','
- });
- int i = 0;
- while (i < array.Length)
- {
- string text2 = array[i];
- string text3 = text2.ToLower();
- if (text3 != null)
- {
- if (!(text3 == "x"))
- {
- if (!(text3 == "y"))
- {
- if (text3 == "z")
- {
- ikdata.GetIKEnable(ikattachType).EnableZ = false;
- }
- }
- else
- {
- ikdata.GetIKEnable(ikattachType).EnableY = false;
- }
- }
- else
- {
- ikdata.GetIKEnable(ikattachType).EnableX = false;
- }
- }
- IL_2B6:
- i++;
- continue;
- goto IL_2B6;
- }
- }
- bool do_animation = false;
- if (tag_data.IsValid("do_animation"))
- {
- do_animation = true;
- }
- if (ikattachType == IKCtrlData.IKAttachType.NewPoint && ikdata is HandFootIKData)
- {
- HandFootIKData handFootIKData = ikdata as HandFootIKData;
- handFootIKData.SetPullState(!tag_data.IsValid("pull_off"));
- }
- maidAndMan.IKTargetToOdogu(text, odogu_name, tgt_name, zero, ikattachType, do_animation, timing);
- return false;
- }
- public bool TagIKAttachIKBoneNext(KagTagSupport tag_data)
- {
- this.CheckAbsolutelyNecessaryTag(tag_data, "ikattachbonenext", new string[]
- {
- "src",
- "srcbone",
- "target",
- "targetbone"
- });
- Maid maidAndMan = this.GetMaidAndMan(tag_data.GetTagProperty("src").AsString());
- Maid maidAndMan2 = this.GetMaidAndMan(tag_data.GetTagProperty("target").AsString());
- if (maidAndMan == null || maidAndMan2 == null)
- {
- return false;
- }
- IKCtrlData.IKExecTiming timing = IKCtrlData.IKExecTiming.FlagPositive;
- if (tag_data.IsValid("exectiming"))
- {
- timing = (IKCtrlData.IKExecTiming)Enum.Parse(typeof(IKCtrlData.IKExecTiming), tag_data.GetTagProperty("exectiming").AsString());
- }
- string text = tag_data.GetTagProperty("srcbone").AsString();
- string bone_name = tag_data.GetTagProperty("targetbone").AsString();
- IKCtrlData ikdata = maidAndMan.IKCtrl.GetIKData(text);
- if (!ikdata)
- {
- return false;
- }
- Vector3 zero = Vector3.zero;
- if (tag_data.IsValid("offsetx"))
- {
- zero.x = tag_data.GetTagProperty("offsetx").AsReal();
- }
- if (tag_data.IsValid("offsety"))
- {
- zero.y = tag_data.GetTagProperty("offsety").AsReal();
- }
- if (tag_data.IsValid("offsetz"))
- {
- zero.z = tag_data.GetTagProperty("offsetz").AsReal();
- }
- IKCtrlData.IKAttachType ikattachType = IKCtrlData.IKAttachType.Point;
- if (tag_data.IsValid("attach_type"))
- {
- ikattachType = (IKCtrlData.IKAttachType)Enum.Parse(typeof(IKCtrlData.IKAttachType), tag_data.GetTagProperty("attach_type").AsString());
- }
- if (ikattachType == IKCtrlData.IKAttachType.NewPoint)
- {
- if (tag_data.IsValid("offset_world"))
- {
- ikdata.posOffsetType = IKCtrlData.PosOffsetType.OffsetWorld;
- }
- else if (tag_data.IsValid("offset_bone"))
- {
- ikdata.posOffsetType = IKCtrlData.PosOffsetType.OffsetBone;
- }
- }
- ikdata.GetIKEnable(ikattachType).Recet();
- if (tag_data.IsValid("disable"))
- {
- string[] array = tag_data.GetTagProperty("disable").AsString().Split(new char[]
- {
- ','
- });
- int i = 0;
- while (i < array.Length)
- {
- string text2 = array[i];
- string text3 = text2.ToLower();
- if (text3 != null)
- {
- if (!(text3 == "x"))
- {
- if (!(text3 == "y"))
- {
- if (text3 == "z")
- {
- ikdata.GetIKEnable(ikattachType).EnableZ = false;
- }
- }
- else
- {
- ikdata.GetIKEnable(ikattachType).EnableY = false;
- }
- }
- else
- {
- ikdata.GetIKEnable(ikattachType).EnableX = false;
- }
- }
- IL_2BA:
- i++;
- continue;
- goto IL_2BA;
- }
- }
- bool do_animation = tag_data.IsValid("do_animation");
- if (ikattachType == IKCtrlData.IKAttachType.NewPoint && ikdata is HandFootIKData)
- {
- HandFootIKData handFootIKData = ikdata as HandFootIKData;
- handFootIKData.SetPullState(!tag_data.IsValid("pull_off"));
- }
- maidAndMan.IKTargetToIKBone(text, maidAndMan2, bone_name, zero, ikattachType, do_animation, timing);
- return false;
- }
- public bool TagIKSetPelvisPull(KagTagSupport tag_data)
- {
- this.CheckAbsolutelyNecessaryTag(tag_data, "iksetpelvispull", new string[]
- {
- "src"
- });
- Maid maidAndMan = this.GetMaidAndMan(tag_data.GetTagProperty("src").AsString());
- if (!maidAndMan)
- {
- return false;
- }
- bool pelvisPull = tag_data.IsValid("on");
- maidAndMan.body0.IKCtrl.SetPelvisPull(pelvisPull);
- return false;
- }
- public bool TagAllPos(KagTagSupport tag_data)
- {
- bool flag = false;
- bool flag2 = false;
- Vector3 zero = Vector3.zero;
- Vector3 zero2 = Vector3.zero;
- if (tag_data.IsValid("x"))
- {
- flag = true;
- zero.x = tag_data.GetTagProperty("x").AsReal();
- }
- if (tag_data.IsValid("y"))
- {
- flag = true;
- zero.y = tag_data.GetTagProperty("y").AsReal();
- }
- if (tag_data.IsValid("z"))
- {
- flag = true;
- zero.z = tag_data.GetTagProperty("z").AsReal();
- }
- if (tag_data.IsValid("rx"))
- {
- flag2 = true;
- zero2.x = tag_data.GetTagProperty("rx").AsReal();
- }
- if (tag_data.IsValid("ry"))
- {
- flag2 = true;
- zero2.y = tag_data.GetTagProperty("ry").AsReal();
- }
- if (tag_data.IsValid("rz"))
- {
- flag2 = true;
- zero2.z = tag_data.GetTagProperty("rz").AsReal();
- }
- if (flag)
- {
- GameMain.Instance.CharacterMgr.SetCharaAllPos(zero);
- if (!this.script_mgr_.compatibilityMode)
- {
- for (int i = 0; i < GameMain.Instance.CharacterMgr.GetMaidCount(); i++)
- {
- Maid maid = GameMain.Instance.CharacterMgr.GetMaid(i);
- if (maid != null && maid.body0 != null)
- {
- maid.body0.SetBoneHitHeightY(zero.y);
- }
- }
- }
- }
- if (flag2)
- {
- GameMain.Instance.CharacterMgr.SetCharaAllRot(zero2);
- }
- return false;
- }
- public bool TagAllOffSet(KagTagSupport tag_data)
- {
- bool flag = false;
- bool flag2 = false;
- Vector3 zero = Vector3.zero;
- Vector3 zero2 = Vector3.zero;
- if (tag_data.IsValid("x"))
- {
- flag = true;
- zero.x = tag_data.GetTagProperty("x").AsReal();
- }
- if (tag_data.IsValid("y"))
- {
- flag = true;
- zero.y = tag_data.GetTagProperty("y").AsReal();
- }
- if (tag_data.IsValid("z"))
- {
- flag = true;
- zero.z = tag_data.GetTagProperty("z").AsReal();
- }
- if (tag_data.IsValid("rx"))
- {
- flag2 = true;
- zero2.x = tag_data.GetTagProperty("rx").AsReal();
- }
- if (tag_data.IsValid("ry"))
- {
- flag2 = true;
- zero2.y = tag_data.GetTagProperty("ry").AsReal();
- }
- if (tag_data.IsValid("rz"))
- {
- flag2 = true;
- zero2.z = tag_data.GetTagProperty("rz").AsReal();
- }
- if (flag)
- {
- GameMain.Instance.CharacterMgr.CharaAllOfsetPos(zero);
- }
- if (flag2)
- {
- GameMain.Instance.CharacterMgr.CharaAllOfsetRot(zero2);
- }
- return false;
- }
- public bool TagAddAllOffset(KagTagSupport tag_data)
- {
- bool flag = false;
- bool flag2 = false;
- Vector3 zero = Vector3.zero;
- Vector3 zero2 = Vector3.zero;
- if (tag_data.IsValid("x"))
- {
- flag = true;
- zero.x = tag_data.GetTagProperty("x").AsReal();
- }
- if (tag_data.IsValid("y"))
- {
- flag = true;
- zero.y = tag_data.GetTagProperty("y").AsReal();
- }
- if (tag_data.IsValid("z"))
- {
- flag = true;
- zero.z = tag_data.GetTagProperty("z").AsReal();
- }
- if (tag_data.IsValid("rx"))
- {
- flag2 = true;
- zero2.x = tag_data.GetTagProperty("rx").AsReal();
- }
- if (tag_data.IsValid("ry"))
- {
- flag2 = true;
- zero2.y = tag_data.GetTagProperty("ry").AsReal();
- }
- if (tag_data.IsValid("rz"))
- {
- flag2 = true;
- zero2.z = tag_data.GetTagProperty("rz").AsReal();
- }
- if (flag)
- {
- Vector3 charaAllOfsetPos = GameMain.Instance.CharacterMgr.GetCharaAllOfsetPos();
- GameMain.Instance.CharacterMgr.CharaAllOfsetPos(charaAllOfsetPos + zero);
- }
- if (flag2)
- {
- Vector3 charaAllOfsetRot = GameMain.Instance.CharacterMgr.GetCharaAllOfsetRot();
- GameMain.Instance.CharacterMgr.CharaAllOfsetRot(charaAllOfsetRot + zero2);
- }
- return false;
- }
- public bool TagOffSet(KagTagSupport tag_data)
- {
- Maid maidAndMan = this.GetMaidAndMan(tag_data, true);
- if (maidAndMan == null)
- {
- return false;
- }
- bool flag = false;
- bool flag2 = false;
- Vector3 zero = Vector3.zero;
- Vector3 zero2 = Vector3.zero;
- if (tag_data.IsValid("x"))
- {
- flag = true;
- zero.x = tag_data.GetTagProperty("x").AsReal();
- }
- if (tag_data.IsValid("y"))
- {
- flag = true;
- zero.y = tag_data.GetTagProperty("y").AsReal();
- }
- if (tag_data.IsValid("z"))
- {
- flag = true;
- zero.z = tag_data.GetTagProperty("z").AsReal();
- }
- if (tag_data.IsValid("rx"))
- {
- flag2 = true;
- zero2.x = tag_data.GetTagProperty("rx").AsReal();
- }
- if (tag_data.IsValid("ry"))
- {
- flag2 = true;
- zero2.y = tag_data.GetTagProperty("ry").AsReal();
- }
- if (tag_data.IsValid("rz"))
- {
- flag2 = true;
- zero2.z = tag_data.GetTagProperty("rz").AsReal();
- }
- if (flag)
- {
- maidAndMan.SetPos(zero);
- maidAndMan.baseOffset = zero;
- }
- if (flag2)
- {
- maidAndMan.SetRot(zero2);
- maidAndMan.baseEulerAngles = zero2;
- }
- if (ScriptManager.isGP001Mode)
- {
- maidAndMan.UpdateTransformData();
- }
- return false;
- }
- public bool TagRotatelink(KagTagSupport tag_data)
- {
- Maid maidAndMan = this.GetMaidAndMan(tag_data, true);
- if (maidAndMan == null)
- {
- return false;
- }
- Maid maidAndMan2 = this.GetMaidAndMan(tag_data, false);
- if (maidAndMan2 == null)
- {
- return false;
- }
- maidAndMan.rotateLinkMaid = (maidAndMan2.rotateLinkMaid = string.Empty);
- if (tag_data.IsValid("clear"))
- {
- return false;
- }
- maidAndMan.rotateLinkMaid = maidAndMan2.status.guid;
- maidAndMan2.rotateLinkMaid = maidAndMan.status.guid;
- return false;
- }
- public bool TagAxisRotation(KagTagSupport tag_data)
- {
- bool flag = false;
- Vector3 zero = Vector3.zero;
- if (tag_data.IsValid("rx"))
- {
- flag = true;
- zero.x = tag_data.GetTagProperty("rx").AsReal();
- }
- if (tag_data.IsValid("ry"))
- {
- flag = true;
- zero.y = tag_data.GetTagProperty("ry").AsReal();
- }
- if (tag_data.IsValid("rz"))
- {
- flag = true;
- zero.z = tag_data.GetTagProperty("rz").AsReal();
- }
- if (flag)
- {
- Vector3 charaAllOfsetRot = GameMain.Instance.CharacterMgr.GetCharaAllOfsetRot();
- GameMain.Instance.CharacterMgr.CharaAllOfsetRot(charaAllOfsetRot + zero);
- }
- return true;
- }
- public bool TagAllResetPos(KagTagSupport tag_data)
- {
- GameMain.Instance.CharacterMgr.ResetCharaPosAll();
- return false;
- }
- public bool TagTransform(KagTagSupport tag_data)
- {
- Maid maidAndMan = this.GetMaidAndMan(tag_data, true);
- return maidAndMan == null && false;
- }
- public bool TagPosition(KagTagSupport tag_data)
- {
- Maid maidAndMan = this.GetMaidAndMan(tag_data, true);
- return maidAndMan == null && false;
- }
- public bool TagRotation(KagTagSupport tag_data)
- {
- Maid maidAndMan = this.GetMaidAndMan(tag_data, true);
- return maidAndMan == null && false;
- }
- public bool TagCamera(KagTagSupport tag_data)
- {
- Vector3 zero = Vector3.zero;
- Vector2 zero2 = Vector2.zero;
- float f_fRadius = 0f;
- if (tag_data.IsValid("reset"))
- {
- GameMain.Instance.MainCamera.ResetFromScriptOnTarget();
- return false;
- }
- if (tag_data.IsValid("radius"))
- {
- f_fRadius = tag_data.GetTagProperty("radius").AsReal();
- }
- if (tag_data.IsValid("cx"))
- {
- zero.x = tag_data.GetTagProperty("cx").AsReal();
- }
- if (tag_data.IsValid("cy"))
- {
- zero.y = tag_data.GetTagProperty("cy").AsReal();
- }
- if (tag_data.IsValid("cz"))
- {
- zero.z = tag_data.GetTagProperty("cz").AsReal();
- }
- if (tag_data.IsValid("rx"))
- {
- zero2.x = tag_data.GetTagProperty("rx").AsReal();
- }
- if (tag_data.IsValid("ry"))
- {
- zero2.y = tag_data.GetTagProperty("ry").AsReal();
- }
- GameMain.Instance.MainCamera.SetFromScriptOnTarget(zero, f_fRadius, zero2);
- return false;
- }
- public bool TagCameraChase(KagTagSupport tag_data)
- {
- this.CheckAbsolutelyNecessaryTag(tag_data, "camerachase", new string[]
- {
- "chase"
- });
- Maid maidAndMan = this.GetMaidAndMan(tag_data, true);
- if (maidAndMan == null)
- {
- return false;
- }
- string f_strAttachBone = tag_data.GetTagProperty("chase").AsString();
- Vector3 zero = Vector3.zero;
- if (tag_data.IsValid("offsx"))
- {
- zero.x = tag_data.GetTagProperty("offsx").AsReal();
- }
- if (tag_data.IsValid("offsy"))
- {
- zero.y = tag_data.GetTagProperty("offsy").AsReal();
- }
- if (tag_data.IsValid("offsz"))
- {
- zero.z = tag_data.GetTagProperty("offsz").AsReal();
- }
- bool f_fOnece = true;
- if (tag_data.IsValid("continue"))
- {
- f_fOnece = false;
- }
- int millisecond = 0;
- if (tag_data.IsValid("time"))
- {
- millisecond = tag_data.GetTagProperty("time").AsInteger();
- }
- GameMain.Instance.MainCamera.SetChaseCamera(maidAndMan, f_strAttachBone, zero, f_fOnece, GameUty.MillisecondToSecond(millisecond));
- return false;
- }
- public bool TagCameraChaseStop(KagTagSupport tag_data)
- {
- this.CheckAbsolutelyNecessaryTag(tag_data, "camerachasestop", new string[0]);
- GameMain.Instance.MainCamera.RemoveChaseCameraAll();
- return false;
- }
- public bool TagCameraAnimationStart(KagTagSupport tag_data)
- {
- this.CheckAbsolutelyNecessaryTag(tag_data, "cameraanimationstart", new string[]
- {
- "time"
- });
- bool f_bStart = false;
- Vector3 zero = Vector3.zero;
- Vector3 zero2 = Vector3.zero;
- Vector2 zero3 = Vector2.zero;
- Vector2 zero4 = Vector2.zero;
- float f_fRadius = 0f;
- float f_fSRadius = 0f;
- float f_fTime = GameUty.MillisecondToSecond(tag_data.GetTagProperty("time").AsInteger());
- string f_strEaseType = string.Empty;
- bool f_bSkip = tag_data.IsValid("skip");
- if (tag_data.IsValid("radius"))
- {
- f_fRadius = tag_data.GetTagProperty("radius").AsReal();
- }
- if (tag_data.IsValid("cx"))
- {
- zero.x = tag_data.GetTagProperty("cx").AsReal();
- }
- if (tag_data.IsValid("cy"))
- {
- zero.y = tag_data.GetTagProperty("cy").AsReal();
- }
- if (tag_data.IsValid("cz"))
- {
- zero.z = tag_data.GetTagProperty("cz").AsReal();
- }
- if (tag_data.IsValid("rx"))
- {
- zero3.x = tag_data.GetTagProperty("rx").AsReal();
- }
- if (tag_data.IsValid("ry"))
- {
- zero3.y = tag_data.GetTagProperty("ry").AsReal();
- }
- if (tag_data.IsValid("sradius"))
- {
- f_fSRadius = tag_data.GetTagProperty("sradius").AsReal();
- f_bStart = true;
- }
- if (tag_data.IsValid("scx"))
- {
- zero2.x = tag_data.GetTagProperty("scx").AsReal();
- f_bStart = true;
- }
- if (tag_data.IsValid("scy"))
- {
- zero2.y = tag_data.GetTagProperty("scy").AsReal();
- f_bStart = true;
- }
- if (tag_data.IsValid("scz"))
- {
- zero2.z = tag_data.GetTagProperty("scz").AsReal();
- f_bStart = true;
- }
- if (tag_data.IsValid("srx"))
- {
- zero4.x = tag_data.GetTagProperty("srx").AsReal();
- f_bStart = true;
- }
- if (tag_data.IsValid("sry"))
- {
- zero4.y = tag_data.GetTagProperty("sry").AsReal();
- f_bStart = true;
- }
- if (tag_data.IsValid("easetype"))
- {
- f_strEaseType = tag_data.GetTagProperty("easetype").AsString();
- }
- float f_fDelay = 0f;
- if (tag_data.IsValid("delay"))
- {
- f_fDelay = GameUty.MillisecondToSecond(tag_data.GetTagProperty("delay").AsInteger());
- }
- GameMain.Instance.MainCamera.StartAnimationTo(f_bStart, zero2, f_fSRadius, zero4, zero, f_fRadius, zero3, f_fTime, f_strEaseType, f_bSkip, f_fDelay);
- return false;
- }
- public bool TagCameraControl(KagTagSupport tag_data)
- {
- GameMain.Instance.MainCamera.SetControl(tag_data.IsValid("true"));
- return false;
- }
- public bool TagLightMain(KagTagSupport tag_data)
- {
- Vector3 zero = Vector3.zero;
- float intensity = 0f;
- bool flag = false;
- bool flag2 = false;
- if (tag_data.IsValid("rx"))
- {
- zero.x = tag_data.GetTagProperty("rx").AsReal();
- flag = true;
- }
- if (tag_data.IsValid("ry"))
- {
- zero.y = tag_data.GetTagProperty("ry").AsReal();
- flag = true;
- }
- if (tag_data.IsValid("rz"))
- {
- zero.z = tag_data.GetTagProperty("rz").AsReal();
- flag = true;
- }
- if (tag_data.IsValid("intensity"))
- {
- intensity = tag_data.GetTagProperty("intensity").AsReal();
- flag2 = true;
- }
- if (flag)
- {
- GameMain.Instance.MainLight.SetRotation(zero);
- }
- if (flag2)
- {
- GameMain.Instance.MainLight.SetIntensity(intensity);
- }
- return false;
- }
- public bool TagPlayBgm(KagTagSupport tag_data)
- {
- this.CheckAbsolutelyNecessaryTag(tag_data, "playbgm", new string[]
- {
- "file"
- });
- string text = tag_data.GetTagProperty("file").AsString();
- text = Path.ChangeExtension(text, ".ogg");
- int millisecond = 0;
- if (tag_data.IsValid("fade"))
- {
- millisecond = tag_data.GetTagProperty("fade").AsInteger();
- }
- if (tag_data.IsValid("old"))
- {
- string f_strFileName = Path.GetFileNameWithoutExtension(text) + "_OLD.ogg";
- if (GameUty.FileSystem.IsExistentFile(f_strFileName))
- {
- GameMain.Instance.SoundMgr.PlayBGM(f_strFileName, GameUty.MillisecondToSecond(millisecond), true);
- }
- else
- {
- GameMain.Instance.SoundMgr.PlayBGMLegacy(text, GameUty.MillisecondToSecond(millisecond), true);
- }
- }
- else
- {
- GameMain.Instance.SoundMgr.PlayBGM(text, GameUty.MillisecondToSecond(millisecond), true);
- }
- return false;
- }
- public bool TagStopBgm(KagTagSupport tag_data)
- {
- int millisecond = 0;
- if (tag_data.IsValid("fade"))
- {
- millisecond = tag_data.GetTagProperty("fade").AsInteger();
- }
- GameMain.Instance.SoundMgr.StopBGM(GameUty.MillisecondToSecond(millisecond));
- return false;
- }
- public bool TagPlayEnv(KagTagSupport tag_data)
- {
- this.CheckAbsolutelyNecessaryTag(tag_data, "playenv", new string[]
- {
- "file"
- });
- string text = tag_data.GetTagProperty("file").AsString();
- text = Path.ChangeExtension(text, ".ogg");
- int millisecond = 0;
- if (tag_data.IsValid("fade"))
- {
- millisecond = tag_data.GetTagProperty("fade").AsInteger();
- }
- GameMain.Instance.SoundMgr.PlayEnv(text, GameUty.MillisecondToSecond(millisecond));
- return false;
- }
- public bool TagStopEnv(KagTagSupport tag_data)
- {
- int millisecond = 0;
- if (tag_data.IsValid("fade"))
- {
- millisecond = tag_data.GetTagProperty("fade").AsInteger();
- }
- GameMain.Instance.SoundMgr.StopEnv(GameUty.MillisecondToSecond(millisecond));
- return false;
- }
- public bool TagPlaySe(KagTagSupport tag_data)
- {
- this.CheckAbsolutelyNecessaryTag(tag_data, "playse", new string[]
- {
- "file"
- });
- string bgm_file_name = tag_data.GetTagProperty("file").AsString();
- bgm_file_name = Path.ChangeExtension(bgm_file_name, ".ogg");
- if (bgm_file_name == "SE016.ogg" && !GameMain.Instance.CMSystem.EjaculationSeEnabled)
- {
- return false;
- }
- bool loop = tag_data.IsValid("loop");
- int num = 0;
- if (tag_data.IsValid("wait"))
- {
- num = tag_data.GetTagProperty("wait").AsInteger();
- }
- WaitEventList waitEventList = this.GetWaitEventList("se");
- if (num <= 0)
- {
- GameMain.Instance.SoundMgr.PlaySe(bgm_file_name, loop);
- waitEventList.Clear();
- }
- else
- {
- waitEventList.Add(delegate
- {
- GameMain.Instance.SoundMgr.PlaySe(bgm_file_name, loop);
- }, num);
- }
- return false;
- }
- public bool TagStopSe(KagTagSupport tag_data)
- {
- string text = string.Empty;
- if (tag_data.IsValid("file"))
- {
- text = tag_data.GetTagProperty("file").AsString();
- text = Path.ChangeExtension(text, ".ogg");
- }
- if (!string.IsNullOrEmpty(text))
- {
- GameMain.Instance.SoundMgr.StopSe(text);
- }
- else
- {
- GameMain.Instance.SoundMgr.StopSe();
- }
- return false;
- }
- public bool TagPlayVoice(KagTagSupport tag_data)
- {
- bool result = false;
- this.CheckAbsolutelyNecessaryTag(tag_data, "playvoice", new string[]
- {
- "voice"
- });
- string text = tag_data.GetTagProperty("voice").AsString();
- text = Path.ChangeExtension(text, ".ogg");
- bool flag = tag_data.IsValid("loop");
- int millisecond = 0;
- if (tag_data.IsValid("fade"))
- {
- millisecond = tag_data.GetTagProperty("fade").AsInteger();
- }
- int num = -1;
- if (!tag_data.IsValid("dummy"))
- {
- Maid maidAndMan = this.GetMaidAndMan(tag_data, true);
- if (maidAndMan != null && maidAndMan.Visible)
- {
- maidAndMan.AudioMan.LoadPlay(text, GameUty.MillisecondToSecond(millisecond), true, flag);
- if (maidAndMan.AudioMan.isPlay() && maidAndMan.AudioMan.audiosource.clip != null)
- {
- num = (int)(maidAndMan.AudioMan.audiosource.clip.length * 1000f);
- }
- if (tag_data.IsValid("wait"))
- {
- result = this.SetMaidVoiceWait(maidAndMan);
- }
- }
- else
- {
- int voice_pitch = 50;
- AudioSourceMgr.Type soundType = AudioSourceMgr.Type.Voice;
- if (maidAndMan != null)
- {
- voice_pitch = maidAndMan.VoicePitch;
- soundType = maidAndMan.AudioMan.SoundType;
- }
- GameMain.Instance.SoundMgr.PlayDummyVoice(text, GameUty.MillisecondToSecond(millisecond), true, flag, voice_pitch, soundType);
- }
- }
- else
- {
- GameMain.Instance.SoundMgr.PlayDummyVoice(text, GameUty.MillisecondToSecond(millisecond), true, flag, 50, AudioSourceMgr.Type.Voice);
- if (GameMain.Instance.SoundMgr.m_AudioDummyVoice.isPlay() && GameMain.Instance.SoundMgr.m_AudioDummyVoice.audiosource.clip != null)
- {
- num = (int)(GameMain.Instance.SoundMgr.m_AudioDummyVoice.audiosource.clip.length * 1000f);
- }
- if (tag_data.IsValid("wait"))
- {
- result = this.SetDummyVoiceWait();
- }
- }
- if (!flag && !string.IsNullOrEmpty(this.subtitle_data.text) && (0 <= this.subtitle_data.displayTime || 0 < num))
- {
- SubtitleMovieManager globalInstance = SubtitleMovieManager.GetGlobalInstance(this.subtitle_data.casinoType);
- globalInstance.autoDestroy = true;
- int num2 = (0 > this.subtitle_data.displayTime) ? num : this.subtitle_data.displayTime;
- num2 += this.subtitle_data.addDisplayTime;
- globalInstance.Play(this.subtitle_data.text, num2);
- this.subtitle_data.Clear();
- }
- return result;
- }
- public bool TagStopVoice(KagTagSupport tag_data)
- {
- if (!tag_data.IsValid("dummy"))
- {
- Maid maidAndMan = this.GetMaidAndMan(tag_data, true);
- if (maidAndMan == null)
- {
- return false;
- }
- maidAndMan.AudioMan.Stop();
- }
- else
- {
- GameMain.Instance.SoundMgr.StopDummyVoide();
- }
- return false;
- }
- public bool TagStopSound(KagTagSupport tag_data)
- {
- GameMain.Instance.SoundMgr.StopAll();
- return false;
- }
- public bool TagFade3D(KagTagSupport tag_data)
- {
- this.CheckAbsolutelyNecessaryTag(tag_data, "fade3D", new string[]
- {
- "time"
- });
- int millisecond = tag_data.GetTagProperty("time").AsInteger();
- float f_fTime = GameUty.MillisecondToSecond(millisecond);
- bool flag = tag_data.IsValid("sync");
- if (tag_data.IsValid("in"))
- {
- GameMain.Instance.MainCamera.FadeInNoUI(f_fTime, true);
- }
- else
- {
- GameMain.Instance.MainCamera.FadeOutNoUI(f_fTime, true);
- }
- if (flag)
- {
- this.SetFadeWait(true);
- }
- return flag;
- }
- public bool TagSetBg(KagTagSupport tag_data)
- {
- this.CheckAbsolutelyNecessaryTag(tag_data, "setbg", new string[]
- {
- "file"
- });
- string text = tag_data.GetTagProperty("file").AsString();
- Maid maid = GameMain.Instance.CharacterMgr.GetMaid(0);
- if (0 <= text.IndexOf("?"))
- {
- if (maid != null)
- {
- text = ScriptManager.ReplacePersonal(GameMain.Instance.CharacterMgr.GetMaid(0), text);
- }
- else
- {
- Debug.LogError("@SetBgで指定されたファイルに?がありましたが、スロット0にメイドがいないので性格置換できませんでした");
- }
- }
- GameMain.Instance.BgMgr.ChangeBg(text);
- return false;
- }
- public bool TagDraw2DTex(KagTagSupport tag_data)
- {
- this.CheckAbsolutelyNecessaryTag(tag_data, "draw2dtex", new string[]
- {
- "file",
- "x",
- "y"
- });
- GameObject gameObject = GameObject.Find("__GameMain__/SystemUI Root/MessageWindowPanel/tex2dplate");
- bool flag = false;
- if (gameObject == null)
- {
- gameObject = Utility.CreatePrefab(GameObject.Find("__GameMain__/SystemUI Root"), "System/Prefab/tex2dplate", true);
- gameObject.name = "tex2dplate";
- flag = true;
- }
- UITexture component = gameObject.GetComponent<UITexture>();
- component.mainTexture = Resources.Load<Texture2D>(tag_data.GetTagProperty("file").AsString());
- component.SetDimensions(component.mainTexture.width, component.mainTexture.height);
- Vector3 localPosition = new Vector3((float)(-960 + tag_data.GetTagProperty("x").AsInteger()), (float)(540 - tag_data.GetTagProperty("y").AsInteger()), 0f);
- gameObject.transform.localPosition = localPosition;
- if (flag)
- {
- gameObject.transform.parent = GameObject.Find("__GameMain__/SystemUI Root/MessageWindowPanel").transform;
- }
- return false;
- }
- public bool TagClear2DTex(KagTagSupport tag_data)
- {
- GameObject gameObject = GameObject.Find("__GameMain__/SystemUI Root/MessageWindowPanel/tex2dplate");
- if (gameObject != null)
- {
- UnityEngine.Object.DestroyImmediate(gameObject);
- }
- return false;
- }
- public bool TagItemChange(KagTagSupport tag_data)
- {
- this.CheckAbsolutelyNecessaryTag(tag_data, "itemchange", new string[]
- {
- "category",
- "name"
- });
- Maid maidAndMan = this.GetMaidAndMan(tag_data, true);
- if (maidAndMan == null)
- {
- return false;
- }
- maidAndMan.ItemChangeTemp(tag_data.GetTagProperty("category").AsString().ToLower(), tag_data.GetTagProperty("name").AsString());
- return false;
- }
- public bool TagItemSet(KagTagSupport tag_data)
- {
- this.CheckAbsolutelyNecessaryTag(tag_data, "itemset", new string[]
- {
- "category",
- "item"
- });
- Maid maidAndMan = this.GetMaidAndMan(tag_data, true);
- if (maidAndMan == null)
- {
- return false;
- }
- maidAndMan.SetProp(tag_data.GetTagProperty("category").AsString().ToLower(), tag_data.GetTagProperty("item").AsString(), 0, tag_data.IsValid("temp"), tag_data.IsValid("noscale"));
- return false;
- }
- public bool TagItemReset(KagTagSupport tag_data)
- {
- this.CheckAbsolutelyNecessaryTag(tag_data, "itemreset", new string[0]);
- Maid maidAndMan = this.GetMaidAndMan(tag_data, true);
- if (maidAndMan == null)
- {
- return false;
- }
- if (tag_data.IsValid("allwear"))
- {
- for (int i = 81; i <= 110; i++)
- {
- maidAndMan.ResetProp((MPN)i, true);
- }
- }
- else if (tag_data.IsValid("multi"))
- {
- string text = tag_data.GetTagProperty("multi").AsString();
- string[] array = text.Split(new char[]
- {
- ':'
- });
- foreach (string mpn in array)
- {
- maidAndMan.ResetProp(mpn, true);
- }
- }
- else
- {
- maidAndMan.ResetProp(tag_data.GetTagProperty("category").AsString().ToLower(), true);
- }
- return false;
- }
- public bool TagItemPos(KagTagSupport tag_data)
- {
- this.CheckAbsolutelyNecessaryTag(tag_data, "itempos", new string[]
- {
- "slot",
- "target"
- });
- Maid maidAndMan = this.GetMaidAndMan(tag_data, true);
- if (maidAndMan == null)
- {
- return false;
- }
- string f_strSlotName = tag_data.GetTagProperty("slot").AsString();
- string f_strObjTarget = tag_data.GetTagProperty("target").AsString();
- Vector3 f_vPos = default(Vector3);
- bool flag = false;
- Vector3 f_vRot = default(Vector3);
- bool flag2 = false;
- if (tag_data.IsValid("x"))
- {
- f_vPos.x = tag_data.GetTagProperty("x").AsReal();
- flag = true;
- }
- if (tag_data.IsValid("y"))
- {
- f_vPos.y = tag_data.GetTagProperty("y").AsReal();
- flag = true;
- }
- if (tag_data.IsValid("z"))
- {
- f_vPos.z = tag_data.GetTagProperty("z").AsReal();
- flag = true;
- }
- if (tag_data.IsValid("rx"))
- {
- f_vRot.x = tag_data.GetTagProperty("rx").AsReal();
- flag2 = true;
- }
- if (tag_data.IsValid("ry"))
- {
- f_vRot.y = tag_data.GetTagProperty("ry").AsReal();
- flag2 = true;
- }
- if (tag_data.IsValid("rz"))
- {
- f_vRot.z = tag_data.GetTagProperty("rz").AsReal();
- flag2 = true;
- }
- if (flag)
- {
- maidAndMan.body0.SetSlotOffsetPos(f_strSlotName, f_strObjTarget, f_vPos);
- }
- if (flag2)
- {
- maidAndMan.body0.SetSlotOffsetRot(f_strSlotName, f_strObjTarget, f_vRot);
- }
- return false;
- }
- public bool TagAllProcPropSeqStart(KagTagSupport tag_data)
- {
- Maid maidAndMan = this.GetMaidAndMan(tag_data, true);
- if (maidAndMan == null)
- {
- return false;
- }
- if (tag_data.IsValid("fix"))
- {
- maidAndMan.AllProcProp();
- }
- else
- {
- maidAndMan.AllProcPropSeqStart();
- if (tag_data.IsValid("sync") && maidAndMan.Visible)
- {
- this.SetMaidAllPropSeqWait(maidAndMan);
- return true;
- }
- }
- return false;
- }
- public bool TagItemMask(KagTagSupport tag_data)
- {
- this.CheckAbsolutelyNecessaryTag(tag_data, "itemmask", new string[]
- {
- "slot",
- "hide"
- });
- Maid maidAndMan = this.GetMaidAndMan(tag_data, true);
- if (maidAndMan == null)
- {
- return false;
- }
- string text = tag_data.GetTagProperty("slot").AsString();
- bool f_bVisible = tag_data.GetTagProperty("hide").AsBool();
- TBody.SlotID f_eSlot = TBody.SlotID.accAnl;
- try
- {
- f_eSlot = (TBody.SlotID)Enum.Parse(typeof(TBody.SlotID), text);
- }
- catch
- {
- NDebug.Assert("@itemmask TBody.SlotID enum convert error.\\n" + text, false);
- }
- maidAndMan.body0.SetMask(f_eSlot, f_bVisible);
- return false;
- }
- public bool TagItemMaskMode(KagTagSupport tag_data)
- {
- this.CheckAbsolutelyNecessaryTag(tag_data, "itemmaskmode", new string[]
- {
- "type"
- });
- Maid maidAndMan = this.GetMaidAndMan(tag_data, true);
- if (maidAndMan == null)
- {
- return false;
- }
- string text = tag_data.GetTagProperty("type").AsString();
- TBody.MaskMode maskMode = TBody.MaskMode.None;
- try
- {
- maskMode = (TBody.MaskMode)Enum.Parse(typeof(TBody.MaskMode), text);
- }
- catch
- {
- NDebug.Assert("@itemmaskmode TBody.MaskMode enum convert error.\\n" + text, false);
- }
- maidAndMan.body0.SetMaskMode(maskMode);
- return false;
- }
- public bool TagMaidReset(KagTagSupport tag_data)
- {
- this.CheckAbsolutelyNecessaryTag(tag_data, "maidreset", new string[]
- {
- "maid"
- });
- Maid maidAndMan = this.GetMaidAndMan(tag_data, true);
- if (maidAndMan == null)
- {
- return false;
- }
- maidAndMan.ResetAll();
- return this.SetMaidAllPropSeqWait(maidAndMan);
- }
- public bool TagPropSet(KagTagSupport tag_data)
- {
- this.CheckAbsolutelyNecessaryTag(tag_data, "propset", new string[]
- {
- "category"
- });
- Maid maidAndMan = this.GetMaidAndMan(tag_data, true);
- if (maidAndMan == null)
- {
- return false;
- }
- bool f_bTemp = tag_data.IsValid("temp");
- string text = tag_data.GetTagProperty("category").AsString();
- if (tag_data.IsValid("autofix"))
- {
- string slotname = tag_data.GetTagProperty("slot").AsString();
- TBodySkin slot = maidAndMan.body0.GetSlot(slotname);
- string param = slot.GetParam2("autofix_" + text);
- if (!string.IsNullOrEmpty(param))
- {
- int val = 0;
- if (int.TryParse(param, out val))
- {
- maidAndMan.SetProp(text, val, f_bTemp);
- }
- }
- }
- else if (tag_data.IsValid("val"))
- {
- int val2 = tag_data.GetTagProperty("val").AsInteger();
- maidAndMan.SetProp(text, val2, f_bTemp);
- }
- else
- {
- Debug.LogError("@PropSet には val か autofix のどちらかの指定が必要です。");
- }
- return false;
- }
- public bool TagPropReset(KagTagSupport tag_data)
- {
- this.CheckAbsolutelyNecessaryTag(tag_data, "propreset", new string[]
- {
- "category"
- });
- Maid maidAndMan = this.GetMaidAndMan(tag_data, true);
- if (maidAndMan == null)
- {
- return false;
- }
- string mpn = tag_data.GetTagProperty("category").AsString();
- maidAndMan.ResetProp(mpn, false);
- return false;
- }
- public bool TagAddPrefabBg(KagTagSupport tag_data)
- {
- this.CheckAbsolutelyNecessaryTag(tag_data, "addprefabbg", new string[]
- {
- "name"
- });
- string text = string.Empty;
- string f_strSrc = string.Empty;
- if (tag_data.IsValid("src"))
- {
- text = tag_data.GetTagProperty("src").AsString();
- }
- else if (tag_data.IsValid("ab"))
- {
- f_strSrc = tag_data.GetTagProperty("ab").AsString();
- }
- string f_strName = tag_data.GetTagProperty("name").AsString();
- string f_strDest = string.Empty;
- if (tag_data.IsValid("dest"))
- {
- f_strDest = tag_data.GetTagProperty("dest").AsString();
- }
- Vector3 zero = Vector3.zero;
- Vector3 zero2 = Vector3.zero;
- if (tag_data.IsValid("x"))
- {
- zero.x = tag_data.GetTagProperty("x").AsReal();
- }
- if (tag_data.IsValid("y"))
- {
- zero.y = tag_data.GetTagProperty("y").AsReal();
- }
- if (tag_data.IsValid("z"))
- {
- zero.z = tag_data.GetTagProperty("z").AsReal();
- }
- if (tag_data.IsValid("rx"))
- {
- zero2.x = tag_data.GetTagProperty("rx").AsReal();
- }
- if (tag_data.IsValid("ry"))
- {
- zero2.y = tag_data.GetTagProperty("ry").AsReal();
- }
- if (tag_data.IsValid("rz"))
- {
- zero2.z = tag_data.GetTagProperty("rz").AsReal();
- }
- if (this.script_mgr_.compatibilityMode && text.ToLower() == "odogu_manaita")
- {
- zero = new Vector3(2.2485f, 0.772f, -0.953f);
- }
- if (!string.IsNullOrEmpty(text))
- {
- GameMain.Instance.BgMgr.AddPrefabToBg(text, f_strName, f_strDest, zero, zero2);
- }
- else
- {
- GameMain.Instance.BgMgr.AddAssetsBundleToBg(f_strSrc, f_strName, f_strDest, zero, zero2);
- }
- return false;
- }
- public bool TagSetPrefabBgTransformData(KagTagSupport tag_data)
- {
- this.CheckAbsolutelyNecessaryTag(tag_data, "SetPrefabBgTransformData", new string[]
- {
- "name"
- });
- GameObject prefabFromBg = GameMain.Instance.BgMgr.GetPrefabFromBg(tag_data.GetTagProperty("name").AsString());
- if (prefabFromBg != null)
- {
- Transform transform = prefabFromBg.transform;
- Vector3 localPosition = transform.localPosition;
- Vector3 eulerAngles = transform.localRotation.eulerAngles;
- Vector3 localScale = transform.localScale;
- if (tag_data.IsValid("x"))
- {
- localPosition.x = tag_data.GetTagProperty("x").AsReal();
- }
- if (tag_data.IsValid("y"))
- {
- localPosition.y = tag_data.GetTagProperty("y").AsReal();
- }
- if (tag_data.IsValid("z"))
- {
- localPosition.z = tag_data.GetTagProperty("z").AsReal();
- }
- if (tag_data.IsValid("rx"))
- {
- eulerAngles.x = tag_data.GetTagProperty("rx").AsReal();
- }
- if (tag_data.IsValid("ry"))
- {
- eulerAngles.y = tag_data.GetTagProperty("ry").AsReal();
- }
- if (tag_data.IsValid("rz"))
- {
- eulerAngles.z = tag_data.GetTagProperty("rz").AsReal();
- }
- if (tag_data.IsValid("sx"))
- {
- localScale.x = tag_data.GetTagProperty("sx").AsReal();
- }
- if (tag_data.IsValid("sy"))
- {
- localScale.y = tag_data.GetTagProperty("sy").AsReal();
- }
- if (tag_data.IsValid("sz"))
- {
- localScale.z = tag_data.GetTagProperty("sz").AsReal();
- }
- transform.localPosition = localPosition;
- transform.localRotation = Quaternion.Euler(eulerAngles);
- transform.localScale = localScale;
- }
- return false;
- }
- public bool TagDelPrefabBg(KagTagSupport tag_data)
- {
- this.CheckAbsolutelyNecessaryTag(tag_data, "delprefabBg", new string[]
- {
- "name"
- });
- GameMain.Instance.BgMgr.DelPrefabFromBg(tag_data.GetTagProperty("name").AsString());
- return false;
- }
- public bool TagDelPrefabBgAll(KagTagSupport tag_data)
- {
- GameMain.Instance.BgMgr.DelPrefabFromBgAll();
- return false;
- }
- public bool TagMovePrefabToChara(KagTagSupport tag_data)
- {
- this.CheckAbsolutelyNecessaryTag(tag_data, "moveprefabtochara", new string[]
- {
- "bone",
- "name"
- });
- Maid maidAndMan = this.GetMaidAndMan(tag_data, true);
- if (maidAndMan == null)
- {
- return false;
- }
- string f_strDestBone = tag_data.GetTagProperty("bone").AsString();
- string f_strPrefabName = tag_data.GetTagProperty("name").AsString();
- Vector3 zero = Vector3.zero;
- if (tag_data.IsValid("offsx"))
- {
- zero.x = tag_data.GetTagProperty("offsx").AsReal();
- }
- if (tag_data.IsValid("offsy"))
- {
- zero.y = tag_data.GetTagProperty("offsy").AsReal();
- }
- if (tag_data.IsValid("offsz"))
- {
- zero.z = tag_data.GetTagProperty("offsz").AsReal();
- }
- int millisecond = 0;
- if (tag_data.IsValid("time"))
- {
- millisecond = tag_data.GetTagProperty("time").AsInteger();
- }
- GameMain.Instance.BgMgr.MovePrefabToChara(f_strPrefabName, maidAndMan, f_strDestBone, zero, Vector3.zero, GameUty.MillisecondToSecond(millisecond));
- return false;
- }
- public bool TagAddPrefabWorld(KagTagSupport tag_data)
- {
- return false;
- }
- public bool TagReleasePrefab(KagTagSupport tag_data)
- {
- return false;
- }
- public bool TagPrefabAnimatorSetParam(KagTagSupport tag_data)
- {
- this.CheckAbsolutelyNecessaryTag(tag_data, "name", new string[]
- {
- "param"
- });
- string f_strName = tag_data.GetTagProperty("name").AsString();
- string f_strParam = tag_data.GetTagProperty("param").AsString();
- if (tag_data.IsValid("bool"))
- {
- GameMain.Instance.BgMgr.PrefabAnimatorSetParam<bool>(f_strName, f_strParam, tag_data.GetTagProperty("bool").AsBool());
- }
- else if (tag_data.IsValid("int"))
- {
- GameMain.Instance.BgMgr.PrefabAnimatorSetParam<int>(f_strName, f_strParam, tag_data.GetTagProperty("int").AsInteger());
- }
- else if (tag_data.IsValid("float"))
- {
- GameMain.Instance.BgMgr.PrefabAnimatorSetParam<float>(f_strName, f_strParam, tag_data.GetTagProperty("float").AsReal());
- }
- else if (tag_data.IsValid("trigger"))
- {
- GameMain.Instance.BgMgr.PrefabAnimatorTrigger(f_strName, f_strParam, tag_data.IsValid("reset"));
- }
- return false;
- }
- public bool TagChinko(KagTagSupport tag_data)
- {
- bool chinkoVisible = tag_data.IsValid("on");
- Maid maidAndMan = this.GetMaidAndMan(tag_data, true);
- if (maidAndMan == null || !maidAndMan.boMAN)
- {
- return false;
- }
- maidAndMan.body0.SetChinkoVisible(chinkoVisible);
- return false;
- }
- public bool TagChinSlide(KagTagSupport tag_data)
- {
- if (!Product.isEnglish || Product.isPublic)
- {
- return false;
- }
- if (tag_data.IsValid("stop"))
- {
- List<ChinkoCtrl> list2 = new List<ChinkoCtrl>();
- Action<Maid, List<ChinkoCtrl>> action = delegate(Maid maid, List<ChinkoCtrl> list)
- {
- if (maid != null && maid.body0 != null && maid.body0.isLoadedBody && maid.body0.chinkoCtrl != null)
- {
- list.Add(maid.body0.chinkoCtrl);
- }
- };
- if (tag_data.IsValid("man"))
- {
- action(this.GetMaidAndMan(tag_data, true), list2);
- }
- else
- {
- for (int i = 0; i < GameMain.Instance.CharacterMgr.GetManCount(); i++)
- {
- action(GameMain.Instance.CharacterMgr.GetMan(i), list2);
- }
- }
- foreach (ChinkoCtrl chinkoCtrl in list2)
- {
- chinkoCtrl.StopChinkoSlide();
- }
- }
- else
- {
- this.CheckAbsolutelyNecessaryTag(tag_data, "maid", new string[]
- {
- "man",
- "reg"
- });
- Maid maidAndMan = this.GetMaidAndMan(tag_data, false);
- Maid maidAndMan2 = this.GetMaidAndMan(tag_data, true);
- Vector3 zero = Vector3.zero;
- if (tag_data.IsValid("offset"))
- {
- string text = tag_data.GetTagProperty("offset").AsString();
- string[] array = text.Split(new char[]
- {
- ','
- });
- zero.x = float.Parse(array[0]);
- zero.y = float.Parse(array[1]);
- zero.z = float.Parse(array[2]);
- }
- if (maidAndMan != null && maidAndMan.body0 != null && maidAndMan.body0.isLoadedBody)
- {
- string value = tag_data.GetTagProperty("reg").AsString();
- ChinkoCtrl.TARGET targetId = (ChinkoCtrl.TARGET)Enum.Parse(typeof(ChinkoCtrl.TARGET), value, true);
- if (tag_data.IsValid("apprdist"))
- {
- float num = (float)tag_data.GetTagProperty("apprdist").AsInteger() * 0.01f;
- }
- maidAndMan.body0.chinkoCtrl.StartChinkoSlide(maidAndMan2, targetId, zero, 0.05f);
- }
- }
- return false;
- }
- public bool TagSetLoacalPosition(KagTagSupport tag_data)
- {
- return false;
- }
- public bool TagAddLocalPosition(KagTagSupport tag_data)
- {
- return false;
- }
- public bool TagOpenMouth(KagTagSupport tag_data)
- {
- Maid maidAndMan = this.GetMaidAndMan(tag_data, true);
- if (maidAndMan == null)
- {
- return false;
- }
- if (tag_data.IsValid("open"))
- {
- maidAndMan.OpenMouth(true);
- }
- if (tag_data.IsValid("close"))
- {
- maidAndMan.OpenMouth(false);
- }
- return false;
- }
- public bool TagEyeToPosition(KagTagSupport tag_data)
- {
- Maid maidAndMan = this.GetMaidAndMan(tag_data, true);
- if (maidAndMan == null)
- {
- return false;
- }
- Vector3 f_vecTargetPos = default(Vector3);
- if (tag_data.IsValid("x"))
- {
- f_vecTargetPos.x = tag_data.GetTagProperty("x").AsReal();
- }
- if (tag_data.IsValid("y"))
- {
- f_vecTargetPos.y = tag_data.GetTagProperty("y").AsReal();
- }
- if (tag_data.IsValid("z"))
- {
- f_vecTargetPos.z = tag_data.GetTagProperty("z").AsReal();
- }
- int millisecond = 500;
- if (tag_data.IsValid("blend"))
- {
- millisecond = tag_data.GetTagProperty("blend").AsInteger();
- }
- maidAndMan.EyeToPosition(f_vecTargetPos, GameUty.MillisecondToSecond(millisecond));
- return false;
- }
- public bool TagEyeToTarget(KagTagSupport tag_data)
- {
- Maid maidAndMan = this.GetMaidAndMan(tag_data, true);
- if (maidAndMan == null)
- {
- return false;
- }
- this.CheckAbsolutelyNecessaryTag(tag_data, "eyetotarget", new string[]
- {
- "target"
- });
- Maid maidAndMan2 = this.GetMaidAndMan(tag_data.GetTagProperty("target").AsString());
- int millisecond = 500;
- if (tag_data.IsValid("blend"))
- {
- millisecond = tag_data.GetTagProperty("blend").AsInteger();
- }
- string text = string.Empty;
- if (tag_data.IsValid("bone"))
- {
- text = tag_data.GetTagProperty("bone").AsString();
- }
- if (text == string.Empty)
- {
- maidAndMan.EyeToTarget(maidAndMan2, GameUty.MillisecondToSecond(millisecond), "Bip01 Head");
- }
- else
- {
- maidAndMan.EyeToTarget(maidAndMan2, GameUty.MillisecondToSecond(millisecond), text);
- }
- return false;
- }
- public bool TagEyeToCamera(KagTagSupport tag_data)
- {
- Maid maidAndMan = this.GetMaidAndMan(tag_data, true);
- if (maidAndMan == null)
- {
- return false;
- }
- this.CheckAbsolutelyNecessaryTag(tag_data, "eyetocamera", new string[]
- {
- "move"
- });
- string text = tag_data.GetTagProperty("move").AsString();
- Maid.EyeMoveType f_eType = Maid.EyeMoveType.無し;
- try
- {
- f_eType = (Maid.EyeMoveType)Enum.Parse(typeof(Maid.EyeMoveType), text);
- }
- catch (ArgumentException)
- {
- NDebug.Assert("Maid.EyeMoveType\nenum parse error.[" + text + "]", false);
- }
- int millisecond = 500;
- if (tag_data.IsValid("blend"))
- {
- millisecond = tag_data.GetTagProperty("blend").AsInteger();
- }
- maidAndMan.EyeToCamera(f_eType, GameUty.MillisecondToSecond(millisecond));
- return false;
- }
- public bool TagEyeToReset(KagTagSupport tag_data)
- {
- Maid maidAndMan = this.GetMaidAndMan(tag_data, true);
- if (maidAndMan == null)
- {
- return false;
- }
- int millisecond = 500;
- if (tag_data.IsValid("blend"))
- {
- millisecond = tag_data.GetTagProperty("blend").AsInteger();
- }
- maidAndMan.EyeToReset(GameUty.MillisecondToSecond(millisecond));
- return false;
- }
- public bool TagSetMaidOffsetPos(KagTagSupport tag_data)
- {
- Maid maidAndMan = this.GetMaidAndMan(tag_data, true);
- if (maidAndMan == null)
- {
- return false;
- }
- this.CheckAbsolutelyNecessaryTag(tag_data, "setmaidoffsetpos", new string[]
- {
- "splitnum"
- });
- int f_nCSTSplitNum = tag_data.GetTagProperty("splitnum").AsInteger();
- CharacterMgr.CharaPer f_cIn = BaseKagManager.PerthOffsetPosTagData.CreateCharaPer(this.tjs_, tag_data);
- GameMain.Instance.CharacterMgr.SetMaidOffsetPos(maidAndMan, f_nCSTSplitNum, f_cIn);
- return false;
- }
- public bool TagSetMaidOffsetMultiPos(KagTagSupport tag_data)
- {
- this.CheckAbsolutelyNecessaryTag(tag_data, "setmaidoffsetpos", new string[]
- {
- "splitnum"
- });
- int f_nCSTSplitNum = tag_data.GetTagProperty("splitnum").AsInteger();
- List<KeyValuePair<Maid, CharacterMgr.CharaPer>> list = BaseKagManager.PerthOffsetPosTagData.CreateMultiCharaPer(this.tjs_, tag_data, this);
- GameMain.Instance.CharacterMgr.SetMaidOffsetOther(list, f_nCSTSplitNum);
- if (!this.script_mgr_.compatibilityMode)
- {
- for (int i = 0; i < list.Count; i++)
- {
- Maid targetMaid = list[i].Key;
- if (this.maidOffsetSetList.Find((Maid maid) => maid == targetMaid) == null)
- {
- this.maidOffsetSetList.Add(targetMaid);
- }
- }
- }
- return false;
- }
- public bool TagSetManOffsetPos(KagTagSupport tag_data)
- {
- this.CheckAbsolutelyNecessaryTag(tag_data, "TagSetManOffsetPos", new string[]
- {
- "man",
- "splitnum",
- "target",
- "penisdetail"
- });
- Maid maidAndMan = this.GetMaidAndMan(tag_data, true);
- if (maidAndMan == null)
- {
- return false;
- }
- string tag_str = tag_data.GetTagProperty("target").AsString();
- Maid maidAndMan2 = this.GetMaidAndMan(tag_str);
- int f_nCSTSplitNum = tag_data.GetTagProperty("splitnum").AsInteger();
- bool f_bPenisDetailMode = tag_data.GetTagProperty("penisdetail").AsBool();
- KeyValuePair<CharacterMgr.CharaPer, CharacterMgr.PenisPer> keyValuePair = BaseKagManager.PerthOffsetPosTagData.CreateCharaPerAndPenisPer(this.tjs_, tag_data);
- GameMain.Instance.CharacterMgr.SetManOffsetPos(maidAndMan, maidAndMan2, f_nCSTSplitNum, f_bPenisDetailMode, keyValuePair.Key, keyValuePair.Value);
- if (!this.script_mgr_.compatibilityMode)
- {
- Maid targetMan = maidAndMan;
- if (this.maidOffsetSetList.Find((Maid maid) => maid == targetMan) == null)
- {
- this.maidOffsetSetList.Add(targetMan);
- }
- }
- return false;
- }
- public bool TagSetMaidOffsetPosCategory(KagTagSupport tag_data)
- {
- this.CheckAbsolutelyNecessaryTag(tag_data, "setmaidoffsetposcategory", new string[]
- {
- "category"
- });
- Maid maidAndMan = this.GetMaidAndMan(tag_data, true);
- if (maidAndMan == null)
- {
- return false;
- }
- string category = tag_data.GetTagProperty("category").AsString();
- if (tag_data.IsValid("x"))
- {
- maidAndMan.SetPosOffsetFromUdeSclX(category, tag_data.GetTagProperty("x").AsReal());
- }
- if (tag_data.IsValid("y"))
- {
- maidAndMan.SetPosOffsetFromUdeSclY(category, tag_data.GetTagProperty("y").AsReal());
- }
- if (tag_data.IsValid("z"))
- {
- maidAndMan.SetPosOffsetFromUdeSclZ(category, tag_data.GetTagProperty("z").AsReal());
- }
- return false;
- }
- public bool TagAddPrefabChara(KagTagSupport tag_data)
- {
- this.CheckAbsolutelyNecessaryTag(tag_data, "addprefabchara", new string[]
- {
- "src",
- "bone"
- });
- Maid maidAndMan = this.GetMaidAndMan(tag_data, true);
- if (maidAndMan == null)
- {
- return false;
- }
- string text = tag_data.GetTagProperty("src").AsString();
- string f_strDestBone = tag_data.GetTagProperty("bone").AsString();
- string f_strName = text;
- if (tag_data.IsValid("name"))
- {
- f_strName = tag_data.GetTagProperty("name").AsString();
- }
- Vector3 zero = Vector3.zero;
- Vector3 zero2 = Vector3.zero;
- if (tag_data.IsValid("x"))
- {
- zero.x = tag_data.GetTagProperty("x").AsReal();
- }
- if (tag_data.IsValid("y"))
- {
- zero.y = tag_data.GetTagProperty("y").AsReal();
- }
- if (tag_data.IsValid("z"))
- {
- zero.z = tag_data.GetTagProperty("z").AsReal();
- }
- if (tag_data.IsValid("rx"))
- {
- zero2.x = tag_data.GetTagProperty("rx").AsReal();
- }
- if (tag_data.IsValid("ry"))
- {
- zero2.y = tag_data.GetTagProperty("ry").AsReal();
- }
- if (tag_data.IsValid("rz"))
- {
- zero2.z = tag_data.GetTagProperty("rz").AsReal();
- }
- maidAndMan.AddPrefab(text, f_strName, f_strDestBone, zero, zero2);
- return false;
- }
- public bool TagDelPrefabChara(KagTagSupport tag_data)
- {
- this.CheckAbsolutelyNecessaryTag(tag_data, "delprefabchara", new string[]
- {
- "name"
- });
- Maid maidAndMan = this.GetMaidAndMan(tag_data, true);
- if (maidAndMan == null)
- {
- return false;
- }
- maidAndMan.DelPrefab(tag_data.GetTagProperty("name").AsString());
- return false;
- }
- public bool TagDelPrefabCharaAll(KagTagSupport tag_data)
- {
- Maid maidAndMan = this.GetMaidAndMan(tag_data, true);
- if (maidAndMan == null)
- {
- return false;
- }
- maidAndMan.DelPrefabAll();
- return false;
- }
- public bool TagAnimObjChara(KagTagSupport tag_data)
- {
- this.CheckAbsolutelyNecessaryTag(tag_data, "animobjchara", new string[]
- {
- "name",
- "mot",
- "play",
- "loop"
- });
- Maid maidAndMan = this.GetMaidAndMan(tag_data, true);
- if (maidAndMan == null)
- {
- return false;
- }
- string f_strName = tag_data.GetTagProperty("name").AsString();
- string f_strAnimName = tag_data.GetTagProperty("mot").AsString();
- bool f_bNowPlay = tag_data.GetTagProperty("play").AsBool();
- bool f_bLoop = tag_data.GetTagProperty("loop").AsBool();
- maidAndMan.AnimationObject(f_strName, f_strAnimName, f_bNowPlay, f_bLoop);
- return false;
- }
- public bool TagCharaActivate(KagTagSupport tag_data)
- {
- if (this.script_mgr_.compatibilityMode)
- {
- return this.TagCompatibilityCharaActivate(tag_data);
- }
- GameMain.Instance.ScriptMgr.StopMotionScript();
- int num = 0;
- bool flag = false;
- if (tag_data.IsValid("maid"))
- {
- num = tag_data.GetTagProperty("maid").AsInteger();
- }
- else if (tag_data.IsValid("man"))
- {
- flag = true;
- num = tag_data.GetTagProperty("man").AsInteger();
- }
- else
- {
- NDebug.Assert("@charaactivate error.", false);
- }
- CharacterMgr characterMgr = GameMain.Instance.CharacterMgr;
- Maid maid = null;
- if (tag_data.IsValid("leader"))
- {
- NDebug.Assert(!flag, "@charaactivateのleaderタグはメイド専用です。man指定がされています。");
- for (int i = 0; i < characterMgr.GetStockMaidCount(); i++)
- {
- Maid stockMaid = characterMgr.GetStockMaid(i);
- if (stockMaid != null && stockMaid.status.leader)
- {
- characterMgr.SetActiveMaid(stockMaid, num);
- maid = stockMaid;
- break;
- }
- }
- NDebug.Assert(maid != null, "メイド長を探せませんでした");
- }
- else if (tag_data.IsValid("rank1"))
- {
- NDebug.Assert(!flag, "@charaactivateのrank1タグはメイド専用です。man指定がされています。");
- List<Maid> list = new List<Maid>();
- for (int j = 0; j < characterMgr.GetStockMaidCount(); j++)
- {
- Maid stockMaid2 = characterMgr.GetStockMaid(j);
- if (stockMaid2 != null)
- {
- list.Add(stockMaid2);
- }
- }
- List<Maid> list2 = list;
- if (BaseKagManager.<>f__mg$cache0 == null)
- {
- BaseKagManager.<>f__mg$cache0 = new Comparison<Maid>(CharacterSelectManager.SortMaidRanking);
- }
- list2.Sort(BaseKagManager.<>f__mg$cache0);
- for (int k = 0; k < list.Count; k++)
- {
- if (list[k].status.popularRank == 1)
- {
- characterMgr.SetActiveMaid(list[k], num);
- maid = list[k];
- break;
- }
- }
- }
- else if (tag_data.IsValid("main"))
- {
- Personal.Data data = Personal.GetData(tag_data.GetTagProperty("main").AsString());
- NDebug.Assert(!flag, "@charaactivateのmainタグはメイド専用です。man指定がされています。");
- for (int l = 0; l < characterMgr.GetStockMaidCount(); l++)
- {
- Maid stockMaid3 = characterMgr.GetStockMaid(l);
- if (stockMaid3 != null && stockMaid3.status.mainChara && stockMaid3.status.personal.id == data.id)
- {
- characterMgr.SetActiveMaid(stockMaid3, num);
- maid = stockMaid3;
- break;
- }
- }
- NDebug.Assert(maid != null, data.drawName + "性格のメインキャラを探せませんでした");
- }
- else if (tag_data.IsValid("npc") || tag_data.IsValid("sub"))
- {
- bool flag2 = false;
- if (tag_data.IsValid("sub"))
- {
- string b = tag_data.GetTagProperty("sub").AsString();
- NDebug.Assert(!flag, "@charaactivateのsubタグはメイド専用です。man指定がされています。");
- for (int m = 0; m < characterMgr.GetStockMaidCount(); m++)
- {
- Maid stockMaid4 = characterMgr.GetStockMaid(m);
- if (stockMaid4 != null && stockMaid4.status.heroineType == HeroineType.Sub && stockMaid4.status.subCharaData != null && stockMaid4.status.subCharaData.uniqueName == b)
- {
- characterMgr.SetActiveMaid(stockMaid4, num);
- maid = stockMaid4;
- flag2 = true;
- break;
- }
- }
- }
- if (!flag2)
- {
- string text = (!tag_data.IsValid("sub")) ? tag_data.GetTagProperty("npc").AsString() : tag_data.GetTagProperty("sub").AsString();
- if (SubMaid.Contains(text))
- {
- NDebug.Assert(!flag, "npc指定の男は日対応です[" + text + "]");
- maid = characterMgr.ActivateNpc(num);
- NDebug.Assert(maid.boNPC, "NPCメイドではないメイドにNPCプリセットを適用しようとしました");
- SubMaid.Data.CharacterStatus characterStatus = (!GameMain.Instance.CharacterMgr.status.lockUserDraftMaid) ? SubMaid.GetData(text).status : SubMaid.GetData(text).secondStatus;
- if (characterStatus == null)
- {
- characterStatus = SubMaid.GetData(text).status;
- }
- CharacterMgr.npcDatas[characterStatus.presetName].Apply(maid, false);
- }
- else
- {
- NDebug.Assert(CharacterMgr.npcDatas.ContainsKey(text), "キャラクタープリセット設定[" + text + "]の情報が見つかりませんでした");
- if (!flag)
- {
- maid = characterMgr.ActivateNpc(num);
- }
- else
- {
- maid = characterMgr.GetMan(num);
- NDebug.Assert(maid != null, "男スロット指定が限界数を超えています。指定可能範囲は0~" + 5.ToString() + "までです");
- }
- if (!flag)
- {
- NDebug.Assert(maid.boNPC, "NPCメイドではないメイドにNPCプリセットを適用しようとしました");
- }
- CharacterMgr.npcDatas[text].Apply(maid, false);
- }
- maid.gameObject.name = ((!flag) ? "Maid[" : "Man[") + num.ToString() + "]";
- if (!flag)
- {
- GameObject gameObject = maid.gameObject;
- string name = gameObject.name;
- gameObject.name = string.Concat(new string[]
- {
- name,
- " ",
- maid.status.firstName,
- " ",
- maid.status.lastName
- });
- }
- }
- }
- else if (tag_data.IsValid("slot"))
- {
- NDebug.Assert(!flag, "@charaactivateのslotタグはメイド専用です。man指定がされています。");
- int f_nStockSlot = tag_data.GetTagProperty("slot").AsInteger();
- maid = GameMain.Instance.CharacterMgr.Activate(num, f_nStockSlot, flag, false);
- }
- else if (tag_data.IsValid("swap"))
- {
- int slotNoB = tag_data.GetTagProperty("swap").AsInteger();
- GameMain.Instance.CharacterMgr.SwapActiveSlot(num, slotNoB, flag);
- }
- else
- {
- NDebug.Assert("@charaactivate error.", false);
- }
- bool result = false;
- if (maid != null && !tag_data.IsValid("noload"))
- {
- maid.Visible = true;
- result = this.SetMaidAllPropSeqWait(maid);
- }
- return result;
- }
- public bool TagCompatibilityCharaActivate(KagTagSupport tag_data)
- {
- int num = 0;
- bool flag = false;
- if (tag_data.IsValid("maid"))
- {
- num = tag_data.GetTagProperty("maid").AsInteger();
- }
- else if (tag_data.IsValid("man"))
- {
- flag = true;
- num = tag_data.GetTagProperty("man").AsInteger();
- if (this.script_mgr_.compatibilityMode && 6 <= num)
- {
- num = 5;
- }
- }
- else if (tag_data.IsValid("file"))
- {
- num = 16;
- }
- else
- {
- NDebug.Assert("@charaactivate error.", false);
- }
- Maid maid = null;
- if (tag_data.IsValid("npc") || tag_data.IsValid("file"))
- {
- string text = string.Empty;
- if (tag_data.IsValid("npc"))
- {
- text = tag_data.GetTagProperty("npc").AsString();
- }
- else
- {
- text = tag_data.GetTagProperty("file").AsString();
- }
- if (this.script_mgr_.compatibilityMode)
- {
- if (text == "叔父メイド" || text == "メイド秘書" || text == "エステメイド")
- {
- text = "旧" + text;
- }
- else if (text == "pre_尾高千夏")
- {
- text = "旧千夏";
- }
- else if (text == "その他1")
- {
- text = "客2";
- }
- }
- NDebug.Assert(CharacterMgr.npcDatas.ContainsKey(text), "サブキャラクター[" + text + "]の情報が見つかりませんでした");
- if (!flag)
- {
- maid = GameMain.Instance.CharacterMgr.ActivateNpc(num);
- }
- else
- {
- maid = GameMain.Instance.CharacterMgr.GetMan(num);
- NDebug.Assert(maid != null, "男スロット指定が限界数を超えています。指定可能範囲は0~" + 5.ToString() + "までです");
- }
- if (!flag)
- {
- NDebug.Assert(maid.boNPC, "NPCメイドではないメイドにNPCプリセットを適用しようとしました");
- }
- CharacterMgr.npcDatas[text].Apply(maid, false);
- maid.status.voiceGroup = VoiceGroup.Sub;
- }
- else if (tag_data.IsValid("pc"))
- {
- int f_nStockSlot = tag_data.GetTagProperty("pc").AsInteger();
- maid = GameMain.Instance.CharacterMgr.Activate(num, f_nStockSlot, false, false);
- }
- else
- {
- NDebug.Assert("@charaactivate error.", false);
- }
- bool result = false;
- if (maid != null)
- {
- result = this.SetMaidAllPropSeqWait(maid);
- }
- return result;
- }
- public bool TagConCharaActivateFreeNPC(KagTagSupport tag_data)
- {
- return this.TagCompatibilityCharaActivate(tag_data);
- }
- public bool TagConCharaActivate1stRanking(KagTagSupport tag_data)
- {
- GameMain.Instance.ScriptMgr.StopMotionScript();
- int f_nActiveSlotNo = 0;
- if (tag_data.IsValid("maid"))
- {
- f_nActiveSlotNo = tag_data.GetTagProperty("maid").AsInteger();
- }
- List<Maid> list = new List<Maid>();
- CharacterMgr characterMgr = GameMain.Instance.CharacterMgr;
- for (int i = 0; i < characterMgr.GetStockMaidCount(); i++)
- {
- Maid stockMaid = characterMgr.GetStockMaid(i);
- if (stockMaid != null)
- {
- list.Add(stockMaid);
- }
- }
- List<Maid> list2 = list;
- if (BaseKagManager.<>f__mg$cache1 == null)
- {
- BaseKagManager.<>f__mg$cache1 = new Comparison<Maid>(CharacterSelectManager.SortMaidRanking);
- }
- list2.Sort(BaseKagManager.<>f__mg$cache1);
- bool result = false;
- for (int j = 0; j < list.Count; j++)
- {
- if (list[j].status.popularRank == 1)
- {
- characterMgr.SetActiveMaid(list[j], f_nActiveSlotNo);
- list[j].Visible = true;
- result = this.SetMaidAllPropSeqWait(list[j]);
- break;
- }
- }
- return result;
- }
- public bool TagConCharaActivateLeader(KagTagSupport tag_data)
- {
- GameMain.Instance.ScriptMgr.StopMotionScript();
- int f_nActiveSlotNo = 0;
- if (tag_data.IsValid("maid"))
- {
- f_nActiveSlotNo = tag_data.GetTagProperty("maid").AsInteger();
- }
- bool result = false;
- CharacterMgr characterMgr = GameMain.Instance.CharacterMgr;
- for (int i = 0; i < characterMgr.GetStockMaidCount(); i++)
- {
- Maid stockMaid = characterMgr.GetStockMaid(i);
- if (stockMaid != null && stockMaid.status.leader)
- {
- characterMgr.SetActiveMaid(stockMaid, f_nActiveSlotNo);
- stockMaid.Visible = true;
- result = this.SetMaidAllPropSeqWait(stockMaid);
- break;
- }
- }
- return result;
- }
- public bool TagManPresetMenuLoad(KagTagSupport tag_data)
- {
- int nManNo = 0;
- if (tag_data.IsValid("man"))
- {
- nManNo = tag_data.GetTagProperty("man").AsInteger();
- }
- CharacterMgr characterMgr = GameMain.Instance.CharacterMgr;
- Maid man = characterMgr.GetMan(nManNo);
- if (man != null)
- {
- man.SetUpModel(tag_data.GetTagProperty("file").AsString());
- }
- return false;
- }
- public bool TagCharaDeactivate(KagTagSupport tag_data)
- {
- int num = 0;
- bool flag = false;
- if (tag_data.IsValid("maid"))
- {
- num = tag_data.GetTagProperty("maid").AsInteger();
- }
- else if (tag_data.IsValid("man"))
- {
- flag = true;
- num = tag_data.GetTagProperty("man").AsInteger();
- if (this.script_mgr_.compatibilityMode && 6 <= num)
- {
- num = 5;
- }
- }
- else
- {
- NDebug.Assert("@CharaDeactivate error.", false);
- }
- ScriptManager scriptMgr = GameMain.Instance.ScriptMgr;
- scriptMgr.ClearForcExecWaitEvent();
- foreach (KeyValuePair<int, MotionKagManager> keyValuePair in scriptMgr.kag_mot_dic)
- {
- if (!flag)
- {
- if (keyValuePair.Value.main_maid != null && keyValuePair.Value.main_maid == GameMain.Instance.CharacterMgr.GetMaid(num))
- {
- keyValuePair.Value.ClearMotion();
- keyValuePair.Value.enabled = false;
- }
- }
- else if (!scriptMgr.compatibilityMode)
- {
- Maid man = GameMain.Instance.CharacterMgr.GetMan(num);
- if (man != null && man.body0 != null)
- {
- man.body0.SetChinkoVisible(true);
- }
- if (keyValuePair.Value.main_man != null && keyValuePair.Value.main_man == man)
- {
- keyValuePair.Value.ClearMotion();
- keyValuePair.Value.enabled = false;
- }
- }
- }
- if (!flag)
- {
- GameMain.Instance.CharacterMgr.Deactivate(num, flag);
- }
- else
- {
- GameMain.Instance.CharacterMgr.CharaVisible(num, false, flag);
- }
- return false;
- }
- public bool TagCharaVisible(KagTagSupport tag_data)
- {
- int num = 0;
- bool flag = false;
- if (tag_data.IsValid("maid"))
- {
- num = tag_data.GetTagProperty("maid").AsInteger();
- }
- else if (tag_data.IsValid("man"))
- {
- flag = true;
- num = tag_data.GetTagProperty("man").AsInteger();
- if (this.script_mgr_.compatibilityMode && 6 <= num)
- {
- num = 5;
- }
- }
- else
- {
- NDebug.Assert("@charavisible error.", false);
- }
- bool flag2 = tag_data.IsValid("true");
- Maid maid = GameMain.Instance.CharacterMgr.CharaVisible(num, flag2, flag);
- if (maid == null && this.script_mgr_.compatibilityMode)
- {
- return false;
- }
- NDebug.Assert(maid != null, string.Concat(new object[]
- {
- "@charavisibleエラー。指定の",
- (!flag) ? "メイド" : "男",
- "はいません。スロット番号",
- num
- }));
- if (!this.script_mgr_.compatibilityMode && maid != null && maid.body0 != null && flag && !flag2)
- {
- maid.body0.SetChinkoVisible(true);
- }
- bool result = false;
- if (flag2 && maid != null)
- {
- result = this.SetMaidAllPropSeqWait(maid);
- }
- return result;
- }
- public bool TagCharaVisibleAllOff(KagTagSupport tag_data)
- {
- bool flag = tag_data.IsValid("man");
- bool flag2 = false;
- CharacterMgr characterMgr = GameMain.Instance.CharacterMgr;
- if (!flag)
- {
- for (int i = 0; i < characterMgr.GetMaidCount(); i++)
- {
- if (characterMgr.GetMaid(i) != null)
- {
- characterMgr.CharaVisible(i, flag2, flag);
- }
- }
- }
- else
- {
- for (int j = 0; j < characterMgr.GetManCount(); j++)
- {
- Maid man = characterMgr.GetMan(j);
- if (man != null)
- {
- if (!flag2 && man.body0 != null)
- {
- man.body0.SetChinkoVisible(true);
- }
- characterMgr.CharaVisible(j, flag2, flag);
- }
- }
- }
- return false;
- }
- public bool TagTexMulAdd(KagTagSupport tag_data)
- {
- this.CheckAbsolutelyNecessaryTag(tag_data, "layer", new string[]
- {
- "x",
- "y",
- "r",
- "s"
- });
- Maid maid = this.GetMaidAndMan(tag_data, true);
- if (maid == null)
- {
- return false;
- }
- Func<string, string> func = delegate(string ran_str)
- {
- string[] array5 = ran_str.Split(new char[]
- {
- ':'
- });
- return array5[UnityEngine.Random.Range(0, array5.Length)];
- };
- string slot = "body";
- if (tag_data.IsValid("slot"))
- {
- slot = tag_data.GetTagProperty("slot").AsString();
- }
- int matno = 0;
- if (tag_data.IsValid("matno"))
- {
- matno = tag_data.GetTagProperty("matno").AsInteger();
- }
- string propname = "_MainTex";
- if (tag_data.IsValid("propname"))
- {
- propname = tag_data.GetTagProperty("propname").AsString();
- }
- int layer = tag_data.GetTagProperty("layer").AsInteger();
- string file = string.Empty;
- if (tag_data.IsValid("file"))
- {
- file = tag_data.GetTagProperty("file").AsString();
- }
- else if (tag_data.IsValid("res"))
- {
- file = tag_data.GetTagProperty("res").AsString();
- }
- NDebug.Assert(!string.IsNullOrEmpty(file), "@texmuladd [file] or [res] error.");
- file = func(file);
- if (tag_data.IsValid("res"))
- {
- file = "res:" + file;
- }
- string text = tag_data.GetTagProperty("x").AsString();
- string[] array = text.Split(new char[]
- {
- ':'
- });
- NDebug.Assert(array.Length == 2, "@texmuladd [x] error.");
- int x = UnityEngine.Random.Range(int.Parse(array[0]), int.Parse(array[1]) + 1);
- string text2 = tag_data.GetTagProperty("y").AsString();
- string[] array2 = text2.Split(new char[]
- {
- ':'
- });
- NDebug.Assert(array2.Length == 2, "@texmuladd [y] error.");
- int y = UnityEngine.Random.Range(int.Parse(array2[0]), int.Parse(array2[1]) + 1);
- string text3 = tag_data.GetTagProperty("r").AsString();
- string[] array3 = text3.Split(new char[]
- {
- ':'
- });
- NDebug.Assert(array3.Length == 2, "@texmuladd [r] error.");
- float r = (float)UnityEngine.Random.Range((int)(float.Parse(array3[0]) * 100f), (int)(float.Parse(array3[1]) * 100f + 1f)) / 100f;
- string text4 = tag_data.GetTagProperty("s").AsString();
- string[] array4 = text4.Split(new char[]
- {
- ':'
- });
- NDebug.Assert(array4.Length == 2, "@texmuladd [s] error.");
- float s = (float)UnityEngine.Random.Range((int)(float.Parse(array4[0]) * 100f), (int)(float.Parse(array4[1]) * 100f + 1f)) / 100f;
- int num = 0;
- if (tag_data.IsValid("delay"))
- {
- num = tag_data.GetTagProperty("delay").AsInteger();
- }
- WaitEventList waitEventList = this.GetWaitEventList("tex_mul_add");
- if (num <= 0)
- {
- this.ExecForcWaitEvent();
- if (maid != null && maid.body0 != null && maid.body0.isLoadedBody)
- {
- maid.body0.MulTexSet(slot, matno, propname, layer, file, GameUty.SystemMaterial.Alpha, true, x, y, r, s, false, null, 1f, 1024);
- if (propname == "_MainTex")
- {
- maid.body0.MulTexSet(slot, matno, "_ShadowTex", layer, file, GameUty.SystemMaterial.Alpha, true, x, y, r, s, false, null, 1f, 1024);
- }
- maid.body0.MulTexProc(slot);
- }
- }
- else
- {
- waitEventList.Add(delegate
- {
- if (maid != null && maid.body0 != null && maid.body0.isLoadedBody)
- {
- maid.body0.MulTexSet(slot, matno, propname, layer, file, GameUty.SystemMaterial.Alpha, true, x, y, r, s, false, null, 1f, 1024);
- if (propname == "_MainTex")
- {
- maid.body0.MulTexSet(slot, matno, "_ShadowTex", layer, file, GameUty.SystemMaterial.Alpha, true, x, y, r, s, false, null, 1f, 1024);
- }
- maid.body0.MulTexProc(slot);
- }
- }, num);
- }
- return false;
- }
- public bool TagTexMulDel(KagTagSupport tag_data)
- {
- Maid maidAndMan = this.GetMaidAndMan(tag_data, true);
- if (maidAndMan == null)
- {
- return false;
- }
- int f_nMatNo = 0;
- if (tag_data.IsValid("matno"))
- {
- f_nMatNo = tag_data.GetTagProperty("matno").AsInteger();
- }
- string text = "_MainTex";
- if (tag_data.IsValid("propname"))
- {
- text = tag_data.GetTagProperty("propname").AsString();
- }
- string text2 = "body";
- if (tag_data.IsValid("slot"))
- {
- text2 = tag_data.GetTagProperty("slot").AsString();
- }
- this.script_mgr_.ClearForcExecWaitEvent();
- string text3 = "10:20";
- if (tag_data.IsValid("layer"))
- {
- text3 = tag_data.GetTagProperty("layer").AsString();
- }
- int num = 10;
- int num2 = 20;
- string[] array = text3.Split(new char[]
- {
- ':'
- });
- if (array.Length == 2)
- {
- num = int.Parse(array[0].Trim());
- num2 = int.Parse(array[1].Trim());
- }
- else if (array.Length == 1)
- {
- num2 = (num = int.Parse(array[0].Trim()));
- }
- for (int i = num; i <= num2; i++)
- {
- maidAndMan.body0.MulTexRemove(text2, f_nMatNo, text, i);
- if (text == "_MainTex")
- {
- maidAndMan.body0.MulTexRemove(text2, f_nMatNo, "_ShadowTex", i);
- }
- }
- maidAndMan.Visible = true;
- maidAndMan.body0.MulTexProc(text2);
- return false;
- }
- public bool TagStartDay(KagTagSupport tag_data)
- {
- GameMain.Instance.OnStartDay();
- return false;
- }
- public bool TagEndDay(KagTagSupport tag_data)
- {
- GameMain.Instance.OnEndDay();
- return false;
- }
- public bool TagScheduleStartManage(KagTagSupport tag_data)
- {
- ScheduleAPI.DayStartManage();
- return false;
- }
- public bool TagConUpdateMaidPoint(KagTagSupport tag_data)
- {
- return false;
- }
- public bool TagVRBGChangeInit(KagTagSupport tag_data)
- {
- SceneVRCommunication.Instance.KagBGChangeInit(tag_data.GetTagList());
- return false;
- }
- public bool TagVREventObj(KagTagSupport tag_data)
- {
- string f_strName = tag_data.GetTagProperty("name").AsString();
- int f_nVisible = 0;
- if (tag_data.IsValid("visible"))
- {
- f_nVisible = ((!tag_data.GetTagProperty("visible").AsBool()) ? 2 : 1);
- }
- int f_nTrigger = 0;
- if (tag_data.IsValid("trigger"))
- {
- f_nTrigger = ((!tag_data.GetTagProperty("trigger").AsBool()) ? 2 : 1);
- }
- int f_nGrab = 0;
- if (tag_data.IsValid("grab"))
- {
- f_nGrab = ((!tag_data.GetTagProperty("grab").AsBool()) ? 2 : 1);
- }
- string f_strAnimation = string.Empty;
- if (tag_data.IsValid("animation"))
- {
- f_strAnimation = tag_data.GetTagProperty("animation").AsString();
- }
- SceneVRCommunication.Instance.KagEventObj(f_strName, f_nVisible, f_nTrigger, f_nGrab, f_strAnimation);
- return false;
- }
- public bool TagVREventGroup(KagTagSupport tag_data)
- {
- string f_strName = tag_data.GetTagProperty("name").AsString();
- int f_nVisible = 0;
- if (tag_data.IsValid("visible"))
- {
- f_nVisible = ((!tag_data.GetTagProperty("visible").AsBool()) ? 2 : 1);
- }
- int f_nTrigger = 0;
- if (tag_data.IsValid("trigger"))
- {
- f_nTrigger = ((!tag_data.GetTagProperty("trigger").AsBool()) ? 2 : 1);
- }
- int f_nGrab = 0;
- if (tag_data.IsValid("grab"))
- {
- f_nGrab = ((!tag_data.GetTagProperty("grab").AsBool()) ? 2 : 1);
- }
- SceneVRCommunication.Instance.KagEventObjGroup(f_strName, f_nVisible, f_nTrigger, f_nGrab);
- return false;
- }
- public bool TagVRFreeScene(KagTagSupport tag_data)
- {
- if (tag_data.IsValid("start"))
- {
- SceneVRCommunication.Instance.kagFreeSceneSwitch(true, true, false);
- }
- else if (tag_data.IsValid("end"))
- {
- bool f_bEnableSkip = !tag_data.IsValid("noskip");
- SceneVRCommunication.Instance.kagFreeSceneSwitch(false, f_bEnableSkip, false);
- }
- return false;
- }
- public bool TagVRCamera(KagTagSupport tag_data)
- {
- float num = 0f;
- bool flag = false;
- float x = tag_data.GetTagProperty("x").AsReal();
- float z = tag_data.GetTagProperty("z").AsReal();
- if (tag_data.IsValid("height"))
- {
- num = tag_data.GetTagProperty("height").AsReal();
- }
- else if (tag_data.IsValid("stand"))
- {
- num = GameMain.Instance.CMSystem.VRCameraHeightStandOffs;
- }
- else if (tag_data.IsValid("sit"))
- {
- num = GameMain.Instance.CMSystem.VRCameraHeightSitOffs;
- flag = true;
- }
- bool f_bYFromFloor = true;
- if (tag_data.IsValid("nofloor"))
- {
- f_bYFromFloor = false;
- if (flag)
- {
- num += 0.4f;
- }
- }
- GameMain.Instance.MainCamera.SetRealHeadPos(new Vector3(x, num, z), f_bYFromFloor);
- if (tag_data.IsValid("angle"))
- {
- float y = tag_data.GetTagProperty("angle").AsReal();
- GameMain.Instance.MainCamera.SetRealHeadRot(new Vector3(0f, y, 0f), true);
- }
- return false;
- }
- public bool TagVRTablet(KagTagSupport tag_data)
- {
- if (tag_data.IsValid("show"))
- {
- GameMain.Instance.OvrMgr.OvrCamera.ShowUI(true);
- }
- else if (tag_data.IsValid("hide"))
- {
- GameMain.Instance.OvrMgr.OvrCamera.ShowUI(false);
- }
- if (tag_data.IsValid("reset"))
- {
- float f_fOffsetRotY = 0f;
- if (tag_data.IsValid("rot"))
- {
- f_fOffsetRotY = tag_data.GetTagProperty("rot").AsReal();
- }
- GameMain.Instance.OvrMgr.OvrCamera.UIPosReset(f_fOffsetRotY);
- }
- if (tag_data.IsValid("nomove"))
- {
- bool uiNoMoveMode = tag_data.GetTagProperty("nomove").AsBool();
- SceneVRCommunication.Instance.UiNoMoveMode = uiNoMoveMode;
- }
- if (tag_data.IsValid("nohome"))
- {
- bool uiNoHomeMode = tag_data.GetTagProperty("nohome").AsBool();
- SceneVRCommunication.Instance.UiNoHomeMode = uiNoHomeMode;
- }
- if (tag_data.IsValid("notime"))
- {
- bool uiNoTimeMode = tag_data.GetTagProperty("notime").AsBool();
- SceneVRCommunication.Instance.UiNoTimeMode = uiNoTimeMode;
- }
- return false;
- }
- public bool TagVRChoicesSet(KagTagSupport tag_data)
- {
- int f_nMaidNo = -1;
- VRChoices.SelectPair.Type f_type = VRChoices.SelectPair.Type.Text;
- string f_strRegionSplitOfColon = string.Empty;
- this.CheckAbsolutelyNecessaryTag(tag_data, "text", new string[]
- {
- "label"
- });
- string text = tag_data.GetTagProperty("text").AsString();
- text = ScriptManager.ReplaceCharaName(text);
- string f_strLabel = tag_data.GetTagProperty("label").AsString();
- if (tag_data.IsValid("maid"))
- {
- f_nMaidNo = tag_data.GetTagProperty("maid").AsInteger();
- }
- if (tag_data.IsValid("type"))
- {
- string text2 = tag_data.GetTagProperty("type").AsString();
- if (text2 == "touch")
- {
- f_type = VRChoices.SelectPair.Type.Touch;
- }
- else if (text2 == "look")
- {
- f_type = VRChoices.SelectPair.Type.Look;
- }
- else
- {
- NDebug.Assert("typeに不正な文字列 " + text2, false);
- }
- }
- float f_fTimeOut = -1f;
- if (tag_data.IsValid("time"))
- {
- f_fTimeOut = tag_data.GetTagProperty("time").AsReal();
- }
- if (tag_data.IsValid("region"))
- {
- f_strRegionSplitOfColon = tag_data.GetTagProperty("region").AsString();
- }
- SceneVRCommunication.Instance.Choices.Add(text, f_strLabel, f_nMaidNo, f_type, f_strRegionSplitOfColon, f_fTimeOut);
- return false;
- }
- public bool TagVRChoicesShow(KagTagSupport tag_data)
- {
- if (tag_data.IsValid("end"))
- {
- SceneVRCommunication.Instance.Choices.Finalize(null);
- return false;
- }
- int f_nTimeOutMS = 0;
- string f_strTimeOutLabel = string.Empty;
- int f_nRandom = 0;
- if (tag_data.IsValid("timeout"))
- {
- f_nTimeOutMS = tag_data.GetTagProperty("timeout").AsInteger();
- }
- if (tag_data.IsValid("timeoutlabel"))
- {
- f_strTimeOutLabel = tag_data.GetTagProperty("timeoutlabel").AsString();
- }
- if (tag_data.IsValid("random"))
- {
- f_nRandom = tag_data.GetTagProperty("random").AsInteger();
- }
- SceneVRCommunication.Instance.Choices.Show(f_nTimeOutMS, f_strTimeOutLabel, f_nRandom);
- return true;
- }
- public bool TagVRChoicesShowNonStop(KagTagSupport tag_data)
- {
- if (tag_data.IsValid("end"))
- {
- SceneVRCommunication.Instance.Choices.Finalize(null);
- return false;
- }
- int f_nTimeOutMS = 0;
- string f_strTimeOutLabel = string.Empty;
- int f_nRandom = 0;
- if (tag_data.IsValid("timeout"))
- {
- f_nTimeOutMS = tag_data.GetTagProperty("timeout").AsInteger();
- }
- if (tag_data.IsValid("timeoutlabel"))
- {
- f_strTimeOutLabel = tag_data.GetTagProperty("timeoutlabel").AsString();
- }
- if (tag_data.IsValid("random"))
- {
- f_nRandom = tag_data.GetTagProperty("random").AsInteger();
- }
- SceneVRCommunication.Instance.Choices.Show(f_nTimeOutMS, f_strTimeOutLabel, f_nRandom);
- return false;
- }
- public bool TagVRDoNextTime(KagTagSupport tag_data)
- {
- SceneVRCommunication.Instance.KagDoNextTime();
- return false;
- }
- public bool TagVRResetHeadPos(KagTagSupport tag_data)
- {
- GameMain.Instance.OvrMgr.OvrCamera.ReCallcOffset();
- return false;
- }
- public bool TagVRTouchScript(KagTagSupport tag_data)
- {
- SceneVRCommunication.Instance.TouchComm.Touch_Operator(tag_data);
- return false;
- }
- public bool TagVRDayTimeShow(KagTagSupport tag_data)
- {
- string f_strReturnFile = string.Empty;
- string f_strReturnLabel = string.Empty;
- if (tag_data.IsValid("file"))
- {
- f_strReturnFile = tag_data.GetTagProperty("file").AsString();
- }
- if (tag_data.IsValid("label"))
- {
- f_strReturnLabel = tag_data.GetTagProperty("label").AsString();
- }
- SceneVRCommunication.Instance.KagStartDayTimeShow(f_strReturnFile, f_strReturnLabel);
- return false;
- }
- public bool TagVRDialog(KagTagSupport tag_data)
- {
- string text = string.Empty;
- string f_strLabelOk = string.Empty;
- string f_strLabelCancel = string.Empty;
- string f_strLabelYes = string.Empty;
- string strLabelNo = string.Empty;
- if (tag_data.IsValid("text"))
- {
- text = tag_data.GetTagProperty("text").AsString();
- text = ScriptManager.ReplaceCharaName(text);
- }
- if (tag_data.IsValid("ok"))
- {
- f_strLabelOk = tag_data.GetTagProperty("ok").AsString();
- }
- if (tag_data.IsValid("cancel"))
- {
- f_strLabelCancel = tag_data.GetTagProperty("cancel").AsString();
- }
- if (tag_data.IsValid("yes"))
- {
- f_strLabelYes = tag_data.GetTagProperty("yes").AsString();
- }
- if (tag_data.IsValid("no"))
- {
- strLabelNo = tag_data.GetTagProperty("no").AsString();
- }
- SceneVRCommunication.Instance.KagDialog(text, f_strLabelOk, f_strLabelCancel, f_strLabelYes, strLabelNo);
- return true;
- }
- public bool TagVRStartMovieMusicPlayerTV(KagTagSupport tag_data)
- {
- SceneVRCommunication.Instance.KagStartMovieMusicPlayerTV();
- return false;
- }
- public bool TagVRMovieTV(KagTagSupport tag_data)
- {
- string f_strFileName = string.Empty;
- bool f_bLoop = false;
- bool f_bStart = tag_data.IsValid("start");
- if (tag_data.IsValid("file"))
- {
- f_strFileName = tag_data.GetTagProperty("file").AsString();
- }
- if (tag_data.IsValid("loop"))
- {
- f_bLoop = tag_data.IsValid("loop");
- }
- SceneVRCommunication.Instance.KagVRMovieTV(f_bStart, f_strFileName, f_bLoop);
- return false;
- }
- public bool TagVRPlantWindowShow(KagTagSupport tag_data)
- {
- string strFileName = string.Empty;
- string strLabelOK = string.Empty;
- string strLabelCancel = string.Empty;
- if (tag_data.IsValid("file"))
- {
- strFileName = tag_data.GetTagProperty("file").AsString();
- }
- if (tag_data.IsValid("ok"))
- {
- strLabelOK = tag_data.GetTagProperty("ok").AsString();
- }
- if (tag_data.IsValid("cancel"))
- {
- strLabelCancel = tag_data.GetTagProperty("cancel").AsString();
- }
- SceneVRCommunication.Instance.KagPlantWindowShow(strFileName, strLabelOK, strLabelCancel);
- return false;
- }
- public bool TagVRPlantUpdate(KagTagSupport tag_data)
- {
- SceneVRCommunication.Instance.KagPlantUpdate();
- return false;
- }
- public bool TagVRTutorialStart(KagTagSupport tag_data)
- {
- string f_strReturnLabel = string.Empty;
- if (tag_data.IsValid("end"))
- {
- f_strReturnLabel = tag_data.GetTagProperty("end").AsString();
- }
- SceneVRCommunication.Instance.KagTutorialStart(f_strReturnLabel);
- return true;
- }
- public bool TagVRPhotoModeStart(KagTagSupport tag_data)
- {
- bool f_bStart = true;
- if (tag_data.IsValid("start"))
- {
- f_bStart = true;
- }
- else if (tag_data.IsValid("end"))
- {
- f_bStart = false;
- }
- GameMain.Instance.OvrMgr.OvrCamera.ChangeToCameraMode(f_bStart);
- return false;
- }
- public bool TagVRNoChangeBG(KagTagSupport tag_data)
- {
- bool f_bStart = true;
- if (tag_data.IsValid("start"))
- {
- f_bStart = true;
- }
- else if (tag_data.IsValid("end"))
- {
- f_bStart = false;
- }
- SceneVRCommunication.Instance.KagVRNoChangeBG(f_bStart);
- return false;
- }
- public bool TagVRCamToManHead(KagTagSupport tag_data)
- {
- float f_fTime = 1f;
- if (tag_data.IsValid("time"))
- {
- f_fTime = (float)tag_data.GetTagProperty("time").AsInteger() / 1000f;
- }
- GameMain.Instance.OvrMgr.OvrCamera.PosToManHead(f_fTime);
- return false;
- }
- public bool TagVRTrophyText(KagTagSupport tag_data)
- {
- string f_strText = string.Empty;
- if (tag_data.IsValid("text"))
- {
- f_strText = tag_data.GetTagProperty("text").AsString();
- }
- SceneVRCommunication.Instance.KagVRTrophyGet(f_strText);
- return false;
- }
- public bool TagVRRentalMaidSelectStart(KagTagSupport tag_data)
- {
- SceneVRCommunication.Instance.KagRentalMaidSelectStart();
- return true;
- }
- public bool TagVRTouchUseSelect(KagTagSupport tag_data)
- {
- string f_strReturnLabel = string.Empty;
- if (tag_data.IsValid("end"))
- {
- f_strReturnLabel = tag_data.GetTagProperty("end").AsString();
- }
- SceneVRCommunication.Instance.KagTouchUseSelect(f_strReturnLabel);
- return true;
- }
- public bool TagVRHintShow(KagTagSupport tag_data)
- {
- string f_strHintMsg = string.Empty;
- if (tag_data.IsValid("text"))
- {
- f_strHintMsg = tag_data.GetTagProperty("text").AsString();
- }
- SceneVRCommunication.Instance.KagHintShow(f_strHintMsg);
- return false;
- }
- public bool TagVRKaraokeWindowShow(KagTagSupport tag_data)
- {
- string f_strReturnFile = string.Empty;
- string f_strReturnLabel = string.Empty;
- if (tag_data.IsValid("cancel_file"))
- {
- f_strReturnFile = tag_data.GetTagProperty("cancel_file").AsString();
- }
- if (tag_data.IsValid("cancel_label"))
- {
- f_strReturnLabel = tag_data.GetTagProperty("cancel_label").AsString();
- }
- SceneVRCommunication.Instance.KagKaraokeWindowShow(f_strReturnFile, f_strReturnLabel);
- return false;
- }
- public bool TagDanceResultStart(KagTagSupport tag_data)
- {
- Result_Display.StartDisplay(tag_data.GetTagProperty("label").AsString());
- return false;
- }
- public bool TagSetDanceType(KagTagSupport tag_data)
- {
- if (!tag_data.IsValid("dancetype"))
- {
- return false;
- }
- string value = tag_data.GetTagProperty("dancetype").AsString();
- RhythmAction_Mgr.SetDanceType((RhythmAction_Mgr.DanceType)Enum.Parse(typeof(RhythmAction_Mgr.DanceType), value));
- return false;
- }
- public bool TagCutinTexShoot(KagTagSupport tag_data)
- {
- string cut_name = string.Empty;
- string label = string.Empty;
- if (tag_data.IsValid("cut"))
- {
- cut_name = tag_data.GetTagProperty("cut").AsString();
- }
- if (tag_data.IsValid("label"))
- {
- label = tag_data.GetTagProperty("label").AsString();
- }
- ShootCutInTex.CutInTexShoot(cut_name, label);
- return false;
- }
- public bool TagBattleCutInStart(KagTagSupport tag_data)
- {
- string end_label = string.Empty;
- if (tag_data.IsValid("label"))
- {
- end_label = tag_data.GetTagProperty("label").AsString();
- }
- ConfrontCutIn.CutInStart(end_label);
- return false;
- }
- public bool TagMotionCheckStart(KagTagSupport tag_data)
- {
- MotionAction_Mgr.ResponceStart(tag_data);
- return false;
- }
- public bool TagSetMcSkip(KagTagSupport tag_data)
- {
- if (tag_data.IsValid("end"))
- {
- McSkip.SkipRelease();
- }
- else if (tag_data.IsValid("label"))
- {
- McSkip.SkipWait(tag_data.GetTagProperty("label").AsString());
- }
- return false;
- }
- public bool TagToTitle(KagTagSupport tag_data)
- {
- GameMain.Instance.LoadScene("SceneToTitle");
- GameMain.Instance.MainCamera.FadeOut(0f, false, null, true, default(Color));
- return false;
- }
- public bool TagAddedEventDisplay(KagTagSupport tag_data)
- {
- string label = string.Empty;
- if (tag_data.IsValid("label"))
- {
- label = tag_data.GetTagProperty("label").AsString();
- }
- else
- {
- Debug.LogError("タグ関数.eventrelease:Labelが指定されてません");
- }
- GameMain.Instance.ScenarioSelectMgr.AddedDisplay(label);
- return false;
- }
- public bool TagTutorialStart(KagTagSupport tag_data)
- {
- this.CheckAbsolutelyNecessaryTag(tag_data, "name", new string[0]);
- string sceneName = tag_data.GetTagProperty("name").AsString();
- string returnLabelName = string.Empty;
- if (tag_data.IsValid("end"))
- {
- returnLabelName = tag_data.GetTagProperty("end").AsString();
- }
- bool absoluteCall = tag_data.IsValid("absolute");
- if (uGUITutorialPanel.IsOpened())
- {
- uGUITutorialPanel.CloseTutorial(true, false);
- }
- uGUITutorialPanel.OpenTutorial(sceneName, delegate
- {
- if (!string.IsNullOrEmpty(returnLabelName))
- {
- GameMain.Instance.ScriptMgr.adv_kag.JumpLabel(returnLabelName);
- }
- GameMain.Instance.ScriptMgr.adv_kag.Exec();
- }, absoluteCall);
- return true;
- }
- public bool TagLoadSubtitleFile(KagTagSupport tag_data)
- {
- if (!Product.supportMultiLanguage)
- {
- return false;
- }
- SubtitleMovieManager.DestroyGlobalInstance();
- this.CheckAbsolutelyNecessaryTag(tag_data, "loadsubtitlefile", new string[]
- {
- "file"
- });
- string fileName = Path.ChangeExtension(tag_data.GetTagProperty("file").AsString(), ".ks");
- SubtitleMovieManager globalInstance = SubtitleMovieManager.GetGlobalInstance(false);
- globalInstance.autoDestroy = true;
- globalInstance.LoadSubtitleScriptFile(fileName);
- globalInstance.Play();
- return false;
- }
- public bool TagEndSubtitleDisplay(KagTagSupport tag_data)
- {
- SubtitleMovieManager.DestroyGlobalInstance();
- return false;
- }
- public bool TagSubtitleDisplayForPlayVoice(KagTagSupport tag_data)
- {
- if (!Product.supportMultiLanguage)
- {
- return false;
- }
- this.CheckAbsolutelyNecessaryTag(tag_data, "subtitledisplayforplayvoice", new string[]
- {
- "text"
- });
- this.subtitle_data.text = tag_data.GetTagProperty("text").AsString();
- this.subtitle_data.displayTime = -1;
- if (tag_data.IsValid("addtime"))
- {
- this.subtitle_data.addDisplayTime = tag_data.GetTagProperty("addtime").AsInteger();
- }
- else if (tag_data.IsValid("wait"))
- {
- this.subtitle_data.displayTime = tag_data.GetTagProperty("wait").AsInteger();
- }
- this.subtitle_data.casinoType = tag_data.IsValid("mode_c");
- return false;
- }
- public bool TagSubtitleDisplay(KagTagSupport tag_data)
- {
- if (!Product.supportMultiLanguage)
- {
- return false;
- }
- this.CheckAbsolutelyNecessaryTag(tag_data, "subtitledisplay", new string[]
- {
- "text",
- "time"
- });
- string text = tag_data.GetTagProperty("text").AsString();
- int displayTime = int.Parse(tag_data.GetTagProperty("time").AsString());
- SubtitleMovieManager globalInstance = SubtitleMovieManager.GetGlobalInstance(false);
- globalInstance.autoDestroy = true;
- globalInstance.Play(text, displayTime);
- return false;
- }
- public bool TagKupa(KagTagSupport tag_data)
- {
- if (!Product.isEnglish || Product.isPublic)
- {
- return false;
- }
- List<KupaCtrl> list2 = new List<KupaCtrl>();
- Action<Maid, List<KupaCtrl>> action = delegate(Maid maid, List<KupaCtrl> list)
- {
- if (maid != null && maid.body0 != null && maid.body0.isLoadedBody)
- {
- TBodySkin tbodySkin = maid.body0.goSlot[0];
- if (tbodySkin != null && tbodySkin.kupaCtrl != null)
- {
- list.Add(tbodySkin.kupaCtrl);
- }
- }
- };
- if (tag_data.IsValid("maid") || tag_data.IsValid("man"))
- {
- action(this.GetMaidAndMan(tag_data, true), list2);
- }
- else
- {
- for (int i = 0; i < GameMain.Instance.CharacterMgr.GetMaidCount(); i++)
- {
- action(GameMain.Instance.CharacterMgr.GetMaid(i), list2);
- }
- for (int j = 0; j < GameMain.Instance.CharacterMgr.GetManCount(); j++)
- {
- action(GameMain.Instance.CharacterMgr.GetMan(j), list2);
- }
- }
- if (list2.Count == 0)
- {
- Debug.LogError("TagKupa で maid か man が居ません。");
- return false;
- }
- if (tag_data.IsValid("auto"))
- {
- this.CheckAbsolutelyNecessaryTag(tag_data, "reg", new string[0]);
- string value = tag_data.GetTagProperty("reg").AsString();
- KupaCtrl.OPEN open = (KupaCtrl.OPEN)Enum.Parse(typeof(KupaCtrl.OPEN), value, true);
- float num = (float)tag_data.GetTagProperty("val").AsInteger() * 0.01f;
- float speedIn = 5f;
- if (tag_data.IsValid("speedin"))
- {
- speedIn = (float)tag_data.GetTagProperty("speedin").AsInteger() * 0.01f;
- }
- float sppedOut = 5f;
- if (tag_data.IsValid("speedout"))
- {
- sppedOut = (float)tag_data.GetTagProperty("speedout").AsInteger() * 0.01f;
- }
- float outVal = 0f;
- if (tag_data.IsValid("outval"))
- {
- outVal = (float)tag_data.GetTagProperty("outval").AsInteger() * 0.01f;
- }
- float lengthRatio = 1f;
- if (tag_data.IsValid("lengthlimit"))
- {
- lengthRatio = (float)tag_data.GetTagProperty("lengthlimit").AsInteger() * 0.01f;
- }
- if (open == KupaCtrl.OPEN.CHINKOF || open == KupaCtrl.OPEN.CHINKOS)
- {
- int maid_no = tag_data.GetTagProperty("targetmaid").AsInteger();
- Maid maid2 = this.GetMaid(maid_no);
- string value2 = tag_data.GetTagProperty("targetreg").AsString();
- KupaCtrl.TARGET target = (KupaCtrl.TARGET)Enum.Parse(typeof(KupaCtrl.TARGET), value2, true);
- foreach (KupaCtrl kupaCtrl in list2)
- {
- kupaCtrl.AutoKariStart(open, target, maid2, num, speedIn, sppedOut, outVal, lengthRatio);
- }
- }
- else
- {
- int man_no = tag_data.GetTagProperty("targetman").AsInteger();
- Maid man = this.GetMan(man_no);
- list2[0].AutoKupaStart(open, man, num, speedIn, sppedOut, outVal, lengthRatio);
- }
- }
- else if (tag_data.IsValid("finish"))
- {
- foreach (KupaCtrl kupaCtrl2 in list2)
- {
- if (tag_data.IsValid("reg"))
- {
- string value3 = tag_data.GetTagProperty("reg").AsString();
- KupaCtrl.OPEN reg = (KupaCtrl.OPEN)Enum.Parse(typeof(KupaCtrl.OPEN), value3, true);
- kupaCtrl2.Finish(reg);
- }
- else
- {
- kupaCtrl2.FinishAll();
- }
- }
- }
- else if (tag_data.IsValid("reset"))
- {
- foreach (KupaCtrl kupaCtrl3 in list2)
- {
- if (tag_data.IsValid("reg"))
- {
- string value4 = tag_data.GetTagProperty("reg").AsString();
- KupaCtrl.OPEN reg2 = (KupaCtrl.OPEN)Enum.Parse(typeof(KupaCtrl.OPEN), value4, true);
- kupaCtrl3.Reset(reg2);
- }
- else
- {
- kupaCtrl3.ResetAll();
- }
- }
- }
- else
- {
- this.CheckAbsolutelyNecessaryTag(tag_data, "reg", new string[]
- {
- "val"
- });
- bool add = tag_data.IsValid("add");
- string value5 = tag_data.GetTagProperty("reg").AsString();
- KupaCtrl.OPEN reg3 = (KupaCtrl.OPEN)Enum.Parse(typeof(KupaCtrl.OPEN), value5, true);
- int num2 = 0;
- if (tag_data.IsValid("time"))
- {
- num2 = tag_data.GetTagProperty("time").AsInteger();
- }
- int num3 = 0;
- if (tag_data.IsValid("wait"))
- {
- num3 = tag_data.GetTagProperty("wait").AsInteger();
- }
- int num4 = tag_data.GetTagProperty("val").AsInteger();
- foreach (KupaCtrl kupaCtrl4 in list2)
- {
- kupaCtrl4.KupaStart(reg3, (float)num2 * 0.001f, (float)num3 * 0.001f, (float)num4 * 0.01f, add);
- }
- }
- return false;
- }
- protected bool TagStartTouchMode(KagTagSupport tag_data)
- {
- if (PrivateMaidTouchManager.instance == null)
- {
- return false;
- }
- int nMaidNo = (!tag_data.IsValid("maid")) ? 0 : tag_data.GetTagProperty("maid").AsInteger();
- int id = (!tag_data.IsValid("id")) ? 0 : tag_data.GetTagProperty("id").AsInteger();
- PrivateMaidTouchManager.instance.CallTouchMode(GameMain.Instance.CharacterMgr.GetMaid(nMaidNo), id);
- return false;
- }
- protected virtual void PlayMaidMotion(Maid maid, string fn, bool additive = false, bool loop = false, bool boAddQue = false, float val = 0.5f)
- {
- if (!GameMain.Instance.ScriptMgr.is_motion_blend)
- {
- val = 0f;
- }
- maid.IKCtrl.BlendTime = val;
- maid.CrossFade(fn, this.script_mgr_.file_system, additive, loop, boAddQue, val, 1f);
- }
- protected virtual void PlayMaidMotionAbs(Maid maid, string fn, bool additive = false, bool loop = false, bool boAddQue = false, float val = 0.5f)
- {
- if (!GameMain.Instance.ScriptMgr.is_motion_blend)
- {
- val = 0f;
- }
- maid.CrossFadeAbsolute(fn, this.script_mgr_.file_system, additive, loop, boAddQue, val, 1f);
- }
- public static Maid GetVoiceTargetMaid(KagTagSupport tag_data)
- {
- Maid maid = null;
- CharacterMgr characterMgr = GameMain.Instance.CharacterMgr;
- if (tag_data.IsValid("maid"))
- {
- maid = characterMgr.GetMaid(int.Parse(tag_data.GetTagProperty("maid").AsString()));
- }
- else if (tag_data.IsValid("name") || tag_data.IsValid("real"))
- {
- string text = string.Empty;
- if (tag_data.IsValid("real"))
- {
- text = tag_data.GetTagProperty("real").AsString().Trim();
- }
- else
- {
- text = tag_data.GetTagProperty("name").AsString().Trim();
- }
- KeyValuePair<string, string> translationText = MessageClass.GetTranslationText(text);
- text = translationText.Key;
- if (tag_data.IsValid("real") && text == "フリー" && GameMain.Instance.ScriptMgr.compatibilityMode)
- {
- text = "[HF16]";
- }
- if (text.IndexOf("[HF") == 0)
- {
- string text2 = text.Replace("[HF", string.Empty).Replace("]", string.Empty);
- if (string.IsNullOrEmpty(text2))
- {
- text2 = "0";
- }
- int nMaidNo = int.Parse(text2);
- maid = characterMgr.GetMaid(nMaidNo);
- }
- else
- {
- for (int i = 0; i < characterMgr.GetMaidCount(); i++)
- {
- Maid maid2 = characterMgr.GetMaid(i);
- if (maid2 != null && maid2.boNPC && maid2.status.firstName == text)
- {
- maid = maid2;
- break;
- }
- }
- if (maid == null && Product.supportMultiLanguage)
- {
- text = translationText.Value;
- for (int j = 0; j < characterMgr.GetMaidCount(); j++)
- {
- Maid maid3 = characterMgr.GetMaid(j);
- if (maid3 != null && maid3.boNPC && maid3.status.firstName == text)
- {
- maid = maid3;
- break;
- }
- }
- }
- }
- if (maid == null)
- {
- Debug.LogWarning("ボイス再生対象のメイドを特定できませんでした");
- }
- }
- return maid;
- }
- public Maid GetMaidAndMan(string tag_str)
- {
- int num = 0;
- tag_str = tag_str.ToLower();
- int num2 = tag_str.IndexOf(':');
- if (num2 != -1)
- {
- string[] array = tag_str.Split(new char[]
- {
- ':'
- });
- NDebug.Assert(array.Length == 2, tag_str + "\nメイド,もしくは男の指定が不正です");
- num = int.Parse(array[1]);
- tag_str = array[0];
- }
- if (tag_str == "maid")
- {
- return this.GetMaid(num);
- }
- if (tag_str == "man")
- {
- return this.GetMan(num);
- }
- NDebug.Assert(tag_str + "\nメイド,もしくは男の指定が不正です", false);
- return null;
- }
- public Maid GetMaidAndMan(KagTagSupport tag_data, bool maid_priority = true)
- {
- int num = 0;
- bool flag = false;
- if (maid_priority)
- {
- if (tag_data.IsValid("maid"))
- {
- num = tag_data.GetTagProperty("maid").AsInteger();
- }
- else if (tag_data.IsValid("man"))
- {
- flag = true;
- num = tag_data.GetTagProperty("man").AsInteger();
- if (this.script_mgr_.compatibilityMode && 6 <= num)
- {
- num = 5;
- }
- }
- else
- {
- NDebug.Assert("スクリプトのman/maid指定が不正です。", false);
- }
- }
- else if (tag_data.IsValid("man"))
- {
- flag = true;
- num = tag_data.GetTagProperty("man").AsInteger();
- if (this.script_mgr_.compatibilityMode && 6 <= num)
- {
- num = 5;
- }
- }
- else if (tag_data.IsValid("maid"))
- {
- num = tag_data.GetTagProperty("maid").AsInteger();
- }
- else
- {
- NDebug.Assert("スクリプトのman/maid指定が不正です。", false);
- }
- return flag ? this.GetMan(num) : this.GetMaid(num);
- }
- public virtual Maid GetMaid(int maid_no)
- {
- return GameMain.Instance.CharacterMgr.GetMaid(maid_no);
- }
- public virtual Maid GetMan(int man_no)
- {
- return GameMain.Instance.CharacterMgr.GetMan(man_no);
- }
- protected WaitEventList GetWaitEventList(string list_name)
- {
- if (!this.wait_event_list_.ContainsKey(list_name))
- {
- this.wait_event_list_.Add(list_name, new WaitEventList());
- }
- return this.wait_event_list_[list_name];
- }
- public void CheckAbsolutelyNecessaryTag(KagTagSupport tag_data, string tag_name, params string[] check_tag)
- {
- for (int i = 0; i < check_tag.Length; i++)
- {
- NDebug.Assert(tag_data.IsValid(check_tag[i]), string.Concat(new string[]
- {
- "@",
- tag_name,
- "\n必須タグ[",
- check_tag[i],
- "]が指定されていません"
- }));
- }
- }
- protected bool SetWait(int time, bool skip_possible)
- {
- this.SetExecWait(time, skip_possible);
- return true;
- }
- public void ExecForcWaitEvent()
- {
- WaitEventList waitEventList = this.GetWaitEventList("tex_mul_add");
- if (waitEventList.list == null || waitEventList.list.Count == 0)
- {
- return;
- }
- for (int i = 0; i < waitEventList.list.Count; i++)
- {
- waitEventList.list[i].call_back_delegate();
- }
- waitEventList.Clear();
- }
- public void ClearForcExecWaitEvent()
- {
- WaitEventList waitEventList = this.GetWaitEventList("tex_mul_add");
- if (waitEventList.list == null || waitEventList.list.Count == 0)
- {
- return;
- }
- waitEventList.Clear();
- }
- public void Dispose()
- {
- this.Dispose(true);
- GC.SuppressFinalize(this);
- }
- protected void Dispose(bool is_release_managed_code)
- {
- if (this.is_disposed_)
- {
- return;
- }
- this.wait_event_list_.Clear();
- this.kag_.Dispose();
- this.kag_ = null;
- this.script_mgr_ = null;
- this.is_disposed_ = true;
- }
- public KagScript kag
- {
- get
- {
- return this.kag_;
- }
- }
- protected bool exec_wait_enabled
- {
- get
- {
- return this.exec_wait_data_.use;
- }
- }
- protected bool IsFadeProc()
- {
- return GameMain.Instance.MainCamera.IsFadeProc() || GameMain.Instance.MainCamera.IsFadeProcNoUI();
- }
- private void OnScenarioLoadEvent(string file_name, string label_name)
- {
- this.subtitle_data.Clear();
- }
- public virtual string GetKagClassName()
- {
- return "ベースkag";
- }
- private string ReplaceFileNameCallBack(string file_name)
- {
- Maid maid = this.GetMaid(0);
- if (maid == null)
- {
- return file_name;
- }
- int maidCount = GameMain.Instance.CharacterMgr.GetMaidCount();
- Maid[] array = new Maid[maidCount];
- for (int i = 0; i < maidCount; i++)
- {
- array[i] = this.GetMaid(i);
- }
- return ScriptManager.ReplacePersonal(array, file_name);
- }
- public void Serialize(BinaryWriter binary)
- {
- binary.Write("CM3D2_KAG");
- binary.Write(1510);
- byte[] array = this.kag_.Serialize();
- int value = array.Length;
- binary.Write(value);
- binary.Write(array);
- binary.Write(this.fade_wait_);
- binary.Write(this.enabled);
- }
- public void Deserialize(BinaryReader binary)
- {
- string a = binary.ReadString();
- NDebug.Assert(a == "CM3D2_KAG", "KAGのヘッダーが不正です。");
- int num = binary.ReadInt32();
- int count = binary.ReadInt32();
- byte[] serialize_data = binary.ReadBytes(count);
- this.kag_.Deserialize(serialize_data);
- this.fade_wait_ = binary.ReadBoolean();
- this.enabled = binary.ReadBoolean();
- this.exec_wait_data_.Clear();
- this.wait_event_list_.Clear();
- this.subtitle_data.Clear();
- }
- public bool enabled { get; set; }
- public List<Maid> maidOffsetSetList { get; protected set; }
- protected readonly TJSScript tjs_;
- protected ScriptManager script_mgr_;
- protected KagScript kag_;
- protected bool fade_wait_;
- protected BaseKagManager.ExecWaitData exec_wait_data_ = new BaseKagManager.ExecWaitData();
- protected Dictionary<string, WaitEventList> wait_event_list_ = new Dictionary<string, WaitEventList>();
- protected BaseKagManager.SubtitleData subtitle_data = new BaseKagManager.SubtitleData();
- private bool is_disposed_;
- [CompilerGenerated]
- private static Comparison<Maid> <>f__mg$cache0;
- [CompilerGenerated]
- private static Comparison<Maid> <>f__mg$cache1;
- private class PerthOffsetPosTagData
- {
- public static CharacterMgr.CharaPer CreateCharaPer(TJSScript tjs, KagTagSupport tag_data)
- {
- CharacterMgr.CharaPer charaPer = BaseKagManager.PerthOffsetPosTagData.GetCharaPer(tjs, tag_data, string.Empty);
- NDebug.AssertNull(charaPer != null);
- return charaPer;
- }
- public static List<KeyValuePair<Maid, CharacterMgr.CharaPer>> CreateMultiCharaPer(TJSScript tjs, KagTagSupport tag_data, BaseKagManager kag_mgr)
- {
- List<KeyValuePair<Maid, CharacterMgr.CharaPer>> list = new List<KeyValuePair<Maid, CharacterMgr.CharaPer>>();
- for (int i = 0; i < GameMain.Instance.CharacterMgr.GetMaidCount(); i++)
- {
- CharacterMgr.CharaPer charaPer = BaseKagManager.PerthOffsetPosTagData.GetCharaPer(tjs, tag_data, "-Maid:" + i);
- if (charaPer != null)
- {
- KeyValuePair<Maid, CharacterMgr.CharaPer> item = new KeyValuePair<Maid, CharacterMgr.CharaPer>(kag_mgr.GetMaid(i), charaPer);
- list.Add(item);
- }
- }
- return list;
- }
- public static KeyValuePair<CharacterMgr.CharaPer, CharacterMgr.PenisPer> CreateCharaPerAndPenisPer(TJSScript tjs, KagTagSupport tag_data)
- {
- CharacterMgr.CharaPer charaPer = BaseKagManager.PerthOffsetPosTagData.GetCharaPer(tjs, tag_data, string.Empty);
- if (charaPer == null)
- {
- charaPer = new CharacterMgr.CharaPer();
- }
- CharacterMgr.PenisPer penisPer = BaseKagManager.PerthOffsetPosTagData.GetPenisPer(tjs, tag_data);
- if (penisPer == null)
- {
- penisPer = new CharacterMgr.PenisPer();
- }
- return new KeyValuePair<CharacterMgr.CharaPer, CharacterMgr.PenisPer>(charaPer, penisPer);
- }
- private static CharacterMgr.CharaPer GetCharaPer(TJSScript tjs, KagTagSupport tag_data, string add_tag_string)
- {
- CharacterMgr.CharaPer charaPer = null;
- BaseKagManager.PerthOffsetPosTagData.TagArrayData tagArrayData = BaseKagManager.PerthOffsetPosTagData.TagArrayData.Create(tjs, tag_data, "OffsDouPar" + add_tag_string);
- if (tagArrayData.valid)
- {
- if (charaPer == null)
- {
- charaPer = new CharacterMgr.CharaPer();
- }
- tagArrayData.GetVector3(ref charaPer.vecOffsDouParGreater, ref charaPer.vecOffsDouParLess);
- }
- BaseKagManager.PerthOffsetPosTagData.TagArrayData.Rlease();
- tagArrayData = BaseKagManager.PerthOffsetPosTagData.TagArrayData.Create(tjs, tag_data, "OffsShinCho" + add_tag_string);
- if (tagArrayData.valid)
- {
- if (charaPer == null)
- {
- charaPer = new CharacterMgr.CharaPer();
- }
- tagArrayData.GetVector3(ref charaPer.vecOffsShinChoGreater, ref charaPer.vecOffsShinChoLess);
- }
- BaseKagManager.PerthOffsetPosTagData.TagArrayData.Rlease();
- tagArrayData = BaseKagManager.PerthOffsetPosTagData.TagArrayData.Create(tjs, tag_data, "OffsMuneL" + add_tag_string);
- if (tagArrayData.valid)
- {
- if (charaPer == null)
- {
- charaPer = new CharacterMgr.CharaPer();
- }
- tagArrayData.GetVector3(ref charaPer.vecOffsMuneLGreater, ref charaPer.vecOffsMuneLLess);
- }
- BaseKagManager.PerthOffsetPosTagData.TagArrayData.Rlease();
- tagArrayData = BaseKagManager.PerthOffsetPosTagData.TagArrayData.Create(tjs, tag_data, "HaremDouPer" + add_tag_string);
- if (tagArrayData.valid)
- {
- if (charaPer == null)
- {
- charaPer = new CharacterMgr.CharaPer();
- }
- tagArrayData.GetVector3(ref charaPer.vecHaremDouPerGreater, ref charaPer.vecHaremDouPerLess);
- }
- BaseKagManager.PerthOffsetPosTagData.TagArrayData.Rlease();
- tagArrayData = BaseKagManager.PerthOffsetPosTagData.TagArrayData.Create(tjs, tag_data, "HaremShinCho" + add_tag_string);
- if (tagArrayData.valid)
- {
- if (charaPer == null)
- {
- charaPer = new CharacterMgr.CharaPer();
- }
- tagArrayData.GetVector3(ref charaPer.vecHaremShinChoGreater, ref charaPer.vecHaremShinChoLess);
- }
- BaseKagManager.PerthOffsetPosTagData.TagArrayData.Rlease();
- tagArrayData = BaseKagManager.PerthOffsetPosTagData.TagArrayData.Create(tjs, tag_data, "HaremMuneL" + add_tag_string);
- if (tagArrayData.valid)
- {
- if (charaPer == null)
- {
- charaPer = new CharacterMgr.CharaPer();
- }
- tagArrayData.GetVector3(ref charaPer.vecHaremMuneLGreater, ref charaPer.vecHaremMuneLLess);
- }
- BaseKagManager.PerthOffsetPosTagData.TagArrayData.Rlease();
- return charaPer;
- }
- private static CharacterMgr.PenisPer GetPenisPer(TJSScript tjs, KagTagSupport tag_data)
- {
- CharacterMgr.PenisPer penisPer = null;
- BaseKagManager.PerthOffsetPosTagData.TagArrayData tagArrayData = BaseKagManager.PerthOffsetPosTagData.TagArrayData.Create(tjs, tag_data, "PenisCommonBase");
- if (tagArrayData.valid)
- {
- if (penisPer == null)
- {
- penisPer = new CharacterMgr.PenisPer();
- }
- tagArrayData.GetVector3(ref penisPer.vecPenisCommonBase);
- }
- BaseKagManager.PerthOffsetPosTagData.TagArrayData.Rlease();
- tagArrayData = BaseKagManager.PerthOffsetPosTagData.TagArrayData.Create(tjs, tag_data, "PenisAmend");
- if (tagArrayData.valid)
- {
- if (penisPer == null)
- {
- penisPer = new CharacterMgr.PenisPer();
- }
- tagArrayData.GetVector3(ref penisPer.vecPenisAmend);
- }
- BaseKagManager.PerthOffsetPosTagData.TagArrayData.Rlease();
- tagArrayData = BaseKagManager.PerthOffsetPosTagData.TagArrayData.Create(tjs, tag_data, "PenisDouPer");
- if (tagArrayData.valid)
- {
- if (penisPer == null)
- {
- penisPer = new CharacterMgr.PenisPer();
- }
- tagArrayData.GetVector3(ref penisPer.vecPenisDouPerGreater, ref penisPer.vecPenisDouPerLess);
- }
- BaseKagManager.PerthOffsetPosTagData.TagArrayData.Rlease();
- tagArrayData = BaseKagManager.PerthOffsetPosTagData.TagArrayData.Create(tjs, tag_data, "PenisShincho");
- if (tagArrayData.valid)
- {
- if (penisPer == null)
- {
- penisPer = new CharacterMgr.PenisPer();
- }
- tagArrayData.GetVector3(ref penisPer.vecPenisShinchoGreater, ref penisPer.vecPenisShinchoLess);
- }
- BaseKagManager.PerthOffsetPosTagData.TagArrayData.Rlease();
- return penisPer;
- }
- private class TagArrayData
- {
- private TagArrayData(TJSScript tjs, KagTagSupport tag_data, string tag_name)
- {
- this.tjs_ = tjs;
- this.is_valid_ = tag_data.IsValid(tag_name);
- if (this.is_valid_)
- {
- string eval_str = this.kTjsGlobalVarName + "=" + tag_data.GetTagProperty(tag_name).AsString();
- this.tjs_.EvalScript(eval_str);
- TJSVariant tjsvariant = new TJSVariant();
- this.tjs_.EvalScript(this.kTjsGlobalVarName + ".count", tjsvariant);
- this.array_count_ = tjsvariant.AsInteger();
- tjsvariant.Dispose();
- NDebug.Assert(this.array_count_ == 3 || this.array_count_ == 6, tag_name + "の指定数が不正です(6 or 7 only)");
- }
- }
- public static BaseKagManager.PerthOffsetPosTagData.TagArrayData Create(TJSScript tjs, KagTagSupport tag_data, string tag_name)
- {
- NDebug.Assert(BaseKagManager.PerthOffsetPosTagData.TagArrayData.instans_data_ == null, "TagArrayDataインスタンスの重複");
- tag_name = tag_name.ToLower();
- BaseKagManager.PerthOffsetPosTagData.TagArrayData.instans_data_ = new BaseKagManager.PerthOffsetPosTagData.TagArrayData(tjs, tag_data, tag_name);
- return BaseKagManager.PerthOffsetPosTagData.TagArrayData.instans_data_;
- }
- public static void Rlease()
- {
- if (BaseKagManager.PerthOffsetPosTagData.TagArrayData.instans_data_ == null)
- {
- return;
- }
- BaseKagManager.PerthOffsetPosTagData.TagArrayData.instans_data_.tjs_.EvalScript(BaseKagManager.PerthOffsetPosTagData.TagArrayData.instans_data_.kTjsGlobalVarName + " = void");
- BaseKagManager.PerthOffsetPosTagData.TagArrayData.instans_data_ = null;
- }
- public void GetVector3(ref Vector3 dest)
- {
- if (!this.is_valid_)
- {
- return;
- }
- NDebug.Assert(this.array_count_ == 3, "Vector3*2の要素に対してVector3を1つのみ作成しようとしています");
- using (TJSVariant tjsvariant = new TJSVariant())
- {
- this.tjs_.EvalScript(this.kTjsGlobalVarName + "[0]", tjsvariant);
- dest.x = tjsvariant.AsReal();
- this.tjs_.EvalScript(this.kTjsGlobalVarName + "[1]", tjsvariant);
- dest.y = tjsvariant.AsReal();
- this.tjs_.EvalScript(this.kTjsGlobalVarName + "[2]", tjsvariant);
- dest.z = tjsvariant.AsReal();
- }
- }
- public void GetVector3(ref Vector3 first_dest, ref Vector3 second_dest)
- {
- if (!this.is_valid_)
- {
- return;
- }
- NDebug.Assert(this.array_count_ == 6, "要素xyzのみに対してVector3を2つ作成しようとしています");
- using (TJSVariant tjsvariant = new TJSVariant())
- {
- this.tjs_.EvalScript(this.kTjsGlobalVarName + "[0]", tjsvariant);
- first_dest.x = tjsvariant.AsReal();
- this.tjs_.EvalScript(this.kTjsGlobalVarName + "[1]", tjsvariant);
- first_dest.y = tjsvariant.AsReal();
- this.tjs_.EvalScript(this.kTjsGlobalVarName + "[2]", tjsvariant);
- first_dest.z = tjsvariant.AsReal();
- this.tjs_.EvalScript(this.kTjsGlobalVarName + "[3]", tjsvariant);
- second_dest.x = tjsvariant.AsReal();
- this.tjs_.EvalScript(this.kTjsGlobalVarName + "[4]", tjsvariant);
- second_dest.y = tjsvariant.AsReal();
- this.tjs_.EvalScript(this.kTjsGlobalVarName + "[5]", tjsvariant);
- second_dest.z = tjsvariant.AsReal();
- }
- }
- public int vecotr_element_count
- {
- get
- {
- return (this.array_count_ != 3) ? 2 : 1;
- }
- }
- public int count
- {
- get
- {
- return this.array_count_;
- }
- }
- public bool valid
- {
- get
- {
- return this.is_valid_;
- }
- }
- private string kTjsGlobalVarName = "global.__tmp_array";
- private static BaseKagManager.PerthOffsetPosTagData.TagArrayData instans_data_;
- private TJSScript tjs_;
- private bool is_valid_;
- private int array_count_;
- }
- }
- protected class ExecWaitData
- {
- public virtual bool Check()
- {
- return !this.use || this.wait_time <= GameMain.tick_count - this.start_tick_count;
- }
- public virtual void Clear()
- {
- this.start_tick_count = (this.wait_time = 0);
- this.use = false;
- this.skip_possible = true;
- }
- public int start_tick_count;
- public int wait_time;
- public bool skip_possible;
- public bool use;
- }
- protected class MaidPropSeqWaitData : BaseKagManager.ExecWaitData
- {
- public override bool Check()
- {
- return !this.use || this.maid == null || !this.maid.IsBusy;
- }
- public override void Clear()
- {
- base.Clear();
- this.maid = null;
- }
- public Maid maid;
- }
- protected class MaidVoiceWaitData : BaseKagManager.ExecWaitData
- {
- public override bool Check()
- {
- if (!this.use || this.maid == null)
- {
- return true;
- }
- AudioSourceMgr audioMan = this.maid.AudioMan;
- return audioMan == null || !audioMan.isPlay();
- }
- public override void Clear()
- {
- base.Clear();
- this.maid = null;
- }
- public Maid maid;
- }
- protected class DummyVoiceWaitData : BaseKagManager.ExecWaitData
- {
- public override bool Check()
- {
- return !this.use || !GameMain.Instance.SoundMgr.IsPlayDummyVoice();
- }
- public override void Clear()
- {
- base.Clear();
- }
- }
- protected class SubtitleData
- {
- public SubtitleData()
- {
- this.Clear();
- }
- public void Clear()
- {
- this.text = string.Empty;
- this.displayTime = -1;
- this.addDisplayTime = 0;
- this.casinoType = false;
- }
- public string text;
- public int displayTime;
- public int addDisplayTime;
- public bool casinoType;
- }
- }
|