BaseKagManager.cs 123 KB

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