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