This commit is contained in:
hyskai 2024-11-05 06:41:16 +08:00
parent dd956bbfee
commit e595df5aa7
8 changed files with 1127 additions and 54 deletions

View File

@ -715,7 +715,7 @@ MonoBehaviour:
- {fileID: 21300000, guid: d4fbb32ff8543d443b74de2652100618, type: 3}
- {fileID: 21300000, guid: f6884187fb833964ea9e632b9d5a8252, type: 3}
- {fileID: 21300000, guid: f79faf75d4e26b748958aaaf6c64cf56, type: 3}
Thingid:
Thingid: 0
rooms:
- {fileID: 361643069}
- {fileID: 1026708935}
@ -744,6 +744,7 @@ MonoBehaviour:
- {fileID: 1262522313}
- {fileID: 1737182421}
- {fileID: 1625391898}
ids: []
--- !u!1 &138158026
GameObject:
m_ObjectHideFlags: 0
@ -2231,7 +2232,8 @@ Transform:
m_LocalPosition: {x: -4.32, y: -1.85, z: -4}
m_LocalScale: {x: 1, y: 1, z: 1}
m_ConstrainProportionsScale: 0
m_Children: []
m_Children:
- {fileID: 799288468}
m_Father: {fileID: 361643070}
m_RootOrder: 5
m_LocalEulerAnglesHint: {x: 0, y: 0, z: 0}
@ -4814,6 +4816,75 @@ RectTransform:
m_AnchoredPosition: {x: 0, y: 0}
m_SizeDelta: {x: 100, y: 100}
m_Pivot: {x: 0.5, y: 0.5}
--- !u!1 &799288467
GameObject:
m_ObjectHideFlags: 0
m_CorrespondingSourceObject: {fileID: 0}
m_PrefabInstance: {fileID: 0}
m_PrefabAsset: {fileID: 0}
serializedVersion: 6
m_Component:
- component: {fileID: 799288468}
- component: {fileID: 799288470}
- component: {fileID: 799288469}
m_Layer: 0
m_Name: miner1(Clone)
m_TagString: Untagged
m_Icon: {fileID: 0}
m_NavMeshLayer: 0
m_StaticEditorFlags: 0
m_IsActive: 1
--- !u!4 &799288468
Transform:
m_ObjectHideFlags: 0
m_CorrespondingSourceObject: {fileID: 0}
m_PrefabInstance: {fileID: 0}
m_PrefabAsset: {fileID: 0}
m_GameObject: {fileID: 799288467}
m_LocalRotation: {x: -0, y: -0, z: -0, w: 1}
m_LocalPosition: {x: 6.9774723, y: 0.42249072, z: 5.4150186}
m_LocalScale: {x: 0.716264, y: 0.716264, z: 0.716264}
m_ConstrainProportionsScale: 0
m_Children:
- {fileID: 1416754134}
m_Father: {fileID: 379972121}
m_RootOrder: 0
m_LocalEulerAnglesHint: {x: 0, y: 0, z: 0}
--- !u!114 &799288469
MonoBehaviour:
m_ObjectHideFlags: 0
m_CorrespondingSourceObject: {fileID: 0}
m_PrefabInstance: {fileID: 0}
m_PrefabAsset: {fileID: 0}
m_GameObject: {fileID: 799288467}
m_Enabled: 1
m_EditorHideFlags: 0
m_Script: {fileID: 11500000, guid: 32c2f38a722aceb40980e1cdf8a6041a, type: 3}
m_Name:
m_EditorClassIdentifier:
animator: {fileID: 1416754135}
nowState: 0
probabilityOfStand: 0.4
probabilityOfMove: 0.3
probabilityOfDig: 0.3
ChangeStateTimer: 3
moveSpeed: 2
maxMovePos: {x: 2.6, y: 0.4, z: -3}
minMovePos: {x: -0.37, y: -0.15, z: -4}
digPosition: {x: 2.6, y: 0.2, z: -3}
digTime: 5
newV: {x: 0, y: 0, z: 0}
--- !u!210 &799288470
SortingGroup:
m_ObjectHideFlags: 0
m_CorrespondingSourceObject: {fileID: 0}
m_PrefabInstance: {fileID: 0}
m_PrefabAsset: {fileID: 0}
m_GameObject: {fileID: 799288467}
m_Enabled: 1
m_SortingLayerID: 0
m_SortingLayer: 0
m_SortingOrder: 1
--- !u!1 &828208476
GameObject:
m_ObjectHideFlags: 0
@ -7875,6 +7946,112 @@ Transform:
m_Father: {fileID: 0}
m_RootOrder: 3
m_LocalEulerAnglesHint: {x: 50, y: -30, z: 0}
--- !u!1 &1416754133
GameObject:
m_ObjectHideFlags: 0
m_CorrespondingSourceObject: {fileID: 0}
m_PrefabInstance: {fileID: 0}
m_PrefabAsset: {fileID: 0}
serializedVersion: 6
m_Component:
- component: {fileID: 1416754134}
- component: {fileID: 1416754136}
- component: {fileID: 1416754135}
m_Layer: 0
m_Name: Square
m_TagString: Untagged
m_Icon: {fileID: 0}
m_NavMeshLayer: 0
m_StaticEditorFlags: 0
m_IsActive: 1
--- !u!4 &1416754134
Transform:
m_ObjectHideFlags: 0
m_CorrespondingSourceObject: {fileID: 0}
m_PrefabInstance: {fileID: 0}
m_PrefabAsset: {fileID: 0}
m_GameObject: {fileID: 1416754133}
m_LocalRotation: {x: 0, y: 0, z: 0, w: 1}
m_LocalPosition: {x: 0, y: 0.972, z: 0}
m_LocalScale: {x: 1, y: 1, z: 1}
m_ConstrainProportionsScale: 0
m_Children: []
m_Father: {fileID: 799288468}
m_RootOrder: 0
m_LocalEulerAnglesHint: {x: 0, y: 0, z: 0}
--- !u!95 &1416754135
Animator:
serializedVersion: 5
m_ObjectHideFlags: 0
m_CorrespondingSourceObject: {fileID: 0}
m_PrefabInstance: {fileID: 0}
m_PrefabAsset: {fileID: 0}
m_GameObject: {fileID: 1416754133}
m_Enabled: 1
m_Avatar: {fileID: 0}
m_Controller: {fileID: 9100000, guid: 1633496a12ffc5a43b2c884de81064c1, type: 2}
m_CullingMode: 0
m_UpdateMode: 0
m_ApplyRootMotion: 0
m_LinearVelocityBlending: 0
m_StabilizeFeet: 0
m_WarningMessage:
m_HasTransformHierarchy: 1
m_AllowConstantClipSamplingOptimization: 1
m_KeepAnimatorStateOnDisable: 0
m_WriteDefaultValuesOnDisable: 0
--- !u!212 &1416754136
SpriteRenderer:
m_ObjectHideFlags: 0
m_CorrespondingSourceObject: {fileID: 0}
m_PrefabInstance: {fileID: 0}
m_PrefabAsset: {fileID: 0}
m_GameObject: {fileID: 1416754133}
m_Enabled: 1
m_CastShadows: 0
m_ReceiveShadows: 0
m_DynamicOccludee: 1
m_StaticShadowCaster: 0
m_MotionVectors: 1
m_LightProbeUsage: 1
m_ReflectionProbeUsage: 1
m_RayTracingMode: 0
m_RayTraceProcedural: 0
m_RenderingLayerMask: 1
m_RendererPriority: 0
m_Materials:
- {fileID: 10754, guid: 0000000000000000f000000000000000, type: 0}
m_StaticBatchInfo:
firstSubMesh: 0
subMeshCount: 0
m_StaticBatchRoot: {fileID: 0}
m_ProbeAnchor: {fileID: 0}
m_LightProbeVolumeOverride: {fileID: 0}
m_ScaleInLightmap: 1
m_ReceiveGI: 1
m_PreserveUVs: 0
m_IgnoreNormalsForChartDetection: 0
m_ImportantGI: 0
m_StitchLightmapSeams: 1
m_SelectedEditorRenderState: 0
m_MinimumChartSize: 4
m_AutoUVMaxDistance: 0.5
m_AutoUVMaxAngle: 89
m_LightmapParameters: {fileID: 0}
m_SortingLayerID: 0
m_SortingLayer: 0
m_SortingOrder: 0
m_Sprite: {fileID: 1679062413, guid: 8e4ba394e8569844caaefbadd38d117e, type: 3}
m_Color: {r: 1, g: 1, b: 1, a: 1}
m_FlipX: 0
m_FlipY: 0
m_DrawMode: 0
m_Size: {x: 1, y: 1}
m_AdaptiveModeThreshold: 0.5
m_SpriteTileMode: 0
m_WasSpriteAssigned: 1
m_MaskInteraction: 0
m_SpriteSortPoint: 0
--- !u!1 &1438189709
GameObject:
m_ObjectHideFlags: 0

