ToolsController.cs 958 B

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354
  1. using System;
  2. using System.Collections;
  3. using System.Collections.Generic;
  4. using System.Linq;
  5. using UnityEngine;
  6. using UnityEngine.UI;
  7. public class ToolsController : MonoBehaviour
  8. {
  9. public GameObject Cursor;
  10. public int Rounding = 1;
  11. enum Tools { Wall, Room, Del, Cursor};
  12. Tools tools = Tools.Cursor;
  13. // Start is called before the first frame update
  14. void Start()
  15. {
  16. }
  17. // Update is called once per frame
  18. void Update()
  19. {
  20. }
  21. public void CursorOff()
  22. {
  23. Cursor.SetActive(false);
  24. tools = Tools.Cursor;
  25. WallCreate.mode = WallCreate.Mode.Cursor;
  26. }
  27. public void WallEdit()
  28. {
  29. Cursor.SetActive(true);
  30. WallCreate.mode = WallCreate.Mode.Wall;
  31. }
  32. public void RoomEdit()
  33. {
  34. Cursor.SetActive(true);
  35. WallCreate.mode = WallCreate.Mode.Room;
  36. }
  37. public void Delete()
  38. {
  39. tools = Tools.Del;
  40. }
  41. }