This commit is contained in:
liuliang 2025-01-08 19:59:32 +08:00
commit 360d73a7ef
4 changed files with 29 additions and 8 deletions

View File

@ -366,7 +366,7 @@
}, },
"S_2": { "S_2": {
"1": { "1": {
"numberOfBullets": 0.25, "numberOfBullets": 2,
"SkillList": [ "SkillList": [
"0" "0"
] ]

View File

@ -4372,6 +4372,7 @@ GameObject:
- component: {fileID: 1337722729} - component: {fileID: 1337722729}
- component: {fileID: 1337722730} - component: {fileID: 1337722730}
- component: {fileID: 1337722731} - component: {fileID: 1337722731}
- component: {fileID: 1337722732}
m_Layer: 0 m_Layer: 0
m_Name: ReadJson m_Name: ReadJson
m_TagString: Untagged m_TagString: Untagged
@ -4427,6 +4428,20 @@ MonoBehaviour:
description: description:
MapLevelJson: {fileID: 4900000, guid: b534002cbb7fddf4bb68f34fb1357ff3, type: 3} MapLevelJson: {fileID: 4900000, guid: b534002cbb7fddf4bb68f34fb1357ff3, type: 3}
count: 0 count: 0
--- !u!114 &1337722732
MonoBehaviour:
m_ObjectHideFlags: 0
m_CorrespondingSourceObject: {fileID: 0}
m_PrefabInstance: {fileID: 0}
m_PrefabAsset: {fileID: 0}
m_GameObject: {fileID: 1337722728}
m_Enabled: 1
m_EditorHideFlags: 0
m_Script: {fileID: 11500000, guid: 39d4d2c40e6ce1e45bb8069dc25b05e8, type: 3}
m_Name:
m_EditorClassIdentifier:
description:
_Json: {fileID: 4900000, guid: 580cfe3a34ab71847870fa8a367f7e93, type: 3}
--- !u!1 &1342038372 --- !u!1 &1342038372
GameObject: GameObject:
m_ObjectHideFlags: 0 m_ObjectHideFlags: 0
@ -5898,6 +5913,8 @@ MonoBehaviour:
SpawnLocations: SpawnLocations:
- {fileID: 734893407} - {fileID: 734893407}
enemysList: [] enemysList: []
MengYaoList: []
SortList: []
--- !u!1 &1910338484 --- !u!1 &1910338484
GameObject: GameObject:
m_ObjectHideFlags: 0 m_ObjectHideFlags: 0

View File

@ -92,14 +92,14 @@ public class SkillUp : Fun
private void Awake() private void Awake()
{ {
//description = "更新后的萌耀使用方法xxxxxxxx"; description = "更新后的萌妖使用方法xxxxxxxx";
} }
public void Up(string mengyao_id,string skill_id,string level) public void Up(string mengyao_id,string skill_id,string level)
{ {
Debug.LogError(GlobalObj.GetComponent<Mengyao_Skill_Date>().parsedData.Count);
SkillLevelData info = GlobalObj.GetComponent<Mengyao_Skill_Date>().parsedData[mengyao_id][skill_id][level]; SkillLevelData info = Mengyao_Skill_Date.instance.parsedData[mengyao_id][skill_id][level];
//攻击范围加成 //攻击范围加成
AttackRange += info.Range; AttackRange += info.Range;
Debug.Log("攻击范围+"+ info.Range +"||"+ attackRange.ToString()+"================================="); Debug.Log("攻击范围+"+ info.Range +"||"+ attackRange.ToString()+"=================================");

View File

@ -6,19 +6,23 @@ using UnityEngine;
public class Mengyao_Skill_Date : JsonReadBase public class Mengyao_Skill_Date : JsonReadBase
{ {
public static Mengyao_Skill_Date instance;
public TextAsset _Json; public TextAsset _Json;
public Dictionary<string, Dictionary<string, Dictionary<string, SkillLevelData>>> parsedData; public Dictionary<string, Dictionary<string, Dictionary<string, SkillLevelData>>> parsedData;
void Awake() void Awake()
{ {
instance = this;
// 解析 JSON 数据 // 解析 JSON 数据
//parsedData = JsonConvert.DeserializeObject<Dictionary<string, Dictionary<string, Dictionary<string, SkillLevelData>>>>(_Json.text.Trim()); parsedData = JsonConvert.DeserializeObject<Dictionary<string, Dictionary<string, Dictionary<string, SkillLevelData>>>>(_Json.text.Trim());
Debug.LogError("解析 JSON 数据成功");
} }
void Start() void Start()
{ {
// 解析 JSON 数据 // 解析 JSON 数据
parsedData = JsonConvert.DeserializeObject<Dictionary<string, Dictionary<string, Dictionary<string, SkillLevelData>>>>(_Json.text.Trim()); //parsedData = JsonConvert.DeserializeObject<Dictionary<string, Dictionary<string, Dictionary<string, SkillLevelData>>>>(_Json.text.Trim());
} }
} }
@ -32,7 +36,7 @@ public class SkillLevelData
public float AttackCooldown = 0; //攻击冷却 public float AttackCooldown = 0; //攻击冷却
public float AttackContinues = 0; //攻击持续 public float AttackContinues = 0; //攻击持续
public int numberOfBullets = 0;//攻击子弹数量加成 public int numberOfBullets = 0;//攻击子弹数量加成
public int speedOfBullets = 0;//攻击子弹速度加成 public float speedOfBullets = 0;//攻击子弹速度加成
public float CriticalRate = 0;//暴击率倍率加成 public float CriticalRate = 0;//暴击率倍率加成
public float CriticalDamage = 0;//暴击伤害倍率加成 public float CriticalDamage = 0;//暴击伤害倍率加成