// OVERRIDE

    public override void Initialize(StatsModule i_StatsModule)
    {
        if (m_FirstCondition != null)
        {
            m_FirstCondition.Initialize(i_StatsModule);
        }

        if (m_SecondCondition != null)
        {
            m_FirstCondition.Initialize(i_StatsModule);
        }
    }
Exemplo n.º 2
0
    // LOGIC

    public void Initialize()
    {
        StatsModule statsModule = GameServices.GetModuleMain <StatsModule>();

        if (statsModule != null)
        {
            for (int conditionIndex = 0; conditionIndex < m_Conditions.Count; ++conditionIndex)
            {
                UserStatCondition condition = m_Conditions[conditionIndex];
                if (condition != null)
                {
                    condition.Initialize(statsModule);
                }
            }
        }

        if (m_CheckOnEvent)
        {
            if (m_EventName != "")
            {
                Messenger.AddListener(m_EventName, OnEvent);
            }
        }
    }