铁匠错误修复
This commit is contained in:
parent
9edf0c0202
commit
af51781cac
@ -102,7 +102,7 @@ public class DragObject_Mon : MonoBehaviour, IDragHandler, IBeginDragHandler, IE
|
|||||||
GameObject.FindGameObjectWithTag("铁匠玩家").GetComponent<BlacksmithPlayer_Mon>().dragmaterial(this.forgingMaterial_Mon.getId(), 1);
|
GameObject.FindGameObjectWithTag("铁匠玩家").GetComponent<BlacksmithPlayer_Mon>().dragmaterial(this.forgingMaterial_Mon.getId(), 1);
|
||||||
GameObject.FindGameObjectWithTag("铁匠玩家").GetComponent<BlacksmithPlayer_Mon>().SubmitWeapons(this.forgingMaterial_Mon.getId());
|
GameObject.FindGameObjectWithTag("铁匠玩家").GetComponent<BlacksmithPlayer_Mon>().SubmitWeapons(this.forgingMaterial_Mon.getId());
|
||||||
Destroy(this.gameObject);
|
Destroy(this.gameObject);
|
||||||
Customer_Mon.ins.ButtonOn();
|
Customer_Mon.ins.ResetText();
|
||||||
Customer_Mon.ins.WaitTimeGetItem(this.forgingMaterial_Mon.getId()==id);
|
Customer_Mon.ins.WaitTimeGetItem(this.forgingMaterial_Mon.getId()==id);
|
||||||
}
|
}
|
||||||
else
|
else
|
||||||
|
@ -40,7 +40,6 @@ public class MaterialGroup_Mon : MonoBehaviour
|
|||||||
GameObject go_= Instantiate(this.MaterialGameObject);
|
GameObject go_= Instantiate(this.MaterialGameObject);
|
||||||
go_.transform.SetParent(this.transform);
|
go_.transform.SetParent(this.transform);
|
||||||
go_.transform.localScale = new Vector3(1, 1, 1);
|
go_.transform.localScale = new Vector3(1, 1, 1);
|
||||||
Debug.LogError(mun_);
|
|
||||||
go_.GetComponent<ForgingMaterial_Mon>().setArticle(article_, mun_);
|
go_.GetComponent<ForgingMaterial_Mon>().setArticle(article_, mun_);
|
||||||
}
|
}
|
||||||
private void Awake()
|
private void Awake()
|
||||||
|
@ -306,6 +306,8 @@ public class BlacksmithPlayer_Mon : MonoBehaviour
|
|||||||
this.EquipmentSynthesisPath_Mon.CloseDrawing();
|
this.EquipmentSynthesisPath_Mon.CloseDrawing();
|
||||||
this.Checkout_Mon.StartCheckout();
|
this.Checkout_Mon.StartCheckout();
|
||||||
this.customer_Mon.mode=false;
|
this.customer_Mon.mode=false;
|
||||||
|
this.customer_Mon.CloseDoor();
|
||||||
|
this.customer_Mon.LoadGame();
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
@ -405,18 +407,22 @@ public class BlacksmithPlayer_Mon : MonoBehaviour
|
|||||||
/// <param name="weapons_">武器</param>
|
/// <param name="weapons_">武器</param>
|
||||||
public void SubmitWeapons(int weapons_)
|
public void SubmitWeapons(int weapons_)
|
||||||
{
|
{
|
||||||
if (this.blacksmith.clients.Count == 0)
|
if (this.blacksmith.clients.Count <= 0)
|
||||||
{
|
{
|
||||||
this.blacksmith.CloseDoor();
|
this.blacksmith.CloseDoor();
|
||||||
CloseShop();
|
CloseShop();
|
||||||
|
LoadGame();
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
int in_=this.blacksmith.SubmitOrder((Weapons)(this.FindArticleBoxs(weapons_)));
|
if (this.blacksmith.GetClient()!=null)
|
||||||
this.Checkout_Mon.AddIncome(in_);
|
{
|
||||||
this.Customer();
|
int in_ = this.blacksmith.SubmitOrder((Weapons)(this.FindArticleBoxs(weapons_)));
|
||||||
//刷新客人
|
this.Checkout_Mon.AddIncome(in_);
|
||||||
this.customer_Mon.Renovate_Visitor();
|
this.Customer();
|
||||||
this.LoadGameUI();
|
//ˢпÍÈË
|
||||||
|
this.customer_Mon.Renovate_Visitor();
|
||||||
|
this.LoadGameUI();
|
||||||
|
}
|
||||||
}
|
}
|
||||||
/// <summary>
|
/// <summary>
|
||||||
/// 输入id返回材料或者武器的icon
|
/// 输入id返回材料或者武器的icon
|
||||||
|
@ -177,7 +177,11 @@ public class Blacksmith
|
|||||||
/// </summary>
|
/// </summary>
|
||||||
/// <returns>首位顾客的信息</returns>
|
/// <returns>首位顾客的信息</returns>
|
||||||
public Client GetClient()
|
public Client GetClient()
|
||||||
{
|
{
|
||||||
|
if (this.clients.Count==0)
|
||||||
|
{
|
||||||
|
return null;
|
||||||
|
}
|
||||||
return this.clients[0];
|
return this.clients[0];
|
||||||
}
|
}
|
||||||
/// <summary>
|
/// <summary>
|
||||||
@ -193,6 +197,7 @@ public class Blacksmith
|
|||||||
/// </summary>
|
/// </summary>
|
||||||
public void OpenShop()
|
public void OpenShop()
|
||||||
{
|
{
|
||||||
|
Debug.LogError("WAIT");
|
||||||
this.blacksmithtype=BlacksmithType.WAIT;
|
this.blacksmithtype=BlacksmithType.WAIT;
|
||||||
}
|
}
|
||||||
/// <summary>
|
/// <summary>
|
||||||
@ -200,12 +205,14 @@ public class Blacksmith
|
|||||||
/// </summary>
|
/// </summary>
|
||||||
public void Forging()
|
public void Forging()
|
||||||
{
|
{
|
||||||
|
Debug.LogError("WORK");
|
||||||
this.blacksmithtype =BlacksmithType.WORK;
|
this.blacksmithtype =BlacksmithType.WORK;
|
||||||
}
|
}
|
||||||
/// <summary>
|
/// <summary>
|
||||||
/// 不结算,休息一下
|
/// 不结算,休息一下
|
||||||
/// </summary>
|
/// </summary>
|
||||||
public void CloseDoor() {
|
public void CloseDoor() {
|
||||||
|
Debug.LogError("CLOSEDOOR");
|
||||||
this.blacksmithtype=BlacksmithType.CLOSEDOOR;
|
this.blacksmithtype=BlacksmithType.CLOSEDOOR;
|
||||||
}
|
}
|
||||||
/// <summary>
|
/// <summary>
|
||||||
@ -213,6 +220,7 @@ public class Blacksmith
|
|||||||
/// </summary>
|
/// </summary>
|
||||||
public void CloseShop()
|
public void CloseShop()
|
||||||
{
|
{
|
||||||
|
Debug.LogError("REST");
|
||||||
this.blacksmithtype = BlacksmithType.REST;
|
this.blacksmithtype = BlacksmithType.REST;
|
||||||
}
|
}
|
||||||
|
|
||||||
@ -225,7 +233,7 @@ public class Blacksmith
|
|||||||
{
|
{
|
||||||
this.remove_clientfirst();
|
this.remove_clientfirst();
|
||||||
|
|
||||||
if (this.GetClient().getweaponid() == weapons_.getId())
|
if (this.GetClient()!=null && this.GetClient().getweaponid() == weapons_.getId())
|
||||||
{
|
{
|
||||||
Debug.Log("武器锻造正确,顾客很满意的离开了");
|
Debug.Log("武器锻造正确,顾客很满意的离开了");
|
||||||
//this.add_money(weapons_.getweaponsmoney());
|
//this.add_money(weapons_.getweaponsmoney());
|
||||||
|
@ -29,7 +29,7 @@ public class Door_Mon : MonoBehaviour, IPointerClickHandler
|
|||||||
{
|
{
|
||||||
if (this.DoorState)
|
if (this.DoorState)
|
||||||
{
|
{
|
||||||
//this.CloseDoor();
|
this.CloseDoor();
|
||||||
}
|
}
|
||||||
else
|
else
|
||||||
{
|
{
|
||||||
@ -91,6 +91,7 @@ public class Door_Mon : MonoBehaviour, IPointerClickHandler
|
|||||||
this.SetImageAlpha(200);
|
this.SetImageAlpha(200);
|
||||||
this.transform.Find("开始营业").GetComponent<SkeletonGraphic> ().AnimationState.SetAnimation(0, "rc_1", false);
|
this.transform.Find("开始营业").GetComponent<SkeletonGraphic> ().AnimationState.SetAnimation(0, "rc_1", false);
|
||||||
this.transform.Find("bg").GetComponent<Image>().raycastTarget = false;
|
this.transform.Find("bg").GetComponent<Image>().raycastTarget = false;
|
||||||
|
Customer_Mon.ins.CloseDoor();
|
||||||
//GameObject.FindGameObjectWithTag("铁匠玩家").GetComponent<BlacksmithPlayer_Mon>().Door();
|
//GameObject.FindGameObjectWithTag("铁匠玩家").GetComponent<BlacksmithPlayer_Mon>().Door();
|
||||||
}
|
}
|
||||||
private void SetImageAlpha(int alpha)
|
private void SetImageAlpha(int alpha)
|
||||||
|
@ -41,7 +41,7 @@ public class Customer_Mon : MonoBehaviour
|
|||||||
{
|
{
|
||||||
ins = this;
|
ins = this;
|
||||||
}
|
}
|
||||||
private void LoadGame()
|
public void LoadGame()
|
||||||
{
|
{
|
||||||
this.CustomerGame = this.transform.Find("顾客").gameObject;
|
this.CustomerGame = this.transform.Find("顾客").gameObject;
|
||||||
this.CloseButton= 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<BlacksmithPlayer_Mon>().GetClientsLength();
|
||||||
|
}
|
||||||
public void WaitTimeGetItem(bool bo)
|
public void WaitTimeGetItem(bool bo)
|
||||||
{
|
{
|
||||||
waitTime = true;
|
waitTime = true;
|
||||||
|
Binary file not shown.
@ -121,7 +121,7 @@ MonoBehaviour:
|
|||||||
m_MinSize: {x: 350, y: 421}
|
m_MinSize: {x: 350, y: 421}
|
||||||
m_MaxSize: {x: 4000, y: 4021}
|
m_MaxSize: {x: 4000, y: 4021}
|
||||||
vertical: 0
|
vertical: 0
|
||||||
controlID: 445
|
controlID: 38
|
||||||
draggingID: 0
|
draggingID: 0
|
||||||
--- !u!114 &6
|
--- !u!114 &6
|
||||||
MonoBehaviour:
|
MonoBehaviour:
|
||||||
@ -142,8 +142,8 @@ MonoBehaviour:
|
|||||||
y: 0
|
y: 0
|
||||||
width: 1331
|
width: 1331
|
||||||
height: 914
|
height: 914
|
||||||
m_MinSize: {x: 100, y: 100}
|
m_MinSize: {x: 100, y: 121}
|
||||||
m_MaxSize: {x: 4000, y: 4000}
|
m_MaxSize: {x: 4000, y: 4021}
|
||||||
m_ActualView: {fileID: 20}
|
m_ActualView: {fileID: 20}
|
||||||
m_Panes:
|
m_Panes:
|
||||||
- {fileID: 20}
|
- {fileID: 20}
|
||||||
@ -198,7 +198,7 @@ MonoBehaviour:
|
|||||||
m_MinSize: {x: 300, y: 100}
|
m_MinSize: {x: 300, y: 100}
|
||||||
m_MaxSize: {x: 24288, y: 16192}
|
m_MaxSize: {x: 24288, y: 16192}
|
||||||
vertical: 0
|
vertical: 0
|
||||||
controlID: 116
|
controlID: 226
|
||||||
draggingID: 0
|
draggingID: 0
|
||||||
--- !u!114 &9
|
--- !u!114 &9
|
||||||
MonoBehaviour:
|
MonoBehaviour:
|
||||||
@ -219,8 +219,8 @@ MonoBehaviour:
|
|||||||
y: 0
|
y: 0
|
||||||
width: 472
|
width: 472
|
||||||
height: 939
|
height: 939
|
||||||
m_MinSize: {x: 275, y: 50}
|
m_MinSize: {x: 276, y: 71}
|
||||||
m_MaxSize: {x: 4000, y: 4000}
|
m_MaxSize: {x: 4001, y: 4021}
|
||||||
m_ActualView: {fileID: 22}
|
m_ActualView: {fileID: 22}
|
||||||
m_Panes:
|
m_Panes:
|
||||||
- {fileID: 22}
|
- {fileID: 22}
|
||||||
@ -271,8 +271,8 @@ MonoBehaviour:
|
|||||||
y: 439
|
y: 439
|
||||||
width: 1448
|
width: 1448
|
||||||
height: 500
|
height: 500
|
||||||
m_MinSize: {x: 100, y: 100}
|
m_MinSize: {x: 101, y: 121}
|
||||||
m_MaxSize: {x: 4000, y: 4000}
|
m_MaxSize: {x: 4001, y: 4021}
|
||||||
m_ActualView: {fileID: 25}
|
m_ActualView: {fileID: 25}
|
||||||
m_Panes:
|
m_Panes:
|
||||||
- {fileID: 21}
|
- {fileID: 21}
|
||||||
@ -374,7 +374,7 @@ MonoBehaviour:
|
|||||||
m_MinSize: {x: 200, y: 100}
|
m_MinSize: {x: 200, y: 100}
|
||||||
m_MaxSize: {x: 16192, y: 16192}
|
m_MaxSize: {x: 16192, y: 16192}
|
||||||
vertical: 1
|
vertical: 1
|
||||||
controlID: 69
|
controlID: 158
|
||||||
draggingID: 0
|
draggingID: 0
|
||||||
--- !u!114 &16
|
--- !u!114 &16
|
||||||
MonoBehaviour:
|
MonoBehaviour:
|
||||||
@ -400,7 +400,7 @@ MonoBehaviour:
|
|||||||
m_MinSize: {x: 200, y: 50}
|
m_MinSize: {x: 200, y: 50}
|
||||||
m_MaxSize: {x: 16192, y: 8096}
|
m_MaxSize: {x: 16192, y: 8096}
|
||||||
vertical: 0
|
vertical: 0
|
||||||
controlID: 70
|
controlID: 159
|
||||||
draggingID: 0
|
draggingID: 0
|
||||||
--- !u!114 &17
|
--- !u!114 &17
|
||||||
MonoBehaviour:
|
MonoBehaviour:
|
||||||
@ -421,8 +421,8 @@ MonoBehaviour:
|
|||||||
y: 0
|
y: 0
|
||||||
width: 1096
|
width: 1096
|
||||||
height: 439
|
height: 439
|
||||||
m_MinSize: {x: 200, y: 200}
|
m_MinSize: {x: 202, y: 221}
|
||||||
m_MaxSize: {x: 4000, y: 4000}
|
m_MaxSize: {x: 4002, y: 4021}
|
||||||
m_ActualView: {fileID: 24}
|
m_ActualView: {fileID: 24}
|
||||||
m_Panes:
|
m_Panes:
|
||||||
- {fileID: 24}
|
- {fileID: 24}
|
||||||
@ -684,7 +684,7 @@ MonoBehaviour:
|
|||||||
scrollPos: {x: 0, y: 0}
|
scrollPos: {x: 0, y: 0}
|
||||||
m_SelectedIDs: 6c6f0000
|
m_SelectedIDs: 6c6f0000
|
||||||
m_LastClickedID: 28524
|
m_LastClickedID: 28524
|
||||||
m_ExpandedIDs: 000000006a6f00006c6f00006e6f0000706f0000726f0000746f0000766f000000ca9a3bffffff7f
|
m_ExpandedIDs:
|
||||||
m_RenameOverlay:
|
m_RenameOverlay:
|
||||||
m_UserAcceptedRename: 0
|
m_UserAcceptedRename: 0
|
||||||
m_Name:
|
m_Name:
|
||||||
@ -712,7 +712,7 @@ MonoBehaviour:
|
|||||||
scrollPos: {x: 0, y: 0}
|
scrollPos: {x: 0, y: 0}
|
||||||
m_SelectedIDs:
|
m_SelectedIDs:
|
||||||
m_LastClickedID: 0
|
m_LastClickedID: 0
|
||||||
m_ExpandedIDs: 000000006a6f00006c6f00006e6f0000706f0000726f0000746f0000766f0000
|
m_ExpandedIDs:
|
||||||
m_RenameOverlay:
|
m_RenameOverlay:
|
||||||
m_UserAcceptedRename: 0
|
m_UserAcceptedRename: 0
|
||||||
m_Name:
|
m_Name:
|
||||||
@ -852,9 +852,9 @@ MonoBehaviour:
|
|||||||
m_SceneHierarchy:
|
m_SceneHierarchy:
|
||||||
m_TreeViewState:
|
m_TreeViewState:
|
||||||
scrollPos: {x: 0, y: 0}
|
scrollPos: {x: 0, y: 0}
|
||||||
m_SelectedIDs: a8650000
|
m_SelectedIDs:
|
||||||
m_LastClickedID: 0
|
m_LastClickedID: 0
|
||||||
m_ExpandedIDs: 46e3ffff90e3ffff76e8ffff16fbffff
|
m_ExpandedIDs: 14fbffff
|
||||||
m_RenameOverlay:
|
m_RenameOverlay:
|
||||||
m_UserAcceptedRename: 0
|
m_UserAcceptedRename: 0
|
||||||
m_Name:
|
m_Name:
|
||||||
@ -1273,7 +1273,7 @@ MonoBehaviour:
|
|||||||
m_PlayAudio: 0
|
m_PlayAudio: 0
|
||||||
m_AudioPlay: 0
|
m_AudioPlay: 0
|
||||||
m_Position:
|
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
|
speed: 2
|
||||||
m_Value: {x: 154.26889, y: 855.7815, z: -3.357976}
|
m_Value: {x: 154.26889, y: 855.7815, z: -3.357976}
|
||||||
m_RenderMode: 0
|
m_RenderMode: 0
|
||||||
@ -1325,7 +1325,7 @@ MonoBehaviour:
|
|||||||
speed: 2
|
speed: 2
|
||||||
m_Value: {x: 0, y: 0, z: 0, w: 1}
|
m_Value: {x: 0, y: 0, z: 0, w: 1}
|
||||||
m_Size:
|
m_Size:
|
||||||
m_Target: 392.36636
|
m_Target: 551.5217
|
||||||
speed: 2
|
speed: 2
|
||||||
m_Value: 392.36636
|
m_Value: 392.36636
|
||||||
m_Ortho:
|
m_Ortho:
|
||||||
|
Loading…
x
Reference in New Issue
Block a user