Esempio n. 1
0
 public static Escaping Instance(float speed, float radius, int threshold, short? objType)
 {
     var key = new Tuple<float, float, int, short?>(speed, radius, threshold, objType);
     Escaping ret;
     if (!instances.TryGetValue(key, out ret))
         ret = instances[key] = new Escaping(speed, radius, threshold, objType);
     return ret;
 }
Esempio n. 2
0
        public static Escaping Instance(float speed, float radius, int threshold, short?objType)
        {
            var      key = new Tuple <float, float, int, short?>(speed, radius, threshold, objType);
            Escaping ret;

            if (!instances.TryGetValue(key, out ret))
            {
                ret = instances[key] = new Escaping(speed, radius, threshold, objType);
            }
            return(ret);
        }