From 13d18687841ba4bdebb18656d2371496e40ed087 Mon Sep 17 00:00:00 2001 From: huangjiayu <2453663605@qq.com> Date: Sun, 17 Sep 2023 11:49:18 +0800 Subject: [PATCH] =?UTF-8?q?=E4=BF=AE=E6=94=B9=E9=93=AD=E7=89=8C=E5=BC=B9?= =?UTF-8?q?=E7=AA=97?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../Assets/Adam/Scripts/NameplateController.cs | 2 +- .../Assets/Adam/Scripts/ShowNameplate.cs | 12 ++++-------- .../Assets/Scenes/农家乐.unity | 2 +- 3 files changed, 6 insertions(+), 10 deletions(-) diff --git a/Electrical_inspectionCompetitionSystem/Assets/Adam/Scripts/NameplateController.cs b/Electrical_inspectionCompetitionSystem/Assets/Adam/Scripts/NameplateController.cs index edbe4c15..a242f9e9 100644 --- a/Electrical_inspectionCompetitionSystem/Assets/Adam/Scripts/NameplateController.cs +++ b/Electrical_inspectionCompetitionSystem/Assets/Adam/Scripts/NameplateController.cs @@ -19,7 +19,7 @@ public class NameplateController : MonoSingleton private void Start() { - AddNameplateClick(); + Invoke("AddNameplateClick",5.0f); } public void AddNameplateClick() diff --git a/Electrical_inspectionCompetitionSystem/Assets/Adam/Scripts/ShowNameplate.cs b/Electrical_inspectionCompetitionSystem/Assets/Adam/Scripts/ShowNameplate.cs index a04781e1..d7507528 100644 --- a/Electrical_inspectionCompetitionSystem/Assets/Adam/Scripts/ShowNameplate.cs +++ b/Electrical_inspectionCompetitionSystem/Assets/Adam/Scripts/ShowNameplate.cs @@ -31,7 +31,7 @@ public class ShowNameplate : MonoBehaviour case "ѹ": multiple = 1.0f; break; - case "_": + case "2__ȷ": multiple = 3.0f; break; case "_": @@ -41,14 +41,10 @@ public class ShowNameplate : MonoBehaviour Vector2 bg = NameplateController.Instance.NameplateImage.rectTransform.sizeDelta; - float x = bg.x / multiple; - float y = bg.y / multiple; - bg = new Vector2(x,y); - NameplateController.Instance.backTransform.sizeDelta = bg + new Vector2(40, 40); - NameplateController.Instance.NameplateImage.rectTransform.sizeDelta = bg; + NameplateController.Instance.backTransform.sizeDelta = bg / multiple + new Vector2(40, 40); + NameplateController.Instance.NameplateImage.rectTransform.sizeDelta = bg / multiple; - 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].gameObject.SetActive(true); diff --git a/Electrical_inspectionCompetitionSystem/Assets/Scenes/农家乐.unity b/Electrical_inspectionCompetitionSystem/Assets/Scenes/农家乐.unity index 3fd0b05c..9cdf1b65 100644 --- a/Electrical_inspectionCompetitionSystem/Assets/Scenes/农家乐.unity +++ b/Electrical_inspectionCompetitionSystem/Assets/Scenes/农家乐.unity @@ -46390,7 +46390,7 @@ PrefabInstance: objectReference: {fileID: 0} - target: {fileID: 5475814894836966473, guid: 74bae246c73626f4d80059eda580593f, type: 3} propertyPath: m_IsActive - value: 1 + value: 0 objectReference: {fileID: 0} m_RemovedComponents: [] m_SourcePrefab: {fileID: 100100000, guid: 74bae246c73626f4d80059eda580593f, type: 3}