public ArtShield New(float radius, float size) { float rad_sq = Utility.Sqrt(radius); int count = (int)(particle_count * rad_sq); ArtShield shield = new ArtShield(this, count, size, radius); return shield; }
public ComponentShield( Ship arg_ship, float arg_size, ShieldTemplate arg_template): base(arg_ship, arg_ship.template.component_shield_pos, arg_size, arg_template) { template = arg_template; radius = arg_ship.template.shield_radius; hitbox = new HitboxCircle(radius); art = ArtManager.shields[template.art_resource].New(radius, size); shield_resistance = template.shield_resistance * SHIELD_BASE_RESISTANCE; max_integrity = (arg_template.integrity * arg_size * Utility.Sqrt(arg_size)); regen_rate = (arg_template.regen / GameConst.framerate) * arg_size; integrity = max_integrity; reform_integrity = max_integrity * template.reform_integrity; active = true; }