Пример #1
0
        public BaseCivNpc(int blockx)
        {
            if (blockx <= 0)
            {
                blockx = 0;
            }
            else if (blockx > SizeGeneratior.WorldWidth)
            {
                blockx = SizeGeneratior.WorldWidth - 1;
            }
            Position.X = blockx * Tile.TILE_MAX_SIZE;
            Position.Y = Program.Game.Dimension[Program.Game.CurrentDimension].MapHeight[blockx] * Tile.TILE_MAX_SIZE - Tile.TILE_MAX_SIZE * 3;
            Type       = Program.Game.Rand.Next(2);
            Rect.Width = Width;

            WayPoint    = Position.X;
            WayPoint   += Program.Game.Rand.Next(-1, 1) * Tile.TILE_MAX_SIZE;
            Rect.Height = Height;
            Drop.Clear();
            Drop.Add(new Item(1, 7));
            for (var i = 0; i < 6; i++)
            {
                ClothesSkin[i] = new Clothes();
            }
            Race = Race.Racelist[0];
        }
Пример #2
0
        public BaseCivNpc(int blockx, Race race, IReadOnlyList <Clothes> clslot, ColorScheme[] color)
        {
            Position.X = blockx * Tile.TILE_MAX_SIZE;
            if (blockx <= 0)
            {
                blockx = 0;
            }
            else if (blockx >= SizeGeneratior.WorldWidth)
            {
                blockx = SizeGeneratior.WorldWidth - 2;
            }
            Position.Y = Program.Game.Dimension[Program.Game.CurrentDimension].MapHeight[blockx] * Tile.TILE_MAX_SIZE - Tile.TILE_MAX_SIZE * 3;
            Type       = Program.Game.Rand.Next(2);
            Rect.Width = Width;

            WayPoint = Position.X;
            for (var i = 0; i < 6; i++)
            {
                ClothesSkin[i] = clslot[i];
            }
            Colors      = color;
            WayPoint   += Program.Game.Rand.Next(-1, 1) * Tile.TILE_MAX_SIZE;
            Rect.Height = Height;
            Drop.Clear();
            Drop.Add(new Item(1, 7));
            Race = race;
        }
Пример #3
0
 public Pig(int blockx, Texture2D npcSkin)
     : base(blockx, new[] { npcSkin })
 {
     WayPoint = Position.X;
     Width    = 36;
     Height   = 20;
     Drop.Clear();
     Drop.Add(new Item(1, 54));
 }
Пример #4
0
        public Civilian(Vector2 positions, List <Dialog> dialog)
        {
            Position = positions;
            WayPoint = Position.X;

            WayPoint   += Program.Game.Rand.Next(-Tile.TILE_MAX_SIZE, Tile.TILE_MAX_SIZE);
            Rect.Width  = Width;
            Rect.Height = Height;
            Drop.Clear();
            Drop.Add(new Item(1, 7));
            Dialog       = dialog;
            Activedialog = 0;
        }
Пример #5
0
 public BaseCivNpc(Vector2 positions)
 {
     Position    = positions;
     WayPoint    = Position.X;
     WayPoint   += Program.Game.Rand.Next(-Tile.TILE_MAX_SIZE, Tile.TILE_MAX_SIZE);
     Rect.Width  = Width;
     Rect.Height = Height;
     Drop.Clear();
     Drop.Add(new Item(1, 7));
     for (var i = 0; i < 6; i++)
     {
         ClothesSkin[i] = new Clothes();
     }
     Race = Race.Racelist[0];
 }
Пример #6
0
 public BaseCivNpc(Vector2 positions, Race race, IReadOnlyList <Clothes> clslot, ColorScheme[] color)
 {
     Position    = positions;
     WayPoint    = Position.X;
     Colors      = color;
     Race        = race;
     WayPoint   += Program.Game.Rand.Next(-Tile.TILE_MAX_SIZE, Tile.TILE_MAX_SIZE);
     Rect.Width  = Width;
     Rect.Height = Height;
     Drop.Clear();
     Drop.Add(new Item(1, 7));
     for (var i = 0; i < 6; i++)
     {
         ClothesSkin[i] = clslot[i];
     }
 }