Esempio n. 1
0
 public void Initialize(TraderRequestsSO requests, ProductTrader trader, WorldClock worldClock)
 {
     _trader = trader;
     InitializeRequestsTable();
     BindWorldClock(worldClock);
     BindScriptable(requests);
 }
Esempio n. 2
0
 private void BindScriptable(TraderRequestsSO scriptable)
 {
     foreach (var request in scriptable.Requests)
     {
         _requests[request.Frequency].Add(new ProductTradeRequest
         {
             ProductAmount = new ProductAmount
             {
                 ProductId = ProductLookup.Instance.GetProduct(request.Product).ID,
                 Amount    = request.Amount
             },
             IsProviding = request.isSelling
         });
     }
 }