private void Init() { grid = new Grid(new Bitmap("Settings/map.png"), null); ai = new AICore(grid); //ai.AddPlayer(mikelChar, new Microsoft.DirectX.Vector3(0, 0, 0), new Entity(), "BasicFSM"); //ai.AddPlayer(mikelChar, new Microsoft.DirectX.Vector3(0, 0, 0), new Entity(), "BasicFSM"); string[] npcList = File.ReadAllLines(Directory.GetCurrentDirectory() + "\\Settings\\level1npc.ini"); characters = new WiccanRede.AI.CharacterNPC[npcList.Length]; for (int i = 0; i < npcList.Length; i++) { try { characters[i] = new WiccanRede.AI.CharacterNPC("Settings\\" + npcList[i] + ".xml"); //ai.AddPlayer(characters[i], new Microsoft.DirectX.Vector3(i,i,i), new Entity(), "BasicFSM"); } catch (Exception ex) { Logging.Logger.AddWarning("Chyba pri nacitani NPC: " + npcList[i] + " - " + ex.ToString()); } } }
public Entity(CharacterNPC character, AICore ai, string fsmName) { ai.AddPlayer(character, new Vector3(), this, fsmName, ""); }