// used by net interface for syncing public void RecieveCountersPlaced(CounterType counterType, int newCounters) { int currentCounters = Counters.AmountOf(counterType); if (currentCounters > newCounters) { Counters.Remove(counterType, currentCounters - newCounters); } else if (currentCounters < newCounters) { Counters.Add(counterType, newCounters - currentCounters); } else { Debug.Log("Trying to set counters to a value it's already set to. This shouldn't happen under normal circumstances"); } }
public void SyncCounters(CounterType counterType) { NetInterface.Get().SyncCounterPlaced(SourceCard, counterType, Counters.AmountOf(counterType)); }