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
76 lines
1.9 KiB
using ARLocation;
|
|
using DG.Tweening;
|
|
using System.Collections;
|
|
using System.Collections.Generic;
|
|
using UnityEngine;
|
|
using UnityEngine.UI;
|
|
|
|
public class Test_1 : MonoBehaviour
|
|
{
|
|
public GameObject di_Path;
|
|
|
|
public GameObject gd;
|
|
|
|
public Button[] button_color;
|
|
|
|
int x, y;
|
|
private int to = 0;
|
|
private int ID;
|
|
public void click_0Button(){
|
|
ID = 0;
|
|
FirstStart_Point();
|
|
button_color[1].GetComponent<Button>().image.DOColor(Color.red, 1f);
|
|
}
|
|
public void click_40Button(){
|
|
ID = 40;
|
|
FirstStart_Point();
|
|
button_color[3].GetComponent<Button>().image.DOColor(Color.red, 1f);
|
|
}
|
|
public void click_13Button(){
|
|
ID = 13;
|
|
FirstStart_Point();
|
|
button_color[2].GetComponent<Button>().image.DOColor(Color.red, 1f);
|
|
}
|
|
public void click_7Button(){
|
|
ID = 7;
|
|
FirstStart_Point();
|
|
button_color[0].GetComponent<Button>().image.DOColor(Color.red, 1f);
|
|
}
|
|
public void click_19Button(){
|
|
ID = 19;
|
|
FirstStart_Point();
|
|
button_color[4].GetComponent<Button>().image.DOColor(Color.red, 1f);
|
|
}
|
|
public void click_25Button(){
|
|
ID = 25;
|
|
FirstStart_Point();
|
|
button_color[6].GetComponent<Button>().image.DOColor(Color.red, 1f);
|
|
}
|
|
public void click_29Button()
|
|
{
|
|
ID = 29;
|
|
FirstStart_Point();
|
|
button_color[5].GetComponent<Button>().image.DOColor(Color.red, 1f);
|
|
}
|
|
public void FirstStart_Point(){
|
|
Invoke("Delays", 1f);
|
|
}
|
|
void Delays(){
|
|
if (to == 0){
|
|
x = ID;
|
|
to++;
|
|
}
|
|
else if (to == 1){
|
|
y = ID;
|
|
to = 0;
|
|
di_Path.GetComponent<dijkstraShortPathInfo>().GetPath(x, y);
|
|
gd.GetComponent<UITest>().NaviStart();
|
|
}
|
|
}
|
|
void NaviOn()
|
|
{
|
|
}
|
|
/* private void Update(){
|
|
Debug.Log("X=" + x + "Y" + y);
|
|
}*/
|
|
}
|