public void AddBox(DeliveryBox deliveryBox) { if (_deliveryPointManager.GetComponent <DeliveryPointManager>()._deliveryPoints.Count <= collectedBoxes()) { return; //if you can't carry more boxes } switch (deliveryBox.Type) { case DeliveryBox.BOXTYPE.MAIN: _objectiveBoxes.Add(deliveryBox); break; case DeliveryBox.BOXTYPE.KILLER: { _pointSystem.TotalBoxesCollected++; _killerBoxes.Add(deliveryBox); _UIManagerScript._socialBoxCounterScript.AddBox(); break; } case DeliveryBox.BOXTYPE.SOCIAL: { _pointSystem.TotalBoxesCollected++; _socialBoxes.Add(deliveryBox); _UIManagerScript._socialBoxCounterScript.AddBox(); break; } } }
bool ValidatePoint(DeliveryBox box, GameObject pointLocation) { if (box.DeliveryPoint == pointLocation) { pointLocation.SetActive(false); // points etc return(true); } return(false); }
private List <ItemStack> GetDeliveryBox(DeliveryBox deliveryBox) { if (Wallet == null || !Wallet.Any(x => x.ID == 1)) { return(new List <ItemStack>()); } Wallet.FirstOrDefault(y => y.ID == 1).Value += deliveryBox.Coins; //Add Gold from the Stash to the total Gold in the wallet return(deliveryBox.Items); }
public void AddBox(DeliveryBox deliveryBox) { if (_deliveryPointManager.GetComponent <DeliveryPointManager>()._deliveryPoints.Count <= collectedBoxes()) { return; //if you can't carry more boxes } switch (deliveryBox.Type) { case DeliveryBox.BOXTYPE.MAIN: _objectiveBoxes.Add(deliveryBox); break; case DeliveryBox.BOXTYPE.KILLER: _killerBoxes.Add(deliveryBox); break; case DeliveryBox.BOXTYPE.SOCIAL: _socialBoxes.Add(deliveryBox); break; } }
public DeliveryBox Update(DeliveryBox value) { _deliveryBoxBusiness.Update(value); return(value); }
public DeliveryBox Create(DeliveryBox value) { return(_deliveryBoxBusiness.Create(value)); }
[HttpPut]// api/DeliveryBox/5 public DeliveryBox Put([FromBody] DeliveryBox value) { return(_deliveryBoxServices.Update(value)); }
[HttpPost]//DeliveryBox public DeliveryBox Post([FromBody] DeliveryBox value) { return(_deliveryBoxServices.Create(value)); }
public DeliveryBox Update(DeliveryBox value) { _deliveryBoxRepository.Update(value); return(value); }
public DeliveryBox Create(DeliveryBox value) { return(_deliveryBoxRepository.Create(value)); }