File diff suppressed because it is too large Load Diff

View File

@ -22,6 +22,7 @@ public class JinShaBuy : mount
public int minerjiage = 0;
public List<GameObject> rooms;
public List<string> ids = new List<string>();
public override void Awake()
{
@ -135,6 +136,7 @@ public class JinShaBuy : mount
rooms[index1].GetComponent<RoomJinsha>().addman(index2, number);
//Debug.Log(data.Ids[0]);
rooms[index1].GetComponent<RoomJinsha>().ids.Add(data.Ids[0]);
this.ids.Add(data.Ids[0]);
}
else

View File

@ -253,7 +253,7 @@ public class RoomJinsha : mount
//Debug.Log(sponse);
string response = await web.SendRequest(web.URL + "/MinerElfActive/GetListOfGem", "POST");
string response = await web.SendRequest(web.URL + "/MinerElfActive/GetListOfGold", "POST");
AllGemVocItemRes itemList = JsonUtility.FromJson<AllGemVocItemRes>(response);
for (int i = 0; i < itemList.List.Length; i++)
@ -261,7 +261,7 @@ public class RoomJinsha : mount
if (itemList.List[i].Num == buy_type)
{
haveNumber += 1;
Debug.Log(this.gameObject.name + "矿工数量" + haveNumber);
// Debug.Log(this.gameObject.name + "矿工数量" + haveNumber);
}
}
toolsNumber = haveNumber;
@ -272,7 +272,7 @@ public class RoomJinsha : mount
GetRoom();
GameObject newMiner = GameObject.Instantiate(minerPrefab);
newMiner.transform.SetParent(startPos);
newMiner.transform.position =new Vector3(gold.position.x-0.5f,gold.position.y,gold.position.y);
newMiner.transform.position =new Vector3(gold.position.x-1.5f,gold.position.y-0.5f,gold.position.y);
}
@ -286,7 +286,7 @@ public class RoomJinsha : mount
ids.RemoveAt(ids.Count - 1);
string jsonString = JsonUtility.ToJson(use);
string aa = await web.SendRequest(web.URL + "/Voucher/Use", "POST", jsonString);
Debug.Log(aa);
//Debug.Log(aa);
}

