AddVoxelTerrainTool.cs 683 B

12345678910111213141516171819202122232425262728
  1. using System.Collections;
  2. using System.Collections.Generic;
  3. using UnityEngine;
  4. using KairoEngine.GameTools.InteractionTools;
  5. using KairoEngine.UI;
  6. using Sirenix.OdinInspector;
  7. namespace KairoEngine.TerrainEngine
  8. {
  9. public class AddVoxelTerrainTool : MonoBehaviour, IInteractionTool
  10. {
  11. public VoxelTerrainEditor voxelTerrainEditor;
  12. public Sprite icon;
  13. public void DisableTool()
  14. {
  15. voxelTerrainEditor.currentTool = VoxelTerrainEditor.Tool.None;
  16. }
  17. public void EnableTool()
  18. {
  19. voxelTerrainEditor.currentTool = VoxelTerrainEditor.Tool.Add;
  20. }
  21. public Sprite GetIcon() => icon;
  22. }
  23. }