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

public class PasssiveModule : DetectionModule {
	public PasssiveModule(JObject json) : base(json) {
		sprite = Resources.Load("Sprites/Modules/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) {
	}
}