This commit is contained in:
hyskai 2024-11-05 02:01:38 +08:00
parent 1a65bd5dff
commit 779c57a187
4 changed files with 45 additions and 19 deletions

View File

@ -706,11 +706,11 @@ MonoBehaviour:
m_EditorClassIdentifier:
go: {fileID: 109717923}
icons:
- {fileID: -564534321, guid: c0603bed087587a459e19f661e80a9b3, type: 3}
- {fileID: 681606087, guid: 239c172bda433554e8dd76bb66b20796, type: 3}
- {fileID: -1747828919, guid: 17e3fe66824e3524bbe9cdd2e3327c17, type: 3}
- {fileID: 1678500488, guid: 77b6288ddba3e0e449fdbd9840862b54, type: 3}
- {fileID: 2074926565, guid: 67d2b1db3ae59284d89e1bdadb1945aa, type: 3}
- {fileID: -564534321, guid: c0603bed087587a459e19f661e80a9b3, type: 3}
- {fileID: -1747828919, guid: 17e3fe66824e3524bbe9cdd2e3327c17, type: 3}
- {fileID: 681606087, guid: 239c172bda433554e8dd76bb66b20796, type: 3}
- {fileID: 1678500488, guid: 77b6288ddba3e0e449fdbd9840862b54, type: 3}
toolsicons:
- {fileID: 21300000, guid: d4fbb32ff8543d443b74de2652100618, type: 3}
- {fileID: 21300000, guid: f6884187fb833964ea9e632b9d5a8252, type: 3}
@ -2180,7 +2180,7 @@ MonoBehaviour:
maxNumer: 10
haveNumber: 0
type: 0
buy_type: 0
buy_type: 1
toolsNumber: 0
haveNumber_text: {fileID: 1337763590}
toolsNumber_text: {fileID: 1489572594}
@ -2196,6 +2196,7 @@ MonoBehaviour:
- {fileID: 1206549371}
BlackRoom: {fileID: 982477524}
Boom: {fileID: 1998930180334184709, guid: 1af55f3362cdbd643937d48b138bef77, type: 3}
ids: []
--- !u!1 &379972120
GameObject:
m_ObjectHideFlags: 0
@ -5917,7 +5918,7 @@ MonoBehaviour:
maxNumer: 10
haveNumber: 0
type: 2
buy_type: 0
buy_type: 2
toolsNumber: 0
haveNumber_text: {fileID: 889190687}
toolsNumber_text: {fileID: 1983841859}
@ -5933,6 +5934,7 @@ MonoBehaviour:
- {fileID: 1675356532}
BlackRoom: {fileID: 314702314}
Boom: {fileID: 1998930180334184709, guid: 1af55f3362cdbd643937d48b138bef77, type: 3}
ids: []
--- !u!1 &1058917053
GameObject:
m_ObjectHideFlags: 0
@ -7042,7 +7044,7 @@ MonoBehaviour:
maxNumer: 10
haveNumber: 0
type: 4
buy_type: 0
buy_type: 3
toolsNumber: 0
haveNumber_text: {fileID: 1512878292}
toolsNumber_text: {fileID: 1696745609}
@ -7058,6 +7060,7 @@ MonoBehaviour:
- {fileID: 331442506}
BlackRoom: {fileID: 64041271}
Boom: {fileID: 1998930180334184709, guid: 1af55f3362cdbd643937d48b138bef77, type: 3}
ids: []
--- !u!1 &1267245798
GameObject:
m_ObjectHideFlags: 0
@ -10181,6 +10184,7 @@ MonoBehaviour:
- {fileID: 1954144235}
BlackRoom: {fileID: 927504749}
Boom: {fileID: 1998930180334184709, guid: 1af55f3362cdbd643937d48b138bef77, type: 3}
ids: []
--- !u!1 &1625551201
GameObject:
m_ObjectHideFlags: 0
@ -10868,7 +10872,7 @@ MonoBehaviour:
maxNumer: 10
haveNumber: 0
type: 6
buy_type: 0
buy_type: 5
toolsNumber: 0
haveNumber_text: {fileID: 1526054076}
toolsNumber_text: {fileID: 1867062610}
@ -10884,6 +10888,7 @@ MonoBehaviour:
- {fileID: 234795530}
BlackRoom: {fileID: 1676301279}
Boom: {fileID: 1998930180334184709, guid: 1af55f3362cdbd643937d48b138bef77, type: 3}
ids: []
--- !u!1 &1747948505
GameObject:
m_ObjectHideFlags: 0

