Пример #1
0
 public Item Collect(CollectionMethod method, Tool tool)
 {
     if(ToolCheck(method,tool))
     {
         return GetMaterial(method);
     }
     else
     {
         return null;
     }
 }
Пример #2
0
 public bool ToolCheck(CollectionMethod method, Tool tool)
 {
     switch (method)
     {
         case CollectionMethod.Hew:
             {
                 return tool is Axe;
             }
         case CollectionMethod.Dig:
             {
                 return tool is Pickaxe;
             }
     }
     return true;
 }