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.
100 lines
3.9 KiB
100 lines
3.9 KiB
3 years ago
|
using AX.MessageSystem;
|
||
|
using AX.TrackRecord;
|
||
|
using UnityEngine;
|
||
|
using UnityEngine.UI;
|
||
|
|
||
|
public class ToolScriptsSet : MonoBehaviour {
|
||
|
|
||
|
private Toggle TwoPointsRanging;
|
||
|
private Toggle MorePointsRanging;
|
||
|
private Toggle SpaceDistance;
|
||
|
private Toggle ScreenShot;//截屏
|
||
|
private Toggle ScreenShotPath;//截屏路径
|
||
|
private Toggle ScreenFull;//全屏
|
||
|
private CeJuScript CeJu;
|
||
|
private ScreenShots screenShot;
|
||
|
// private Toggle RegionalSettings;//区域设定
|
||
|
void Start ()
|
||
|
{
|
||
|
TwoPointsRanging = this.transform.Find("Template").Find("两点测距").GetComponent<Toggle>();
|
||
|
MorePointsRanging = this.transform.Find("Template").Find("多点测距").GetComponent<Toggle>();
|
||
|
SpaceDistance = this.transform.Find("Template").Find("空间测距").GetComponent<Toggle>();
|
||
|
ScreenShot = this.transform.Find("Template").Find("截屏").GetComponent<Toggle>();
|
||
|
ScreenShotPath = this.transform.parent.Find("截屏目录").GetComponent<Toggle>();
|
||
|
ScreenFull = this.transform.Find("Template").Find("全屏").GetComponent<Toggle>();
|
||
|
// RegionalSettings= this.transform.Find("Template").Find("透明主体").GetComponent<Toggle>();
|
||
|
CeJu = this.gameObject.GetComponent<CeJuScript>();
|
||
|
screenShot = this.gameObject.GetComponent<ScreenShots>();
|
||
|
|
||
|
TwoPointsRanging.onValueChanged.AddListener(TwoPointsRangingWay);
|
||
|
MorePointsRanging.onValueChanged.AddListener(MorePointsRangingWay);
|
||
|
SpaceDistance.onValueChanged.AddListener(SpaceDistanceWay);
|
||
|
ScreenShot.onValueChanged.AddListener(ScreenShotWay);
|
||
|
ScreenShotPath.onValueChanged.AddListener(ScreenShotPathWay);
|
||
|
ScreenFull.onValueChanged.AddListener(ScreenFullWay);
|
||
|
//RegionalSettings.onValueChanged.AddListener(RegionalSettingWay);
|
||
|
|
||
|
|
||
|
}
|
||
|
//public GameObject PolygonPrefab;
|
||
|
|
||
|
//public void RegionalSettingWay(bool check)
|
||
|
//{
|
||
|
// if (check)//生成Polygon
|
||
|
// {
|
||
|
// GameObject game = Instantiate(PolygonPrefab) as GameObject;
|
||
|
// game.transform.parent = GameObject.Find("AllParent/pPolygon").transform;
|
||
|
// string Now = System.DateTime.Now.Year.ToString() + System.DateTime.Now.Month.ToString() + System.DateTime.Now.Day.ToString() + System.DateTime.Now.Hour.ToString() + System.DateTime.Now.Minute.ToString() + System.DateTime.Now.Second.ToString();
|
||
|
// game.name = "Polygon" + Now;
|
||
|
// InputManager.Instance_.enabled = false;
|
||
|
// MessageDispatcher.SendMessage(3f, "NodeTreeHints", (object)"区域设定");
|
||
|
|
||
|
// if (RecordManager.Instance.IsRecording)
|
||
|
// {
|
||
|
// TrackRecordHelpClass.RECORDPolygon(game);
|
||
|
// }
|
||
|
|
||
|
// }
|
||
|
// else
|
||
|
// {
|
||
|
// if (UIController.instance.PolygonPlane != null)
|
||
|
// {
|
||
|
// UIController.instance.PolygonPlane.SetActive(false);
|
||
|
// }
|
||
|
// MessageDispatcher.SendMessage("ControlPolygonFalse", (object)"");
|
||
|
// InputManager.Instance_.enabled = true;
|
||
|
// }
|
||
|
//}
|
||
|
public void TwoPointsRangingWay(bool check)//两点测距
|
||
|
{
|
||
|
CeJu.Button(TwoPointsRanging.gameObject);
|
||
|
}
|
||
|
public void MorePointsRangingWay(bool check)//多点测距
|
||
|
{
|
||
|
CeJu.Button(MorePointsRanging.gameObject);
|
||
|
}
|
||
|
public void SpaceDistanceWay(bool check)//空间测距
|
||
|
{
|
||
|
CeJu.Button(SpaceDistance.gameObject);
|
||
|
}
|
||
|
public void ScreenShotWay(bool check)//截屏
|
||
|
{
|
||
|
CeJu.Set();
|
||
|
this.transform.Find("Template").gameObject.SetActive(false);
|
||
|
this.GetComponent<Toggle>().isOn = false;
|
||
|
screenShot.TheJiePingBtn();
|
||
|
|
||
|
}
|
||
|
public void ScreenShotPathWay(bool check)//截屏路径
|
||
|
{
|
||
|
//OpenFileSelf.instance.ButtonClcik();
|
||
|
OpenFileSelf.instance.OpenPicPanel();
|
||
|
CeJu.Set();
|
||
|
}
|
||
|
public void ScreenFullWay(bool check)//全屏
|
||
|
{
|
||
|
CeJu.Set();
|
||
|
}
|
||
|
|
||
|
}
|