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