This commit is contained in:
shurongsen 2024-11-05 04:01:23 +08:00
commit 3c285b5ba0
5 changed files with 46 additions and 36 deletions

View File

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

View File

@ -125,11 +125,16 @@ public class JinShaBuy : mount
generateForFisherElf.Num = Num; generateForFisherElf.Num = Num;
generateForFisherElf.Count = Convert.ToInt32(number); generateForFisherElf.Count = Convert.ToInt32(number);
string response = await web.SendRequest(web.URL + "/Voucher/GenerateForMinerElf", "POST", JsonUtility.ToJson(generateForFisherElf)); 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); Promptmgr.Instance.PromptBubble("¹ºÂò¾«Áé³É¹¦", Color.black,Color.blue);
int index1 = Num - 1; int index1 = Num - 1;
int index2 = (Num - 1)*2; int index2 = (Num - 1)*2;
rooms[index1].GetComponent<RoomJinsha>().addman(index2, number); rooms[index1].GetComponent<RoomJinsha>().addman(index2, number);
Debug.Log(data.Ids[0]);
rooms[index1].GetComponent<RoomJinsha>().ids.Add(data.Ids[0]);
} }
else else
{ {
@ -144,6 +149,7 @@ public class JinShaBuy : mount
int index1 = Num - 74; int index1 = Num - 74;
int index2 = (Num - 74)*2; int index2 = (Num - 74)*2;
rooms[index1].GetComponent<RoomJinsha>().addtools(index2, number); 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; private bool Buy_succefful = false;
public static bool Can = true; 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 // Start is called before the first frame update
public override void Awake() public override void Awake()
{ {
@ -81,6 +84,8 @@ public class RoomJinsha : mount
} }
UseDaijinjuan();
haveNumber--; haveNumber--;
toolsNumber--; toolsNumber--;
UpdateShowCazhi(); UpdateShowCazhi();
@ -122,10 +127,12 @@ public class RoomJinsha : mount
Promptmgr.Instance.PromptBubble("购买卷不足", Color.black, Color.red); Promptmgr.Instance.PromptBubble("购买卷不足", Color.black, Color.red);
return; return;
} }
PlayerManager.Instance.SetMoney(MoneyType.Stones, -10); //PlayerManager.Instance.SetMoney(MoneyType.Stones, -10);
} }
//Use uesminer = new Use();
UseDaijinjuan();
GetRoom(); GetRoom();
haveNumber--; haveNumber--;
@ -162,9 +169,9 @@ public class RoomJinsha : mount
public void addman(int type, int num) public void addman(int type, int num)
{ {
Debug.LogError("======================="); /*Debug.LogError("=======================");
Debug.LogError(type); Debug.LogError(type);
Debug.LogError(this.type); Debug.LogError(this.type);*/
if (type == this.type) if (type == this.type)
{ {
Debug.Log("扣钱检测"); Debug.Log("扣钱检测");
@ -199,9 +206,9 @@ public class RoomJinsha : mount
public void addtools(int type, int num) public void addtools(int type, int num)
{ {
Debug.LogError("======================="); /* Debug.LogError("=======================");
Debug.LogError(type); Debug.LogError(type);
Debug.LogError(this.type); Debug.LogError(this.type);*/
if (type == this.type) if (type == this.type)
{ {
Debug.LogError("111111111111111111111111111"); Debug.LogError("111111111111111111111111111");
@ -257,10 +264,18 @@ public class RoomJinsha : mount
itemlist.Add(reslist.List[i]); 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()//购买金币矿工界面 public async void buy_miners()//购买金币矿工界面
{ {
loding();
// loding(); // loding();
//关闭摄像头逻辑 //关闭摄像头逻辑

View File

@ -110,22 +110,7 @@ public class room : mount
private async void OnMouseDown() private async void OnMouseDown()
{ {
/* if (haveNumber<1||toolsNumber<1)
{
Promptmgr.Instance.PromptBubble("人数或工具不足", Color.black, Color.red);
return;
}*/
/*if (toolsNumber_text == null)
{
Debug.Log("扣钱检测");
if (PlayerManager.Instance.GetNumer(MoneyType.Stones) < 11)
{
Promptmgr.Instance.PromptBubble("购买卷不足", Color.black, Color.red);
return;
}
}*/
Generate(1); Generate(1);
GetRoom(); GetRoom();
haveNumber++; haveNumber++;
@ -249,8 +234,7 @@ public class room : mount
use.Id = data.Ids[0]; use.Id = data.Ids[0];
string jsonString = JsonUtility.ToJson(use); string jsonString = JsonUtility.ToJson(use);
Debug.Log(jsonString); Debug.Log(jsonString);
string aa = await web.SendRequest(web.URL + "/Voucher/Use", "POST", jsonString); string aa = await web.SendRequest(web.URL + "/Voucher/Use", "POST", jsonString);
Debug.Log(aa);
} }