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