Beispiel #1
0
        public static bool GetSpeeds(object obj, ref double activeSpeed, ref double passiveSpeed)
        {
            if (!Enabled)
            {
                return(false);
            }

            if (m_Table == null)
            {
                LoadTable();
            }

            SpeedInfo sp = null;

            m_Table.TryGetValue(obj.GetType(), out sp);

            if (sp == null)
            {
                return(false);
            }

            activeSpeed  = sp.ActiveSpeed;
            passiveSpeed = sp.PassiveSpeed;

            return(true);
        }
Beispiel #2
0
        public static bool GetSpeeds(object obj, ref double activeSpeed, ref double passiveSpeed)
        {
            if (!Enabled)
            {
                return(false);
            }

            if (m_Table == null)
            {
                LoadTable();
            }

            SpeedInfo sp = (SpeedInfo)m_Table[obj.GetType()];

            /*if (sp == null)
             * {
             *  return false;
             * }*/

            /*activeSpeed = sp.ActiveSpeed;
             * passiveSpeed = sp.PassiveSpeed;*/

            activeSpeed  = 0.215;
            passiveSpeed = 0.50;

            return(true);
        }
Beispiel #3
0
        private static void LoadTable()
        {
            m_Table = new Hashtable();

            for (int i = 0; i < m_Speeds.Length; ++i)
            {
                SpeedInfo info  = m_Speeds[i];
                Type[]    types = info.Types;

                for (int j = 0; j < types.Length; ++j)
                {
                    m_Table[types[j]] = info;
                }
            }
        }
Beispiel #4
0
        public static bool Contains(object obj)
        {
            if (!Enabled)
            {
                return(false);
            }

            if (m_Table == null)
            {
                LoadTable();
            }

            SpeedInfo sp = (SpeedInfo)m_Table[obj.GetType()];

            return(sp != null);
        }
Beispiel #5
0
        public static bool Contains(object obj)
        {
            if (!Enabled)
            {
                return(false);
            }

            if (m_Table == null)
            {
                LoadTable();
            }

            SpeedInfo sp = null;

            m_Table.TryGetValue(obj.GetType(), out sp);

            return(sp != null);
        }
Beispiel #6
0
        public static bool GetSpeeds(object obj, ref double activeSpeed, ref double passiveSpeed)
        {
            if (!Enabled)
            {
                return(false);
            }

            if (m_Table == null)
            {
                LoadTable();
            }

            SpeedInfo sp = (SpeedInfo)m_Table[obj.GetType()];

            if (sp == null)
            {
                return(false);
            }

            activeSpeed  = sp.ActiveSpeed;
            passiveSpeed = sp.PassiveSpeed;

            return(true);
        }