BaseKagManager.cs 126 KB

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