46 lines
1.0 KiB
C#
46 lines
1.0 KiB
C#
using System;
|
|
using System.Collections.Generic;
|
|
using Cysharp.Threading.Tasks;
|
|
using Unity.Mathematics;
|
|
|
|
namespace DanieleMarotta.RiversongCodeShowcase
|
|
{
|
|
public abstract class EditTool : IDisposable
|
|
{
|
|
protected EditTool(IServiceLocator serviceLocator)
|
|
{
|
|
ServiceLocator = serviceLocator;
|
|
}
|
|
|
|
protected IServiceLocator ServiceLocator { get; }
|
|
|
|
public List<(int2, TileHighlightType)> AffectedTiles { get; } = new();
|
|
|
|
public virtual UniTask InitializeAsync()
|
|
{
|
|
return UniTask.CompletedTask;
|
|
}
|
|
|
|
public virtual void Dispose()
|
|
{
|
|
}
|
|
|
|
public virtual void OnEnabled()
|
|
{
|
|
}
|
|
|
|
public virtual void OnDisabled()
|
|
{
|
|
}
|
|
|
|
public virtual void Update()
|
|
{
|
|
}
|
|
|
|
public virtual void GetDeleteGameObjectsPreviewInfo(out DeletedGameObjectsFilter filter, out TileRect rect)
|
|
{
|
|
filter = DeletedGameObjectsFilter.None;
|
|
rect = TileRect.Empty;
|
|
}
|
|
}
|
|
} |