using Newtonsoft.Json.Linq;
using System.Collections.Generic;
using UnityEngine;
using System;

public class WarheadModule : Module {
	private float damage;
	private float zone;

	public WarheadModule(JObject json) : base(json) {
		this.damage = (float)json["damage"];
		this.zone = (float)json["zone"];
	}

	public float getDamage() {
		return damage;
	}

	public static WarheadModule[] loadModules(string[] filenames) {
		Array.Sort(filenames);
		WarheadModule[] array = new WarheadModule[filenames.Length];

		for (int i = 0; i < filenames.Length; i++) {
			array[i] = new WarheadModule(jsonFromFile(filenames[i]));
		}

		return array;
	}

	override public void updateClasses() {
	}

	override public ModuleData getData(int parent, float angleOffset, Vector position) {
		return new WarheadModuleData(parent, this, position);
	}
}

public class WarheadModuleData : ModuleData{
	public WarheadModuleData(int parent, Module template, Vector position) : base(parent, template, position) {
	}
}