Ejemplo n.º 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);
        }
Ejemplo n.º 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);
        }
Ejemplo n.º 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;
                }
            }
        }
Ejemplo n.º 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);
        }
Ejemplo n.º 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);
        }
Ejemplo n.º 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);
        }