示例#1
0
        public List <Character> TavernCharactersChange()
        {
            int     newCharacterNumber = _rand.Next(2, 5);
            Taverne rc = new Taverne();

            _tavernCharacters = new List <Character>();
            for (int i = 0; i < newCharacterNumber; i++)
            {
                _tavernCharacters.Add(rc.New(1, 10, this));
            }

            return(_tavernCharacters);
        }
示例#2
0
 private void City_Load(object sender, EventArgs e)
 {
     foreach (object service in _city.Services)
     {
         if (service is LogicalGame.Militia)
         {
             CreateButton("Milice", ((LogicalGame.Militia)service).PointX, ((LogicalGame.Militia)service).PointY, service);
         }
         else if (service is LogicalGame.Mortuary)
         {
             CreateButton("Morgue", ((LogicalGame.Mortuary)service).PointX, ((LogicalGame.Mortuary)service).PointY, service);
         }
         else if (service is LogicalGame.Merchant)
         {
             CreateButton(((LogicalGame.Merchant)service).Name, ((LogicalGame.Merchant)service).PointX, ((LogicalGame.Merchant)service).PointY, service);
         }
         else if (service is LogicalGame.Taverne)
         {
             CreateButton("Taverne", ((LogicalGame.Taverne)service).PointX, ((LogicalGame.Taverne)service).PointY, service);
         }
     }
     LogicalGame.Taverne taverne = new LogicalGame.Taverne();
 }