public static ThrowAttack Instance(float bombRadius, float sightRadius, int damage, float offsetAngle = 0) { var key = new Tuple<float, float, int, float>(bombRadius, sightRadius, damage, offsetAngle); ThrowAttack ret; if (!instances.TryGetValue(key, out ret)) ret = instances[key] = new ThrowAttack(bombRadius, sightRadius, damage, offsetAngle); return ret; }
public static ThrowAttack Instance(float bombRadius, float sightRadius, int damage) { var key = new Tuple <float, float, int>(bombRadius, sightRadius, damage); ThrowAttack ret; if (!instances.TryGetValue(key, out ret)) { ret = instances[key] = new ThrowAttack(bombRadius, sightRadius, damage); } return(ret); }