SW 중심대학 OSS GIT 서버 박건태, 이승준, 고기완, 이준호 새로운 배포
You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.

76 lines
1.9 KiB

4 years ago
  1. using ARLocation;
  2. using DG.Tweening;
  3. using System.Collections;
  4. using System.Collections.Generic;
  5. using UnityEngine;
  6. using UnityEngine.UI;
  7. public class Test_1 : MonoBehaviour
  8. {
  9. public GameObject di_Path;
  10. public GameObject gd;
  11. public Button[] button_color;
  12. int x, y;
  13. private int to = 0;
  14. private int ID;
  15. public void click_0Button(){
  16. ID = 0;
  17. FirstStart_Point();
  18. button_color[1].GetComponent<Button>().image.DOColor(Color.red, 1f);
  19. }
  20. public void click_40Button(){
  21. ID = 40;
  22. FirstStart_Point();
  23. button_color[3].GetComponent<Button>().image.DOColor(Color.red, 1f);
  24. }
  25. public void click_13Button(){
  26. ID = 13;
  27. FirstStart_Point();
  28. button_color[2].GetComponent<Button>().image.DOColor(Color.red, 1f);
  29. }
  30. public void click_7Button(){
  31. ID = 7;
  32. FirstStart_Point();
  33. button_color[0].GetComponent<Button>().image.DOColor(Color.red, 1f);
  34. }
  35. public void click_19Button(){
  36. ID = 19;
  37. FirstStart_Point();
  38. button_color[4].GetComponent<Button>().image.DOColor(Color.red, 1f);
  39. }
  40. public void click_25Button(){
  41. ID = 25;
  42. FirstStart_Point();
  43. button_color[6].GetComponent<Button>().image.DOColor(Color.red, 1f);
  44. }
  45. public void click_29Button()
  46. {
  47. ID = 29;
  48. FirstStart_Point();
  49. button_color[5].GetComponent<Button>().image.DOColor(Color.red, 1f);
  50. }
  51. public void FirstStart_Point(){
  52. Invoke("Delays", 1f);
  53. }
  54. void Delays(){
  55. if (to == 0){
  56. x = ID;
  57. to++;
  58. }
  59. else if (to == 1){
  60. y = ID;
  61. to = 0;
  62. di_Path.GetComponent<dijkstraShortPathInfo>().GetPath(x, y);
  63. gd.GetComponent<UITest>().NaviStart();
  64. }
  65. }
  66. void NaviOn()
  67. {
  68. }
  69. /* private void Update(){
  70. Debug.Log("X=" + x + "Y" + y);
  71. }*/
  72. }