难度传值修改
This commit is contained in:
parent
e7920a7662
commit
ec305be7cb
@ -25,18 +25,18 @@ RectTransform:
|
|||||||
m_PrefabInstance: {fileID: 0}
|
m_PrefabInstance: {fileID: 0}
|
||||||
m_PrefabAsset: {fileID: 0}
|
m_PrefabAsset: {fileID: 0}
|
||||||
m_GameObject: {fileID: 4498060909466071809}
|
m_GameObject: {fileID: 4498060909466071809}
|
||||||
m_LocalRotation: {x: 0, y: 0, z: 0, w: 1}
|
m_LocalRotation: {x: -0, y: -0, z: -0, w: 1}
|
||||||
m_LocalPosition: {x: 0, y: 0, z: 0}
|
m_LocalPosition: {x: 0, y: 0, z: 0}
|
||||||
m_LocalScale: {x: 1, y: 1, z: 1}
|
m_LocalScale: {x: 1, y: 1, z: 1}
|
||||||
m_ConstrainProportionsScale: 0
|
m_ConstrainProportionsScale: 0
|
||||||
m_Children: []
|
m_Children: []
|
||||||
m_Father: {fileID: 5900002970331946163}
|
m_Father: {fileID: 7531194149634478661}
|
||||||
m_RootOrder: 1
|
m_RootOrder: 0
|
||||||
m_LocalEulerAnglesHint: {x: 0, y: 0, z: 0}
|
m_LocalEulerAnglesHint: {x: 0, y: 0, z: 0}
|
||||||
m_AnchorMin: {x: 0, y: 0}
|
m_AnchorMin: {x: 0, y: 1}
|
||||||
m_AnchorMax: {x: 0, y: 0}
|
m_AnchorMax: {x: 0, y: 1}
|
||||||
m_AnchoredPosition: {x: 0, y: 0}
|
m_AnchoredPosition: {x: 779.9408, y: 21}
|
||||||
m_SizeDelta: {x: 513.89, y: 0}
|
m_SizeDelta: {x: 467.2219, y: 42}
|
||||||
m_Pivot: {x: 0.5, y: 0.5}
|
m_Pivot: {x: 0.5, y: 0.5}
|
||||||
--- !u!222 &7577960020006578146
|
--- !u!222 &7577960020006578146
|
||||||
CanvasRenderer:
|
CanvasRenderer:
|
||||||
@ -76,10 +76,10 @@ MonoBehaviour:
|
|||||||
m_Alignment: 4
|
m_Alignment: 4
|
||||||
m_AlignByGeometry: 0
|
m_AlignByGeometry: 0
|
||||||
m_RichText: 1
|
m_RichText: 1
|
||||||
m_HorizontalOverflow: 0
|
m_HorizontalOverflow: 1
|
||||||
m_VerticalOverflow: 0
|
m_VerticalOverflow: 1
|
||||||
m_LineSpacing: 1
|
m_LineSpacing: 1
|
||||||
m_Text: "\u8FD8\u7F3A\u81F3\u5C111\u540D\u4EC0\u4E48\u4EC0\u4E48\u804C\u4E1A"
|
m_Text: "\u8FD8\u7F3A\u81F3\u5C111\u540D\u533B\u7597\u6551\u62A4"
|
||||||
--- !u!1 &5900002969924403205
|
--- !u!1 &5900002969924403205
|
||||||
GameObject:
|
GameObject:
|
||||||
m_ObjectHideFlags: 0
|
m_ObjectHideFlags: 0
|
||||||
@ -268,7 +268,7 @@ RectTransform:
|
|||||||
m_ConstrainProportionsScale: 0
|
m_ConstrainProportionsScale: 0
|
||||||
m_Children:
|
m_Children:
|
||||||
- {fileID: 5900002970044280994}
|
- {fileID: 5900002970044280994}
|
||||||
- {fileID: 8838300892937481870}
|
- {fileID: 7531194149634478661}
|
||||||
- {fileID: 5900002970821547561}
|
- {fileID: 5900002970821547561}
|
||||||
m_Father: {fileID: 5900002971020626570}
|
m_Father: {fileID: 5900002971020626570}
|
||||||
m_RootOrder: 1
|
m_RootOrder: 1
|
||||||
@ -604,6 +604,7 @@ MonoBehaviour:
|
|||||||
personelPanelText: {fileID: 5900002971283911308}
|
personelPanelText: {fileID: 5900002971283911308}
|
||||||
personelNumText: {fileID: 5900002969924403207}
|
personelNumText: {fileID: 5900002969924403207}
|
||||||
lockText: {fileID: 5757504950814517587}
|
lockText: {fileID: 5757504950814517587}
|
||||||
|
lockBg: {fileID: 8597188645527605400}
|
||||||
personelContent: {fileID: 5900002971599260874}
|
personelContent: {fileID: 5900002971599260874}
|
||||||
personelItem: {fileID: 6026028542083999128, guid: 93710d87e1c578748b4ef94ce0d38198, type: 3}
|
personelItem: {fileID: 6026028542083999128, guid: 93710d87e1c578748b4ef94ce0d38198, type: 3}
|
||||||
firstLablePrefab: {fileID: 0}
|
firstLablePrefab: {fileID: 0}
|
||||||
@ -723,7 +724,7 @@ RectTransform:
|
|||||||
m_LocalEulerAnglesHint: {x: 0, y: 0, z: 0}
|
m_LocalEulerAnglesHint: {x: 0, y: 0, z: 0}
|
||||||
m_AnchorMin: {x: 0, y: 1}
|
m_AnchorMin: {x: 0, y: 1}
|
||||||
m_AnchorMax: {x: 0, y: 1}
|
m_AnchorMax: {x: 0, y: 1}
|
||||||
m_AnchoredPosition: {x: 560.5, y: -109}
|
m_AnchoredPosition: {x: 560.5, y: -44}
|
||||||
m_SizeDelta: {x: 1121, y: 0}
|
m_SizeDelta: {x: 1121, y: 0}
|
||||||
m_Pivot: {x: 0.5, y: 0.5}
|
m_Pivot: {x: 0.5, y: 0.5}
|
||||||
--- !u!114 &5900002971599260725
|
--- !u!114 &5900002971599260725
|
||||||
@ -784,3 +785,80 @@ MonoBehaviour:
|
|||||||
m_FlexibleWidth: -1
|
m_FlexibleWidth: -1
|
||||||
m_FlexibleHeight: -1
|
m_FlexibleHeight: -1
|
||||||
m_LayoutPriority: 1
|
m_LayoutPriority: 1
|
||||||
|
--- !u!1 &8597188645527605400
|
||||||
|
GameObject:
|
||||||
|
m_ObjectHideFlags: 0
|
||||||
|
m_CorrespondingSourceObject: {fileID: 0}
|
||||||
|
m_PrefabInstance: {fileID: 0}
|
||||||
|
m_PrefabAsset: {fileID: 0}
|
||||||
|
serializedVersion: 6
|
||||||
|
m_Component:
|
||||||
|
- component: {fileID: 7531194149634478661}
|
||||||
|
- component: {fileID: 6555106214558057608}
|
||||||
|
- component: {fileID: 7932220027260091179}
|
||||||
|
m_Layer: 5
|
||||||
|
m_Name: lackBg
|
||||||
|
m_TagString: Untagged
|
||||||
|
m_Icon: {fileID: 0}
|
||||||
|
m_NavMeshLayer: 0
|
||||||
|
m_StaticEditorFlags: 0
|
||||||
|
m_IsActive: 1
|
||||||
|
--- !u!224 &7531194149634478661
|
||||||
|
RectTransform:
|
||||||
|
m_ObjectHideFlags: 0
|
||||||
|
m_CorrespondingSourceObject: {fileID: 0}
|
||||||
|
m_PrefabInstance: {fileID: 0}
|
||||||
|
m_PrefabAsset: {fileID: 0}
|
||||||
|
m_GameObject: {fileID: 8597188645527605400}
|
||||||
|
m_LocalRotation: {x: -0, y: -0, z: -0, w: 1}
|
||||||
|
m_LocalPosition: {x: 0, y: 0, z: 0}
|
||||||
|
m_LocalScale: {x: 1, y: 1, z: 1}
|
||||||
|
m_ConstrainProportionsScale: 0
|
||||||
|
m_Children:
|
||||||
|
- {fileID: 8838300892937481870}
|
||||||
|
m_Father: {fileID: 5900002970331946163}
|
||||||
|
m_RootOrder: 1
|
||||||
|
m_LocalEulerAnglesHint: {x: 0, y: 0, z: 0}
|
||||||
|
m_AnchorMin: {x: 0, y: 0}
|
||||||
|
m_AnchorMax: {x: 0, y: 0}
|
||||||
|
m_AnchoredPosition: {x: 0, y: 0}
|
||||||
|
m_SizeDelta: {x: 520.5148, y: 0}
|
||||||
|
m_Pivot: {x: 0.5, y: 0.5}
|
||||||
|
--- !u!222 &6555106214558057608
|
||||||
|
CanvasRenderer:
|
||||||
|
m_ObjectHideFlags: 0
|
||||||
|
m_CorrespondingSourceObject: {fileID: 0}
|
||||||
|
m_PrefabInstance: {fileID: 0}
|
||||||
|
m_PrefabAsset: {fileID: 0}
|
||||||
|
m_GameObject: {fileID: 8597188645527605400}
|
||||||
|
m_CullTransparentMesh: 1
|
||||||
|
--- !u!114 &7932220027260091179
|
||||||
|
MonoBehaviour:
|
||||||
|
m_ObjectHideFlags: 0
|
||||||
|
m_CorrespondingSourceObject: {fileID: 0}
|
||||||
|
m_PrefabInstance: {fileID: 0}
|
||||||
|
m_PrefabAsset: {fileID: 0}
|
||||||
|
m_GameObject: {fileID: 8597188645527605400}
|
||||||
|
m_Enabled: 1
|
||||||
|
m_EditorHideFlags: 0
|
||||||
|
m_Script: {fileID: 11500000, guid: fe87c0e1cc204ed48ad3b37840f39efc, type: 3}
|
||||||
|
m_Name:
|
||||||
|
m_EditorClassIdentifier:
|
||||||
|
m_Material: {fileID: 0}
|
||||||
|
m_Color: {r: 1, g: 1, b: 1, a: 1}
|
||||||
|
m_RaycastTarget: 1
|
||||||
|
m_RaycastPadding: {x: 0, y: 0, z: 0, w: 0}
|
||||||
|
m_Maskable: 1
|
||||||
|
m_OnCullStateChanged:
|
||||||
|
m_PersistentCalls:
|
||||||
|
m_Calls: []
|
||||||
|
m_Sprite: {fileID: 21300000, guid: 4536eccb5b41d62469e251412db57216, type: 3}
|
||||||
|
m_Type: 0
|
||||||
|
m_PreserveAspect: 0
|
||||||
|
m_FillCenter: 1
|
||||||
|
m_FillMethod: 4
|
||||||
|
m_FillAmount: 1
|
||||||
|
m_FillClockwise: 1
|
||||||
|
m_FillOrigin: 0
|
||||||
|
m_UseSpriteMesh: 0
|
||||||
|
m_PixelsPerUnitMultiplier: 1
|
||||||
|
@ -4091,7 +4091,7 @@ PrefabInstance:
|
|||||||
objectReference: {fileID: 0}
|
objectReference: {fileID: 0}
|
||||||
- target: {fileID: 1031840000928267012, guid: f7e3ba3643cbe834083789575336030d, type: 3}
|
- target: {fileID: 1031840000928267012, guid: f7e3ba3643cbe834083789575336030d, type: 3}
|
||||||
propertyPath: m_RootOrder
|
propertyPath: m_RootOrder
|
||||||
value: 3
|
value: 4
|
||||||
objectReference: {fileID: 0}
|
objectReference: {fileID: 0}
|
||||||
- target: {fileID: 1031840000928267012, guid: f7e3ba3643cbe834083789575336030d, type: 3}
|
- target: {fileID: 1031840000928267012, guid: f7e3ba3643cbe834083789575336030d, type: 3}
|
||||||
propertyPath: m_AnchorMax.x
|
propertyPath: m_AnchorMax.x
|
||||||
@ -4891,7 +4891,7 @@ PrefabInstance:
|
|||||||
objectReference: {fileID: 0}
|
objectReference: {fileID: 0}
|
||||||
- target: {fileID: 1031840001719723866, guid: f7e3ba3643cbe834083789575336030d, type: 3}
|
- target: {fileID: 1031840001719723866, guid: f7e3ba3643cbe834083789575336030d, type: 3}
|
||||||
propertyPath: m_AnchoredPosition.x
|
propertyPath: m_AnchoredPosition.x
|
||||||
value: 968.31604
|
value: 963.7986
|
||||||
objectReference: {fileID: 0}
|
objectReference: {fileID: 0}
|
||||||
- target: {fileID: 1031840001719723866, guid: f7e3ba3643cbe834083789575336030d, type: 3}
|
- target: {fileID: 1031840001719723866, guid: f7e3ba3643cbe834083789575336030d, type: 3}
|
||||||
propertyPath: m_AnchoredPosition.y
|
propertyPath: m_AnchoredPosition.y
|
||||||
@ -5519,7 +5519,7 @@ PrefabInstance:
|
|||||||
objectReference: {fileID: 0}
|
objectReference: {fileID: 0}
|
||||||
- target: {fileID: 1031840002484896209, guid: f7e3ba3643cbe834083789575336030d, type: 3}
|
- target: {fileID: 1031840002484896209, guid: f7e3ba3643cbe834083789575336030d, type: 3}
|
||||||
propertyPath: m_AnchoredPosition.x
|
propertyPath: m_AnchoredPosition.x
|
||||||
value: 407.8161
|
value: 137.80115
|
||||||
objectReference: {fileID: 0}
|
objectReference: {fileID: 0}
|
||||||
- target: {fileID: 1031840002484896209, guid: f7e3ba3643cbe834083789575336030d, type: 3}
|
- target: {fileID: 1031840002484896209, guid: f7e3ba3643cbe834083789575336030d, type: 3}
|
||||||
propertyPath: m_AnchoredPosition.y
|
propertyPath: m_AnchoredPosition.y
|
||||||
@ -5729,6 +5729,26 @@ PrefabInstance:
|
|||||||
propertyPath: m_AnchoredPosition.y
|
propertyPath: m_AnchoredPosition.y
|
||||||
value: -17.5
|
value: -17.5
|
||||||
objectReference: {fileID: 0}
|
objectReference: {fileID: 0}
|
||||||
|
- target: {fileID: 3978082958181212982, guid: f7e3ba3643cbe834083789575336030d, type: 3}
|
||||||
|
propertyPath: m_AnchorMax.y
|
||||||
|
value: 1
|
||||||
|
objectReference: {fileID: 0}
|
||||||
|
- target: {fileID: 3978082958181212982, guid: f7e3ba3643cbe834083789575336030d, type: 3}
|
||||||
|
propertyPath: m_AnchorMin.y
|
||||||
|
value: 1
|
||||||
|
objectReference: {fileID: 0}
|
||||||
|
- target: {fileID: 3978082958181212982, guid: f7e3ba3643cbe834083789575336030d, type: 3}
|
||||||
|
propertyPath: m_SizeDelta.y
|
||||||
|
value: 42
|
||||||
|
objectReference: {fileID: 0}
|
||||||
|
- target: {fileID: 3978082958181212982, guid: f7e3ba3643cbe834083789575336030d, type: 3}
|
||||||
|
propertyPath: m_AnchoredPosition.x
|
||||||
|
value: 546.3399
|
||||||
|
objectReference: {fileID: 0}
|
||||||
|
- target: {fileID: 3978082958181212982, guid: f7e3ba3643cbe834083789575336030d, type: 3}
|
||||||
|
propertyPath: m_AnchoredPosition.y
|
||||||
|
value: -21
|
||||||
|
objectReference: {fileID: 0}
|
||||||
m_RemovedComponents: []
|
m_RemovedComponents: []
|
||||||
m_SourcePrefab: {fileID: 100100000, guid: f7e3ba3643cbe834083789575336030d, type: 3}
|
m_SourcePrefab: {fileID: 100100000, guid: f7e3ba3643cbe834083789575336030d, type: 3}
|
||||||
--- !u!224 &856136727 stripped
|
--- !u!224 &856136727 stripped
|
||||||
@ -9176,8 +9196,8 @@ RectTransform:
|
|||||||
- {fileID: 618256459}
|
- {fileID: 618256459}
|
||||||
- {fileID: 7468736064579811971}
|
- {fileID: 7468736064579811971}
|
||||||
- {fileID: 617308872}
|
- {fileID: 617308872}
|
||||||
- {fileID: 856136727}
|
|
||||||
- {fileID: 7318934474885050404}
|
- {fileID: 7318934474885050404}
|
||||||
|
- {fileID: 856136727}
|
||||||
- {fileID: 700683836}
|
- {fileID: 700683836}
|
||||||
m_Father: {fileID: 0}
|
m_Father: {fileID: 0}
|
||||||
m_RootOrder: 2
|
m_RootOrder: 2
|
||||||
@ -13613,7 +13633,7 @@ RectTransform:
|
|||||||
m_Children:
|
m_Children:
|
||||||
- {fileID: 7318934475829044879}
|
- {fileID: 7318934475829044879}
|
||||||
m_Father: {fileID: 1592869153}
|
m_Father: {fileID: 1592869153}
|
||||||
m_RootOrder: 4
|
m_RootOrder: 3
|
||||||
m_LocalEulerAnglesHint: {x: 0, y: 0, z: 0}
|
m_LocalEulerAnglesHint: {x: 0, y: 0, z: 0}
|
||||||
m_AnchorMin: {x: 0, y: 0}
|
m_AnchorMin: {x: 0, y: 0}
|
||||||
m_AnchorMax: {x: 1, y: 1}
|
m_AnchorMax: {x: 1, y: 1}
|
||||||
|
@ -115,27 +115,27 @@ public class Panel : Base
|
|||||||
//动态加载人员
|
//动态加载人员
|
||||||
public async void DynamicLoadingPeople()
|
public async void DynamicLoadingPeople()
|
||||||
{
|
{
|
||||||
//for (int i = 0; i < 10; i++)
|
for (int i = 0; i < 10; i++)
|
||||||
//{
|
|
||||||
// GameObject item = GameObject.Instantiate<GameObject>(peoplePrefab, peopleCountent);
|
|
||||||
// PeopleItem peopleItem = item.GetComponent<PeopleItem>();
|
|
||||||
// peopleItem.nameText.text = "角色1";
|
|
||||||
// peopleItem.peopleId = "0";
|
|
||||||
// Button peoplebutton = item.transform.Find("TextBtn").GetComponent<Button>();
|
|
||||||
// peoplebutton.onClick.AddListener(() => OnPeopleItemClicked(item, Color.yellow, selectedPerson));
|
|
||||||
// peopleList.Add(item);// 将每个实例化的角色添加到列表中
|
|
||||||
//}
|
|
||||||
PlayerListResponse playerListResponse = await userInfo.GetPlayerList();
|
|
||||||
foreach (PlayerListData player in playerListResponse.data)
|
|
||||||
{
|
{
|
||||||
GameObject item = GameObject.Instantiate<GameObject>(peoplePrefab, peopleCountent);
|
GameObject item = GameObject.Instantiate<GameObject>(peoplePrefab, peopleCountent);
|
||||||
PeopleItem peopleItem = item.GetComponent<PeopleItem>();
|
PeopleItem peopleItem = item.GetComponent<PeopleItem>();
|
||||||
peopleItem.nameText.text = player.NickName;
|
peopleItem.nameText.text = "角色1";
|
||||||
peopleItem.peopleId = player.UserId;
|
peopleItem.peopleId = "0";
|
||||||
Button peoplebutton = item.transform.Find("TextBtn").GetComponent<Button>();
|
Button peoplebutton = item.transform.Find("TextBtn").GetComponent<Button>();
|
||||||
peoplebutton.onClick.AddListener(() => OnPeopleItemClicked(item, Color.yellow, selectedPerson));
|
peoplebutton.onClick.AddListener(() => OnPeopleItemClicked(item, Color.yellow, selectedPerson));
|
||||||
peopleList.Add(item);// 将每个实例化的角色添加到列表中
|
peopleList.Add(item);// 将每个实例化的角色添加到列表中
|
||||||
}
|
}
|
||||||
|
//PlayerListResponse playerListResponse = await userInfo.GetPlayerList();
|
||||||
|
//foreach (PlayerListData player in playerListResponse.data)
|
||||||
|
//{
|
||||||
|
// GameObject item = GameObject.Instantiate<GameObject>(peoplePrefab, peopleCountent);
|
||||||
|
// PeopleItem peopleItem = item.GetComponent<PeopleItem>();
|
||||||
|
// peopleItem.nameText.text = player.NickName;
|
||||||
|
// peopleItem.peopleId = player.UserId;
|
||||||
|
// Button peoplebutton = item.transform.Find("TextBtn").GetComponent<Button>();
|
||||||
|
// peoplebutton.onClick.AddListener(() => OnPeopleItemClicked(item, Color.yellow, selectedPerson));
|
||||||
|
// peopleList.Add(item);// 将每个实例化的角色添加到列表中
|
||||||
|
//}
|
||||||
}
|
}
|
||||||
|
|
||||||
//动态加载职责
|
//动态加载职责
|
||||||
|
@ -49,11 +49,17 @@ public class DistributionPanel : MonoBehaviour
|
|||||||
{
|
{
|
||||||
string a=CheckMissingRoles(scene.sceneId);
|
string a=CheckMissingRoles(scene.sceneId);
|
||||||
scenetext.lockText.text = a;
|
scenetext.lockText.text = a;
|
||||||
|
if(a==null)
|
||||||
|
{
|
||||||
|
scenetext.lockBg.SetActive(false);
|
||||||
|
}
|
||||||
|
else
|
||||||
|
{
|
||||||
|
scenetext.lockBg.SetActive(true);
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
public void CreateFirstLable()
|
public void CreateFirstLable()
|
||||||
{
|
{
|
||||||
GameObject fistLable = Instantiate<GameObject>(personnelLable, personnelContent);
|
GameObject fistLable = Instantiate<GameObject>(personnelLable, personnelContent);
|
||||||
@ -62,7 +68,6 @@ public class DistributionPanel : MonoBehaviour
|
|||||||
public string CheckMissingRoles(string sceneID)
|
public string CheckMissingRoles(string sceneID)
|
||||||
{
|
{
|
||||||
List<SelectedInfo> info = null;
|
List<SelectedInfo> info = null;
|
||||||
|
|
||||||
// 遍历字典中的每一个条目
|
// 遍历字典中的每一个条目
|
||||||
foreach (var entry in panel.sceneDataDictionary)
|
foreach (var entry in panel.sceneDataDictionary)
|
||||||
{
|
{
|
||||||
@ -82,41 +87,34 @@ public class DistributionPanel : MonoBehaviour
|
|||||||
break;
|
break;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
if (info != null)
|
if (info != null)
|
||||||
{
|
{
|
||||||
string roleLimit = jsonReader.GetAreaDateById(int.Parse(sceneID)).RoleLimit;
|
string roleLimit = jsonReader.GetAreaDateById(int.Parse(sceneID)).RoleLimit;
|
||||||
string[] sceneLimits = roleLimit.Split('|');
|
string[] sceneLimits = roleLimit.Split('|');
|
||||||
|
|
||||||
// 存储已选择的职业ID集合
|
// 存储已选择的职业ID集合
|
||||||
HashSet<string> selectedDutyIds = new HashSet<string>();
|
HashSet<string> selectedDutyIds = new HashSet<string>();
|
||||||
|
|
||||||
// 遍历所有已选择的角色,提取职业ID
|
// 遍历所有已选择的角色,提取职业ID
|
||||||
foreach (var selectedInfo in info)
|
foreach (var selectedInfo in info)
|
||||||
{
|
{
|
||||||
selectedDutyIds.Add(selectedInfo.dutyId);
|
selectedDutyIds.Add(selectedInfo.dutyId);
|
||||||
}
|
}
|
||||||
|
|
||||||
// 存储缺少的职业ID
|
// 存储缺少的职业ID
|
||||||
List<string> missingDutyIds = new List<string>();
|
List<string> missingDutyIds = new List<string>();
|
||||||
|
|
||||||
// 获取选中的场景和难度ID
|
// 获取选中的场景和难度ID
|
||||||
string selectedSceneId = selectScenePanel.idcidentId.ToString();
|
string selectedSceneId = selectScenePanel.idcidentId.ToString();
|
||||||
string selectedDifficultyId = selectScenePanel.difficultyId.ToString();
|
string selectedDifficultyId = selectScenePanel.difficultyId.ToString();
|
||||||
|
|
||||||
// 遍历每个限制条件,检查是否缺少职业
|
// 遍历每个限制条件,检查是否缺少职业
|
||||||
foreach (var sceneLimit in sceneLimits)
|
foreach (var sceneLimit in sceneLimits)
|
||||||
{
|
{
|
||||||
string[] limit = sceneLimit.Split(',');
|
string[] limit = sceneLimit.Split(',');
|
||||||
|
|
||||||
if (limit.Length == 4)
|
if (limit.Length == 4)
|
||||||
{
|
{
|
||||||
string sceneLimitId = limit[0];
|
string sceneLimitId = limit[0];
|
||||||
string difficultyLimitId = limit[1];
|
string difficultyLimitId = limit[1];
|
||||||
string dutyId = limit[2];
|
string dutyId = limit[2];
|
||||||
|
string dutyNum = limit[3];
|
||||||
// 检查是否符合场景ID和难度ID的条件
|
// 检查是否符合场景ID和难度ID的条件
|
||||||
if (sceneLimitId == selectedSceneId && difficultyLimitId == selectedDifficultyId)
|
if (sceneLimitId == selectedSceneId && difficultyLimitId == selectedDifficultyId&& dutyNum!="-1")
|
||||||
{
|
{
|
||||||
// 检查是否缺少职业
|
// 检查是否缺少职业
|
||||||
if (!selectedDutyIds.Contains(dutyId))
|
if (!selectedDutyIds.Contains(dutyId))
|
||||||
|
@ -65,24 +65,18 @@ public class ManagerPanel : MonoBehaviour
|
|||||||
// 点击项时调用
|
// 点击项时调用
|
||||||
public void OnItemClicked(GameObject clickedItem)
|
public void OnItemClicked(GameObject clickedItem)
|
||||||
{
|
{
|
||||||
// 如果有之前选中的项,恢复其原始大小
|
|
||||||
if (currentSelectedItem != null)
|
if (currentSelectedItem != null)
|
||||||
{
|
{
|
||||||
RectTransform rt = currentSelectedItem.GetComponent<RectTransform>();
|
RectTransform rt = currentSelectedItem.GetComponent<RectTransform>();
|
||||||
rt.localScale = originalScale; // 恢复原始大小
|
rt.localScale = originalScale; // 恢复原始大小
|
||||||
}
|
}
|
||||||
// 记录当前选中项的原始大小
|
|
||||||
RectTransform clickedItemRT = clickedItem.GetComponent<RectTransform>();
|
RectTransform clickedItemRT = clickedItem.GetComponent<RectTransform>();
|
||||||
if (originalScale == Vector3.zero)
|
if (originalScale == Vector3.zero)
|
||||||
{
|
{
|
||||||
originalScale = clickedItemRT.localScale; // 只记录一次原始大小
|
originalScale = clickedItemRT.localScale; // 只记录一次原始大小
|
||||||
}
|
}
|
||||||
// 更新当前选中的项
|
|
||||||
currentSelectedItem = clickedItem;
|
currentSelectedItem = clickedItem;
|
||||||
// 放大当前选中的项
|
|
||||||
clickedItemRT.localScale = originalScale * 1.2f; // 放大1.2倍
|
clickedItemRT.localScale = originalScale * 1.2f; // 放大1.2倍
|
||||||
// 使当前选中的项居中显示
|
|
||||||
//CenterOnItem(clickedItemRT);
|
|
||||||
}
|
}
|
||||||
|
|
||||||
// 使选中的项居中显示
|
// 使选中的项居中显示
|
||||||
|
@ -9,6 +9,7 @@ public class PersonnelPanel : MonoBehaviour
|
|||||||
public Text personelPanelText;
|
public Text personelPanelText;
|
||||||
public Text personelNumText;
|
public Text personelNumText;
|
||||||
public Text lockText;
|
public Text lockText;
|
||||||
|
public GameObject lockBg;
|
||||||
public Transform personelContent;
|
public Transform personelContent;
|
||||||
public GameObject personelItem;
|
public GameObject personelItem;
|
||||||
public GameObject firstLablePrefab;
|
public GameObject firstLablePrefab;
|
||||||
|
@ -413,7 +413,7 @@ public class SelectScenePanel : Base
|
|||||||
DifficultyInfo difficultyInfo = item.GetComponent<DifficultyInfo>();
|
DifficultyInfo difficultyInfo = item.GetComponent<DifficultyInfo>();
|
||||||
this.difficultyId = difficultyInfo.difficulty;
|
this.difficultyId = difficultyInfo.difficulty;
|
||||||
this.difficulty = item.transform.GetComponentInChildren<Text>().text;
|
this.difficulty = item.transform.GetComponentInChildren<Text>().text;
|
||||||
createTemplateInfo.Instance.auth_CreateTemplate.mode = this.difficulty;
|
createTemplateInfo.Instance.auth_CreateTemplate.mode = this.difficultyId.ToString();
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
Loading…
Reference in New Issue
Block a user