/// <summary> /// METHOD: CreateMind, a generic method which creates a type of T /// </summary> /// <typeparam name="T"> the type to make</typeparam> /// <param name="e"> the entity which the mind will possess </param> public IMind CreateMind <T>(IEntity e) where T : IMind, new() { // INSTANTIATE an IMind as a new type of T IMind m = new T(); // CALL the possessEntity method, passing in the entity parameter m.possessEntity(e); // ADD the new mind to the list of minds MindList.Add(m); return(m); }
public void Unload() { MindList.Clear(); MindList = new List <IMind>(); }