public static AimedMultiAttack Instance(float radius, short?objType, float angle, int numShot, float offset = 0, int projectileIndex = 0) { var key = new Tuple <float, short?, float, int, float, int>(radius, objType, angle, numShot, offset, projectileIndex); AimedMultiAttack ret; if (!instances.TryGetValue(key, out ret)) { ret = instances[key] = new AimedMultiAttack(radius, objType, angle, numShot, offset, projectileIndex); } return(ret); }
public static AimedMultiAttack Instance(float radius, short? objType, float angle, int numShot, float offset = 0, int projectileIndex = 0) { var key = new Tuple<float, short?, float, int, float, int>(radius, objType, angle, numShot, offset, projectileIndex); AimedMultiAttack ret; if (!instances.TryGetValue(key, out ret)) ret = instances[key] = new AimedMultiAttack(radius, objType, angle, numShot, offset, projectileIndex); return ret; }