技能读取
This commit is contained in:
parent
7f50422c4b
commit
bf50ed51ad
@ -603,7 +603,7 @@ MonoBehaviour:
|
||||
m_Script: {fileID: 11500000, guid: c64989b3a75e1d44e8692a17ba9c22ea, type: 3}
|
||||
m_Name:
|
||||
m_EditorClassIdentifier:
|
||||
mengyaoid: 3
|
||||
mengyaoid: M_H_001
|
||||
--- !u!1 &4784401008393657171
|
||||
GameObject:
|
||||
m_ObjectHideFlags: 0
|
||||
@ -816,7 +816,7 @@ MonoBehaviour:
|
||||
m_Script: {fileID: 11500000, guid: c64989b3a75e1d44e8692a17ba9c22ea, type: 3}
|
||||
m_Name:
|
||||
m_EditorClassIdentifier:
|
||||
mengyaoid: 1
|
||||
mengyaoid: M_M_001
|
||||
--- !u!1 &6630224712762924237
|
||||
GameObject:
|
||||
m_ObjectHideFlags: 0
|
||||
@ -1044,7 +1044,7 @@ MonoBehaviour:
|
||||
m_Script: {fileID: 11500000, guid: c64989b3a75e1d44e8692a17ba9c22ea, type: 3}
|
||||
m_Name:
|
||||
m_EditorClassIdentifier:
|
||||
mengyaoid: 2
|
||||
mengyaoid: M_S_001
|
||||
--- !u!1 &7283252518049257111
|
||||
GameObject:
|
||||
m_ObjectHideFlags: 0
|
||||
|
@ -358,7 +358,7 @@ MonoBehaviour:
|
||||
m_Script: {fileID: 11500000, guid: c64989b3a75e1d44e8692a17ba9c22ea, type: 3}
|
||||
m_Name:
|
||||
m_EditorClassIdentifier:
|
||||
mengyaoid: 3
|
||||
mengyaoid: M_H_001
|
||||
--- !u!1 &1126466392997513758
|
||||
GameObject:
|
||||
m_ObjectHideFlags: 0
|
||||
|
@ -450,7 +450,7 @@ MonoBehaviour:
|
||||
m_Script: {fileID: 11500000, guid: c64989b3a75e1d44e8692a17ba9c22ea, type: 3}
|
||||
m_Name:
|
||||
m_EditorClassIdentifier:
|
||||
mengyaoid: 1
|
||||
mengyaoid: M_M_001
|
||||
--- !u!1 &6655435213110775788
|
||||
GameObject:
|
||||
m_ObjectHideFlags: 0
|
||||
|
@ -285,7 +285,7 @@ MonoBehaviour:
|
||||
m_Script: {fileID: 11500000, guid: c64989b3a75e1d44e8692a17ba9c22ea, type: 3}
|
||||
m_Name:
|
||||
m_EditorClassIdentifier:
|
||||
mengyaoid: 2
|
||||
mengyaoid: M_S_001
|
||||
--- !u!1 &5508436328304430213
|
||||
GameObject:
|
||||
m_ObjectHideFlags: 0
|
||||
|
@ -3554,11 +3554,11 @@ MonoBehaviour:
|
||||
btnObj: {fileID: 1942153352}
|
||||
IconTipObj: {fileID: 0}
|
||||
mengyaoCardDataList:
|
||||
- cardID: 1
|
||||
- cardID: M_M_001
|
||||
cardPrefab: {fileID: 6655435212987556048, guid: 383e65ed01369d345a73d626ab713888, type: 3}
|
||||
- cardID: 2
|
||||
- cardID: M_S_001
|
||||
cardPrefab: {fileID: 5508436327438263543, guid: 12644a2c53bfc72489ad76e8f81628f5, type: 3}
|
||||
- cardID: 3
|
||||
- cardID: M_H_001
|
||||
cardPrefab: {fileID: 1126466392417920613, guid: 0dd4a50e59d08e84fb1439c946c24fdc, type: 3}
|
||||
parentPos: {fileID: 1136445683}
|
||||
scaleUpDuration: 0.5
|
||||
|
@ -1,6 +1,7 @@
|
||||
using DG.Tweening;
|
||||
using System.Collections;
|
||||
using System.Collections.Generic;
|
||||
using Unity.VisualScripting;
|
||||
using UnityEngine;
|
||||
using UnityEngine.UI;
|
||||
|
||||
@ -27,6 +28,9 @@ public class SkillBox : Base
|
||||
public Transform SkillParent;
|
||||
|
||||
public Image ExpFill;
|
||||
|
||||
public Dictionary<string,Role> mengyaoRole=new Dictionary<string,Role>();
|
||||
|
||||
public int ExpNumber
|
||||
{
|
||||
get => expNumber;
|
||||
@ -85,16 +89,29 @@ public class SkillBox : Base
|
||||
|
||||
void InitSkil()
|
||||
{
|
||||
for (int i = 0; i < Base.GlobalObj.GetComponent<gameGlobal>().CarryCardId.Count; i++)
|
||||
|
||||
|
||||
|
||||
foreach (string _mengyaoRole in mengyaoRole.Keys)
|
||||
{
|
||||
GameObject obj = Instantiate(Skill, SkillParent);
|
||||
obj.GetComponent<Skill_Spend>().infobox_skill_up = infobox_skill;
|
||||
obj.GetComponent<Skill_Spend>().MySkill = mengyaoRole[_mengyaoRole].Myskill;
|
||||
}
|
||||
|
||||
|
||||
/*for (int i = 0; i < Base.GlobalObj.GetComponent<gameGlobal>().CarryCardId.Count; i++)
|
||||
{
|
||||
|
||||
|
||||
Base.GlobalObj.GetComponent<gameGlobal>().CarryCardId[i];
|
||||
for (int j = 0; j < 2; j++)
|
||||
{
|
||||
GameObject obj = Instantiate(Skill,SkillParent);
|
||||
obj.GetComponent<Skill_Spend>().infobox_skill_up = infobox_skill;
|
||||
obj.GetComponent<Skill_Spend>().MySkill = MengyaoInfo.Instance.m_SkillData[i].skills[j];
|
||||
}
|
||||
}
|
||||
}*/
|
||||
|
||||
//Base.GlobalObj.GetComponent<gameGlobal>().CarryCardId.Clear();
|
||||
}
|
||||
@ -181,4 +198,9 @@ public class SkillBox : Base
|
||||
});
|
||||
}
|
||||
|
||||
void OnDestroy()
|
||||
{
|
||||
mengyaoRole = null;
|
||||
}
|
||||
|
||||
}
|
||||
|
@ -142,7 +142,6 @@ public class cardBox : MonoBehaviour
|
||||
Debug.LogWarning($"未找到ID为 '{id}' 的萌妖卡预制体!");
|
||||
}
|
||||
}
|
||||
//Base.GlobalObj.GetComponent<gameGlobal>().CarryCardId.Clear();
|
||||
}
|
||||
|
||||
}
|
||||
|
@ -82,6 +82,8 @@ public class cardContorl : MonoBehaviour, IBeginDragHandler, IDragHandler, IEndD
|
||||
{
|
||||
mY.transform.position = mY.GetComponent<cardPlace>().tower.transform.position;
|
||||
|
||||
SkillBox.instance.mengyaoRole.Add(mY.GetComponent<Role>().id,mY.GetComponent<Role>());
|
||||
|
||||
this.enabled = false;
|
||||
cardBox.instance.ChangeInPlaceNumber(1);
|
||||
mask.SetActive(true);
|
||||
|
@ -15,6 +15,7 @@ public class gameGlobal : Base
|
||||
|
||||
public List<string> CarryCardId = new List<string>();
|
||||
|
||||
|
||||
/// <summary>
|
||||
/// ÓÎÏ·³õʼ»¯
|
||||
/// </summary>
|
||||
|
@ -38,7 +38,7 @@ public class Battle_Selection : BaseUI
|
||||
{
|
||||
|
||||
|
||||
await showPanel(_panel);
|
||||
await showPanel(_panel);
|
||||
// 初始化:将所有卡牌添加到萌妖卡列表,并设置其父节点为萌妖卡生成点
|
||||
foreach (Button btn in CardBTN)
|
||||
{
|
||||
@ -71,6 +71,8 @@ public class Battle_Selection : BaseUI
|
||||
foreach (Button go in CarryCard)
|
||||
{
|
||||
Debug.Log(go.gameObject.GetComponent<CardInfo>().mengyaoid);
|
||||
|
||||
|
||||
Base.GlobalObj.GetComponent<gameGlobal>().CarryCardId.Add(go.gameObject.GetComponent<CardInfo>().mengyaoid);
|
||||
}
|
||||
SceneManager.LoadScene(2);
|
||||
|
Loading…
Reference in New Issue
Block a user