예제 #1
0
 public void AddFarmObj(NetConnection conn, int playerid, int money, int exp)
 {
     lock (Locker)
     {
         if (FarmList.ContainsKey(conn))
         {
             return;
         }
         FarmList[conn] = new FarmStorage()
         {
             CurrTime = DateTime.Now,
             Exp      = exp,
             Money    = money,
             PlayerId = playerid,
         };
         if (!FarmTimer.Enabled)
         {
             FarmTimer.Enabled = true;
         }
     }
     return;
 }
 public FarmRepository(FarmStorage farm)
 {
     _farmStorage = farm;
 }