예제 #1
0
 public void Add(EventTriggerInfo info)
 {
     if (!this.IsInfo(info.Name))
     {
         this.m_GameTriggerInfoList.Add(info);
     }
 }
예제 #2
0
    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);
            }
        }
    }
예제 #3
0
 private string GetQuestConditionText(EventTriggerInfo Data)
 {
     if (Data == null)
     {
         return("Ʈ���� �˻�");
     }
     return("Ʈ���� �˻�");
 }
예제 #4
0
    public void Set(int Unique, EventTriggerInfo NewInfo)
    {
        EventTriggerInfo info = this.GetInfo(Unique);

        if (info != null)
        {
            this.Set(info.Name, NewInfo);
        }
    }
예제 #5
0
 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);
 }
예제 #6
0
    public int GetUnique(string EventTriggerName)
    {
        EventTriggerInfo eventTriggerInfo = this.GetEventTriggerInfo(EventTriggerName);

        if (eventTriggerInfo != null)
        {
            return(eventTriggerInfo.Unique);
        }
        return(0);
    }
예제 #7
0
    public void SendOffEventTrigger(int Unique)
    {
        EventTriggerInfo eventTriggerInfo = this.GetEventTriggerInfo(Unique);

        if (eventTriggerInfo == null)
        {
            return;
        }
        this._OnTriggers.Remove(eventTriggerInfo.EventTrigger);
    }
예제 #8
0
    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);
    }
예제 #9
0
    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);
        }
    }
예제 #10
0
    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);
        }
    }
예제 #11
0
    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);
    }
예제 #12
0
 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);
 }
예제 #13
0
    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);
            }
        }
    }
예제 #14
0
    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);
    }
예제 #15
0
    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);
    }
예제 #16
0
    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);
        }
    }
예제 #17
0
    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);
    }
예제 #18
0
    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);
    }
예제 #19
0
    public bool IsATB(int EventTriggerUnique, EventTriggerInfo.EventTriggerATB atb)
    {
        EventTriggerInfo eventTriggerInfo = this.GetEventTriggerInfo(EventTriggerUnique);

        return(eventTriggerInfo != null && EventTriggerInfo.IsATB(eventTriggerInfo.ATB, atb));
    }
예제 #20
0
    public bool IsEventTriggerFlag(int EventTriggerUnique)
    {
        EventTriggerInfo eventTriggerInfo = this.GetEventTriggerInfo(EventTriggerUnique);

        return(eventTriggerInfo != null && eventTriggerInfo.Flag.IsFlag(this._EventTriggerActionFlag.ToArray()));
    }
예제 #21
0
    public string GetQuestConditionText(int EventTriggerUnique)
    {
        EventTriggerInfo eventTriggerInfo = this.GetEventTriggerInfo(EventTriggerUnique);

        return(this.GetQuestConditionText(eventTriggerInfo));
    }
예제 #22
0
 public bool NewTriggerInfo(EventTriggerInfo Info)
 {
     this.AddTriggerInfo(Info);
     return(true);
 }
예제 #23
0
 public EventTriggerInfo(EventTriggerInfo Info)
 {
     this.Init();
     this.Set(Info.Name, Info.Unique, Info.MapIdx, Info.Flag.Get(), Info.ATB, Info.QuestTextIndex, Info.Comment);
 }
예제 #24
0
 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);
 }