public void Add(EventTriggerInfo info) { if (!this.IsInfo(info.Name)) { this.m_GameTriggerInfoList.Add(info); } }
public void AttachTriggerObject(GameObject[] gos, bool bEnable) { for (int i = 0; i < gos.Length; i++) { GameObject gameObject = gos[i]; EventTriggerItem[] components = gameObject.GetComponents <EventTriggerItem>(); EventTriggerItem[] array = components; for (int j = 0; j < array.Length; j++) { EventTriggerItem eventTriggerItem = array[j]; TsSceneSwitcher.Instance.Collect(TsSceneSwitcher.ESceneType.WorldScene, eventTriggerItem.gameObject); } gameObject.transform.parent = this.m_goMap.transform; gameObject.SetActive(false); EventTrigger_Game component = gameObject.GetComponent <EventTrigger_Game>(); if (component != null) { EventTriggerInfo eventTriggerInfo = NrTSingleton <NrEventTriggerInfoManager> .Instance.GetEventTriggerInfo(gameObject.name); if (eventTriggerInfo != null) { eventTriggerInfo.EventTrigger = component; component.EventTriggerUnique = eventTriggerInfo.Unique; } component.Enable(bEnable); } } }
private string GetQuestConditionText(EventTriggerInfo Data) { if (Data == null) { return("Ʈ���� �˻�"); } return("Ʈ���� �˻�"); }
public void Set(int Unique, EventTriggerInfo NewInfo) { EventTriggerInfo info = this.GetInfo(Unique); if (info != null) { this.Set(info.Name, NewInfo); } }
public override bool ParseDataFromNDT(TsDataReader dr) { foreach (TsDataReader.Row data in dr) { EventTriggerInfo eventTriggerInfo = new EventTriggerInfo(); eventTriggerInfo.SetData(data); NrTSingleton <NrEventTriggerInfoManager> .Instance.AddTriggerInfo(eventTriggerInfo); } return(true); }
public int GetUnique(string EventTriggerName) { EventTriggerInfo eventTriggerInfo = this.GetEventTriggerInfo(EventTriggerName); if (eventTriggerInfo != null) { return(eventTriggerInfo.Unique); } return(0); }
public void SendOffEventTrigger(int Unique) { EventTriggerInfo eventTriggerInfo = this.GetEventTriggerInfo(Unique); if (eventTriggerInfo == null) { return; } this._OnTriggers.Remove(eventTriggerInfo.EventTrigger); }
public bool DelEventTriggerInfo(string EventTriggerName) { EventTriggerInfo eventTriggerInfo = this.GetEventTriggerInfo(EventTriggerName); if (eventTriggerInfo == null) { return(false); } this._EventTriggerInfo.Remove(eventTriggerInfo.Unique); this._EventTriggerKeyInfo.Remove(eventTriggerInfo.Name); return(true); }
public void SendOnEventTrigger(int Unique) { EventTriggerInfo eventTriggerInfo = this.GetEventTriggerInfo(Unique); if (eventTriggerInfo == null) { return; } if (!this._OnTriggers.Contains(eventTriggerInfo.EventTrigger)) { this._OnTriggers.Add(eventTriggerInfo.EventTrigger); } }
public void OnTrigger(string EventTriggerName) { EventTriggerInfo eventTriggerInfo = this.GetEventTriggerInfo(EventTriggerName); if (eventTriggerInfo == null) { return; } if (!eventTriggerInfo.EventTrigger.TriggerOn) { eventTriggerInfo.EventTrigger.OnTrigger(); EventTriggerMapManager.Instance.ActiveTriggerInfo(eventTriggerInfo.EventTrigger); } }
public void New(EventTriggerInfo info) { EventTriggerInfo eventTriggerInfo = new EventTriggerInfo(); eventTriggerInfo.Unique = info.Unique; eventTriggerInfo.Name = info.Name; eventTriggerInfo.MapIdx = info.MapIdx; eventTriggerInfo.Flag.Set(info.Flag.Get()); eventTriggerInfo.ATB = info.ATB; eventTriggerInfo.QuestTextIndex = info.QuestTextIndex; eventTriggerInfo.Comment = info.Comment; eventTriggerInfo.Flag.Set(info.Flag.Get()); this.Add(eventTriggerInfo); NrTSingleton <NrEventTriggerInfoManager> .Instance.NewTriggerInfo(eventTriggerInfo); }
public bool AddTriggerInfo(EventTriggerInfo Info) { if (!this._EventTriggerInfo.ContainsKey(Info.Unique)) { this._EventTriggerInfo.Add(Info.Unique, Info); } if (!this._EventTriggerKeyInfo.ContainsKey(Info.Name)) { this._EventTriggerKeyInfo.Add(Info.Name, Info); } else if (NrTSingleton <NrGlobalReference> .Instance.IsEnableLog) { TsLog.LogWarning("EventTriggerInfo Name Error: " + Info.Name, new object[0]); } return(true); }
public void RemoveActionTrigger(EventTrigger_Game trigger) { if (this._ActionEventTrigger.Contains(trigger)) { this._ActionEventTrigger.Remove(trigger); } EventTriggerInfo eventTriggerInfo = NrTSingleton <NrEventTriggerInfoManager> .Instance.GetEventTriggerInfo(trigger.EventTriggerUnique); if (eventTriggerInfo != null) { MapTriggerInfo mapTriggerInfo = this.GetMapTriggerInfo(eventTriggerInfo.MapIdx); if (mapTriggerInfo != null && !this._ActiveMap.Contains(mapTriggerInfo)) { mapTriggerInfo.SetActive(false, trigger.name); } } }
public override void SetData(TsDataReader.Row tsRow) { short num = 0; this.Init(); tsRow.GetColumn(0, out this.Unique); tsRow.GetColumn(1, out this.Name); tsRow.GetColumn(2, out this.MapIdx); tsRow.GetColumn(3, out num); this.Flag = new EventTriggerFlag((long)num); string empty = string.Empty; tsRow.GetColumn(4, out empty); this.ATB = EventTriggerInfo.ParseATB(empty); tsRow.GetColumn(5, out this.QuestTextIndex); tsRow.GetColumn(6, out this.Comment); }
public bool SetTriggerInfo(int Unique, EventTriggerInfo NewInfo) { if (NewInfo == null) { return(false); } EventTriggerInfo eventTriggerInfo = this.GetEventTriggerInfo(Unique); if (eventTriggerInfo != null) { eventTriggerInfo.Unique = NewInfo.Unique; eventTriggerInfo.Name = NewInfo.Name; eventTriggerInfo.MapIdx = NewInfo.MapIdx; eventTriggerInfo.Flag.Set(NewInfo.Flag.Get()); eventTriggerInfo.ATB = NewInfo.ATB; eventTriggerInfo.QuestTextIndex = NewInfo.QuestTextIndex; eventTriggerInfo.Comment = NewInfo.Comment; } return(true); }
public void Set(string Name, EventTriggerInfo NewInfo) { EventTriggerInfo info = this.GetInfo(Name); if (info != null) { info.Unique = NewInfo.Unique; info.Name = NewInfo.Name; info.MapIdx = NewInfo.MapIdx; info.Flag.Set(NewInfo.Flag.Get()); info.ATB = NewInfo.ATB; info.QuestTextIndex = NewInfo.QuestTextIndex; info.Comment = NewInfo.Comment; int num = this.FlagList.FindIndex((EventTriggerGameTriggerInfo.TriggerInfoFlag value) => value.info.Name == info.Name); if (num >= 0) { this.FlagList[num].Flag = (int)info.Flag.Get(); } NrTSingleton <NrEventTriggerInfoManager> .Instance.SetTriggerInfo(Name, NewInfo); } }
public bool Del(string Name) { EventTriggerInfo eventTriggerInfo = null; foreach (EventTriggerInfo current in this.m_GameTriggerInfoList) { if (current.Name == Name) { eventTriggerInfo = current; break; } } if (eventTriggerInfo != null) { this.m_GameTriggerInfoList.Remove(eventTriggerInfo); int num = this.FlagList.FindIndex((EventTriggerGameTriggerInfo.TriggerInfoFlag value) => value.info.Name == Name); if (num >= 0) { this.FlagList.Remove(this.FlagList[num]); } return(NrTSingleton <NrEventTriggerInfoManager> .Instance.DelEventTriggerInfo(Name)); } return(false); }
public static string ParseATBToString(EventTriggerInfo.EventTriggerATB ATB) { string text = EventTriggerInfo.EventTriggerATB.None.ToString(); EventTriggerInfo.EventTriggerATB[] array = Enum.GetValues(typeof(EventTriggerInfo.EventTriggerATB)) as EventTriggerInfo.EventTriggerATB[]; EventTriggerInfo.EventTriggerATB[] array2 = array; for (int i = 0; i < array2.Length; i++) { EventTriggerInfo.EventTriggerATB eventTriggerATB = array2[i]; if (EventTriggerInfo.IsATB(ATB, eventTriggerATB)) { if (text != EventTriggerInfo.EventTriggerATB.None.ToString()) { text += "+"; } else { text = string.Empty; } text += Enum.GetName(typeof(EventTriggerInfo.EventTriggerATB), eventTriggerATB); } } return(text); }
public bool IsATB(int EventTriggerUnique, EventTriggerInfo.EventTriggerATB atb) { EventTriggerInfo eventTriggerInfo = this.GetEventTriggerInfo(EventTriggerUnique); return(eventTriggerInfo != null && EventTriggerInfo.IsATB(eventTriggerInfo.ATB, atb)); }
public bool IsEventTriggerFlag(int EventTriggerUnique) { EventTriggerInfo eventTriggerInfo = this.GetEventTriggerInfo(EventTriggerUnique); return(eventTriggerInfo != null && eventTriggerInfo.Flag.IsFlag(this._EventTriggerActionFlag.ToArray())); }
public string GetQuestConditionText(int EventTriggerUnique) { EventTriggerInfo eventTriggerInfo = this.GetEventTriggerInfo(EventTriggerUnique); return(this.GetQuestConditionText(eventTriggerInfo)); }
public bool NewTriggerInfo(EventTriggerInfo Info) { this.AddTriggerInfo(Info); return(true); }
public EventTriggerInfo(EventTriggerInfo Info) { this.Init(); this.Set(Info.Name, Info.Unique, Info.MapIdx, Info.Flag.Get(), Info.ATB, Info.QuestTextIndex, Info.Comment); }
public void Set(string name, int unique, int mapidx, long flag, string atb, string textidx, string comment) { this.Set(name, unique, this.MapIdx, flag, EventTriggerInfo.ParseATB(atb), textidx, comment); }