public static ChasingGroup Instance(float speed, float radius, float targetRadius, string group) { var key = new Tuple<float, float, float, string>(speed, radius, targetRadius, group); ChasingGroup ret; if (!instances.TryGetValue(key, out ret)) ret = instances[key] = new ChasingGroup(speed, radius, targetRadius, group); return ret; }
public static ChasingGroup Instance(float speed, float radius, float targetRadius, string group) { var key = new Tuple <float, float, float, string>(speed, radius, targetRadius, group); ChasingGroup ret; if (!instances.TryGetValue(key, out ret)) { ret = instances[key] = new ChasingGroup(speed, radius, targetRadius, group); } return(ret); }