[ClientRpc] void RpcItemCollected(Item.VegetableType itemType) { ItemCollected?.Invoke(itemType); }
void IncrementItem(Item.VegetableType itemType) { CountGUI cg = items[(int)itemType].GetComponent <CountGUI>(); cg.UpdateCount(); }
[Command] void CmdItemCollected(Item.VegetableType itemType) { Debug.Log("commanditemcollected: " + itemType); RpcItemCollected(itemType); }