public bool CanMergeWith(CargoBlock other) { return (!Merging && !other.Merging && FishType == other.FishType && FishCount == other.FishCount); }
public void MergeWith(CargoBlock other) { if (!CanMergeWith(other)) { throw new System.ArgumentException("gave a bad cargo block to merge"); } Merging = true; FishCount *= 2; Destroy(other.gameObject, PositionTransition.Time); }