12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849505152535455565758596061626364656667686970717273747576777879808182838485868788899091929394959697989910010110210310410510610710810911011111211311411511611711811912012112212312412512612712812913013113213313413513613713813914014114214314414514614714814915015115215315415515615715815916016116216316416516616716816917017117217317417517617717817918018118218318418518618718818919019119219319419519619719819920020120220320420520620720820921021121221321421521621721821922022122222322422522622722822923023123223323423523623723823924024124224324424524624724824925025125225325425525625725825926026126226326426526626726826927027127227327427527627727827928028128228328428528628728828929029129229329429529629729829930030130230330430530630730830931031131231331431531631731831932032132232332432532632732832933033133233333433533633733833934034134234334434534634734834935035135235335435535635735835936036136236336436536636736836937037137237337437537637737837938038138238338438538638738838939039139239339439539639739839940040140240340440540640740840941041141241341441541641741841942042142242342442542642742842943043143243343443543643743843944044144244344444544644744844945045145245345445545645745845946046146246346446546646746846947047147247347447547647747847948048148248348448548648748848949049149249349449549649749849950050150250350450550650750850951051151251351451551651751851952052152252352452552652752852953053153253353453553653753853954054154254354454554654754854955055155255355455555655755855956056156256356456556656756856957057157257357457557657757857958058158258358458558658758858959059159259359459559659759859960060160260360460560660760860961061161261361461561661761861962062162262362462562662762862963063163263363463563663763863964064164264364464564664764864965065165265365465565665765865966066166266366466566666766866967067167267367467567667767867968068168268368468568668768868969069169269369469569669769869970070170270370470570670770870971071171271371471571671771871972072172272372472572672772872973073173273373473573673773873974074174274374474574674774874975075175275375475575675775875976076176276376476576676776876977077177277377477577677777877978078178278378478578678778878979079179279379479579679779879980080180280380480580680780880981081181281381481581681781881982082182282382482582682782882983083183283383483583683783883984084184284384484584684784884985085185285385485585685785885986086186286386486586686786886987087187287387487587687787887988088188288388488588688788888989089189289389489589689789889990090190290390490590690790890991091191291391491591691791891992092192292392492592692792892993093193293393493593693793893994094194294394494594694794894995095195295395495595695795895996096196296396496596696796896997097197297397497597697797897998098198298398498598698798898999099199299399499599699799899910001001100210031004100510061007100810091010101110121013101410151016101710181019102010211022102310241025102610271028102910301031103210331034103510361037103810391040104110421043104410451046104710481049105010511052105310541055105610571058105910601061106210631064106510661067106810691070107110721073107410751076107710781079108010811082108310841085108610871088108910901091109210931094109510961097109810991100110111021103110411051106110711081109111011111112111311141115111611171118111911201121112211231124112511261127112811291130113111321133113411351136113711381139114011411142114311441145114611471148114911501151115211531154115511561157115811591160116111621163116411651166116711681169117011711172117311741175117611771178117911801181118211831184118511861187118811891190119111921193119411951196119711981199120012011202120312041205120612071208120912101211121212131214121512161217121812191220122112221223122412251226122712281229123012311232123312341235123612371238123912401241124212431244124512461247124812491250125112521253125412551256125712581259126012611262126312641265126612671268126912701271127212731274127512761277127812791280128112821283128412851286128712881289129012911292129312941295129612971298129913001301130213031304130513061307130813091310131113121313131413151316131713181319132013211322132313241325132613271328132913301331133213331334133513361337133813391340134113421343134413451346134713481349135013511352135313541355135613571358135913601361136213631364136513661367136813691370137113721373137413751376137713781379138013811382138313841385138613871388138913901391139213931394139513961397139813991400140114021403140414051406140714081409141014111412141314141415141614171418141914201421142214231424142514261427142814291430143114321433143414351436143714381439144014411442144314441445144614471448144914501451145214531454145514561457145814591460146114621463146414651466146714681469147014711472147314741475147614771478147914801481148214831484148514861487148814891490149114921493149414951496149714981499150015011502150315041505150615071508150915101511151215131514151515161517151815191520152115221523152415251526152715281529153015311532153315341535153615371538153915401541154215431544154515461547154815491550155115521553155415551556155715581559156015611562156315641565156615671568156915701571157215731574157515761577157815791580158115821583158415851586158715881589159015911592159315941595159615971598159916001601160216031604160516061607160816091610161116121613161416151616161716181619162016211622162316241625162616271628162916301631163216331634163516361637163816391640164116421643164416451646164716481649165016511652165316541655165616571658165916601661166216631664166516661667166816691670167116721673167416751676167716781679168016811682168316841685168616871688168916901691169216931694169516961697169816991700170117021703170417051706170717081709171017111712171317141715171617171718171917201721172217231724172517261727172817291730173117321733173417351736173717381739174017411742174317441745174617471748174917501751175217531754175517561757175817591760176117621763176417651766176717681769177017711772177317741775177617771778177917801781178217831784178517861787178817891790179117921793179417951796179717981799180018011802180318041805180618071808180918101811181218131814181518161817181818191820182118221823182418251826182718281829183018311832183318341835183618371838183918401841184218431844184518461847184818491850185118521853185418551856185718581859186018611862186318641865186618671868186918701871187218731874187518761877187818791880188118821883188418851886188718881889189018911892189318941895189618971898189919001901190219031904190519061907190819091910191119121913191419151916191719181919192019211922192319241925192619271928192919301931193219331934193519361937193819391940194119421943194419451946194719481949195019511952195319541955195619571958195919601961196219631964196519661967196819691970197119721973197419751976197719781979198019811982198319841985198619871988198919901991199219931994199519961997199819992000200120022003200420052006200720082009201020112012201320142015201620172018201920202021202220232024202520262027202820292030203120322033203420352036203720382039204020412042204320442045204620472048204920502051205220532054205520562057205820592060206120622063206420652066206720682069207020712072207320742075207620772078207920802081208220832084208520862087208820892090209120922093209420952096209720982099210021012102210321042105210621072108210921102111211221132114211521162117211821192120212121222123212421252126212721282129213021312132213321342135213621372138213921402141214221432144214521462147214821492150215121522153215421552156215721582159216021612162216321642165216621672168216921702171217221732174217521762177217821792180218121822183218421852186218721882189219021912192219321942195219621972198219922002201220222032204220522062207220822092210221122122213221422152216221722182219222022212222222322242225222622272228222922302231223222332234223522362237223822392240224122422243224422452246224722482249225022512252225322542255225622572258225922602261226222632264226522662267226822692270227122722273227422752276227722782279228022812282228322842285228622872288228922902291229222932294229522962297229822992300230123022303230423052306230723082309231023112312231323142315231623172318231923202321232223232324232523262327232823292330233123322333233423352336233723382339234023412342234323442345234623472348234923502351235223532354235523562357235823592360236123622363236423652366236723682369237023712372237323742375237623772378237923802381238223832384238523862387238823892390239123922393239423952396239723982399240024012402240324042405240624072408240924102411241224132414241524162417241824192420242124222423242424252426242724282429243024312432243324342435243624372438243924402441244224432444244524462447244824492450245124522453245424552456245724582459246024612462246324642465246624672468246924702471247224732474247524762477247824792480248124822483248424852486248724882489249024912492249324942495249624972498249925002501250225032504250525062507250825092510251125122513251425152516251725182519252025212522252325242525252625272528252925302531253225332534253525362537253825392540254125422543254425452546254725482549255025512552255325542555255625572558255925602561256225632564256525662567256825692570257125722573257425752576257725782579258025812582258325842585258625872588258925902591259225932594259525962597259825992600260126022603260426052606260726082609261026112612261326142615261626172618261926202621262226232624262526262627262826292630263126322633263426352636263726382639264026412642264326442645264626472648264926502651265226532654265526562657265826592660266126622663266426652666266726682669267026712672267326742675267626772678267926802681268226832684268526862687268826892690269126922693269426952696269726982699270027012702270327042705270627072708270927102711271227132714271527162717271827192720272127222723272427252726272727282729273027312732273327342735273627372738273927402741274227432744274527462747274827492750275127522753275427552756275727582759276027612762276327642765276627672768276927702771277227732774277527762777277827792780278127822783278427852786278727882789279027912792279327942795279627972798279928002801280228032804280528062807280828092810281128122813281428152816281728182819282028212822282328242825282628272828282928302831283228332834283528362837283828392840284128422843284428452846284728482849285028512852285328542855285628572858285928602861286228632864286528662867286828692870287128722873287428752876287728782879288028812882288328842885288628872888288928902891289228932894289528962897289828992900290129022903290429052906290729082909291029112912291329142915291629172918291929202921292229232924292529262927292829292930293129322933293429352936293729382939294029412942294329442945294629472948294929502951295229532954295529562957295829592960296129622963296429652966296729682969297029712972297329742975297629772978297929802981298229832984298529862987298829892990299129922993299429952996299729982999300030013002300330043005300630073008300930103011301230133014301530163017301830193020302130223023302430253026302730283029303030313032303330343035303630373038303930403041304230433044304530463047304830493050305130523053305430553056305730583059306030613062306330643065306630673068306930703071307230733074307530763077307830793080308130823083308430853086308730883089309030913092309330943095309630973098309931003101310231033104310531063107310831093110311131123113311431153116311731183119312031213122312331243125312631273128312931303131313231333134313531363137313831393140314131423143314431453146314731483149315031513152315331543155315631573158315931603161316231633164316531663167316831693170317131723173317431753176317731783179318031813182318331843185318631873188318931903191319231933194319531963197319831993200320132023203320432053206320732083209321032113212321332143215321632173218321932203221322232233224322532263227322832293230323132323233323432353236323732383239324032413242324332443245324632473248324932503251325232533254325532563257325832593260326132623263326432653266326732683269327032713272327332743275327632773278327932803281328232833284328532863287328832893290329132923293329432953296329732983299330033013302330333043305330633073308330933103311331233133314331533163317331833193320332133223323332433253326332733283329333033313332333333343335333633373338333933403341334233433344334533463347334833493350335133523353335433553356335733583359336033613362336333643365336633673368336933703371337233733374337533763377337833793380338133823383338433853386338733883389339033913392339333943395339633973398339934003401340234033404340534063407340834093410341134123413341434153416341734183419342034213422342334243425342634273428342934303431343234333434343534363437343834393440344134423443344434453446344734483449345034513452345334543455345634573458345934603461346234633464346534663467346834693470347134723473347434753476347734783479348034813482348334843485348634873488348934903491349234933494349534963497349834993500350135023503350435053506350735083509351035113512351335143515351635173518351935203521352235233524352535263527352835293530353135323533353435353536353735383539354035413542354335443545354635473548354935503551355235533554355535563557355835593560356135623563356435653566356735683569357035713572357335743575357635773578357935803581358235833584358535863587358835893590359135923593359435953596359735983599360036013602360336043605360636073608360936103611361236133614361536163617361836193620362136223623362436253626362736283629363036313632363336343635363636373638363936403641364236433644364536463647364836493650365136523653365436553656365736583659366036613662366336643665366636673668366936703671367236733674367536763677367836793680368136823683368436853686368736883689369036913692369336943695369636973698369937003701370237033704370537063707370837093710371137123713371437153716371737183719372037213722372337243725372637273728372937303731373237333734373537363737373837393740374137423743374437453746374737483749375037513752375337543755375637573758375937603761376237633764376537663767376837693770377137723773377437753776377737783779378037813782378337843785378637873788378937903791379237933794379537963797379837993800380138023803380438053806380738083809381038113812381338143815381638173818381938203821382238233824382538263827382838293830383138323833383438353836383738383839384038413842384338443845384638473848384938503851385238533854385538563857385838593860386138623863386438653866386738683869387038713872387338743875387638773878387938803881388238833884388538863887388838893890389138923893389438953896389738983899390039013902390339043905390639073908390939103911391239133914391539163917391839193920392139223923392439253926392739283929393039313932393339343935393639373938393939403941394239433944394539463947394839493950395139523953395439553956395739583959396039613962396339643965396639673968396939703971397239733974397539763977397839793980398139823983398439853986398739883989399039913992399339943995399639973998399940004001400240034004400540064007400840094010401140124013401440154016401740184019402040214022402340244025402640274028402940304031403240334034403540364037403840394040404140424043404440454046404740484049405040514052405340544055405640574058405940604061406240634064406540664067406840694070407140724073407440754076407740784079408040814082408340844085408640874088408940904091409240934094409540964097409840994100410141024103410441054106410741084109411041114112411341144115411641174118411941204121412241234124412541264127412841294130413141324133413441354136413741384139414041414142414341444145414641474148414941504151415241534154415541564157415841594160416141624163416441654166416741684169417041714172417341744175417641774178417941804181418241834184418541864187418841894190419141924193419441954196419741984199420042014202420342044205420642074208420942104211421242134214421542164217421842194220422142224223422442254226422742284229423042314232423342344235423642374238423942404241424242434244424542464247424842494250425142524253425442554256425742584259426042614262426342644265426642674268426942704271427242734274427542764277427842794280428142824283428442854286428742884289429042914292429342944295429642974298429943004301430243034304430543064307430843094310431143124313431443154316431743184319432043214322432343244325432643274328432943304331433243334334433543364337433843394340434143424343434443454346434743484349435043514352435343544355435643574358435943604361436243634364436543664367436843694370437143724373437443754376437743784379438043814382438343844385438643874388438943904391439243934394439543964397439843994400440144024403440444054406440744084409441044114412441344144415441644174418441944204421442244234424442544264427442844294430443144324433443444354436443744384439444044414442444344444445444644474448444944504451445244534454445544564457445844594460446144624463446444654466446744684469447044714472447344744475447644774478447944804481448244834484448544864487448844894490449144924493449444954496449744984499450045014502450345044505450645074508450945104511451245134514451545164517451845194520452145224523452445254526452745284529453045314532453345344535453645374538453945404541454245434544454545464547454845494550455145524553455445554556455745584559456045614562456345644565456645674568456945704571457245734574457545764577457845794580458145824583458445854586458745884589459045914592459345944595459645974598459946004601460246034604460546064607460846094610461146124613461446154616461746184619462046214622462346244625462646274628462946304631463246334634463546364637463846394640464146424643464446454646464746484649465046514652465346544655465646574658465946604661466246634664466546664667466846694670467146724673467446754676467746784679468046814682468346844685468646874688468946904691469246934694469546964697469846994700470147024703470447054706470747084709471047114712471347144715471647174718471947204721472247234724472547264727472847294730473147324733473447354736473747384739474047414742474347444745474647474748474947504751475247534754475547564757475847594760476147624763476447654766476747684769477047714772477347744775477647774778477947804781478247834784478547864787478847894790479147924793479447954796479747984799480048014802480348044805480648074808480948104811481248134814481548164817481848194820482148224823482448254826482748284829483048314832483348344835483648374838483948404841484248434844484548464847484848494850485148524853485448554856485748584859486048614862486348644865486648674868486948704871487248734874487548764877487848794880488148824883488448854886488748884889489048914892489348944895489648974898489949004901490249034904490549064907490849094910491149124913491449154916491749184919492049214922492349244925492649274928492949304931493249334934493549364937493849394940494149424943494449454946494749484949495049514952495349544955495649574958495949604961496249634964496549664967496849694970497149724973497449754976497749784979498049814982498349844985498649874988498949904991499249934994499549964997499849995000500150025003500450055006500750085009501050115012501350145015501650175018501950205021502250235024502550265027502850295030503150325033503450355036503750385039504050415042504350445045504650475048504950505051505250535054505550565057505850595060506150625063506450655066506750685069507050715072507350745075507650775078507950805081508250835084508550865087508850895090509150925093509450955096509750985099510051015102510351045105510651075108510951105111511251135114511551165117511851195120512151225123512451255126512751285129513051315132513351345135513651375138513951405141514251435144514551465147514851495150515151525153515451555156515751585159516051615162516351645165516651675168516951705171517251735174517551765177517851795180518151825183518451855186518751885189519051915192519351945195519651975198519952005201520252035204520552065207520852095210521152125213521452155216521752185219522052215222522352245225522652275228522952305231523252335234523552365237523852395240524152425243524452455246524752485249525052515252525352545255525652575258525952605261526252635264526552665267526852695270527152725273527452755276527752785279528052815282528352845285528652875288528952905291529252935294529552965297529852995300530153025303530453055306530753085309531053115312531353145315531653175318531953205321532253235324532553265327532853295330533153325333533453355336533753385339534053415342534353445345534653475348534953505351535253535354535553565357535853595360536153625363536453655366536753685369537053715372537353745375537653775378537953805381538253835384538553865387538853895390539153925393539453955396539753985399540054015402540354045405540654075408540954105411541254135414541554165417541854195420542154225423542454255426542754285429543054315432543354345435543654375438543954405441544254435444544554465447544854495450545154525453545454555456545754585459546054615462546354645465546654675468546954705471547254735474547554765477547854795480548154825483548454855486548754885489549054915492549354945495549654975498549955005501550255035504550555065507550855095510551155125513551455155516551755185519552055215522 |
- using System;
- using System.Collections.Generic;
- using System.IO;
- using System.Runtime.CompilerServices;
- using MaidStatus;
- using Schedule;
- using script;
- using UnityEngine;
- using wf;
- public class BaseKagManager : IDisposable
- {
- public BaseKagManager(TJSScript tjs, ScriptManager script_mgr)
- {
- NDebug.AssertNull(tjs != null);
- this.maidOffsetSetList = new List<Maid>();
- this.tjs_ = tjs;
- this.script_mgr_ = script_mgr;
- this.kag_ = new KagScript(this.tjs_);
- this.kag_.SetReplaceEvent(new KagScript.ReplaceCallBack(this.ReplaceFileNameCallBack));
- this.kag_.onScenarioLoadEventList.Add(new KagScript.OnScenarioLoadCallBack(this.OnScenarioLoadEvent));
- this.exec_wait_data_.Clear();
- }
- ~BaseKagManager()
- {
- this.Dispose(false);
- }
- public virtual void Initialize()
- {
- this.kag_.AddTagCallBack("wait", new KagScript.KagTagCallBack(this.TagWait));
- this.kag_.AddTagCallBack("face", new KagScript.KagTagCallBack(this.TagFace));
- this.kag_.AddTagCallBack("faceblend", new KagScript.KagTagCallBack(this.TagFaceBlend));
- this.kag_.AddTagCallBack("faceblend2", new KagScript.KagTagCallBack(this.TagFaceBlend2));
- this.kag_.AddTagCallBack("startkuchipakupattern", new KagScript.KagTagCallBack(this.TagStartKuchipakuPattern));
- this.kag_.AddTagCallBack("stopkuchipakupattern", new KagScript.KagTagCallBack(this.TagStopKuchipakuPattern));
- this.kag_.AddTagCallBack("motion", new KagScript.KagTagCallBack(this.TagMotion));
- this.kag_.AddTagCallBack("motionnext", new KagScript.KagTagCallBack(this.TagMotionNext));
- this.kag_.AddTagCallBack("motionnextabs", new KagScript.KagTagCallBack(this.TagMotionNextAbs));
- this.kag_.AddTagCallBack("motionstop", new KagScript.KagTagCallBack(this.TagMotionStop));
- this.kag_.AddTagCallBack("motionlayerstop", new KagScript.KagTagCallBack(this.TagMotionLayerStop));
- this.kag_.AddTagCallBack("motionautotwist", new KagScript.KagTagCallBack(this.TagMotionAutoTwist));
- this.kag_.AddTagCallBack("motionblendenabled", new KagScript.KagTagCallBack(this.TagMotionBlendEnabled));
- this.kag_.AddTagCallBack("motionscript", new KagScript.KagTagCallBack(this.TagMotionScript));
- this.kag_.AddTagCallBack("itemanime", new KagScript.KagTagCallBack(this.TagItemAnime));
- this.kag_.AddTagCallBack("hairphisics", new KagScript.KagTagCallBack(this.TagHairPhisics));
- this.kag_.AddTagCallBack("bustmove", new KagScript.KagTagCallBack(this.TagBustMove));
- this.kag_.AddTagCallBack("phisicshit", new KagScript.KagTagCallBack(this.TagPhisicsHit));
- this.kag_.AddTagCallBack("ikattachpoint", new KagScript.KagTagCallBack(this.TagIKAttachPoint));
- this.kag_.AddTagCallBack("ikattachbone", new KagScript.KagTagCallBack(this.TagIKAttachBone));
- this.kag_.AddTagCallBack("ikdetach", new KagScript.KagTagCallBack(this.TagIKDetach));
- this.kag_.AddTagCallBack("allikdetach", new KagScript.KagTagCallBack(this.TagAllIKDetach));
- this.kag_.AddTagCallBack("ikattachodogu", new KagScript.KagTagCallBack(this.TagIKAttachOdogu));
- this.kag_.AddTagCallBack("ikattachikbone", new KagScript.KagTagCallBack(this.TagIKAttachIKBone));
- this.kag_.AddTagCallBack("setbodypos", new KagScript.KagTagCallBack(this.TagSetBodyPos));
- this.kag_.AddTagCallBack("ikcheckthrough", new KagScript.KagTagCallBack(this.TagIKCheckThrough));
- this.kag_.AddTagCallBack("bendbonectrl", new KagScript.KagTagCallBack(this.TagBendBoneCtrl));
- this.kag_.AddTagCallBack("nextikflag", new KagScript.KagTagCallBack(this.TagNextIKFlag));
- this.kag_.AddTagCallBack("ikattachpointnext", new KagScript.KagTagCallBack(this.TagIKAttachPointNext));
- this.kag_.AddTagCallBack("ikattachbonenext", new KagScript.KagTagCallBack(this.TagIKAttachBoneNext));
- this.kag_.AddTagCallBack("ikattachodogunext", new KagScript.KagTagCallBack(this.TagIKAttachOdoguNext));
- this.kag_.AddTagCallBack("ikattachikbonenext", new KagScript.KagTagCallBack(this.TagIKAttachIKBoneNext));
- this.kag_.AddTagCallBack("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));
- this.kag_.AddTagCallBack("loadsubtitlefile", new KagScript.KagTagCallBack(this.TagLoadSubtitleFile));
- this.kag_.AddTagCallBack("endsubtitledisplay", new KagScript.KagTagCallBack(this.TagEndSubtitleDisplay));
- this.kag_.AddTagCallBack("subtitledisplayforplayvoice", new KagScript.KagTagCallBack(this.TagSubtitleDisplayForPlayVoice));
- this.kag_.AddTagCallBack("subtitledisplay", new KagScript.KagTagCallBack(this.TagSubtitleDisplay));
- }
- 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 text = tag_data.GetTagProperty("srcbone").AsString();
- string attachpoint_name = tag_data.GetTagProperty("targetpoint").AsString();
- string tgt_name = tag_data.GetTagProperty("targetobj").AsString();
- IKCtrlData ikdata = maidAndMan.IKCtrl.GetIKData(text, false);
- if (!ikdata)
- {
- return false;
- }
- Vector3 zero = Vector3.zero;
- if (tag_data.IsValid("offsetx"))
- {
- zero.x = tag_data.GetTagProperty("offsetx").AsReal();
- }
- if (tag_data.IsValid("offsety"))
- {
- zero.y = tag_data.GetTagProperty("offsety").AsReal();
- }
- if (tag_data.IsValid("offsetz"))
- {
- zero.z = tag_data.GetTagProperty("offsetz").AsReal();
- }
- IKCtrlData.IKAttachType ikattachType = IKCtrlData.IKAttachType.Point;
- if (tag_data.IsValid("attach_type"))
- {
- ikattachType = (IKCtrlData.IKAttachType)Enum.Parse(typeof(IKCtrlData.IKAttachType), tag_data.GetTagProperty("attach_type").AsString());
- }
- if (ikattachType == IKCtrlData.IKAttachType.NewPoint)
- {
- ikdata.OffsetWorld = tag_data.IsValid("offset_world");
- ikdata.OffsetBone = tag_data.IsValid("offset_bone");
- }
- ikdata.GetIKEnable(ikattachType).Recet();
- if (tag_data.IsValid("disable"))
- {
- string[] array = tag_data.GetTagProperty("disable").AsString().Split(new char[]
- {
- ','
- });
- int i = 0;
- while (i < array.Length)
- {
- string text2 = array[i];
- string text3 = text2.ToLower();
- if (text3 != null)
- {
- if (!(text3 == "x"))
- {
- if (!(text3 == "y"))
- {
- if (text3 == "z")
- {
- ikdata.GetIKEnable(ikattachType).EnableZ = false;
- }
- }
- else
- {
- ikdata.GetIKEnable(ikattachType).EnableY = false;
- }
- }
- else
- {
- ikdata.GetIKEnable(ikattachType).EnableX = false;
- }
- }
- IL_28C:
- i++;
- continue;
- goto IL_28C;
- }
- }
- string axisbone = string.Empty;
- if (tag_data.IsValid("axisbone"))
- {
- axisbone = tag_data.GetTagProperty("axisbone").AsString();
- }
- float blend_time = 0f;
- if (tag_data.IsValid("blendtime"))
- {
- blend_time = GameUty.MillisecondToSecond(tag_data.GetTagProperty("blendtime").AsInteger());
- }
- bool do_animation = false;
- if (tag_data.IsValid("do_animation"))
- {
- do_animation = true;
- }
- maidAndMan.IKTargetToAttachPoint(text, maidAndMan2, tgt_name, attachpoint_name, zero, ikattachType, axisbone, blend_time, do_animation, false);
- return false;
- }
- public bool TagIKAttachBone(KagTagSupport tag_data)
- {
- this.CheckAbsolutelyNecessaryTag(tag_data, "ikattachbone", new string[]
- {
- "src",
- "srcbone",
- "target",
- "targetbone"
- });
- Maid maidAndMan = this.GetMaidAndMan(tag_data.GetTagProperty("src").AsString());
- Maid maidAndMan2 = this.GetMaidAndMan(tag_data.GetTagProperty("target").AsString());
- if (maidAndMan == null || maidAndMan2 == null)
- {
- return false;
- }
- string text = tag_data.GetTagProperty("srcbone").AsString();
- string tgtbone_name = tag_data.GetTagProperty("targetbone").AsString();
- IKCtrlData ikdata = maidAndMan.IKCtrl.GetIKData(text, false);
- if (!ikdata)
- {
- return false;
- }
- bool search_sm = tag_data.IsValid("Search_SM_Body");
- Vector3 zero = Vector3.zero;
- if (tag_data.IsValid("offsetx"))
- {
- zero.x = tag_data.GetTagProperty("offsetx").AsReal();
- }
- if (tag_data.IsValid("offsety"))
- {
- zero.y = tag_data.GetTagProperty("offsety").AsReal();
- }
- if (tag_data.IsValid("offsetz"))
- {
- zero.z = tag_data.GetTagProperty("offsetz").AsReal();
- }
- IKCtrlData.IKAttachType ikattachType = IKCtrlData.IKAttachType.Point;
- if (tag_data.IsValid("attach_type"))
- {
- ikattachType = (IKCtrlData.IKAttachType)Enum.Parse(typeof(IKCtrlData.IKAttachType), tag_data.GetTagProperty("attach_type").AsString());
- }
- if (ikattachType == IKCtrlData.IKAttachType.NewPoint)
- {
- ikdata.OffsetWorld = tag_data.IsValid("offset_world");
- ikdata.OffsetBone = tag_data.IsValid("offset_bone");
- }
- ikdata.GetIKEnable(ikattachType).Recet();
- if (tag_data.IsValid("disable"))
- {
- string[] array = tag_data.GetTagProperty("disable").AsString().Split(new char[]
- {
- ','
- });
- int i = 0;
- while (i < array.Length)
- {
- string text2 = array[i];
- string text3 = text2.ToLower();
- if (text3 != null)
- {
- if (!(text3 == "x"))
- {
- if (!(text3 == "y"))
- {
- if (text3 == "z")
- {
- ikdata.GetIKEnable(ikattachType).EnableZ = false;
- }
- }
- else
- {
- ikdata.GetIKEnable(ikattachType).EnableY = false;
- }
- }
- else
- {
- ikdata.GetIKEnable(ikattachType).EnableX = false;
- }
- }
- IL_27F:
- i++;
- continue;
- goto IL_27F;
- }
- }
- float blend_time = 0f;
- if (tag_data.IsValid("blendtime"))
- {
- blend_time = GameUty.MillisecondToSecond(tag_data.GetTagProperty("blendtime").AsInteger());
- }
- bool do_animation = false;
- if (tag_data.IsValid("do_animation"))
- {
- do_animation = true;
- }
- maidAndMan.IKTargetToBone(text, maidAndMan2, tgtbone_name, zero, ikattachType, search_sm, blend_time, do_animation, false);
- return false;
- }
- public bool TagIKDetach(KagTagSupport tag_data)
- {
- this.CheckAbsolutelyNecessaryTag(tag_data, "ikdetach", new string[]
- {
- "src",
- "srcbone"
- });
- Maid maidAndMan = this.GetMaidAndMan(tag_data.GetTagProperty("src").AsString());
- if (maidAndMan == null)
- {
- return false;
- }
- string text = tag_data.GetTagProperty("srcbone").AsString();
- IKCtrlData ikdata = maidAndMan.IKCtrl.GetIKData(text, false);
- if (!ikdata)
- {
- return false;
- }
- float blendtime = 0f;
- if (tag_data.IsValid("blendtime"))
- {
- blendtime = GameUty.MillisecondToSecond(tag_data.GetTagProperty("blendtime").AsInteger());
- }
- maidAndMan.IKDetach(text, blendtime);
- return false;
- }
- public bool TagAllIKDetach(KagTagSupport tag_data)
- {
- this.CheckAbsolutelyNecessaryTag(tag_data, "allikdetach", new string[]
- {
- "src"
- });
- Maid maidAndMan = this.GetMaidAndMan(tag_data.GetTagProperty("src").AsString());
- if (maidAndMan == null)
- {
- return false;
- }
- float blendtime = 0f;
- if (tag_data.IsValid("blendtime"))
- {
- blendtime = GameUty.MillisecondToSecond(tag_data.GetTagProperty("blendtime").AsInteger());
- }
- maidAndMan.IKDetach(blendtime);
- return false;
- }
- public bool TagIKAttachOdogu(KagTagSupport tag_data)
- {
- this.CheckAbsolutelyNecessaryTag(tag_data, "ikattachodogu", new string[]
- {
- "src",
- "srcbone",
- "odogu"
- });
- Maid maidAndMan = this.GetMaidAndMan(tag_data.GetTagProperty("src").AsString());
- if (!maidAndMan)
- {
- return false;
- }
- string text = tag_data.GetTagProperty("srcbone").AsString();
- string odogu_name = tag_data.GetTagProperty("odogu").AsString();
- IKCtrlData ikdata = maidAndMan.IKCtrl.GetIKData(text, false);
- if (!ikdata)
- {
- return false;
- }
- string tgt_name = string.Empty;
- if (tag_data.IsValid("target"))
- {
- tgt_name = tag_data.GetTagProperty("target").AsString();
- }
- Vector3 zero = Vector3.zero;
- if (tag_data.IsValid("offsetx"))
- {
- zero.x = tag_data.GetTagProperty("offsetx").AsReal();
- }
- if (tag_data.IsValid("offsety"))
- {
- zero.y = tag_data.GetTagProperty("offsety").AsReal();
- }
- if (tag_data.IsValid("offsetz"))
- {
- zero.z = tag_data.GetTagProperty("offsetz").AsReal();
- }
- IKCtrlData.IKAttachType ikattachType = IKCtrlData.IKAttachType.Point;
- if (tag_data.IsValid("attach_type"))
- {
- ikattachType = (IKCtrlData.IKAttachType)Enum.Parse(typeof(IKCtrlData.IKAttachType), tag_data.GetTagProperty("attach_type").AsString());
- }
- if (ikattachType == IKCtrlData.IKAttachType.NewPoint)
- {
- ikdata.OffsetWorld = tag_data.IsValid("offset_world");
- ikdata.OffsetBone = tag_data.IsValid("offset_bone");
- }
- ikdata.GetIKEnable(ikattachType).Recet();
- if (tag_data.IsValid("disable"))
- {
- string[] array = tag_data.GetTagProperty("disable").AsString().Split(new char[]
- {
- ','
- });
- int i = 0;
- while (i < array.Length)
- {
- string text2 = array[i];
- string text3 = text2.ToLower();
- if (text3 != null)
- {
- if (!(text3 == "x"))
- {
- if (!(text3 == "y"))
- {
- if (text3 == "z")
- {
- ikdata.GetIKEnable(ikattachType).EnableZ = false;
- }
- }
- else
- {
- ikdata.GetIKEnable(ikattachType).EnableY = false;
- }
- }
- else
- {
- ikdata.GetIKEnable(ikattachType).EnableX = false;
- }
- }
- IL_267:
- i++;
- continue;
- goto IL_267;
- }
- }
- float blend_time = 0f;
- if (tag_data.IsValid("blendtime"))
- {
- blend_time = GameUty.MillisecondToSecond(tag_data.GetTagProperty("blendtime").AsInteger());
- }
- bool do_animation = false;
- if (tag_data.IsValid("do_animation"))
- {
- do_animation = true;
- }
- maidAndMan.IKTargetToOdogu(text, odogu_name, tgt_name, zero, ikattachType, blend_time, do_animation, false);
- return false;
- }
- public bool TagIKAttachIKBone(KagTagSupport tag_data)
- {
- this.CheckAbsolutelyNecessaryTag(tag_data, "ikattachbone", new string[]
- {
- "src",
- "srcbone",
- "target",
- "targetbone"
- });
- Maid maidAndMan = this.GetMaidAndMan(tag_data.GetTagProperty("src").AsString());
- Maid maidAndMan2 = this.GetMaidAndMan(tag_data.GetTagProperty("target").AsString());
- if (maidAndMan == null || maidAndMan2 == null)
- {
- return false;
- }
- string text = tag_data.GetTagProperty("srcbone").AsString();
- string bone_name = tag_data.GetTagProperty("targetbone").AsString();
- IKCtrlData ikdata = maidAndMan.IKCtrl.GetIKData(text, false);
- if (!ikdata)
- {
- return false;
- }
- Vector3 zero = Vector3.zero;
- if (tag_data.IsValid("offsetx"))
- {
- zero.x = tag_data.GetTagProperty("offsetx").AsReal();
- }
- if (tag_data.IsValid("offsety"))
- {
- zero.y = tag_data.GetTagProperty("offsety").AsReal();
- }
- if (tag_data.IsValid("offsetz"))
- {
- zero.z = tag_data.GetTagProperty("offsetz").AsReal();
- }
- IKCtrlData.IKAttachType ikattachType = IKCtrlData.IKAttachType.Point;
- if (tag_data.IsValid("attach_type"))
- {
- ikattachType = (IKCtrlData.IKAttachType)Enum.Parse(typeof(IKCtrlData.IKAttachType), tag_data.GetTagProperty("attach_type").AsString());
- }
- if (ikattachType == IKCtrlData.IKAttachType.NewPoint)
- {
- ikdata.OffsetWorld = tag_data.IsValid("offset_world");
- ikdata.OffsetBone = tag_data.IsValid("offset_bone");
- }
- ikdata.GetIKEnable(ikattachType).Recet();
- if (tag_data.IsValid("disable"))
- {
- string[] array = tag_data.GetTagProperty("disable").AsString().Split(new char[]
- {
- ','
- });
- int i = 0;
- while (i < array.Length)
- {
- string text2 = array[i];
- string text3 = text2.ToLower();
- if (text3 != null)
- {
- if (!(text3 == "x"))
- {
- if (!(text3 == "y"))
- {
- if (text3 == "z")
- {
- ikdata.GetIKEnable(ikattachType).EnableZ = false;
- }
- }
- else
- {
- ikdata.GetIKEnable(ikattachType).EnableY = false;
- }
- }
- else
- {
- ikdata.GetIKEnable(ikattachType).EnableX = false;
- }
- }
- IL_272:
- i++;
- continue;
- goto IL_272;
- }
- }
- float blend_time = 0f;
- if (tag_data.IsValid("blendtime"))
- {
- blend_time = GameUty.MillisecondToSecond(tag_data.GetTagProperty("blendtime").AsInteger());
- }
- bool do_animation = tag_data.IsValid("do_animation");
- maidAndMan.IKTargetToIKBone(text, maidAndMan2, bone_name, zero, ikattachType, blend_time, do_animation, false);
- return false;
- }
- public bool TagSetBodyPos(KagTagSupport tag_data)
- {
- this.CheckAbsolutelyNecessaryTag(tag_data, "setbodypos", new string[]
- {
- "src",
- "srcbone",
- "target",
- "targetbone"
- });
- Maid maidAndMan = this.GetMaidAndMan(tag_data.GetTagProperty("src").AsString());
- Maid maidAndMan2 = this.GetMaidAndMan(tag_data.GetTagProperty("target").AsString());
- if (maidAndMan == null || maidAndMan2 == null)
- {
- return false;
- }
- string tgtbone_name = tag_data.GetTagProperty("targetbone").AsString();
- Vector3 zero = Vector3.zero;
- if (tag_data.IsValid("offsetx"))
- {
- zero.x = tag_data.GetTagProperty("offsetx").AsReal();
- }
- if (tag_data.IsValid("offsety"))
- {
- zero.y = tag_data.GetTagProperty("offsety").AsReal();
- }
- if (tag_data.IsValid("offsetz"))
- {
- zero.z = tag_data.GetTagProperty("offsetz").AsReal();
- }
- IKCtrlData.IKAttachType attach_type = IKCtrlData.IKAttachType.NewPoint;
- float blend_time = 0f;
- if (tag_data.IsValid("blendtime"))
- {
- blend_time = GameUty.MillisecondToSecond(tag_data.GetTagProperty("blendtime").AsInteger());
- }
- bool search_sm = tag_data.IsValid("Search_SM_Body");
- maidAndMan.IKCtrl.BodyCtrlData.OffsetEnable.Recet();
- if (tag_data.IsValid("disable"))
- {
- string[] array = tag_data.GetTagProperty("disable").AsString().Split(new char[]
- {
- ','
- });
- int i = 0;
- while (i < array.Length)
- {
- string text = array[i];
- string text2 = text.ToLower();
- if (text2 != null)
- {
- if (!(text2 == "x"))
- {
- if (!(text2 == "y"))
- {
- if (text2 == "z")
- {
- maidAndMan.IKCtrl.BodyCtrlData.OffsetEnable.EnableZ = false;
- }
- }
- else
- {
- maidAndMan.IKCtrl.BodyCtrlData.OffsetEnable.EnableY = false;
- }
- }
- else
- {
- maidAndMan.IKCtrl.BodyCtrlData.OffsetEnable.EnableX = false;
- }
- }
- IL_238:
- i++;
- continue;
- goto IL_238;
- }
- }
- if (tag_data.IsValid("heighttype"))
- {
- BodyCtrlData.HeightFitType heightFit = (BodyCtrlData.HeightFitType)Enum.Parse(typeof(BodyCtrlData.HeightFitType), tag_data.GetTagProperty("heighttype").AsString());
- maidAndMan.IKCtrl.BodyCtrlData.HeightFit = heightFit;
- }
- maidAndMan.IKCtrl.BodyCtrlData.PosBaseBone = maidAndMan.body0.GetBone(tag_data.GetTagProperty("srcbone").AsString());
- maidAndMan.IKCtrl.BodyCtrlData.OffsetWorld = tag_data.IsValid("offset_world");
- maidAndMan.IKCtrl.BodyCtrlData.OffsetBone = tag_data.IsValid("offset_bone");
- maidAndMan.IKTargetToBone("体全体", maidAndMan2, tgtbone_name, zero, attach_type, search_sm, blend_time, false, false);
- return false;
- }
- public bool TagIKCheckThrough(KagTagSupport tag_data)
- {
- this.CheckAbsolutelyNecessaryTag(tag_data, "ikcheckthrough", new string[]
- {
- "src",
- "srcbone",
- "checkobj"
- });
- Maid maidAndMan = this.GetMaidAndMan(tag_data.GetTagProperty("src").AsString());
- if (maidAndMan == null)
- {
- return false;
- }
- string tag_name = tag_data.GetTagProperty("srcbone").AsString();
- BipedIKCtrlData ikdata = maidAndMan.IKCtrl.GetIKData<BipedIKCtrlData>(tag_name, false);
- if (tag_data.IsValid("correctbone"))
- {
- ikdata.ToCorrectBone = maidAndMan.body0.GetBone(tag_data.GetTagProperty("correctbone").AsString());
- }
- string text = tag_data.GetTagProperty("checkobj").AsString();
- float weight = 1f;
- if (tag_data.IsValid("bendweight"))
- {
- weight = tag_data.GetTagProperty("bendweight").AsReal();
- }
- BipedIKCtrlData.BorderCorrectData borderCorrectData;
- if (text.Contains("Floor"))
- {
- borderCorrectData = ikdata.FloorCorrect;
- }
- else
- {
- if (!text.Contains("Wall"))
- {
- Debug.LogErrorFormat("{0}は定義できません", new object[]
- {
- text
- });
- return false;
- }
- borderCorrectData = ikdata.WallCorrect;
- }
- if (tag_data.IsValid("correcttype"))
- {
- ikdata.CorrectType = (BipedIKCtrlData.BorderCorrectType)Enum.Parse(typeof(BipedIKCtrlData.BorderCorrectType), tag_data.GetTagProperty("correcttype").AsString());
- if (ikdata.CorrectType == BipedIKCtrlData.BorderCorrectType.HalfBody)
- {
- ikdata.RootEffector.positionWeight = 1f;
- }
- }
- float blend_time = 0f;
- if (tag_data.IsValid("blendtime"))
- {
- blend_time = GameUty.MillisecondToSecond(tag_data.GetTagProperty("blendtime").AsInteger());
- }
- ikdata.ForceIK = true;
- ikdata.Chain.bendConstraint.weight = weight;
- ikdata.SetIKSetting(IKCtrlData.IKAttachType.NewPoint, false, null, null, Vector3.zero, false, blend_time);
- borderCorrectData.Enable = true;
- borderCorrectData.Border = float.Parse(text.Split(new char[]
- {
- ':'
- })[1]);
- return false;
- }
- public bool TagBendBoneCtrl(KagTagSupport tag_data)
- {
- this.CheckAbsolutelyNecessaryTag(tag_data, "bendbonectrl", new string[]
- {
- "src",
- "srcbone",
- "flagobj"
- });
- Maid maidAndMan = this.GetMaidAndMan(tag_data.GetTagProperty("src").AsString());
- if (maidAndMan == null)
- {
- return false;
- }
- string tag_name = tag_data.GetTagProperty("srcbone").AsString();
- BipedIKCtrlData ikdata = maidAndMan.IKCtrl.GetIKData<BipedIKCtrlData>(tag_name, false);
- if (!ikdata)
- {
- return false;
- }
- string bendweightCtrl = tag_data.GetTagProperty("flagobj").AsString();
- ikdata.SetBendweightCtrl(bendweightCtrl);
- return false;
- }
- public bool TagNextIKFlag(KagTagSupport tag_data)
- {
- this.CheckAbsolutelyNecessaryTag(tag_data, "nextikflag", new string[]
- {
- "src",
- "srcbone",
- "flagobj"
- });
- Maid maidAndMan = this.GetMaidAndMan(tag_data.GetTagProperty("src").AsString());
- if (maidAndMan == null)
- {
- return false;
- }
- string tag_name = tag_data.GetTagProperty("srcbone").AsString();
- IKCtrlData ik_data = maidAndMan.IKCtrl.GetIKData(tag_name, false);
- if (!ik_data)
- {
- return false;
- }
- Action<IKCtrlData.IKAttachType> action = delegate(IKCtrlData.IKAttachType attach_type)
- {
- if (tag_data.IsValid("axis"))
- {
- ik_data.GetFlagData(attach_type).Axis = KasaiUtility.Vec3Parse(tag_data.GetTagProperty("axis").AsString(), ',');
- }
- if (tag_data.IsValid("value"))
- {
- ik_data.GetFlagData(attach_type).OnValue = tag_data.GetTagProperty("value").AsReal();
- }
- ik_data.GetFlagData(attach_type).BlendCtrlSelf = tag_data.IsValid("blendself");
- string name = tag_data.GetTagProperty("flagobj").AsString();
- ik_data.SetFlagTarget(attach_type, name);
- };
- if (tag_data.IsValid("attach_type"))
- {
- IKCtrlData.IKAttachType obj = (IKCtrlData.IKAttachType)Enum.Parse(typeof(IKCtrlData.IKAttachType), tag_data.GetTagProperty("attach_type").AsString());
- action(obj);
- }
- else
- {
- action(IKCtrlData.IKAttachType.NewPoint);
- action(IKCtrlData.IKAttachType.Rotate);
- }
- return false;
- }
- public bool TagIKAttachPointNext(KagTagSupport tag_data)
- {
- this.CheckAbsolutelyNecessaryTag(tag_data, "ikattachpointnext", new string[]
- {
- "src",
- "srcbone",
- "target",
- "targetobj",
- "targetpoint"
- });
- Maid maidAndMan = this.GetMaidAndMan(tag_data.GetTagProperty("src").AsString());
- Maid maidAndMan2 = this.GetMaidAndMan(tag_data.GetTagProperty("target").AsString());
- if (maidAndMan == null || maidAndMan2 == null)
- {
- return false;
- }
- string text = tag_data.GetTagProperty("srcbone").AsString();
- string attachpoint_name = tag_data.GetTagProperty("targetpoint").AsString();
- string tgt_name = tag_data.GetTagProperty("targetobj").AsString();
- IKCtrlData ikdata = maidAndMan.IKCtrl.GetIKData(text, false);
- if (!ikdata)
- {
- return false;
- }
- Vector3 zero = Vector3.zero;
- if (tag_data.IsValid("offsetx"))
- {
- zero.x = tag_data.GetTagProperty("offsetx").AsReal();
- }
- if (tag_data.IsValid("offsety"))
- {
- zero.y = tag_data.GetTagProperty("offsety").AsReal();
- }
- if (tag_data.IsValid("offsetz"))
- {
- zero.z = tag_data.GetTagProperty("offsetz").AsReal();
- }
- IKCtrlData.IKAttachType ikattachType = IKCtrlData.IKAttachType.Point;
- if (tag_data.IsValid("attach_type"))
- {
- ikattachType = (IKCtrlData.IKAttachType)Enum.Parse(typeof(IKCtrlData.IKAttachType), tag_data.GetTagProperty("attach_type").AsString());
- }
- if (ikattachType == IKCtrlData.IKAttachType.NewPoint)
- {
- ikdata.OffsetWorld = tag_data.IsValid("offset_world");
- ikdata.OffsetBone = tag_data.IsValid("offset_bone");
- }
- ikdata.GetIKEnable(ikattachType).Recet();
- if (tag_data.IsValid("disable"))
- {
- string[] array = tag_data.GetTagProperty("disable").AsString().Split(new char[]
- {
- ','
- });
- int i = 0;
- while (i < array.Length)
- {
- string text2 = array[i];
- string text3 = text2.ToLower();
- if (text3 != null)
- {
- if (!(text3 == "x"))
- {
- if (!(text3 == "y"))
- {
- if (text3 == "z")
- {
- ikdata.GetIKEnable(ikattachType).EnableZ = false;
- }
- }
- else
- {
- ikdata.GetIKEnable(ikattachType).EnableY = false;
- }
- }
- else
- {
- ikdata.GetIKEnable(ikattachType).EnableX = false;
- }
- }
- IL_28C:
- i++;
- continue;
- goto IL_28C;
- }
- }
- string axisbone = string.Empty;
- if (tag_data.IsValid("axisbone"))
- {
- axisbone = tag_data.GetTagProperty("axisbone").AsString();
- }
- float blend_time = 0f;
- if (tag_data.IsValid("blendtime"))
- {
- blend_time = GameUty.MillisecondToSecond(tag_data.GetTagProperty("blendtime").AsInteger());
- }
- bool do_animation = false;
- if (tag_data.IsValid("do_animation"))
- {
- do_animation = true;
- }
- maidAndMan.IKTargetToAttachPoint(text, maidAndMan2, tgt_name, attachpoint_name, zero, ikattachType, axisbone, blend_time, do_animation, true);
- return false;
- }
- public bool TagIKAttachBoneNext(KagTagSupport tag_data)
- {
- this.CheckAbsolutelyNecessaryTag(tag_data, "ikattachbonenext", new string[]
- {
- "src",
- "srcbone",
- "target",
- "targetbone"
- });
- Maid maidAndMan = this.GetMaidAndMan(tag_data.GetTagProperty("src").AsString());
- Maid maidAndMan2 = this.GetMaidAndMan(tag_data.GetTagProperty("target").AsString());
- if (maidAndMan == null || maidAndMan2 == null)
- {
- return false;
- }
- string text = tag_data.GetTagProperty("srcbone").AsString();
- string tgtbone_name = tag_data.GetTagProperty("targetbone").AsString();
- IKCtrlData ikdata = maidAndMan.IKCtrl.GetIKData(text, false);
- if (!ikdata)
- {
- return false;
- }
- bool search_sm = tag_data.IsValid("Search_SM_Body");
- Vector3 zero = Vector3.zero;
- if (tag_data.IsValid("offsetx"))
- {
- zero.x = tag_data.GetTagProperty("offsetx").AsReal();
- }
- if (tag_data.IsValid("offsety"))
- {
- zero.y = tag_data.GetTagProperty("offsety").AsReal();
- }
- if (tag_data.IsValid("offsetz"))
- {
- zero.z = tag_data.GetTagProperty("offsetz").AsReal();
- }
- IKCtrlData.IKAttachType ikattachType = IKCtrlData.IKAttachType.Point;
- if (tag_data.IsValid("attach_type"))
- {
- ikattachType = (IKCtrlData.IKAttachType)Enum.Parse(typeof(IKCtrlData.IKAttachType), tag_data.GetTagProperty("attach_type").AsString());
- }
- if (ikattachType == IKCtrlData.IKAttachType.NewPoint)
- {
- ikdata.OffsetWorld = tag_data.IsValid("offset_world");
- ikdata.OffsetBone = tag_data.IsValid("offset_bone");
- }
- ikdata.GetIKEnable(ikattachType).Recet();
- if (tag_data.IsValid("disable"))
- {
- string[] array = tag_data.GetTagProperty("disable").AsString().Split(new char[]
- {
- ','
- });
- int i = 0;
- while (i < array.Length)
- {
- string text2 = array[i];
- string text3 = text2.ToLower();
- if (text3 != null)
- {
- if (!(text3 == "x"))
- {
- if (!(text3 == "y"))
- {
- if (text3 == "z")
- {
- ikdata.GetIKEnable(ikattachType).EnableZ = false;
- }
- }
- else
- {
- ikdata.GetIKEnable(ikattachType).EnableY = false;
- }
- }
- else
- {
- ikdata.GetIKEnable(ikattachType).EnableX = false;
- }
- }
- IL_27F:
- i++;
- continue;
- goto IL_27F;
- }
- }
- float blend_time = 0f;
- if (tag_data.IsValid("blendtime"))
- {
- blend_time = GameUty.MillisecondToSecond(tag_data.GetTagProperty("blendtime").AsInteger());
- }
- bool do_animation = false;
- if (tag_data.IsValid("do_animation"))
- {
- do_animation = true;
- }
- maidAndMan.IKTargetToBone(text, maidAndMan2, tgtbone_name, zero, ikattachType, search_sm, blend_time, do_animation, true);
- return false;
- }
- public bool TagIKAttachOdoguNext(KagTagSupport tag_data)
- {
- this.CheckAbsolutelyNecessaryTag(tag_data, "ikattachodogunext", new string[]
- {
- "src",
- "srcbone",
- "odogu"
- });
- Maid maidAndMan = this.GetMaidAndMan(tag_data.GetTagProperty("src").AsString());
- if (!maidAndMan)
- {
- return false;
- }
- string text = tag_data.GetTagProperty("srcbone").AsString();
- string odogu_name = tag_data.GetTagProperty("odogu").AsString();
- IKCtrlData ikdata = maidAndMan.IKCtrl.GetIKData(text, false);
- if (!ikdata)
- {
- return false;
- }
- string tgt_name = string.Empty;
- if (tag_data.IsValid("target"))
- {
- tgt_name = tag_data.GetTagProperty("target").AsString();
- }
- Vector3 zero = Vector3.zero;
- if (tag_data.IsValid("offsetx"))
- {
- zero.x = tag_data.GetTagProperty("offsetx").AsReal();
- }
- if (tag_data.IsValid("offsety"))
- {
- zero.y = tag_data.GetTagProperty("offsety").AsReal();
- }
- if (tag_data.IsValid("offsetz"))
- {
- zero.z = tag_data.GetTagProperty("offsetz").AsReal();
- }
- IKCtrlData.IKAttachType ikattachType = IKCtrlData.IKAttachType.Point;
- if (tag_data.IsValid("attach_type"))
- {
- ikattachType = (IKCtrlData.IKAttachType)Enum.Parse(typeof(IKCtrlData.IKAttachType), tag_data.GetTagProperty("attach_type").AsString());
- }
- if (ikattachType == IKCtrlData.IKAttachType.NewPoint)
- {
- ikdata.OffsetWorld = tag_data.IsValid("offset_world");
- ikdata.OffsetBone = tag_data.IsValid("offset_bone");
- }
- ikdata.GetIKEnable(ikattachType).Recet();
- if (tag_data.IsValid("disable"))
- {
- string[] array = tag_data.GetTagProperty("disable").AsString().Split(new char[]
- {
- ','
- });
- int i = 0;
- while (i < array.Length)
- {
- string text2 = array[i];
- string text3 = text2.ToLower();
- if (text3 != null)
- {
- if (!(text3 == "x"))
- {
- if (!(text3 == "y"))
- {
- if (text3 == "z")
- {
- ikdata.GetIKEnable(ikattachType).EnableZ = false;
- }
- }
- else
- {
- ikdata.GetIKEnable(ikattachType).EnableY = false;
- }
- }
- else
- {
- ikdata.GetIKEnable(ikattachType).EnableX = false;
- }
- }
- IL_267:
- i++;
- continue;
- goto IL_267;
- }
- }
- float blend_time = 0f;
- if (tag_data.IsValid("blendtime"))
- {
- blend_time = GameUty.MillisecondToSecond(tag_data.GetTagProperty("blendtime").AsInteger());
- }
- bool do_animation = false;
- if (tag_data.IsValid("do_animation"))
- {
- do_animation = true;
- }
- maidAndMan.IKTargetToOdogu(text, odogu_name, tgt_name, zero, ikattachType, blend_time, do_animation, true);
- return false;
- }
- public bool TagIKAttachIKBoneNext(KagTagSupport tag_data)
- {
- this.CheckAbsolutelyNecessaryTag(tag_data, "ikattachbonenext", new string[]
- {
- "src",
- "srcbone",
- "target",
- "targetbone"
- });
- Maid maidAndMan = this.GetMaidAndMan(tag_data.GetTagProperty("src").AsString());
- Maid maidAndMan2 = this.GetMaidAndMan(tag_data.GetTagProperty("target").AsString());
- if (maidAndMan == null || maidAndMan2 == null)
- {
- return false;
- }
- string text = tag_data.GetTagProperty("srcbone").AsString();
- string bone_name = tag_data.GetTagProperty("targetbone").AsString();
- IKCtrlData ikdata = maidAndMan.IKCtrl.GetIKData(text, false);
- if (!ikdata)
- {
- return false;
- }
- Vector3 zero = Vector3.zero;
- if (tag_data.IsValid("offsetx"))
- {
- zero.x = tag_data.GetTagProperty("offsetx").AsReal();
- }
- if (tag_data.IsValid("offsety"))
- {
- zero.y = tag_data.GetTagProperty("offsety").AsReal();
- }
- if (tag_data.IsValid("offsetz"))
- {
- zero.z = tag_data.GetTagProperty("offsetz").AsReal();
- }
- IKCtrlData.IKAttachType ikattachType = IKCtrlData.IKAttachType.Point;
- if (tag_data.IsValid("attach_type"))
- {
- ikattachType = (IKCtrlData.IKAttachType)Enum.Parse(typeof(IKCtrlData.IKAttachType), tag_data.GetTagProperty("attach_type").AsString());
- }
- if (ikattachType == IKCtrlData.IKAttachType.NewPoint)
- {
- ikdata.OffsetWorld = tag_data.IsValid("offset_world");
- ikdata.OffsetBone = tag_data.IsValid("offset_bone");
- }
- ikdata.GetIKEnable(ikattachType).Recet();
- if (tag_data.IsValid("disable"))
- {
- string[] array = tag_data.GetTagProperty("disable").AsString().Split(new char[]
- {
- ','
- });
- int i = 0;
- while (i < array.Length)
- {
- string text2 = array[i];
- string text3 = text2.ToLower();
- if (text3 != null)
- {
- if (!(text3 == "x"))
- {
- if (!(text3 == "y"))
- {
- if (text3 == "z")
- {
- ikdata.GetIKEnable(ikattachType).EnableZ = false;
- }
- }
- else
- {
- ikdata.GetIKEnable(ikattachType).EnableY = false;
- }
- }
- else
- {
- ikdata.GetIKEnable(ikattachType).EnableX = false;
- }
- }
- IL_272:
- i++;
- continue;
- goto IL_272;
- }
- }
- float blend_time = 0f;
- if (tag_data.IsValid("blendtime"))
- {
- blend_time = GameUty.MillisecondToSecond(tag_data.GetTagProperty("blendtime").AsInteger());
- }
- bool do_animation = tag_data.IsValid("do_animation");
- maidAndMan.IKTargetToIKBone(text, maidAndMan2, bone_name, zero, ikattachType, blend_time, do_animation, true);
- 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"))
- {
- string f_strFileName = Path.GetFileNameWithoutExtension(text) + "_OLD.ogg";
- if (GameUty.FileSystem.IsExistentFile(f_strFileName))
- {
- GameMain.Instance.SoundMgr.PlayBGM(f_strFileName, GameUty.MillisecondToSecond(millisecond), true);
- }
- else
- {
- GameMain.Instance.SoundMgr.PlayBGMLegacy(text, GameUty.MillisecondToSecond(millisecond), true);
- }
- }
- else
- {
- GameMain.Instance.SoundMgr.PlayBGM(text, GameUty.MillisecondToSecond(millisecond), true);
- }
- return false;
- }
- public bool TagStopBgm(KagTagSupport tag_data)
- {
- int millisecond = 0;
- if (tag_data.IsValid("fade"))
- {
- millisecond = tag_data.GetTagProperty("fade").AsInteger();
- }
- GameMain.Instance.SoundMgr.StopBGM(GameUty.MillisecondToSecond(millisecond));
- return false;
- }
- public bool TagPlayEnv(KagTagSupport tag_data)
- {
- this.CheckAbsolutelyNecessaryTag(tag_data, "playenv", new string[]
- {
- "file"
- });
- string text = tag_data.GetTagProperty("file").AsString();
- text = Path.ChangeExtension(text, ".ogg");
- int millisecond = 0;
- if (tag_data.IsValid("fade"))
- {
- millisecond = tag_data.GetTagProperty("fade").AsInteger();
- }
- GameMain.Instance.SoundMgr.PlayEnv(text, GameUty.MillisecondToSecond(millisecond));
- return false;
- }
- public bool TagStopEnv(KagTagSupport tag_data)
- {
- int millisecond = 0;
- if (tag_data.IsValid("fade"))
- {
- millisecond = tag_data.GetTagProperty("fade").AsInteger();
- }
- GameMain.Instance.SoundMgr.StopEnv(GameUty.MillisecondToSecond(millisecond));
- return false;
- }
- public bool TagPlaySe(KagTagSupport tag_data)
- {
- this.CheckAbsolutelyNecessaryTag(tag_data, "playse", new string[]
- {
- "file"
- });
- string bgm_file_name = tag_data.GetTagProperty("file").AsString();
- bgm_file_name = Path.ChangeExtension(bgm_file_name, ".ogg");
- if (bgm_file_name == "SE016.ogg" && !GameMain.Instance.CMSystem.EjaculationSeEnabled)
- {
- return false;
- }
- bool loop = tag_data.IsValid("loop");
- int num = 0;
- if (tag_data.IsValid("wait"))
- {
- num = tag_data.GetTagProperty("wait").AsInteger();
- }
- WaitEventList waitEventList = this.GetWaitEventList("se");
- if (num <= 0)
- {
- GameMain.Instance.SoundMgr.PlaySe(bgm_file_name, loop);
- waitEventList.Clear();
- }
- else
- {
- waitEventList.Add(delegate
- {
- GameMain.Instance.SoundMgr.PlaySe(bgm_file_name, loop);
- }, num);
- }
- return false;
- }
- public bool TagStopSe(KagTagSupport tag_data)
- {
- string text = string.Empty;
- if (tag_data.IsValid("file"))
- {
- text = tag_data.GetTagProperty("file").AsString();
- text = Path.ChangeExtension(text, ".ogg");
- }
- if (!string.IsNullOrEmpty(text))
- {
- GameMain.Instance.SoundMgr.StopSe(text);
- }
- else
- {
- GameMain.Instance.SoundMgr.StopSe();
- }
- return false;
- }
- public bool TagPlayVoice(KagTagSupport tag_data)
- {
- bool result = false;
- this.CheckAbsolutelyNecessaryTag(tag_data, "playvoice", new string[]
- {
- "voice"
- });
- string text = tag_data.GetTagProperty("voice").AsString();
- text = Path.ChangeExtension(text, ".ogg");
- bool f_bLoop = tag_data.IsValid("loop");
- int millisecond = 0;
- if (tag_data.IsValid("fade"))
- {
- millisecond = tag_data.GetTagProperty("fade").AsInteger();
- }
- int num = -1;
- if (!tag_data.IsValid("dummy"))
- {
- Maid maidAndMan = this.GetMaidAndMan(tag_data);
- if (maidAndMan != null && maidAndMan.Visible)
- {
- maidAndMan.AudioMan.LoadPlay(text, GameUty.MillisecondToSecond(millisecond), true, f_bLoop);
- if (maidAndMan.AudioMan.isPlay() && maidAndMan.AudioMan.audiosource.clip != null)
- {
- num = (int)(maidAndMan.AudioMan.audiosource.clip.length * 1000f);
- }
- if (tag_data.IsValid("wait"))
- {
- result = this.SetMaidVoiceWait(maidAndMan);
- }
- }
- else
- {
- 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 (GameMain.Instance.SoundMgr.m_AudioDummyVoice.isPlay() && GameMain.Instance.SoundMgr.m_AudioDummyVoice.audiosource.clip != null)
- {
- num = (int)(GameMain.Instance.SoundMgr.m_AudioDummyVoice.audiosource.clip.length * 1000f);
- }
- if (tag_data.IsValid("wait"))
- {
- result = this.SetDummyVoiceWait();
- }
- }
- if (!string.IsNullOrEmpty(this.subtitle_data.text) && (0 <= this.subtitle_data.displayTime || 0 < num))
- {
- SubtitleMovieManager globalInstance = SubtitleMovieManager.GetGlobalInstance(this.subtitle_data.casinoType);
- globalInstance.autoDestroy = true;
- int num2 = (0 > this.subtitle_data.displayTime) ? num : this.subtitle_data.displayTime;
- num2 += this.subtitle_data.addDisplayTime;
- globalInstance.Play(this.subtitle_data.text, num2);
- this.subtitle_data.Clear();
- }
- return result;
- }
- public bool TagStopVoice(KagTagSupport tag_data)
- {
- if (!tag_data.IsValid("dummy"))
- {
- Maid maidAndMan = this.GetMaidAndMan(tag_data);
- 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;
- }
- public bool TagLoadSubtitleFile(KagTagSupport tag_data)
- {
- this.CheckAbsolutelyNecessaryTag(tag_data, "loadsubtitlefile", new string[]
- {
- "file"
- });
- string fileName = Path.ChangeExtension(tag_data.GetTagProperty("file").AsString(), ".ks");
- SubtitleMovieManager globalInstance = SubtitleMovieManager.GetGlobalInstance(false);
- globalInstance.autoDestroy = true;
- globalInstance.LoadSubtitleScriptFile(fileName);
- globalInstance.Play();
- return false;
- }
- public bool TagEndSubtitleDisplay(KagTagSupport tag_data)
- {
- SubtitleMovieManager.DestroyGlobalInstance();
- return false;
- }
- public bool TagSubtitleDisplayForPlayVoice(KagTagSupport tag_data)
- {
- this.CheckAbsolutelyNecessaryTag(tag_data, "subtitledisplayforplayvoice", new string[]
- {
- "text"
- });
- this.subtitle_data.text = tag_data.GetTagProperty("text").AsString();
- this.subtitle_data.displayTime = -1;
- if (tag_data.IsValid("addtime"))
- {
- this.subtitle_data.addDisplayTime = tag_data.GetTagProperty("addtime").AsInteger();
- }
- else if (tag_data.IsValid("wait"))
- {
- this.subtitle_data.displayTime = tag_data.GetTagProperty("wait").AsInteger();
- }
- this.subtitle_data.casinoType = tag_data.IsValid("mode_c");
- return false;
- }
- public bool TagSubtitleDisplay(KagTagSupport tag_data)
- {
- this.CheckAbsolutelyNecessaryTag(tag_data, "subtitledisplay", new string[]
- {
- "text",
- "time"
- });
- string text = tag_data.GetTagProperty("text").AsString();
- int displayTime = int.Parse(tag_data.GetTagProperty("time").AsString());
- SubtitleMovieManager globalInstance = SubtitleMovieManager.GetGlobalInstance(false);
- globalInstance.autoDestroy = true;
- globalInstance.Play(text, displayTime);
- return false;
- }
- 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)
- {
- this.subtitle_data.Clear();
- }
- public virtual string GetKagClassName()
- {
- return "ベースkag";
- }
- private string ReplaceFileNameCallBack(string file_name)
- {
- Maid maid = this.GetMaid(0);
- if (maid == null)
- {
- return file_name;
- }
- int maidCount = GameMain.Instance.CharacterMgr.GetMaidCount();
- Maid[] array = new Maid[maidCount];
- for (int i = 0; i < maidCount; i++)
- {
- array[i] = this.GetMaid(i);
- }
- return ScriptManager.ReplacePersonal(array, file_name);
- }
- public void Serialize(BinaryWriter binary)
- {
- binary.Write("CM3D2_KAG");
- binary.Write(1170);
- byte[] array = this.kag_.Serialize();
- int value = array.Length;
- binary.Write(value);
- binary.Write(array);
- binary.Write(this.fade_wait_);
- binary.Write(this.enabled);
- }
- public void Deserialize(BinaryReader binary)
- {
- string a = binary.ReadString();
- NDebug.Assert(a == "CM3D2_KAG", "KAGのヘッダーが不正です。");
- int num = binary.ReadInt32();
- int count = binary.ReadInt32();
- byte[] serialize_data = binary.ReadBytes(count);
- this.kag_.Deserialize(serialize_data);
- this.fade_wait_ = binary.ReadBoolean();
- this.enabled = binary.ReadBoolean();
- this.exec_wait_data_.Clear();
- this.wait_event_list_.Clear();
- this.subtitle_data.Clear();
- }
- public bool enabled { get; set; }
- public List<Maid> maidOffsetSetList { get; protected set; }
- protected readonly TJSScript tjs_;
- protected ScriptManager script_mgr_;
- protected KagScript kag_;
- protected bool fade_wait_;
- protected BaseKagManager.ExecWaitData exec_wait_data_ = new BaseKagManager.ExecWaitData();
- protected Dictionary<string, WaitEventList> wait_event_list_ = new Dictionary<string, WaitEventList>();
- protected BaseKagManager.SubtitleData subtitle_data = new BaseKagManager.SubtitleData();
- private bool is_disposed_;
- [CompilerGenerated]
- private static Comparison<Maid> <>f__mg$cache0;
- [CompilerGenerated]
- private static Comparison<Maid> <>f__mg$cache1;
- private class PerthOffsetPosTagData
- {
- public static CharacterMgr.CharaPer CreateCharaPer(TJSScript tjs, KagTagSupport tag_data)
- {
- CharacterMgr.CharaPer charaPer = BaseKagManager.PerthOffsetPosTagData.GetCharaPer(tjs, tag_data, string.Empty);
- NDebug.AssertNull(charaPer != null);
- return charaPer;
- }
- public static List<KeyValuePair<Maid, CharacterMgr.CharaPer>> CreateMultiCharaPer(TJSScript tjs, KagTagSupport tag_data, BaseKagManager kag_mgr)
- {
- List<KeyValuePair<Maid, CharacterMgr.CharaPer>> list = new List<KeyValuePair<Maid, CharacterMgr.CharaPer>>();
- for (int i = 0; i < GameMain.Instance.CharacterMgr.GetMaidCount(); i++)
- {
- CharacterMgr.CharaPer charaPer = BaseKagManager.PerthOffsetPosTagData.GetCharaPer(tjs, tag_data, "-Maid:" + i);
- if (charaPer != null)
- {
- KeyValuePair<Maid, CharacterMgr.CharaPer> item = new KeyValuePair<Maid, CharacterMgr.CharaPer>(kag_mgr.GetMaid(i), charaPer);
- list.Add(item);
- }
- }
- return list;
- }
- public static KeyValuePair<CharacterMgr.CharaPer, CharacterMgr.PenisPer> CreateCharaPerAndPenisPer(TJSScript tjs, KagTagSupport tag_data)
- {
- CharacterMgr.CharaPer charaPer = BaseKagManager.PerthOffsetPosTagData.GetCharaPer(tjs, tag_data, string.Empty);
- if (charaPer == null)
- {
- charaPer = new CharacterMgr.CharaPer();
- }
- CharacterMgr.PenisPer penisPer = BaseKagManager.PerthOffsetPosTagData.GetPenisPer(tjs, tag_data);
- if (penisPer == null)
- {
- penisPer = new CharacterMgr.PenisPer();
- }
- return new KeyValuePair<CharacterMgr.CharaPer, CharacterMgr.PenisPer>(charaPer, penisPer);
- }
- private static CharacterMgr.CharaPer GetCharaPer(TJSScript tjs, KagTagSupport tag_data, string add_tag_string)
- {
- CharacterMgr.CharaPer charaPer = null;
- BaseKagManager.PerthOffsetPosTagData.TagArrayData tagArrayData = BaseKagManager.PerthOffsetPosTagData.TagArrayData.Create(tjs, tag_data, "OffsDouPar" + add_tag_string);
- if (tagArrayData.valid)
- {
- if (charaPer == null)
- {
- charaPer = new CharacterMgr.CharaPer();
- }
- tagArrayData.GetVector3(ref charaPer.vecOffsDouParGreater, ref charaPer.vecOffsDouParLess);
- }
- BaseKagManager.PerthOffsetPosTagData.TagArrayData.Rlease();
- tagArrayData = BaseKagManager.PerthOffsetPosTagData.TagArrayData.Create(tjs, tag_data, "OffsShinCho" + add_tag_string);
- if (tagArrayData.valid)
- {
- if (charaPer == null)
- {
- charaPer = new CharacterMgr.CharaPer();
- }
- tagArrayData.GetVector3(ref charaPer.vecOffsShinChoGreater, ref charaPer.vecOffsShinChoLess);
- }
- BaseKagManager.PerthOffsetPosTagData.TagArrayData.Rlease();
- tagArrayData = BaseKagManager.PerthOffsetPosTagData.TagArrayData.Create(tjs, tag_data, "OffsMuneL" + add_tag_string);
- if (tagArrayData.valid)
- {
- if (charaPer == null)
- {
- charaPer = new CharacterMgr.CharaPer();
- }
- tagArrayData.GetVector3(ref charaPer.vecOffsMuneLGreater, ref charaPer.vecOffsMuneLLess);
- }
- BaseKagManager.PerthOffsetPosTagData.TagArrayData.Rlease();
- tagArrayData = BaseKagManager.PerthOffsetPosTagData.TagArrayData.Create(tjs, tag_data, "HaremDouPer" + add_tag_string);
- if (tagArrayData.valid)
- {
- if (charaPer == null)
- {
- charaPer = new CharacterMgr.CharaPer();
- }
- tagArrayData.GetVector3(ref charaPer.vecHaremDouPerGreater, ref charaPer.vecHaremDouPerLess);
- }
- BaseKagManager.PerthOffsetPosTagData.TagArrayData.Rlease();
- tagArrayData = BaseKagManager.PerthOffsetPosTagData.TagArrayData.Create(tjs, tag_data, "HaremShinCho" + add_tag_string);
- if (tagArrayData.valid)
- {
- if (charaPer == null)
- {
- charaPer = new CharacterMgr.CharaPer();
- }
- tagArrayData.GetVector3(ref charaPer.vecHaremShinChoGreater, ref charaPer.vecHaremShinChoLess);
- }
- BaseKagManager.PerthOffsetPosTagData.TagArrayData.Rlease();
- tagArrayData = BaseKagManager.PerthOffsetPosTagData.TagArrayData.Create(tjs, tag_data, "HaremMuneL" + add_tag_string);
- if (tagArrayData.valid)
- {
- if (charaPer == null)
- {
- charaPer = new CharacterMgr.CharaPer();
- }
- tagArrayData.GetVector3(ref charaPer.vecHaremMuneLGreater, ref charaPer.vecHaremMuneLLess);
- }
- BaseKagManager.PerthOffsetPosTagData.TagArrayData.Rlease();
- return charaPer;
- }
- private static CharacterMgr.PenisPer GetPenisPer(TJSScript tjs, KagTagSupport tag_data)
- {
- CharacterMgr.PenisPer penisPer = null;
- BaseKagManager.PerthOffsetPosTagData.TagArrayData tagArrayData = BaseKagManager.PerthOffsetPosTagData.TagArrayData.Create(tjs, tag_data, "PenisCommonBase");
- if (tagArrayData.valid)
- {
- if (penisPer == null)
- {
- penisPer = new CharacterMgr.PenisPer();
- }
- tagArrayData.GetVector3(ref penisPer.vecPenisCommonBase);
- }
- BaseKagManager.PerthOffsetPosTagData.TagArrayData.Rlease();
- tagArrayData = BaseKagManager.PerthOffsetPosTagData.TagArrayData.Create(tjs, tag_data, "PenisAmend");
- if (tagArrayData.valid)
- {
- if (penisPer == null)
- {
- penisPer = new CharacterMgr.PenisPer();
- }
- tagArrayData.GetVector3(ref penisPer.vecPenisAmend);
- }
- BaseKagManager.PerthOffsetPosTagData.TagArrayData.Rlease();
- tagArrayData = BaseKagManager.PerthOffsetPosTagData.TagArrayData.Create(tjs, tag_data, "PenisDouPer");
- if (tagArrayData.valid)
- {
- if (penisPer == null)
- {
- penisPer = new CharacterMgr.PenisPer();
- }
- tagArrayData.GetVector3(ref penisPer.vecPenisDouPerGreater, ref penisPer.vecPenisDouPerLess);
- }
- BaseKagManager.PerthOffsetPosTagData.TagArrayData.Rlease();
- tagArrayData = BaseKagManager.PerthOffsetPosTagData.TagArrayData.Create(tjs, tag_data, "PenisShincho");
- if (tagArrayData.valid)
- {
- if (penisPer == null)
- {
- penisPer = new CharacterMgr.PenisPer();
- }
- tagArrayData.GetVector3(ref penisPer.vecPenisShinchoGreater, ref penisPer.vecPenisShinchoLess);
- }
- BaseKagManager.PerthOffsetPosTagData.TagArrayData.Rlease();
- return penisPer;
- }
- private class TagArrayData
- {
- private TagArrayData(TJSScript tjs, KagTagSupport tag_data, string tag_name)
- {
- this.tjs_ = tjs;
- this.is_valid_ = tag_data.IsValid(tag_name);
- if (this.is_valid_)
- {
- string eval_str = this.kTjsGlobalVarName + "=" + tag_data.GetTagProperty(tag_name).AsString();
- this.tjs_.EvalScript(eval_str);
- TJSVariant tjsvariant = new TJSVariant();
- this.tjs_.EvalScript(this.kTjsGlobalVarName + ".count", tjsvariant);
- this.array_count_ = tjsvariant.AsInteger();
- tjsvariant.Dispose();
- NDebug.Assert(this.array_count_ == 3 || this.array_count_ == 6, tag_name + "の指定数が不正です(6 or 7 only)");
- }
- }
- public static BaseKagManager.PerthOffsetPosTagData.TagArrayData Create(TJSScript tjs, KagTagSupport tag_data, string tag_name)
- {
- NDebug.Assert(BaseKagManager.PerthOffsetPosTagData.TagArrayData.instans_data_ == null, "TagArrayDataインスタンスの重複");
- tag_name = tag_name.ToLower();
- BaseKagManager.PerthOffsetPosTagData.TagArrayData.instans_data_ = new BaseKagManager.PerthOffsetPosTagData.TagArrayData(tjs, tag_data, tag_name);
- return BaseKagManager.PerthOffsetPosTagData.TagArrayData.instans_data_;
- }
- public static void Rlease()
- {
- if (BaseKagManager.PerthOffsetPosTagData.TagArrayData.instans_data_ == null)
- {
- return;
- }
- BaseKagManager.PerthOffsetPosTagData.TagArrayData.instans_data_.tjs_.EvalScript(BaseKagManager.PerthOffsetPosTagData.TagArrayData.instans_data_.kTjsGlobalVarName + " = void");
- BaseKagManager.PerthOffsetPosTagData.TagArrayData.instans_data_ = null;
- }
- public void GetVector3(ref Vector3 dest)
- {
- if (!this.is_valid_)
- {
- return;
- }
- NDebug.Assert(this.array_count_ == 3, "Vector3*2の要素に対してVector3を1つのみ作成しようとしています");
- using (TJSVariant tjsvariant = new TJSVariant())
- {
- this.tjs_.EvalScript(this.kTjsGlobalVarName + "[0]", tjsvariant);
- dest.x = tjsvariant.AsReal();
- this.tjs_.EvalScript(this.kTjsGlobalVarName + "[1]", tjsvariant);
- dest.y = tjsvariant.AsReal();
- this.tjs_.EvalScript(this.kTjsGlobalVarName + "[2]", tjsvariant);
- dest.z = tjsvariant.AsReal();
- }
- }
- public void GetVector3(ref Vector3 first_dest, ref Vector3 second_dest)
- {
- if (!this.is_valid_)
- {
- return;
- }
- NDebug.Assert(this.array_count_ == 6, "要素xyzのみに対してVector3を2つ作成しようとしています");
- using (TJSVariant tjsvariant = new TJSVariant())
- {
- this.tjs_.EvalScript(this.kTjsGlobalVarName + "[0]", tjsvariant);
- first_dest.x = tjsvariant.AsReal();
- this.tjs_.EvalScript(this.kTjsGlobalVarName + "[1]", tjsvariant);
- first_dest.y = tjsvariant.AsReal();
- this.tjs_.EvalScript(this.kTjsGlobalVarName + "[2]", tjsvariant);
- first_dest.z = tjsvariant.AsReal();
- this.tjs_.EvalScript(this.kTjsGlobalVarName + "[3]", tjsvariant);
- second_dest.x = tjsvariant.AsReal();
- this.tjs_.EvalScript(this.kTjsGlobalVarName + "[4]", tjsvariant);
- second_dest.y = tjsvariant.AsReal();
- this.tjs_.EvalScript(this.kTjsGlobalVarName + "[5]", tjsvariant);
- second_dest.z = tjsvariant.AsReal();
- }
- }
- public int vecotr_element_count
- {
- get
- {
- return (this.array_count_ != 3) ? 2 : 1;
- }
- }
- public int count
- {
- get
- {
- return this.array_count_;
- }
- }
- public bool valid
- {
- get
- {
- return this.is_valid_;
- }
- }
- private string kTjsGlobalVarName = "global.__tmp_array";
- private static BaseKagManager.PerthOffsetPosTagData.TagArrayData instans_data_;
- private TJSScript tjs_;
- private bool is_valid_;
- private int array_count_;
- }
- }
- protected class ExecWaitData
- {
- public virtual bool Check()
- {
- return !this.use || this.wait_time <= GameMain.tick_count - this.start_tick_count;
- }
- public virtual void Clear()
- {
- this.start_tick_count = (this.wait_time = 0);
- this.use = false;
- this.skip_possible = true;
- }
- public int start_tick_count;
- public int wait_time;
- public bool skip_possible;
- public bool use;
- }
- protected class MaidPropSeqWaitData : BaseKagManager.ExecWaitData
- {
- public override bool Check()
- {
- return !this.use || this.maid == null || !this.maid.IsBusy;
- }
- public override void Clear()
- {
- base.Clear();
- this.maid = null;
- }
- public Maid maid;
- }
- protected class MaidVoiceWaitData : BaseKagManager.ExecWaitData
- {
- public override bool Check()
- {
- if (!this.use || this.maid == null)
- {
- return true;
- }
- AudioSourceMgr audioMan = this.maid.AudioMan;
- return audioMan == null || !audioMan.isPlay();
- }
- public override void Clear()
- {
- base.Clear();
- this.maid = null;
- }
- public Maid maid;
- }
- protected class DummyVoiceWaitData : BaseKagManager.ExecWaitData
- {
- public override bool Check()
- {
- return !this.use || !GameMain.Instance.SoundMgr.IsPlayDummyVoice();
- }
- public override void Clear()
- {
- base.Clear();
- }
- }
- protected class SubtitleData
- {
- public SubtitleData()
- {
- this.Clear();
- }
- public void Clear()
- {
- this.text = string.Empty;
- this.displayTime = -1;
- this.addDisplayTime = 0;
- this.casinoType = false;
- }
- public string text;
- public int displayTime;
- public int addDisplayTime;
- public bool casinoType;
- }
- }
|