コード例 #1
0
 public bool CanHarvest(HarvestResourceAction.HarvestAction action)
 {
     if (action == HarvestResourceAction.HarvestAction.Chop)
     {
         return(this.CanChop);
     }
     if (action == HarvestResourceAction.HarvestAction.Mine)
     {
         return(this.CanMine);
     }
     if (action == HarvestResourceAction.HarvestAction.Smash)
     {
         return(this.CanHarvestAttack);
     }
     throw new NotImplementedException();
 }
コード例 #2
0
 public bool CanBeHarvested(HarvestResourceAction.HarvestAction action)
 {
     if (action == HarvestResourceAction.HarvestAction.Chop)
     {
         return(this.CanBeChopped);
     }
     if (action == HarvestResourceAction.HarvestAction.Mine)
     {
         return(this.CanBeMined);
     }
     if (action == HarvestResourceAction.HarvestAction.Smash)
     {
         return(this.CanBeHarvestAttacked);
     }
     throw new NotImplementedException();
 }