public virtual ComponentWeapon New(Ship arg_ship, WeaponPort arg_port) { float size = arg_port.size; ComponentWeapon weapon = new ComponentWeapon(arg_ship, arg_port, size, this); weapon.cooldown = 60f / (fire_rate); weapon.projectile_velocity = projectile_velocity; weapon.projectile_frame_life = (int)(projectile_range * size / projectile_velocity); weapon.projectile_scatter = projectile_scatter; weapon.projectile_scale = projectile_scale * size; return weapon; }
public WeaponPort(WeaponPort example) { size = example.size; position = example.position; angle_min = example.angle_min; angle_max = example.angle_max; }
public WeaponFacade( WeaponPort arg_port, ComponentWeapon arg_component ) : base(arg_component) { component = arg_component; port = arg_port; }
public ComponentWeapon(Ship arg_ship, WeaponPort arg_port, float arg_size, WeaponTemplate arg_template) : base(arg_ship, arg_port.position, arg_size, arg_template) { port = arg_port; template = arg_template; explosion = template.explosion * size; facade = new WeaponFacade(port, this); }