[SerializeField] private DragableObj _foodBag = null; //prefab #endregion #region MonoFunction #endregion #region Function public override int FillIn(DragableObj bag) { if (bag.CompareTag("FoodBag")) { base.FillIn(bag); } return(-1); }
public override int FillIn(DragableObj bag) { int score = -1; if (bag.CompareTag("Bloodbag")) { if (((BloodBag)bag).bloodInfo.Equals(info, true, true, false)) { base.FillIn(bag); score = _data.ScoreByBloodStocked; CanvasManager.inst.AddScore(score); } else { Debug.Log("Your are bad: wrong shelf for this blood bag"); Destroy(bag.gameObject); _audioSource.Play(); } } return(score); }