using HighlightPlus;
using System;
using System.Collections;
using System.Collections.Generic;
using UnityEngine;
public class Tool_InsulatedConductor : Tool_Base
{
///
/// 预制体
///
public static GameObject uiPrefbs;
public GameObject 红导线;
public GameObject 绿导线;
public GameObject 黄导线;
public GameObject 黑导线;
///
/// 当前选中的导线
///
public GameObject currentChoseLine;
///
/// ui
///
private InsulatedConductorPanel insulatedConductorPanel;
///
/// 盒子中状态
///
public void SetBoxState()
{
//transform.Find("盒子").gameObject.SetActive(true);
//红导线.transform.localPosition = new Vector3(0.002249179f, 0.0254f, -0.08313887f);
//红导线.transform.localEulerAngles = Vector3.zero;
//绿导线.transform.localPosition = new Vector3(-0.004413905f, 0.07645171f, -0.08313887f);
//绿导线.transform.localEulerAngles = Vector3.zero;
//黄导线.transform.localPosition = new Vector3(0.004091827f, 0.02574606f, 0.07529999f);
//黄导线.transform.localEulerAngles = Vector3.zero;
//黑导线.transform.localPosition = new Vector3(-0.007f, 0.07715699f, 0.07529999f);
//黑导线.transform.localEulerAngles = Vector3.zero;
}
///
/// 拿出状态
///
public void SetChoeseState(string hightLightColor="")
{
//显示UI
if (uiPrefbs == null)
uiPrefbs = Resources.Load("UI/UI_Tip/InsulatedConductorPanel");
GameObject obj = Instantiate(uiPrefbs, GameManager.UIMgr.canvas.transform);
insulatedConductorPanel = obj.GetComponent();
insulatedConductorPanel.Init(this);
if (!string.IsNullOrEmpty(hightLightColor))
{
insulatedConductorPanel.SwitchSubProcessStepTriggerID("选择"+hightLightColor+"线");
}
gameObject.SetActive(false);
}
protected override void OnDestroy()
{
base.OnDestroy();
if (insulatedConductorPanel != null)
{
Destroy(insulatedConductorPanel.gameObject);
}
}
}