public static void ChangeLightShader(Transform root) { //IL_0058: Unknown result type (might be due to invalid IL or missing references) //IL_0092: Unknown result type (might be due to invalid IL or missing references) //IL_00d1: Unknown result type (might be due to invalid IL or missing references) //IL_00d6: Expected O, but got Unknown UIntKeyTable <Material> uIntKeyTable = new UIntKeyTable <Material>(); List <Renderer> list = new List <Renderer>(); root.GetComponentsInChildren <Renderer>(true, list); int i = 0; for (int count = list.Count; i < count; i++) { Renderer val = list[i]; Material[] sharedMaterials = val.get_sharedMaterials(); int j = 0; for (int num = sharedMaterials.Length; j < num; j++) { Material val2 = sharedMaterials[j]; if (val2 != null && val2.get_shader() != null) { Material val3 = uIntKeyTable.Get((uint)val2.GetInstanceID()); if (val3 != null) { sharedMaterials[j] = val3; } else { string name = val2.get_shader().get_name(); if (!name.EndsWith("__l")) { Shader val4 = ResourceUtility.FindShader(name + "__l"); if (val4 != null) { val3 = new Material(val2); val3.set_shader(val4); sharedMaterials[j] = val3; uIntKeyTable.Add((uint)val2.GetInstanceID(), val3); continue; } } uIntKeyTable.Add((uint)val2.GetInstanceID(), val2); } } } val.set_sharedMaterials(sharedMaterials); } uIntKeyTable.Clear(); list.Clear(); }
private IEnumerator InitPortalStatusImpl(Action onComplete) { LoadingQueue loadQueue = new LoadingQueue(this); UIntKeyTable <LoadObject> loadTextures = new UIntKeyTable <LoadObject>(); for (int k = 0; k < locations.Length; k++) { FieldMapTable.FieldMapTableData tableData = locations[k].tableData; if (tableData != null && tableData.hasChildRegion && loadTextures.Get(tableData.iconId) == null) { loadTextures.Add(tableData.iconId, loadQueue.Load(RESOURCE_CATEGORY.DUNGEON_ICON, ResourceName.GetDungeonIcon(tableData.iconId), false)); } } if (loadQueue.IsLoading()) { yield return((object)loadQueue.Wait()); } for (int j = 0; j < locations.Length; j++) { FieldMapTable.FieldMapTableData tableData2 = locations[j].tableData; if (tableData2 != null && tableData2.hasChildRegion) { locations[j].icon = (loadTextures.Get(tableData2.iconId).loadedObject as Texture2D); } } for (int i = 0; i < portals.Length; i++) { RegionMapPortal portal = portals[i]; if (portal.IsVisited()) { portal.Open(); } } onComplete?.Invoke(); }
public static bool AddUIntKeyTable <T>(UIntKeyTable <T> table, string text, CallBackUIntKeyReadCSV <T> cb, string name_table, Progress progress = null) where T : new() { CSVReader cSVReader = new CSVReader(text, name_table, false); float num = 1f; if (progress != null) { num = progress.value; } float num2 = 1f - num; float num3 = (float)text.Length; while (cSVReader.NextLine()) { string value = string.Empty; if ((bool)cSVReader.Pop(ref value)) { if (value.Length > 0) { uint key = uint.Parse(value); T val = new T(); if (!cb(cSVReader, val, ref key)) { return(false); } bool flag = !table.Add(key, val); } if (progress != null) { progress.value = num + num2 * (float)cSVReader.GetPosition() / num3; } } } return(true); }
public static bool AddUIntKeyListTable <T>(UIntKeyTable <List <T> > table, string text, CallBackUIntKeyReadCSV <T> cb, string name_table) where T : new() { CSVReader cSVReader = new CSVReader(text, name_table, false); while (cSVReader.NextLine()) { string value = string.Empty; if ((bool)cSVReader.Pop(ref value) && value.Length > 0) { uint key = uint.Parse(value); T val = new T(); if (!cb(cSVReader, val, ref key)) { return(false); } List <T> list = table.Get(key); if (list == null) { list = new List <T>(); table.Add(key, list); } list.Add(val); } } return(true); }
public void SetSystemSEClips(int[] values, List <LoadObject> los) { m_SystemSEClips = new UIntKeyTable <AudioClip>(); foreach (int num in values) { if (num > 0) { string sE = ResourceName.GetSE(num); LoadObject loadObject = null; foreach (LoadObject lo in los) { if (lo != null && lo.loadedObject != null && !string.IsNullOrEmpty(lo.loadedObject.get_name())) { string b = ResourceName.Normalize(lo.loadedObject.get_name()); if (sE == b) { loadObject = lo; } } } if (loadObject != null) { AudioClip val = loadObject.loadedObject as AudioClip; if (val != null) { m_SystemSEClips.Add((uint)num, val); } } } } }
private void RegistResendPacket(CoopPacket packet, Func <Coop_Model_ACK, bool> onReceiveAck, Func <Coop_Model_Base, bool> onPreResend = null) { packet.model.r = true; ResendPacket resendPacket = new ResendPacket(); resendPacket.resendCount = 0; resendPacket.lastSendTime = Time.get_time(); resendPacket.onReceiveAck = onReceiveAck; resendPacket.onPreResend = onPreResend; resendPacket.packet = packet; resendPackets.Add((uint)packet.sequenceNo, resendPacket); }
public static UIntKeyTable <T> CreateUIntKeyTableFromBinary <T>(MemoryStream stream) where T : IUIntKeyBinaryTableData, new() { UIntKeyTable <T> uIntKeyTable = new UIntKeyTable <T>(); BinaryTableReader binaryTableReader = new BinaryTableReader(stream); while (binaryTableReader.MoveNext()) { uint key = binaryTableReader.ReadUInt32(0u); T value = new T(); value.LoadFromBinary(binaryTableReader, ref key); uIntKeyTable.Add(key, value); } return(uIntKeyTable); }
public void CreateTable(string csv_text) { table = new UIntKeyTable <Data>(); CSVReader cSVReader = new CSVReader(csv_text, "type,id,face,hair,body,zbias,helm,arm,leg,hitex", false); TYPE tYPE = TYPE.WEP; while (cSVReader.NextLine()) { TYPE value = TYPE.WEP; if ((bool)cSVReader.Pop(ref value)) { tYPE = value; } int value2 = -1; if ((bool)cSVReader.Pop(ref value2)) { Data data = new Data(); int value3 = 1; if ((bool)cSVReader.Pop(ref value3) && value3 == 0) { data.flags &= -2; } cSVReader.Pop(ref data.hairMode); cSVReader.Pop(ref data.bodyDraw); value3 = 1; if ((bool)cSVReader.Pop(ref value3) && value3 == 0) { data.flags &= -17; } value3 = 1; if ((bool)cSVReader.Pop(ref value3) && value3 == 0) { data.flags &= -3; } value3 = 1; if ((bool)cSVReader.Pop(ref value3) && value3 == 0) { data.flags &= -5; } value3 = 1; if ((bool)cSVReader.Pop(ref value3) && value3 == 0) { data.flags &= -9; } cSVReader.Pop(ref data.highTex); table.Add((uint)(tYPE + value2), data); } } table.TrimExcess(); }
public OpponentRecord FindOrRegist(StageObject obj) { if (obj == null) { return(emptyOpponent); } OpponentRecord opponentRecord = Find(obj); if (opponentRecord == null) { opponentRecord = new OpponentRecord(obj); opponentRecords.Add((uint)obj.id, opponentRecord); } return(opponentRecord); }
public int GetMaxLv(int exceed_cnt) { SkillMaxLevel skillMaxLevel = maxLvData.Get((uint)exceed_cnt); if (skillMaxLevel == null) { int exceedMaxLevel = GetExceedMaxLevel(exceed_cnt); if (exceedMaxLevel > maxLv) { exceedMaxLevel = maxLv; } maxLvData.Add((uint)exceed_cnt, new SkillMaxLevel(exceed_cnt, exceedMaxLevel)); return(exceedMaxLevel); } return(skillMaxLevel.maxLevel); }
public void CreateGimmickPointTable(string csv_text) { fieldGimmickPointTable = TableUtility.CreateUIntKeyTable <FieldGimmickPointTableData>(csv_text, FieldGimmickPointTableData.cb, "pointId,gimmickType,pointMapId,pointX,pointZ,pointDir,value1,value2", null); fieldGimmickPointMapIDTable = new UIntKeyTable <List <FieldGimmickPointTableData> >(); fieldGimmickPointTable.ForEach(delegate(FieldGimmickPointTableData pointData) { uint pointMapID = pointData.pointMapID; List <FieldGimmickPointTableData> list = fieldGimmickPointMapIDTable.Get(pointMapID); if (list == null) { list = new List <FieldGimmickPointTableData>(); fieldGimmickPointMapIDTable.Add(pointMapID, list); } list.Add(pointData); }); }
public void CreateGatherPointTable(string csv_text) { gatherPointTable = TableUtility.CreateUIntKeyTable <GatherPointTableData>(csv_text, GatherPointTableData.cb, "pointId,pointMapId,pointX,pointZ,pointDir,viewId,gimmickType,value1", null); gatherPointMapIDTable = new UIntKeyTable <List <GatherPointTableData> >(); gatherPointTable.ForEach(delegate(GatherPointTableData pointData) { uint pointMapID = pointData.pointMapID; List <GatherPointTableData> list = gatherPointMapIDTable.Get(pointMapID); if (list == null) { list = new List <GatherPointTableData>(); gatherPointMapIDTable.Add(pointMapID, list); } list.Add(pointData); }); }
public void AddPortalTable(string csv_text) { TableUtility.AddUIntKeyTable(portalTable, csv_text, PortalTableData.cb, "portalId,linkPortalId,srcMapId,srcX,srcZ,dstMapId,dstX,dstZ,dstDir,mapX,mapY,dstQuestId,showDeliveryId,hideQuestId,appearQuestId,appearDeliveryId,travelMapId,openPriority,portalPoint,notAppearText,placeText,startAt,banEnemy,appearRegionId", null); portalSrcMapIDTable = new UIntKeyTable <List <PortalTableData> >(); portalTable.ForEach(delegate(PortalTableData portalData) { uint srcMapID = portalData.srcMapID; List <PortalTableData> list = portalSrcMapIDTable.Get(srcMapID); if (list == null) { list = new List <PortalTableData>(); portalSrcMapIDTable.Add(srcMapID, list); } list.Add(portalData); }); }
public void CreateTable(string csv_text) { achievementIdDataTable = new UIntKeyTable <AchievementIdData>(); CSVReader cSVReader = new CSVReader(csv_text, "taskId,goalNum,androidKey", true); uint num = 1u; while (cSVReader.NextLine()) { AchievementIdData achievementIdData = new AchievementIdData(); cSVReader.Pop(ref achievementIdData.taskId); cSVReader.Pop(ref achievementIdData.goalNum); cSVReader.Pop(ref achievementIdData.key); achievementIdDataTable.Add(num, achievementIdData); num++; } achievementIdDataTable.TrimExcess(); }
public void CreateTable(string csv_text) { CSVReader cSVReader = new CSVReader(csv_text, "id,scene_name,section_name,message_id,trigger_event_name,completed_tutorial_step,appear_tutorial_bit,finish_tutorial_bit,appear,appear_delivery_id,only_new_section,set_bit,force_resend,check_keyword,position,npc_id,face_type,message,image_resource_name,voice_id,cursor_target,focus_pattern,wait_event_name,focus_frame,wait,cursor_offset_x,cursor_offset_y,cursor_angle,cursor_delay", false); TutorialMessageData tutorialMessageData = null; uint value = 0u; while (cSVReader.NextLine()) { value = 0u; cSVReader.Pop(ref value); if (value != 0) { if (tutorialMessageData != null) { tutorialSectionMessages.Add((uint)tutorialMessageData.tutorialId, tutorialMessageData); } string value2 = string.Empty; string value3 = string.Empty; string value4 = string.Empty; int value5 = 0; string value6 = string.Empty; string value7 = string.Empty; int value8 = 0; int value9 = 0; int value10 = 0; bool value11 = false; string value12 = string.Empty; FORCE_RESEND_DIALOG_FLAG value13 = FORCE_RESEND_DIALOG_FLAG.NONE; string value14 = string.Empty; cSVReader.Pop(ref value2); cSVReader.Pop(ref value3); cSVReader.Pop(ref value10); cSVReader.Pop(ref value4); cSVReader.Pop(ref value5); cSVReader.Pop(ref value6); cSVReader.Pop(ref value7); cSVReader.Pop(ref value8); cSVReader.Pop(ref value9); cSVReader.Pop(ref value11); cSVReader.Pop(ref value12); cSVReader.Pop(ref value13); cSVReader.Pop(ref value14); if (GetTutorialTheSection(value3, value10) != null) { Log.Warning(LOG.SYSTEM, "同一セクション内で message_id が重複しています : id " + value + " : " + value3 + " - " + value10); continue; } tutorialMessageData = new TutorialMessageData(); tutorialMessageData.tutorialId = (int)value; tutorialMessageData.sceneName = value2; tutorialMessageData.sectionName = value3; tutorialMessageData.messageId = value10; tutorialMessageData.triggerEventName = value4; tutorialMessageData.completedTutorialStep = value5; tutorialMessageData.strAppearTutorialBit = value6; tutorialMessageData.strFinishTutorialBit = value7; tutorialMessageData.appearId = value8; tutorialMessageData.appearDeliveryId = value9; tutorialMessageData.isNewSectionOnly = value11; tutorialMessageData.strSetBit = value12; tutorialMessageData.resendFrag = value13; tutorialMessageData.checkKeyword = value14; tutorialMessageData.messageData = new List <TutorialMessageData.MessageData>(); } else { string value15 = string.Empty; int value16 = 0; bool value17 = false; cSVReader.Pop(ref value15); cSVReader.Pop(ref value15); cSVReader.Pop(ref value16); cSVReader.Pop(ref value15); cSVReader.Pop(ref value16); cSVReader.Pop(ref value15); cSVReader.Pop(ref value15); cSVReader.Pop(ref value16); cSVReader.Pop(ref value16); cSVReader.Pop(ref value17); cSVReader.Pop(ref value15); cSVReader.Pop(ref value15); cSVReader.Pop(ref value15); } if (tutorialMessageData != null && tutorialMessageData.messageData != null) { TutorialMessageData.MessageData messageData = new TutorialMessageData.MessageData(); cSVReader.Pop(ref messageData.positionId); cSVReader.Pop(ref messageData.npcId); cSVReader.Pop(ref messageData.faceType); cSVReader.Pop(ref messageData.message); cSVReader.Pop(ref messageData.imageResourceName); cSVReader.Pop(ref messageData.voiceId); cSVReader.Pop(ref messageData.cursorTarget); cSVReader.Pop(ref messageData.focusPattern); cSVReader.Pop(ref messageData.waitEventName); cSVReader.Pop(ref messageData.focusFrame); cSVReader.Pop(ref messageData.wait); if (!cSVReader.IsEmpty()) { messageData.cursorType = TutorialMessageData.MessageData.CursorType.MANUAL; cSVReader.Pop(ref messageData.cursorOffset); } else { cSVReader.NextValue(); cSVReader.NextValue(); } if (!cSVReader.IsEmpty()) { messageData.cursorType = TutorialMessageData.MessageData.CursorType.MANUAL; } cSVReader.Pop(ref messageData.cursorRotDeg); cSVReader.Pop(ref messageData.cursorDelay); tutorialMessageData.messageData.Add(messageData); } } if (tutorialMessageData != null) { tutorialSectionMessages.Add((uint)tutorialMessageData.tutorialId, tutorialMessageData); } }