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; }
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); }