View File

@ -174,18 +174,15 @@ public class jinsha : mount
{
//ÔùËÍÂß¼­
Giveaway giveaway = new Giveaway();
Debug.LogError(Thingid);
List<string> go = rooms[Thingid].GetComponent<RoomJinsha>().ids;
Debug.LogError(rooms[Thingid].GetComponent<RoomJinsha>().ids);
if (go.Count<1)
{
Debug.LogError("Ä㻹ûÓÐ");
ercitanchuang.GetComponent<input_box_pop_up_window>().destroy();
return;
}
giveaway.Ids[0] = go[go.Count - 1];
giveaway.GiftTargetId = "1";
Debug.Log("ÔùËͳɹ¦");
Debug.Log(go.ids.Count);
string[] sstr = { go.ids[go.ids.Count - 1] };
giveaway.Ids = sstr;
giveaway.GiftTargetId = userid;
string aa= await web.SendRequest(web.URL + "/Voucher/Gift", "POST", JsonUtility.ToJson(giveaway));
//Debug.Log("ÔùËͳɹ¦,AA:"+aa);
ercitanchuang.GetComponent<input_box_pop_up_window>().destroy();
}
@ -274,11 +271,15 @@ public class jinsha : mount
ercitanchuangs[1].GetComponent<input_box_pop_up_window_item>().register_click(async (BoxType boxType, int type) =>
{
if (type == 1)
{
{
//ÔùËÍÂß¼­
Giveaway giveaway = new Giveaway();
Debug.Log(go.ids.Count);
string[] sstr = { go.ids[go.ids.Count - 1] };
giveaway.Ids = sstr;
giveaway.GiftTargetId = userid;
string aa = await web.SendRequest(web.URL + "/Voucher/Gift", "POST", JsonUtility.ToJson(giveaway));
ercitanchuang.GetComponent<input_box_pop_up_window>().destroy();
}
else

View File

@ -31,6 +31,8 @@ public class room : mount
public GameObject Boom;
private bool Buy_succefful =false;
//public List<string> ids = new List<string>();
// Start is called before the first frame update
public override void Awake()
{
@ -204,7 +206,7 @@ public class room : mount
if (itemList.List[i].Num == buy_type)
{
haveNumber += 1;
Debug.Log(this.gameObject.name+"矿工数量" + haveNumber);
// Debug.Log(this.gameObject.name+"矿工数量" + haveNumber);
}
}
ChangeTextPro();
@ -214,7 +216,7 @@ public class room : mount
GetRoom();
GameObject newMiner = GameObject.Instantiate(minerPrefab);
newMiner.transform.SetParent(startPos);
newMiner.transform.position = new Vector3(gold.position.x - 0.5f, gold.position.y, gold.position.y); ;
newMiner.transform.position = new Vector3(gold.position.x -1.5f, gold.position.y - 0.5f, gold.position.y); ;
}

View File

@ -58,6 +58,8 @@ public class landContorl_jinsha : MonoBehaviour
public static bool canClick=true;
public List<string> ids = new List<string>();
// Start is called before the first frame update
private void Awake()
{

View File

@ -20,6 +20,9 @@ public class shopman :mount
public int minerjiage = 0;
public int type =0;
private string userid;
public List<GameObject> lands= new List<GameObject>();
public int lishiid;
// Start is called before the first frame update
public override void Awake()
{
@ -39,9 +42,9 @@ public class shopman :mount
landContorl_jinsha.canClick = false;
string userponse = await web.SendRequest(web.URL + "/FisherElf/GetList", "POST");
Debug.Log(userponse);
//Debug.Log(userponse);
BuyuList itemList = JsonUtility.FromJson<BuyuList>(userponse);
Debug.Log(itemList.List[0].Type);
// Debug.Log(itemList.List[0].Type);
List<BoxType> boxTypes = new List<BoxType>();
@ -82,6 +85,7 @@ public class shopman :mount
{
Debug.Log("进入创建弹窗");
BuyuItem item = intData.GetTypedData();
lishiid = item.Num;
Show_buy(boxType.icon, boxType.prompt, 64, item.Num, item.ActivateValue);
}
@ -131,6 +135,7 @@ public class shopman :mount
{
PlayerData pldata = intData.GetTypedData();
userid = pldata.Id;
}
List<BoxType> boxTypeser = new List<BoxType>();
@ -143,8 +148,16 @@ public class shopman :mount
{
if (type == 1)
{
//赠送逻辑
Giveaway giveaway = new Giveaway();
string[] sstr = { this.lands[lishiid / 3].GetComponent<landContorl_jinsha>().ids[this.lands[lishiid / 3].GetComponent<landContorl_jinsha>().ids.Count - 1]};
giveaway.Ids = sstr;
giveaway.GiftTargetId = userid;
string aa = await web.SendRequest(web.URL + "/Voucher/Gift", "POST", JsonUtility.ToJson(giveaway));
// Debug.Log("ÔùËÍ"+aa);
ercitanchuang.GetComponent<input_box_pop_up_window>().destroy();
}
else
@ -208,7 +221,6 @@ public class shopman :mount
numbertext1 = "1",//单个矿工的价钱
numbertext2 = number.ToString()//几个矿工
});
boxTypes.Add(new BoxType { Name = "account_number", textName = " 数量:", prompt = "请输入购买数量", Type = 6, is_required = false });
boxTypes.Add(new BoxType { Name = "submit", textName = " 取消购买 ", Type = 2 });
GameObject gameObject = add_pop_up(true);//生成弹窗母体
@ -280,7 +292,12 @@ public class shopman :mount
generateForFisherElf.Num = Num;
generateForFisherElf.Count = Convert.ToInt32(number);
string response = await web.SendRequest(web.URL + "/Voucher/GenerateForFisherElf", "POST", JsonUtility.ToJson(generateForFisherElf));
Debug.Log(response);
//Ìí¼Ó
Mining_Wizard_ID mi = JsonUtility.FromJson<Mining_Wizard_ID>(response);
this.lands[Num / 3].GetComponent<landContorl_jinsha>().ids.Add(mi.Ids[0]);
Promptmgr.Instance.PromptBubble("购买精灵成功", Color.black, Color.blue);
}