Пример #1
0
        public EntityBase(Color foreground, Color background, int glyph, Map map, bool haveVision = false, int visionRange = 20) : base(1, 1)
        {
            Animation.CurrentFrame[0].Foreground = foreground;
            Animation.CurrentFrame[0].Background = background;
            Animation.CurrentFrame[0].Glyph      = glyph;

            EntityStatus = new EntityStatus();

            Inventory = new Inventory(EntityStatus.MaxWeight);

            this.map = map;

            HaveVision = haveVision;
            if (HaveVision)
            {
                fovmap      = new FOV(map);
                VisionRange = visionRange;
            }

            Equip = new ItemBase("Pickaxe", 10f);
            Equip.ItemBehaviour = ItemBehaviourHelper.Mine();

            random = RandomNumberServiceLocator.GetService();
            logger = LoggingServiceLocator.GetService();

            ID = random.NextUint();
        }