예제 #1
0
    public static T GetEvent <T>() where T : IInputEventBase, new()
    {
        string cmdKey = typeof(T).Name;

        if (!m_eventPool.ContainsKey(cmdKey))
        {
            EventPool pool = new EventPool();
            pool.Init <T>(3);

            m_eventPool.Add(cmdKey, pool);
        }


        return((T)m_eventPool[cmdKey].GetEvent());
    }