diff --git a/b1/Assets/脚本/拖动对象/DragObject_Mon.cs b/b1/Assets/脚本/拖动对象/DragObject_Mon.cs index fe8564c8..92c77ecd 100644 --- a/b1/Assets/脚本/拖动对象/DragObject_Mon.cs +++ b/b1/Assets/脚本/拖动对象/DragObject_Mon.cs @@ -102,7 +102,7 @@ public class DragObject_Mon : MonoBehaviour, IDragHandler, IBeginDragHandler, IE GameObject.FindGameObjectWithTag("铁匠玩家").GetComponent().dragmaterial(this.forgingMaterial_Mon.getId(), 1); GameObject.FindGameObjectWithTag("铁匠玩家").GetComponent().SubmitWeapons(this.forgingMaterial_Mon.getId()); Destroy(this.gameObject); - Customer_Mon.ins.ButtonOn(); + Customer_Mon.ins.ResetText(); Customer_Mon.ins.WaitTimeGetItem(this.forgingMaterial_Mon.getId()==id); } else diff --git a/b1/Assets/脚本/材料组/MaterialGroup_Mon.cs b/b1/Assets/脚本/材料组/MaterialGroup_Mon.cs index 08aff7ed..adbb7556 100644 --- a/b1/Assets/脚本/材料组/MaterialGroup_Mon.cs +++ b/b1/Assets/脚本/材料组/MaterialGroup_Mon.cs @@ -40,7 +40,6 @@ public class MaterialGroup_Mon : MonoBehaviour GameObject go_= Instantiate(this.MaterialGameObject); go_.transform.SetParent(this.transform); go_.transform.localScale = new Vector3(1, 1, 1); - Debug.LogError(mun_); go_.GetComponent().setArticle(article_, mun_); } private void Awake() diff --git a/b1/Assets/脚本/铁匠玩家/BlacksmithPlayer_Mon.cs b/b1/Assets/脚本/铁匠玩家/BlacksmithPlayer_Mon.cs index e1d519f9..75354831 100644 --- a/b1/Assets/脚本/铁匠玩家/BlacksmithPlayer_Mon.cs +++ b/b1/Assets/脚本/铁匠玩家/BlacksmithPlayer_Mon.cs @@ -306,6 +306,8 @@ public class BlacksmithPlayer_Mon : MonoBehaviour this.EquipmentSynthesisPath_Mon.CloseDrawing(); this.Checkout_Mon.StartCheckout(); this.customer_Mon.mode=false; + this.customer_Mon.CloseDoor(); + this.customer_Mon.LoadGame(); } @@ -405,18 +407,22 @@ public class BlacksmithPlayer_Mon : MonoBehaviour /// public void SubmitWeapons(int weapons_) { - if (this.blacksmith.clients.Count == 0) + if (this.blacksmith.clients.Count <= 0) { this.blacksmith.CloseDoor(); CloseShop(); + LoadGame(); return; } - int in_=this.blacksmith.SubmitOrder((Weapons)(this.FindArticleBoxs(weapons_))); - this.Checkout_Mon.AddIncome(in_); - this.Customer(); - //ˢ¿ - this.customer_Mon.Renovate_Visitor(); - this.LoadGameUI(); + if (this.blacksmith.GetClient()!=null) + { + int in_ = this.blacksmith.SubmitOrder((Weapons)(this.FindArticleBoxs(weapons_))); + this.Checkout_Mon.AddIncome(in_); + this.Customer(); + //ˢ¿ + this.customer_Mon.Renovate_Visitor(); + this.LoadGameUI(); + } } /// /// idزϻicon diff --git a/b1/Assets/脚本/铁匠脚本/Blacksmith.cs b/b1/Assets/脚本/铁匠脚本/Blacksmith.cs index 428ce916..c0545fbe 100644 --- a/b1/Assets/脚本/铁匠脚本/Blacksmith.cs +++ b/b1/Assets/脚本/铁匠脚本/Blacksmith.cs @@ -177,7 +177,11 @@ public class Blacksmith /// /// 首位顾客的信息 public Client GetClient() - { + { + if (this.clients.Count==0) + { + return null; + } return this.clients[0]; } /// @@ -193,6 +197,7 @@ public class Blacksmith /// public void OpenShop() { + Debug.LogError("WAIT"); this.blacksmithtype=BlacksmithType.WAIT; } /// @@ -200,12 +205,14 @@ public class Blacksmith /// public void Forging() { + Debug.LogError("WORK"); this.blacksmithtype =BlacksmithType.WORK; } /// /// 不结算,休息一下 /// - public void CloseDoor() { + public void CloseDoor() { + Debug.LogError("CLOSEDOOR"); this.blacksmithtype=BlacksmithType.CLOSEDOOR; } /// @@ -213,6 +220,7 @@ public class Blacksmith /// public void CloseShop() { + Debug.LogError("REST"); this.blacksmithtype = BlacksmithType.REST; } @@ -225,7 +233,7 @@ public class Blacksmith { this.remove_clientfirst(); - if (this.GetClient().getweaponid() == weapons_.getId()) + if (this.GetClient()!=null && this.GetClient().getweaponid() == weapons_.getId()) { Debug.Log("武器锻造正确,顾客很满意的离开了"); //this.add_money(weapons_.getweaponsmoney()); diff --git a/b1/Assets/脚本/门/Door_Mon.cs b/b1/Assets/脚本/门/Door_Mon.cs index 73972392..7695d05f 100644 --- a/b1/Assets/脚本/门/Door_Mon.cs +++ b/b1/Assets/脚本/门/Door_Mon.cs @@ -29,7 +29,7 @@ public class Door_Mon : MonoBehaviour, IPointerClickHandler { if (this.DoorState) { - //this.CloseDoor(); + this.CloseDoor(); } else { @@ -91,6 +91,7 @@ public class Door_Mon : MonoBehaviour, IPointerClickHandler this.SetImageAlpha(200); this.transform.Find("ʼӪҵ").GetComponent ().AnimationState.SetAnimation(0, "rc_1", false); this.transform.Find("bg").GetComponent().raycastTarget = false; + Customer_Mon.ins.CloseDoor(); //GameObject.FindGameObjectWithTag("").GetComponent().Door(); } private void SetImageAlpha(int alpha) diff --git a/b1/Assets/脚本/顾客组件/Customer_Mon.cs b/b1/Assets/脚本/顾客组件/Customer_Mon.cs index 57d1485c..858d62aa 100644 --- a/b1/Assets/脚本/顾客组件/Customer_Mon.cs +++ b/b1/Assets/脚本/顾客组件/Customer_Mon.cs @@ -41,7 +41,7 @@ public class Customer_Mon : MonoBehaviour { ins = this; } - private void LoadGame() + public void LoadGame() { this.CustomerGame = this.transform.Find("˿").gameObject; this.CloseButton= this.transform.Find("Ӫҵ_л").gameObject; @@ -111,6 +111,10 @@ public class Customer_Mon : MonoBehaviour } } + public void ResetText() + { + this.SurplusPopulation.text = "ʣ" + GameObject.Find("").GetComponent().GetClientsLength(); + } public void WaitTimeGetItem(bool bo) { waitTime = true; diff --git a/b1/TextToolDatas/slim/backup.txt b/b1/TextToolDatas/slim/backup.txt index 0f398133..29aeebd8 100644 Binary files a/b1/TextToolDatas/slim/backup.txt and b/b1/TextToolDatas/slim/backup.txt differ diff --git a/b1/UserSettings/Layouts/default-2022.dwlt b/b1/UserSettings/Layouts/default-2022.dwlt index 2318d184..e499a99c 100644 --- a/b1/UserSettings/Layouts/default-2022.dwlt +++ b/b1/UserSettings/Layouts/default-2022.dwlt @@ -121,7 +121,7 @@ MonoBehaviour: m_MinSize: {x: 350, y: 421} m_MaxSize: {x: 4000, y: 4021} vertical: 0 - controlID: 445 + controlID: 38 draggingID: 0 --- !u!114 &6 MonoBehaviour: @@ -142,8 +142,8 @@ MonoBehaviour: y: 0 width: 1331 height: 914 - m_MinSize: {x: 100, y: 100} - m_MaxSize: {x: 4000, y: 4000} + m_MinSize: {x: 100, y: 121} + m_MaxSize: {x: 4000, y: 4021} m_ActualView: {fileID: 20} m_Panes: - {fileID: 20} @@ -198,7 +198,7 @@ MonoBehaviour: m_MinSize: {x: 300, y: 100} m_MaxSize: {x: 24288, y: 16192} vertical: 0 - controlID: 116 + controlID: 226 draggingID: 0 --- !u!114 &9 MonoBehaviour: @@ -219,8 +219,8 @@ MonoBehaviour: y: 0 width: 472 height: 939 - m_MinSize: {x: 275, y: 50} - m_MaxSize: {x: 4000, y: 4000} + m_MinSize: {x: 276, y: 71} + m_MaxSize: {x: 4001, y: 4021} m_ActualView: {fileID: 22} m_Panes: - {fileID: 22} @@ -271,8 +271,8 @@ MonoBehaviour: y: 439 width: 1448 height: 500 - m_MinSize: {x: 100, y: 100} - m_MaxSize: {x: 4000, y: 4000} + m_MinSize: {x: 101, y: 121} + m_MaxSize: {x: 4001, y: 4021} m_ActualView: {fileID: 25} m_Panes: - {fileID: 21} @@ -374,7 +374,7 @@ MonoBehaviour: m_MinSize: {x: 200, y: 100} m_MaxSize: {x: 16192, y: 16192} vertical: 1 - controlID: 69 + controlID: 158 draggingID: 0 --- !u!114 &16 MonoBehaviour: @@ -400,7 +400,7 @@ MonoBehaviour: m_MinSize: {x: 200, y: 50} m_MaxSize: {x: 16192, y: 8096} vertical: 0 - controlID: 70 + controlID: 159 draggingID: 0 --- !u!114 &17 MonoBehaviour: @@ -421,8 +421,8 @@ MonoBehaviour: y: 0 width: 1096 height: 439 - m_MinSize: {x: 200, y: 200} - m_MaxSize: {x: 4000, y: 4000} + m_MinSize: {x: 202, y: 221} + m_MaxSize: {x: 4002, y: 4021} m_ActualView: {fileID: 24} m_Panes: - {fileID: 24} @@ -684,7 +684,7 @@ MonoBehaviour: scrollPos: {x: 0, y: 0} m_SelectedIDs: 6c6f0000 m_LastClickedID: 28524 - m_ExpandedIDs: 000000006a6f00006c6f00006e6f0000706f0000726f0000746f0000766f000000ca9a3bffffff7f + m_ExpandedIDs: m_RenameOverlay: m_UserAcceptedRename: 0 m_Name: @@ -712,7 +712,7 @@ MonoBehaviour: scrollPos: {x: 0, y: 0} m_SelectedIDs: m_LastClickedID: 0 - m_ExpandedIDs: 000000006a6f00006c6f00006e6f0000706f0000726f0000746f0000766f0000 + m_ExpandedIDs: m_RenameOverlay: m_UserAcceptedRename: 0 m_Name: @@ -852,9 +852,9 @@ MonoBehaviour: m_SceneHierarchy: m_TreeViewState: scrollPos: {x: 0, y: 0} - m_SelectedIDs: a8650000 + m_SelectedIDs: m_LastClickedID: 0 - m_ExpandedIDs: 46e3ffff90e3ffff76e8ffff16fbffff + m_ExpandedIDs: 14fbffff m_RenameOverlay: m_UserAcceptedRename: 0 m_Name: @@ -1273,7 +1273,7 @@ MonoBehaviour: m_PlayAudio: 0 m_AudioPlay: 0 m_Position: - m_Target: {x: 154.26889, y: 855.7815, z: -3.357976} + m_Target: {x: 763.59906, y: 1324.3041, z: -2.189849} speed: 2 m_Value: {x: 154.26889, y: 855.7815, z: -3.357976} m_RenderMode: 0 @@ -1325,7 +1325,7 @@ MonoBehaviour: speed: 2 m_Value: {x: 0, y: 0, z: 0, w: 1} m_Size: - m_Target: 392.36636 + m_Target: 551.5217 speed: 2 m_Value: 392.36636 m_Ortho: