public Npc(IMap map, Level level, PathToPlayer path) { Alive = true; _map = map; _level = level; _path = path; _isAwareOfPlayer = false; //_dialogueTree = new DialogueTree(); //Info = new FigureInfo(); }
public static Npc CreateNpc(FigureInfo info, Level level, int x, int y) { Npc npc = null; //Level level = LevelManager.GetCurrentLevel(); //if (info.IsEnemy) { Texture2D tex = null; TileHelper.GetTileTexture(0, ref tex); var pathFromAggressiveEnemy = new PathToPlayer(Global.Player, level.Map, tex); pathFromAggressiveEnemy.CreateFrom(x, y); npc = new Npc(level.Map, level, pathFromAggressiveEnemy) { X = x, Y = y, Sprite = UIState._selectedTexture, Damage = Dice.Parse("d3"), }; npc.Info = info; if (npc.Info.IsMerchant) { npc.Info.Inventory = new List <int>(); npc.Info.Inventory.Add(2569); npc.Info.Inventory.Add(2569); npc.Info.Inventory.Add(2569); } //level.AddNpc(npc); } //else //{ //} return(npc); }