protected override void ProceedUse(List <Vector2> pTiles) { NeedBase energyNeed = PlayerNeedManager.Instance.GetNeed("Energy"); energyNeed.Change(-CurrentTool.EnergyCost * (ToolCursorManager.Instance.CursorIndex + 1)); List <Vector2> tiles = pTiles; foreach (Vector2 tile in tiles) { if (CheckTileValidity(tile)) { FarmPlot plot = GetPlot(tile); plot.Water(); CurrentTool.CurrentCharge = Mathf.Clamp(CurrentTool.CurrentCharge - 1, 0, CurrentTool.MaxCharge); if (plot.Crop != null) { plot.Crop.Water(); } } } }
public static bool Water(FarmPlot plot, float cooldown, FarmTool tool) { return(plot.Water(cooldown, tool)); }