예제 #1
0
 public void TreeDestroy(Treetypes type)
 {
     if (onTreeDestroy != null)
     {
         onTreeDestroy(type);
     }
 }
예제 #2
0
 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);
     }
 }
예제 #3
0
 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();
 }
예제 #4
0
 protected abstract void Inventory(Treetypes type);