public static Reproduce Instance(short objType, int maxCount, int cooldown = 10000, float radius = 5) { var key = new Tuple<short, int, int, float>(objType, maxCount, cooldown, radius); Reproduce ret; if (!instances.TryGetValue(key, out ret)) ret = instances[key] = new Reproduce(objType, maxCount, cooldown, radius); return ret; }
public static Reproduce Instance(short objType, int maxCount, int cooldown = 10000, float radius = 5) { var key = new Tuple <short, int, int, float>(objType, maxCount, cooldown, radius); Reproduce ret; if (!instances.TryGetValue(key, out ret)) { ret = instances[key] = new Reproduce(objType, maxCount, cooldown, radius); } return(ret); }