public void TreeDestroy(Treetypes type) { if (onTreeDestroy != null) { onTreeDestroy(type); } }
protected override void Inventory(Treetypes type) { if (inventory.ContainsKey(type)) { int a = (int)inventory[type]; a++; inventory.Remove(type); inventory.Add(type, a); } else { inventory.Add(type, 1); } }
private void AmountTreesInInventory(Treetypes type) { if (actualCountOfTrees.ContainsKey(type)) { int a = (int)actualCountOfTrees[type]; a++; actualCountOfTrees.Remove(type); actualCountOfTrees.Add(type, a); } else { actualCountOfTrees.Add(type, 1); } foreach (DictionaryEntry entry in actualCountOfTrees) { sb.Append(entry.Key + " " + entry.Value + Environment.NewLine); } TreesInfo.text = sb.ToString(); sb.Clear(); }
protected abstract void Inventory(Treetypes type);