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

public class PasssiveModule : DetectionModule {
	public PasssiveModule(JObject json) : base(json) {
		icon = Resources.Load("Sprites/Modules/Icons/Passive/" + getUniqueName(), typeof(Sprite)) as Sprite;
		silhouette = Resources.Load("Sprites/Modules/Silhouettes/Passive/" + getUniqueName(), typeof(Sprite)) as Sprite;
	}

	override public bool canDetect(ClassType type) {
		return true;
	}

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

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

		return array;
	}

	override public void updateClasses() {
	}

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

public class PasssiveModuleData : DetectionModuleData{
	public PasssiveModuleData(int parent, Module template, float angleOffset, Vector position) : base(parent, template, angleOffset, position) {
	}
}