View File

@ -125,11 +125,16 @@ public class JinShaBuy : mount
generateForFisherElf.Num = Num;
generateForFisherElf.Count = Convert.ToInt32(number);
string response = await web.SendRequest(web.URL + "/Voucher/GenerateForMinerElf", "POST", JsonUtility.ToJson(generateForFisherElf));
Mining_Wizard_ID data = JsonUtility.FromJson<Mining_Wizard_ID>(response);
Promptmgr.Instance.PromptBubble("¹ºÂò¾«Áé³É¹¦", Color.black,Color.blue);
int index1 = Num - 1;
int index2 = (Num - 1)*2;
rooms[index1].GetComponent<RoomJinsha>().addman(index2, number);
Debug.Log(data.Ids[0]);
rooms[index1].GetComponent<RoomJinsha>().ids.Add(data.Ids[0]);
}
else
{
@ -144,6 +149,7 @@ public class JinShaBuy : mount
int index1 = Num - 74;
int index2 = (Num - 74)*2;
rooms[index1].GetComponent<RoomJinsha>().addtools(index2, number);
// rooms[index1].GetComponent<RoomJinsha>().toolids.Add();
}
}
});

View File

@ -29,6 +29,9 @@ public class RoomJinsha : mount
private bool Buy_succefful = false;
public static bool Can = true;
public List<string> ids =new List<string>();
public List<string> toolids = new List<string>();
// Start is called before the first frame update
public override void Awake()
{
@ -81,6 +84,8 @@ public class RoomJinsha : mount
}
UseDaijinjuan();
haveNumber--;
toolsNumber--;
UpdateShowCazhi();
@ -122,10 +127,12 @@ public class RoomJinsha : mount
Promptmgr.Instance.PromptBubble("购买卷不足", Color.black, Color.red);
return;
}
PlayerManager.Instance.SetMoney(MoneyType.Stones, -10);
//PlayerManager.Instance.SetMoney(MoneyType.Stones, -10);
}
//Use uesminer = new Use();
UseDaijinjuan();
GetRoom();
haveNumber--;
@ -162,9 +169,9 @@ public class RoomJinsha : mount
public void addman(int type, int num)
{
Debug.LogError("=======================");
/*Debug.LogError("=======================");
Debug.LogError(type);
Debug.LogError(this.type);
Debug.LogError(this.type);*/
if (type == this.type)
{
Debug.Log("扣钱检测");
@ -199,9 +206,9 @@ public class RoomJinsha : mount
public void addtools(int type, int num)
{
Debug.LogError("=======================");
/* Debug.LogError("=======================");
Debug.LogError(type);
Debug.LogError(this.type);
Debug.LogError(this.type);*/
if (type == this.type)
{
Debug.LogError("111111111111111111111111111");
@ -257,10 +264,18 @@ public class RoomJinsha : mount
itemlist.Add(reslist.List[i]);
}
}
}
private async void UseDaijinjuan()
{
Use use = new Use();
use.Id = ids[ids.Count-1];
ids.RemoveAt(ids.Count - 1);
string jsonString = JsonUtility.ToJson(use);
string aa = await web.SendRequest(web.URL + "/Voucher/Use", "POST", jsonString);
Debug.Log(aa);
}
//开拓房间

View File

@ -51,7 +51,7 @@ public class jinsha : mount
public async void buy_miners()//购买金币矿工界面
{
loding();
// loding();
//关闭摄像头逻辑