private void AutoloadProjectile(Type type) { ModProjectile projectile = (ModProjectile)Activator.CreateInstance(type); projectile.mod = this; string name = type.Name; if (projectile.Autoload(ref name)) { AddProjectile(name, projectile); } }
private void AutoloadProjectile(Type type) { ModProjectile projectile = (ModProjectile)Activator.CreateInstance(type); projectile.mod = this; string name = type.Name; string texture = (type.Namespace + "." + type.Name).Replace('.', '/'); if (projectile.Autoload(ref name, ref texture)) { AddProjectile(name, projectile, texture); } }