四大场景接口代码
This commit is contained in:
parent
f995278b88
commit
78713793f5
@ -2690,6 +2690,8 @@ MonoBehaviour:
|
||||
m_Script: {fileID: 11500000, guid: fc4ace221bc630d49ad2cfc1a43e80f4, type: 3}
|
||||
m_Name:
|
||||
m_EditorClassIdentifier:
|
||||
RoomId: 0
|
||||
RoomName: {fileID: 0}
|
||||
fishManPrefab: {fileID: 5560367099341029388, guid: 6f4b04647bf06074ba78c56c3b621562, type: 3}
|
||||
listItem: []
|
||||
startPos: {fileID: 228491670}
|
||||
@ -30264,6 +30266,8 @@ MonoBehaviour:
|
||||
m_Script: {fileID: 11500000, guid: fc4ace221bc630d49ad2cfc1a43e80f4, type: 3}
|
||||
m_Name:
|
||||
m_EditorClassIdentifier:
|
||||
RoomId: 0
|
||||
RoomName: {fileID: 0}
|
||||
fishManPrefab: {fileID: 5560367099341029388, guid: 5ec434eeda724cd49942e03bdae71cdc, type: 3}
|
||||
listItem: []
|
||||
startPos: {fileID: 1596443116}
|
||||
@ -35712,7 +35716,7 @@ PrefabInstance:
|
||||
objectReference: {fileID: 0}
|
||||
- target: {fileID: 8631885451795898585, guid: 638b7f7423db411419568d073208d929, type: 3}
|
||||
propertyPath: m_AnchorMax.y
|
||||
value: 0
|
||||
value: 1
|
||||
objectReference: {fileID: 0}
|
||||
- target: {fileID: 8631885451795898585, guid: 638b7f7423db411419568d073208d929, type: 3}
|
||||
propertyPath: m_AnchorMin.x
|
||||
@ -35720,7 +35724,7 @@ PrefabInstance:
|
||||
objectReference: {fileID: 0}
|
||||
- target: {fileID: 8631885451795898585, guid: 638b7f7423db411419568d073208d929, type: 3}
|
||||
propertyPath: m_AnchorMin.y
|
||||
value: 0
|
||||
value: 1
|
||||
objectReference: {fileID: 0}
|
||||
- target: {fileID: 8631885451795898585, guid: 638b7f7423db411419568d073208d929, type: 3}
|
||||
propertyPath: m_SizeDelta.x
|
||||
@ -35760,11 +35764,11 @@ PrefabInstance:
|
||||
objectReference: {fileID: 0}
|
||||
- target: {fileID: 8631885451795898585, guid: 638b7f7423db411419568d073208d929, type: 3}
|
||||
propertyPath: m_AnchoredPosition.x
|
||||
value: 0
|
||||
value: 187
|
||||
objectReference: {fileID: 0}
|
||||
- target: {fileID: 8631885451795898585, guid: 638b7f7423db411419568d073208d929, type: 3}
|
||||
propertyPath: m_AnchoredPosition.y
|
||||
value: 0
|
||||
value: -41.6286
|
||||
objectReference: {fileID: 0}
|
||||
- target: {fileID: 8631885451795898585, guid: 638b7f7423db411419568d073208d929, type: 3}
|
||||
propertyPath: m_LocalEulerAnglesHint.x
|
||||
@ -38311,6 +38315,8 @@ MonoBehaviour:
|
||||
m_Script: {fileID: 11500000, guid: 195502a56cff5614c989db7fabdb604d, type: 3}
|
||||
m_Name:
|
||||
m_EditorClassIdentifier:
|
||||
RoomId: 0
|
||||
daoyuName: {fileID: 1340620171}
|
||||
fishManPrefab: {fileID: 250013124275613388, guid: 6f83d74a5434cca478809c01980c861a, type: 3}
|
||||
listItem: []
|
||||
startPos: {fileID: 274160317}
|
||||
@ -40019,7 +40025,7 @@ PrefabInstance:
|
||||
objectReference: {fileID: 0}
|
||||
- target: {fileID: 8631885451795898585, guid: 638b7f7423db411419568d073208d929, type: 3}
|
||||
propertyPath: m_AnchorMax.y
|
||||
value: 1
|
||||
value: 0
|
||||
objectReference: {fileID: 0}
|
||||
- target: {fileID: 8631885451795898585, guid: 638b7f7423db411419568d073208d929, type: 3}
|
||||
propertyPath: m_AnchorMin.x
|
||||
@ -40027,7 +40033,7 @@ PrefabInstance:
|
||||
objectReference: {fileID: 0}
|
||||
- target: {fileID: 8631885451795898585, guid: 638b7f7423db411419568d073208d929, type: 3}
|
||||
propertyPath: m_AnchorMin.y
|
||||
value: 1
|
||||
value: 0
|
||||
objectReference: {fileID: 0}
|
||||
- target: {fileID: 8631885451795898585, guid: 638b7f7423db411419568d073208d929, type: 3}
|
||||
propertyPath: m_SizeDelta.x
|
||||
@ -40067,11 +40073,11 @@ PrefabInstance:
|
||||
objectReference: {fileID: 0}
|
||||
- target: {fileID: 8631885451795898585, guid: 638b7f7423db411419568d073208d929, type: 3}
|
||||
propertyPath: m_AnchoredPosition.x
|
||||
value: 202.76596
|
||||
value: 0
|
||||
objectReference: {fileID: 0}
|
||||
- target: {fileID: 8631885451795898585, guid: 638b7f7423db411419568d073208d929, type: 3}
|
||||
propertyPath: m_AnchoredPosition.y
|
||||
value: -91.81842
|
||||
value: 0
|
||||
objectReference: {fileID: 0}
|
||||
- target: {fileID: 8631885451795898585, guid: 638b7f7423db411419568d073208d929, type: 3}
|
||||
propertyPath: m_LocalEulerAnglesHint.x
|
||||
@ -40297,7 +40303,7 @@ GameObject:
|
||||
m_Icon: {fileID: 0}
|
||||
m_NavMeshLayer: 0
|
||||
m_StaticEditorFlags: 0
|
||||
m_IsActive: 1
|
||||
m_IsActive: 0
|
||||
--- !u!4 &535772947
|
||||
Transform:
|
||||
m_ObjectHideFlags: 0
|
||||
@ -40642,6 +40648,8 @@ MonoBehaviour:
|
||||
m_Script: {fileID: 11500000, guid: fc4ace221bc630d49ad2cfc1a43e80f4, type: 3}
|
||||
m_Name:
|
||||
m_EditorClassIdentifier:
|
||||
RoomId: 0
|
||||
RoomName: {fileID: 0}
|
||||
fishManPrefab: {fileID: 5560367099341029388, guid: 8bf6b1147db02644fbbd63d4c325af7f, type: 3}
|
||||
listItem: []
|
||||
startPos: {fileID: 508918677}
|
||||
@ -56580,7 +56588,7 @@ PrefabInstance:
|
||||
objectReference: {fileID: 0}
|
||||
- target: {fileID: 3229315116778200709, guid: c5e8245d9cbdb3e4087ffdb8a6161e5a, type: 3}
|
||||
propertyPath: m_AnchorMax.y
|
||||
value: 1
|
||||
value: 0
|
||||
objectReference: {fileID: 0}
|
||||
- target: {fileID: 3229315116778200709, guid: c5e8245d9cbdb3e4087ffdb8a6161e5a, type: 3}
|
||||
propertyPath: m_AnchorMin.x
|
||||
@ -56588,7 +56596,7 @@ PrefabInstance:
|
||||
objectReference: {fileID: 0}
|
||||
- target: {fileID: 3229315116778200709, guid: c5e8245d9cbdb3e4087ffdb8a6161e5a, type: 3}
|
||||
propertyPath: m_AnchorMin.y
|
||||
value: 1
|
||||
value: 0
|
||||
objectReference: {fileID: 0}
|
||||
- target: {fileID: 3229315116778200709, guid: c5e8245d9cbdb3e4087ffdb8a6161e5a, type: 3}
|
||||
propertyPath: m_SizeDelta.x
|
||||
@ -56628,11 +56636,11 @@ PrefabInstance:
|
||||
objectReference: {fileID: 0}
|
||||
- target: {fileID: 3229315116778200709, guid: c5e8245d9cbdb3e4087ffdb8a6161e5a, type: 3}
|
||||
propertyPath: m_AnchoredPosition.x
|
||||
value: -182.82126
|
||||
value: 0
|
||||
objectReference: {fileID: 0}
|
||||
- target: {fileID: 3229315116778200709, guid: c5e8245d9cbdb3e4087ffdb8a6161e5a, type: 3}
|
||||
propertyPath: m_AnchoredPosition.y
|
||||
value: -402.28784
|
||||
value: 0
|
||||
objectReference: {fileID: 0}
|
||||
- target: {fileID: 3229315116778200709, guid: c5e8245d9cbdb3e4087ffdb8a6161e5a, type: 3}
|
||||
propertyPath: m_LocalEulerAnglesHint.x
|
||||
@ -65131,13 +65139,14 @@ GameObject:
|
||||
serializedVersion: 6
|
||||
m_Component:
|
||||
- component: {fileID: 892924930}
|
||||
- component: {fileID: 892924931}
|
||||
m_Layer: 0
|
||||
m_Name: Scene_jinbikuang
|
||||
m_TagString: Untagged
|
||||
m_Icon: {fileID: 0}
|
||||
m_NavMeshLayer: 0
|
||||
m_StaticEditorFlags: 0
|
||||
m_IsActive: 0
|
||||
m_IsActive: 1
|
||||
--- !u!4 &892924930
|
||||
Transform:
|
||||
m_ObjectHideFlags: 0
|
||||
@ -65155,6 +65164,24 @@ Transform:
|
||||
m_Father: {fileID: 0}
|
||||
m_RootOrder: 12
|
||||
m_LocalEulerAnglesHint: {x: 0, y: 0, z: 0}
|
||||
--- !u!114 &892924931
|
||||
MonoBehaviour:
|
||||
m_ObjectHideFlags: 0
|
||||
m_CorrespondingSourceObject: {fileID: 0}
|
||||
m_PrefabInstance: {fileID: 0}
|
||||
m_PrefabAsset: {fileID: 0}
|
||||
m_GameObject: {fileID: 892924929}
|
||||
m_Enabled: 1
|
||||
m_EditorHideFlags: 0
|
||||
m_Script: {fileID: 11500000, guid: 9fac8a7a3343db14b96373ef1ef9cd46, type: 3}
|
||||
m_Name:
|
||||
m_EditorClassIdentifier:
|
||||
lands:
|
||||
- {fileID: 390984964}
|
||||
- {fileID: 538483214}
|
||||
- {fileID: 1921553433}
|
||||
- {fileID: 1676680139}
|
||||
- {fileID: 41060956}
|
||||
--- !u!1 &898522364
|
||||
GameObject:
|
||||
m_ObjectHideFlags: 0
|
||||
@ -70610,6 +70637,8 @@ MonoBehaviour:
|
||||
m_Script: {fileID: 11500000, guid: 195502a56cff5614c989db7fabdb604d, type: 3}
|
||||
m_Name:
|
||||
m_EditorClassIdentifier:
|
||||
RoomId: 0
|
||||
daoyuName: {fileID: 1176037959}
|
||||
fishManPrefab: {fileID: 6326838472770711776, guid: 8c814c69c87ffbe4aa847bfc451607bf, type: 3}
|
||||
listItem: []
|
||||
startPos: {fileID: 410861474}
|
||||
@ -83843,6 +83872,7 @@ GameObject:
|
||||
serializedVersion: 6
|
||||
m_Component:
|
||||
- component: {fileID: 1155363692}
|
||||
- component: {fileID: 1155363693}
|
||||
m_Layer: 0
|
||||
m_Name: scene_jingshadao
|
||||
m_TagString: Untagged
|
||||
@ -83867,6 +83897,22 @@ Transform:
|
||||
m_Father: {fileID: 0}
|
||||
m_RootOrder: 11
|
||||
m_LocalEulerAnglesHint: {x: 0, y: 0, z: 0}
|
||||
--- !u!114 &1155363693
|
||||
MonoBehaviour:
|
||||
m_ObjectHideFlags: 0
|
||||
m_CorrespondingSourceObject: {fileID: 0}
|
||||
m_PrefabInstance: {fileID: 0}
|
||||
m_PrefabAsset: {fileID: 0}
|
||||
m_GameObject: {fileID: 1155363691}
|
||||
m_Enabled: 1
|
||||
m_EditorHideFlags: 0
|
||||
m_Script: {fileID: 11500000, guid: 6cf111609f58e9440a2e64b2e75775d5, type: 3}
|
||||
m_Name:
|
||||
m_EditorClassIdentifier:
|
||||
lands:
|
||||
- {fileID: 504391785}
|
||||
- {fileID: 980365146}
|
||||
- {fileID: 1583471194}
|
||||
--- !u!1 &1156662823
|
||||
GameObject:
|
||||
m_ObjectHideFlags: 0
|
||||
@ -90989,7 +91035,7 @@ PrefabInstance:
|
||||
objectReference: {fileID: 0}
|
||||
- target: {fileID: 3229315116778200709, guid: c5e8245d9cbdb3e4087ffdb8a6161e5a, type: 3}
|
||||
propertyPath: m_AnchorMax.y
|
||||
value: 0
|
||||
value: 1
|
||||
objectReference: {fileID: 0}
|
||||
- target: {fileID: 3229315116778200709, guid: c5e8245d9cbdb3e4087ffdb8a6161e5a, type: 3}
|
||||
propertyPath: m_AnchorMin.x
|
||||
@ -90997,7 +91043,7 @@ PrefabInstance:
|
||||
objectReference: {fileID: 0}
|
||||
- target: {fileID: 3229315116778200709, guid: c5e8245d9cbdb3e4087ffdb8a6161e5a, type: 3}
|
||||
propertyPath: m_AnchorMin.y
|
||||
value: 0
|
||||
value: 1
|
||||
objectReference: {fileID: 0}
|
||||
- target: {fileID: 3229315116778200709, guid: c5e8245d9cbdb3e4087ffdb8a6161e5a, type: 3}
|
||||
propertyPath: m_SizeDelta.x
|
||||
@ -91037,11 +91083,11 @@ PrefabInstance:
|
||||
objectReference: {fileID: 0}
|
||||
- target: {fileID: 3229315116778200709, guid: c5e8245d9cbdb3e4087ffdb8a6161e5a, type: 3}
|
||||
propertyPath: m_AnchoredPosition.x
|
||||
value: 0
|
||||
value: 296.47998
|
||||
objectReference: {fileID: 0}
|
||||
- target: {fileID: 3229315116778200709, guid: c5e8245d9cbdb3e4087ffdb8a6161e5a, type: 3}
|
||||
propertyPath: m_AnchoredPosition.y
|
||||
value: 0
|
||||
value: -114.79303
|
||||
objectReference: {fileID: 0}
|
||||
- target: {fileID: 3229315116778200709, guid: c5e8245d9cbdb3e4087ffdb8a6161e5a, type: 3}
|
||||
propertyPath: m_LocalEulerAnglesHint.x
|
||||
@ -107780,19 +107826,19 @@ PrefabInstance:
|
||||
objectReference: {fileID: 21300000, guid: 3987eea29d3d1e74c9b5a8917835d83e, type: 3}
|
||||
- target: {fileID: 4284489241791779464, guid: cb107975b9c5d0340b2b96ff946e1b93, type: 3}
|
||||
propertyPath: m_AnchorMax.y
|
||||
value: 1
|
||||
value: 0
|
||||
objectReference: {fileID: 0}
|
||||
- target: {fileID: 4284489241791779464, guid: cb107975b9c5d0340b2b96ff946e1b93, type: 3}
|
||||
propertyPath: m_AnchorMin.y
|
||||
value: 1
|
||||
value: 0
|
||||
objectReference: {fileID: 0}
|
||||
- target: {fileID: 4284489241791779464, guid: cb107975b9c5d0340b2b96ff946e1b93, type: 3}
|
||||
propertyPath: m_AnchoredPosition.x
|
||||
value: 284
|
||||
value: 0
|
||||
objectReference: {fileID: 0}
|
||||
- target: {fileID: 4284489241791779464, guid: cb107975b9c5d0340b2b96ff946e1b93, type: 3}
|
||||
propertyPath: m_AnchoredPosition.y
|
||||
value: -43
|
||||
value: 0
|
||||
objectReference: {fileID: 0}
|
||||
- target: {fileID: 4284489241791779467, guid: cb107975b9c5d0340b2b96ff946e1b93, type: 3}
|
||||
propertyPath: m_IsActive
|
||||
@ -107804,19 +107850,19 @@ PrefabInstance:
|
||||
objectReference: {fileID: 0}
|
||||
- target: {fileID: 4284489241841894086, guid: cb107975b9c5d0340b2b96ff946e1b93, type: 3}
|
||||
propertyPath: m_AnchorMax.y
|
||||
value: 1
|
||||
value: 0
|
||||
objectReference: {fileID: 0}
|
||||
- target: {fileID: 4284489241841894086, guid: cb107975b9c5d0340b2b96ff946e1b93, type: 3}
|
||||
propertyPath: m_AnchorMin.y
|
||||
value: 1
|
||||
value: 0
|
||||
objectReference: {fileID: 0}
|
||||
- target: {fileID: 4284489241841894086, guid: cb107975b9c5d0340b2b96ff946e1b93, type: 3}
|
||||
propertyPath: m_AnchoredPosition.x
|
||||
value: 428
|
||||
value: 0
|
||||
objectReference: {fileID: 0}
|
||||
- target: {fileID: 4284489241841894086, guid: cb107975b9c5d0340b2b96ff946e1b93, type: 3}
|
||||
propertyPath: m_AnchoredPosition.y
|
||||
value: -43
|
||||
value: 0
|
||||
objectReference: {fileID: 0}
|
||||
- target: {fileID: 4284489242025471100, guid: cb107975b9c5d0340b2b96ff946e1b93, type: 3}
|
||||
propertyPath: m_IsActive
|
||||
@ -115777,6 +115823,8 @@ MonoBehaviour:
|
||||
m_Script: {fileID: 11500000, guid: 195502a56cff5614c989db7fabdb604d, type: 3}
|
||||
m_Name:
|
||||
m_EditorClassIdentifier:
|
||||
RoomId: 0
|
||||
daoyuName: {fileID: 1856976716}
|
||||
fishManPrefab: {fileID: 6326838472770711776, guid: 67218d0ec54507a40af9588f6bea520c, type: 3}
|
||||
listItem: []
|
||||
startPos: {fileID: 637223391}
|
||||
@ -122512,6 +122560,8 @@ MonoBehaviour:
|
||||
m_Script: {fileID: 11500000, guid: fc4ace221bc630d49ad2cfc1a43e80f4, type: 3}
|
||||
m_Name:
|
||||
m_EditorClassIdentifier:
|
||||
RoomId: 0
|
||||
RoomName: {fileID: 0}
|
||||
fishManPrefab: {fileID: 5560367099341029388, guid: 30ad8291b0c95fe4183c296aad20b6fd, type: 3}
|
||||
listItem: []
|
||||
startPos: {fileID: 503088120}
|
||||
@ -140123,6 +140173,8 @@ MonoBehaviour:
|
||||
m_Script: {fileID: 11500000, guid: fc4ace221bc630d49ad2cfc1a43e80f4, type: 3}
|
||||
m_Name:
|
||||
m_EditorClassIdentifier:
|
||||
RoomId: 0
|
||||
RoomName: {fileID: 0}
|
||||
fishManPrefab: {fileID: 5560367099341029388, guid: 71e3ccfc7573cc54f93aabc5bc9e041e, type: 3}
|
||||
listItem: []
|
||||
startPos: {fileID: 359696444}
|
||||
@ -153895,7 +153947,7 @@ PrefabInstance:
|
||||
objectReference: {fileID: 0}
|
||||
- target: {fileID: 6720542061045396415, guid: 44f8c7a70b8d4c54983e81548e983557, type: 3}
|
||||
propertyPath: m_AnchorMax.y
|
||||
value: 1
|
||||
value: 0
|
||||
objectReference: {fileID: 0}
|
||||
- target: {fileID: 6720542061045396415, guid: 44f8c7a70b8d4c54983e81548e983557, type: 3}
|
||||
propertyPath: m_AnchorMin.x
|
||||
@ -153903,7 +153955,7 @@ PrefabInstance:
|
||||
objectReference: {fileID: 0}
|
||||
- target: {fileID: 6720542061045396415, guid: 44f8c7a70b8d4c54983e81548e983557, type: 3}
|
||||
propertyPath: m_AnchorMin.y
|
||||
value: 1
|
||||
value: 0
|
||||
objectReference: {fileID: 0}
|
||||
- target: {fileID: 6720542061045396415, guid: 44f8c7a70b8d4c54983e81548e983557, type: 3}
|
||||
propertyPath: m_SizeDelta.x
|
||||
@ -153955,11 +154007,11 @@ PrefabInstance:
|
||||
objectReference: {fileID: 0}
|
||||
- target: {fileID: 6720542061045396415, guid: 44f8c7a70b8d4c54983e81548e983557, type: 3}
|
||||
propertyPath: m_AnchoredPosition.x
|
||||
value: 11.310501
|
||||
value: 0
|
||||
objectReference: {fileID: 0}
|
||||
- target: {fileID: 6720542061045396415, guid: 44f8c7a70b8d4c54983e81548e983557, type: 3}
|
||||
propertyPath: m_AnchoredPosition.y
|
||||
value: -271
|
||||
value: 0
|
||||
objectReference: {fileID: 0}
|
||||
- target: {fileID: 6720542061045396415, guid: 44f8c7a70b8d4c54983e81548e983557, type: 3}
|
||||
propertyPath: m_LocalEulerAnglesHint.x
|
||||
|
@ -1 +1 @@
|
||||
Subproject commit f9085935d5427ccc6ac969d9721c841354f63e43
|
||||
Subproject commit 8fde270423daa41bf2968599462aafe4bac70722
|
40
meng_yao/Assets/script/scene_Main/scene/Scene_jinbikuang.cs
Normal file
40
meng_yao/Assets/script/scene_Main/scene/Scene_jinbikuang.cs
Normal file
@ -0,0 +1,40 @@
|
||||
using System.Collections;
|
||||
using System.Collections.Generic;
|
||||
using UnityEngine;
|
||||
|
||||
public class Scene_jinbikuang : MonoBehaviour
|
||||
{
|
||||
public static Scene_jinbikuang instance;
|
||||
|
||||
public List<GameObject> lands = new List<GameObject>();
|
||||
|
||||
void Awake()
|
||||
{
|
||||
instance = this;
|
||||
}
|
||||
|
||||
void Start()
|
||||
{
|
||||
init();
|
||||
}
|
||||
|
||||
async void init()
|
||||
{
|
||||
List<MinngConfigData> infos = await miner_jiekou.instance.GetMinerInfo(0);
|
||||
|
||||
int index = 0;
|
||||
foreach (MinngConfigData info in infos)
|
||||
{
|
||||
lands[index].GetComponent<roomcontroller>().RoomId = info.Id;
|
||||
//lands[index].GetComponent<roomcontroller>().RoomName.text = info.Name;
|
||||
|
||||
lands[index].GetComponent<roomcontroller>().ActivateValue = info.Price;
|
||||
//lands[index].GetComponent<roomcontroller>().goldNumerTextPro.text = info.Price.ToString("f0");
|
||||
// lands[index].GetComponent<roomcontroller>().shipNumberTextPro.text =
|
||||
// info.ActivateCount.ToString() + "/" + info.ActivateLimit;
|
||||
|
||||
|
||||
index++;
|
||||
}
|
||||
}
|
||||
}
|
@ -0,0 +1,11 @@
|
||||
fileFormatVersion: 2
|
||||
guid: 9fac8a7a3343db14b96373ef1ef9cd46
|
||||
MonoImporter:
|
||||
externalObjects: {}
|
||||
serializedVersion: 2
|
||||
defaultReferences: []
|
||||
executionOrder: 0
|
||||
icon: {instanceID: 0}
|
||||
userData:
|
||||
assetBundleName:
|
||||
assetBundleVariant:
|
40
meng_yao/Assets/script/scene_Main/scene/scene_jingshadao.cs
Normal file
40
meng_yao/Assets/script/scene_Main/scene/scene_jingshadao.cs
Normal file
@ -0,0 +1,40 @@
|
||||
using System.Collections;
|
||||
using System.Collections.Generic;
|
||||
using UnityEngine;
|
||||
|
||||
public class scene_jingshadao : MonoBehaviour
|
||||
{
|
||||
public static scene_jingshadao instance;
|
||||
|
||||
public List<GameObject> lands = new List<GameObject>();
|
||||
|
||||
void Awake()
|
||||
{
|
||||
instance = this;
|
||||
}
|
||||
|
||||
void Start()
|
||||
{
|
||||
init();
|
||||
}
|
||||
|
||||
async void init()
|
||||
{
|
||||
List<MinngConfigData> infos = await miner_jiekou.instance.GetMinerInfo(0);
|
||||
|
||||
int index = 0;
|
||||
foreach (MinngConfigData info in infos)
|
||||
{
|
||||
lands[index].GetComponent<jishadao_contorl>().RoomId = info.Id;
|
||||
lands[index].GetComponent<jishadao_contorl>().daoyuName.text = info.Name;
|
||||
|
||||
lands[index].GetComponent<jishadao_contorl>().ActivateValue = info.Price;
|
||||
lands[index].GetComponent<jishadao_contorl>().goldNumerTextPro.text = info.Price.ToString("f0");
|
||||
lands[index].GetComponent<jishadao_contorl>().shipNumberTextPro.text =
|
||||
info.ActivateCount.ToString() + "/" + info.ActivateLimit;
|
||||
|
||||
|
||||
index++;
|
||||
}
|
||||
}
|
||||
}
|
@ -0,0 +1,11 @@
|
||||
fileFormatVersion: 2
|
||||
guid: 6cf111609f58e9440a2e64b2e75775d5
|
||||
MonoImporter:
|
||||
externalObjects: {}
|
||||
serializedVersion: 2
|
||||
defaultReferences: []
|
||||
executionOrder: 0
|
||||
icon: {instanceID: 0}
|
||||
userData:
|
||||
assetBundleName:
|
||||
assetBundleVariant:
|
@ -8,7 +8,12 @@ using System.Threading.Tasks;
|
||||
|
||||
public class roomcontroller : MonoBehaviour
|
||||
{
|
||||
|
||||
[Header("id")]
|
||||
public int RoomId;
|
||||
|
||||
public Text RoomName;
|
||||
|
||||
|
||||
[Header("精灵的预制体")]
|
||||
public GameObject fishManPrefab;
|
||||
[Header("购买的精灵数据")]
|
||||
@ -122,7 +127,7 @@ public class roomcontroller : MonoBehaviour
|
||||
}
|
||||
}
|
||||
|
||||
public void OnClick()
|
||||
public async void OnClick()
|
||||
{
|
||||
|
||||
if (!canClick)
|
||||
@ -130,13 +135,24 @@ public class roomcontroller : MonoBehaviour
|
||||
return;
|
||||
}
|
||||
|
||||
if (fishMan == null)
|
||||
Debug.Log("OnClick");
|
||||
|
||||
if (await ActivationRoom())
|
||||
{
|
||||
Promptmgr.Instance.PromptBubble("还没有买精灵!", Color.black, Color.red);
|
||||
return;
|
||||
if (fishMan == null)
|
||||
{
|
||||
Promptmgr.Instance.PromptBubble("还没有买", Color.black, Color.red);
|
||||
return;
|
||||
}
|
||||
Promptmgr.Instance.PromptBubble("激活成功");
|
||||
add_fish();
|
||||
}
|
||||
else
|
||||
{
|
||||
Promptmgr.Instance.PromptBubble("激活失败");
|
||||
}
|
||||
|
||||
add_fish();
|
||||
|
||||
|
||||
}
|
||||
public void add_fish(string timerStr = null)//生成船只
|
||||
@ -180,24 +196,10 @@ public class roomcontroller : MonoBehaviour
|
||||
}
|
||||
|
||||
|
||||
//使用代金卷
|
||||
async void UseShip()
|
||||
public async Task<bool> ActivationRoom()
|
||||
{
|
||||
Use use = new Use(); // 使用渔夫
|
||||
use.Id = listItem[0].Id;
|
||||
string rect = await web.SendRequest(web.URL + "/Voucher/Use", "POST", JsonUtility.ToJson(use));
|
||||
Res res = JsonUtility.FromJson<ids>(rect);
|
||||
if (res.ErrorCode == 0)
|
||||
{
|
||||
Promptmgr.Instance.PromptBubble("使用成功", Color.black, Color.blue);
|
||||
}
|
||||
else
|
||||
{
|
||||
Promptmgr.Instance.PromptBubble(res.ErrorMessage, Color.black, Color.red);
|
||||
}
|
||||
return await miner_jiekou.instance.MiningActivate(this.RoomId);
|
||||
|
||||
}
|
||||
|
||||
|
||||
|
||||
|
||||
}
|
||||
|
@ -4,9 +4,15 @@ using UnityEngine;
|
||||
using UnityEngine.UI;
|
||||
using DG.Tweening;
|
||||
using TMPro;
|
||||
using System.Threading.Tasks;
|
||||
|
||||
public class jishadao_contorl : MonoBehaviour
|
||||
{
|
||||
[Header("id")]
|
||||
public int RoomId;
|
||||
|
||||
public Text daoyuName;
|
||||
|
||||
[Header("渔船的预制体")]
|
||||
public GameObject fishManPrefab;
|
||||
[Header("购买的渔船数据")]
|
||||
@ -129,16 +135,31 @@ public class jishadao_contorl : MonoBehaviour
|
||||
}
|
||||
}
|
||||
|
||||
public void OnClick()
|
||||
public async void OnClick()
|
||||
{
|
||||
|
||||
if (!canClick)
|
||||
{
|
||||
return;
|
||||
}
|
||||
|
||||
|
||||
ScaleAni(OnBtnAni);
|
||||
|
||||
if (await ActivationRoom())
|
||||
{
|
||||
if (fishMan == null)
|
||||
{
|
||||
Promptmgr.Instance.PromptBubble("»¹Ã»ÓÐÂò´¬ÁË", Color.black, Color.red);
|
||||
return;
|
||||
}
|
||||
ScaleAni(OnBtnAni);
|
||||
add_fish();
|
||||
}
|
||||
else
|
||||
{
|
||||
Promptmgr.Instance.PromptBubble("¼¤»îʧ°Ü");
|
||||
}
|
||||
|
||||
/*ScaleAni(OnBtnAni);
|
||||
|
||||
|
||||
if (fishMan == null)
|
||||
@ -147,7 +168,7 @@ public class jishadao_contorl : MonoBehaviour
|
||||
return;
|
||||
}
|
||||
|
||||
add_fish();
|
||||
add_fish();*/
|
||||
|
||||
}
|
||||
public void add_fish(string timerStr = null)//生成船只
|
||||
@ -287,20 +308,9 @@ public class jishadao_contorl : MonoBehaviour
|
||||
}
|
||||
|
||||
|
||||
//使用代金卷
|
||||
async void UseShip()
|
||||
public async Task<bool> ActivationRoom()
|
||||
{
|
||||
Use use = new Use(); // 使用渔夫
|
||||
use.Id = listItem[0].Id;
|
||||
string rect = await web.SendRequest(web.URL + "/Voucher/Use", "POST", JsonUtility.ToJson(use));
|
||||
Res res = JsonUtility.FromJson<ids>(rect);
|
||||
if (res.ErrorCode == 0)
|
||||
{
|
||||
Promptmgr.Instance.PromptBubble("使用成功", Color.black, Color.blue);
|
||||
}
|
||||
else
|
||||
{
|
||||
Promptmgr.Instance.PromptBubble(res.ErrorMessage, Color.black, Color.red);
|
||||
}
|
||||
return await miner_jiekou.instance.MiningActivate(this.RoomId);
|
||||
|
||||
}
|
||||
}
|
||||
|
Loading…
Reference in New Issue
Block a user