修改铭牌弹窗
This commit is contained in:
parent
b041c3bd5f
commit
13d1868784
|
@ -19,7 +19,7 @@ public class NameplateController : MonoSingleton<NameplateController>
|
||||||
|
|
||||||
private void Start()
|
private void Start()
|
||||||
{
|
{
|
||||||
AddNameplateClick();
|
Invoke("AddNameplateClick",5.0f);
|
||||||
}
|
}
|
||||||
|
|
||||||
public void AddNameplateClick()
|
public void AddNameplateClick()
|
||||||
|
|
|
@ -31,7 +31,7 @@ public class ShowNameplate : MonoBehaviour
|
||||||
case "低压互感器铭牌":
|
case "低压互感器铭牌":
|
||||||
multiple = 1.0f;
|
multiple = 1.0f;
|
||||||
break;
|
break;
|
||||||
case "¹â·ü²¢ÍøÄæ±äÆ÷_ÃúÅÆ":
|
case "2号逆变器_铭牌_正确":
|
||||||
multiple = 3.0f;
|
multiple = 3.0f;
|
||||||
break;
|
break;
|
||||||
case "光伏板_铭牌":
|
case "光伏板_铭牌":
|
||||||
|
@ -41,14 +41,10 @@ public class ShowNameplate : MonoBehaviour
|
||||||
|
|
||||||
|
|
||||||
Vector2 bg = NameplateController.Instance.NameplateImage.rectTransform.sizeDelta;
|
Vector2 bg = NameplateController.Instance.NameplateImage.rectTransform.sizeDelta;
|
||||||
float x = bg.x / multiple;
|
NameplateController.Instance.backTransform.sizeDelta = bg / multiple + new Vector2(40, 40);
|
||||||
float y = bg.y / multiple;
|
NameplateController.Instance.NameplateImage.rectTransform.sizeDelta = bg / multiple;
|
||||||
bg = new Vector2(x,y);
|
|
||||||
NameplateController.Instance.backTransform.sizeDelta = bg + new Vector2(40, 40);
|
|
||||||
NameplateController.Instance.NameplateImage.rectTransform.sizeDelta = bg;
|
|
||||||
|
|
||||||
Vector2 mt = NameplateController.Instance.mtTransform.sizeDelta;
|
//NameplateController.Instance.mtTransform.sizeDelta = new Vector2(NameplateController.Instance.backTransform.sizeDelta.x, mt.y);
|
||||||
NameplateController.Instance.mtTransform.sizeDelta = new Vector2(NameplateController.Instance.backTransform.sizeDelta.x, mt.y);
|
|
||||||
|
|
||||||
NameplateController.Instance.DictextMeshPro[myName].text = "300";
|
NameplateController.Instance.DictextMeshPro[myName].text = "300";
|
||||||
NameplateController.Instance.DictextMeshPro[myName].gameObject.SetActive(true);
|
NameplateController.Instance.DictextMeshPro[myName].gameObject.SetActive(true);
|
||||||
|
|
|
@ -46390,7 +46390,7 @@ PrefabInstance:
|
||||||
objectReference: {fileID: 0}
|
objectReference: {fileID: 0}
|
||||||
- target: {fileID: 5475814894836966473, guid: 74bae246c73626f4d80059eda580593f, type: 3}
|
- target: {fileID: 5475814894836966473, guid: 74bae246c73626f4d80059eda580593f, type: 3}
|
||||||
propertyPath: m_IsActive
|
propertyPath: m_IsActive
|
||||||
value: 1
|
value: 0
|
||||||
objectReference: {fileID: 0}
|
objectReference: {fileID: 0}
|
||||||
m_RemovedComponents: []
|
m_RemovedComponents: []
|
||||||
m_SourcePrefab: {fileID: 100100000, guid: 74bae246c73626f4d80059eda580593f, type: 3}
|
m_SourcePrefab: {fileID: 100100000, guid: 74bae246c73626f4d80059eda580593f, type: 3}
|
||||||
|
|
Loading…
Reference in New Issue