public bool Heal(float cooldown, FarmTool tool) { var readyForState = ReadyForState(State.Growing); if (readyForState == StateReady.Ready && _state == State.Decay && _interActable) { soundEffectManager.SoundPesticide(); _cooldown = cooldown; CultivateToState(State.Healing); return(true); } else { if (readyForState == StateReady.OnCooldown) { Notify(new PlotOnCooldownWarningEvent(this, tool)); } else { Notify(new WrongToolOnPlotWarningEvent(this, tool)); } Debug.Log("Not allowed"); return(false); } }
public bool Dig(float cooldown, FarmTool tool) { var readyForState = ReadyForState(State.Dug); if (readyForState == StateReady.Ready && _interActable) { soundEffectManager.SoundDig(); _cooldown = cooldown; CultivateAfterCooldown(State.Dug); return(true); } else { if (readyForState == StateReady.OnCooldown) { Notify(new PlotOnCooldownWarningEvent(this, tool)); } else { Notify(new WrongToolOnPlotWarningEvent(this, tool)); } Debug.Log("Not allowed"); return(false); } }
public WrongToolOnPlotWarningEvent(FarmPlot farmPlot, FarmTool farmTool) : base(farmPlot) { this.farmPlot = farmPlot; this.farmTool = farmTool; }
public ToolOnCooldownWarningEvent(FarmTool farmTool) : base(farmTool) { this.farmTool = farmTool; }
public PlotOnCooldownWarningEvent(FarmPlot farmPlot, FarmTool farmTool) : base(farmPlot) { this.farmPlot = farmPlot; this.farmTool = farmTool; }
public static bool Heal(FarmPlot plot, float cooldown, FarmTool tool) { return(plot.Heal(cooldown, tool)); }
public static bool Water(FarmPlot plot, float cooldown, FarmTool tool) { return(plot.Water(cooldown, tool)); }
public static bool Plant(FarmPlot plot, float cooldown, FarmTool tool) { return(plot.Plant(cooldown, tool)); }
public static bool Dig(FarmPlot plot, float cooldown, FarmTool tool) { return(plot.Dig(cooldown, tool)); }