public void Set(Statistic s, StatisticHolder origin, CarryType t) { statistic = s; type = t; originalStat = origin; originalStat.AddSavable(this); GameState.IsCarrying = true; }
public void Deliver(StatisticHolder target) { if (target.type == type && active) { float remainder = target.GetStatistic.Inject( statistic); if (remainder == 0) { originalStat.RemoveSavable(this); GameState.IsCarrying = false; Destroy(gameObject); } else { statistic.Value = remainder; } } }