31 lines
843 B
C#
31 lines
843 B
C#
using R3;
|
|
using UnityEngine;
|
|
|
|
namespace Code.D.Cleaning.CleanTools
|
|
{
|
|
public abstract class CleanTool
|
|
{
|
|
protected float DurabilityUsageStep;
|
|
protected Texture2D BrushTexture;
|
|
protected float CleanRadius;
|
|
|
|
public abstract CleanToolType ToolType { get; }
|
|
|
|
protected CleanTool(float durabilityUsageStep, float cleanRadius, Texture2D brushTexture)
|
|
{
|
|
IsDirty.Value = false;
|
|
|
|
DurabilityUsageStep = durabilityUsageStep;
|
|
CleanRadius = cleanRadius;
|
|
BrushTexture = brushTexture;
|
|
}
|
|
|
|
public ReactiveProperty<bool> IsDirty { get; } = new();
|
|
public ReactiveProperty<float> CurrentDirtiness { get; }
|
|
= new(0f);
|
|
|
|
public abstract TryapkaUsageInfo Use();
|
|
|
|
public abstract void Clean();
|
|
}
|
|
} |