using System.Collections;
using System.Collections.Generic;
using UnityEngine;

public enum ObjectType {Character = 0, EVA = 1, LargeSpaceShip = 2};

public abstract class TemplateManager {
	
	private static List<GameObject> chars = new List<GameObject>();
	private static List<GameObject> EVAs = new List<GameObject>();
	private static List<GameObject> largeSpaceShips = new List<GameObject>();

	public static void init(Transform templates) {
		chars.Add(templates.FindChild("Characters/char0").gameObject);
		EVAs.Add(templates.FindChild("EVAs/eva0").gameObject);
		largeSpaceShips.Add(templates.FindChild("LargeSpaceShips/lss0").gameObject);
	}

	public static GameObject getTemplate(ObjectType type, int index) {
		switch (type) {
			case ObjectType.Character:
				return chars[index];
			case ObjectType.EVA:
				return EVAs[index];
			case ObjectType.LargeSpaceShip:
				return largeSpaceShips[index];
			default:
				Debug.Assert(false);
				return null;
		}
	}
}
