修bug
This commit is contained in:
parent
73ed00eeeb
commit
a9fdee5432
@ -5,112 +5,67 @@
|
||||
"WaveRewards": 50,
|
||||
"EnemyStatistics": [
|
||||
{
|
||||
"NumberofLevels": 1,
|
||||
"EnemyAttributes": [
|
||||
"type": 1,
|
||||
"enemies": [
|
||||
{
|
||||
"EnemyId": "Enemy001",
|
||||
"EnemyLevel": 2,
|
||||
"IntervalTime": 0,
|
||||
"KillOutput": 3
|
||||
}
|
||||
]
|
||||
"id": "Enemy_002",
|
||||
"level": 1,
|
||||
"health": 0,
|
||||
"damage": 3
|
||||
},
|
||||
{
|
||||
"NumberofLevels": 1,
|
||||
"EnemyAttributes": [
|
||||
{
|
||||
"EnemyId": "Enemy001",
|
||||
"EnemyLevel": 2,
|
||||
"IntervalTime": 500,
|
||||
"KillOutput": 3
|
||||
}
|
||||
]
|
||||
"id": "Enemy_002",
|
||||
"level": 1,
|
||||
"health": 500,
|
||||
"damage": 3
|
||||
},
|
||||
{
|
||||
"NumberofLevels": 1,
|
||||
"EnemyAttributes": [
|
||||
{
|
||||
"EnemyId": "Enemy001",
|
||||
"EnemyLevel": 2,
|
||||
"IntervalTime": 500,
|
||||
"KillOutput": 3
|
||||
}
|
||||
]
|
||||
"id": "Enemy_002",
|
||||
"level": 1,
|
||||
"health": 500,
|
||||
"damage": 3
|
||||
},
|
||||
{
|
||||
"NumberofLevels": 1,
|
||||
"EnemyAttributes": [
|
||||
{
|
||||
"EnemyId": "Enemy001",
|
||||
"EnemyLevel": 2,
|
||||
"IntervalTime": 500,
|
||||
"KillOutput": 3
|
||||
}
|
||||
]
|
||||
"id": "Enemy_002",
|
||||
"level": 1,
|
||||
"health": 500,
|
||||
"damage": 3
|
||||
},
|
||||
{
|
||||
"NumberofLevels": 1,
|
||||
"EnemyAttributes": [
|
||||
{
|
||||
"EnemyId": "Enemy001",
|
||||
"EnemyLevel": 2,
|
||||
"IntervalTime": 500,
|
||||
"KillOutput": 3
|
||||
}
|
||||
]
|
||||
"id": "Enemy_002",
|
||||
"level": 1,
|
||||
"health": 500,
|
||||
"damage": 3
|
||||
},
|
||||
{
|
||||
"NumberofLevels": 1,
|
||||
"EnemyAttributes": [
|
||||
{
|
||||
"EnemyId": "Enemy001",
|
||||
"EnemyLevel": 2,
|
||||
"IntervalTime": 500,
|
||||
"KillOutput": 3
|
||||
}
|
||||
]
|
||||
"id": "Enemy_002",
|
||||
"level": 1,
|
||||
"health": 500,
|
||||
"damage": 3
|
||||
},
|
||||
{
|
||||
"NumberofLevels": 1,
|
||||
"EnemyAttributes": [
|
||||
{
|
||||
"EnemyId": "Enemy001",
|
||||
"EnemyLevel": 2,
|
||||
"IntervalTime": 500,
|
||||
"KillOutput": 3
|
||||
}
|
||||
]
|
||||
"id": "Enemy_002",
|
||||
"level": 1,
|
||||
"health": 500,
|
||||
"damage": 3
|
||||
},
|
||||
{
|
||||
"NumberofLevels": 1,
|
||||
"EnemyAttributes": [
|
||||
{
|
||||
"EnemyId": "Enemy001",
|
||||
"EnemyLevel": 2,
|
||||
"IntervalTime": 500,
|
||||
"KillOutput": 3
|
||||
}
|
||||
]
|
||||
"id": "Enemy_002",
|
||||
"level": 1,
|
||||
"health": 500,
|
||||
"damage": 3
|
||||
},
|
||||
{
|
||||
"NumberofLevels": 1,
|
||||
"EnemyAttributes": [
|
||||
{
|
||||
"EnemyId": "Enemy001",
|
||||
"EnemyLevel": 2,
|
||||
"IntervalTime": 500,
|
||||
"KillOutput": 3
|
||||
}
|
||||
]
|
||||
"id": "Enemy_002",
|
||||
"level": 1,
|
||||
"health": 500,
|
||||
"damage": 3
|
||||
},
|
||||
{
|
||||
"NumberofLevels": 1,
|
||||
"EnemyAttributes": [
|
||||
{
|
||||
"EnemyId": "Enemy001",
|
||||
"EnemyLevel": 2,
|
||||
"IntervalTime": 500,
|
||||
"KillOutput": 3
|
||||
"id": "Enemy_002",
|
||||
"level": 1,
|
||||
"health": 500,
|
||||
"damage": 3
|
||||
}
|
||||
]
|
||||
}
|
||||
|
@ -1,7 +1,6 @@
|
||||
[
|
||||
{
|
||||
"skills": [
|
||||
{
|
||||
"temp_id": 3,
|
||||
"temp_id": "M_H_001",
|
||||
"monster_code": "火萌妖-01",
|
||||
"skills": [
|
||||
{
|
||||
@ -29,9 +28,9 @@
|
||||
]
|
||||
},
|
||||
{
|
||||
"temp_id": 2,
|
||||
"temp_id": "M_S_001",
|
||||
"monster_code": "水萌妖-01",
|
||||
"skillInfo": [
|
||||
"skills": [
|
||||
{
|
||||
"positioning": "快速射出子弹,增加对空伤害",
|
||||
"name": "寒冰子弹",
|
||||
@ -57,7 +56,7 @@
|
||||
]
|
||||
},
|
||||
{
|
||||
"temp_id": 1,
|
||||
"temp_id": "M_M_001",
|
||||
"monster_code": "木萌妖-01",
|
||||
"skills": [
|
||||
{
|
||||
@ -85,4 +84,3 @@
|
||||
]
|
||||
}
|
||||
]
|
||||
}
|
||||
|
@ -1114,10 +1114,10 @@ RectTransform:
|
||||
m_Father: {fileID: 453763628}
|
||||
m_RootOrder: 0
|
||||
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: 1080, y: 0}
|
||||
m_AnchorMin: {x: 0, y: 1}
|
||||
m_AnchorMax: {x: 0, y: 1}
|
||||
m_AnchoredPosition: {x: 540, y: -55}
|
||||
m_SizeDelta: {x: 1080, y: 110}
|
||||
m_Pivot: {x: 0.5, y: 0.5}
|
||||
--- !u!114 &408785965
|
||||
MonoBehaviour:
|
||||
@ -1315,7 +1315,7 @@ GameObject:
|
||||
m_Icon: {fileID: 0}
|
||||
m_NavMeshLayer: 0
|
||||
m_StaticEditorFlags: 0
|
||||
m_IsActive: 1
|
||||
m_IsActive: 0
|
||||
--- !u!224 &453763628
|
||||
RectTransform:
|
||||
m_ObjectHideFlags: 0
|
||||
@ -1336,7 +1336,7 @@ RectTransform:
|
||||
m_AnchorMin: {x: 0.5, y: 0}
|
||||
m_AnchorMax: {x: 0.5, y: 0}
|
||||
m_AnchoredPosition: {x: 0, y: 235.96967}
|
||||
m_SizeDelta: {x: 0, y: 0}
|
||||
m_SizeDelta: {x: 1080, y: 470}
|
||||
m_Pivot: {x: 0.5, y: 0.5}
|
||||
--- !u!114 &453763629
|
||||
MonoBehaviour:
|
||||
@ -1447,7 +1447,7 @@ MonoBehaviour:
|
||||
expNumberText: {fileID: 385770246}
|
||||
maxExpNumber: 20
|
||||
infobox_skill: {fileID: 1801653805}
|
||||
Skill: {fileID: 0}
|
||||
Skill: {fileID: 2105540892551905820, guid: 5ba5240922e49e04cbfd99f42f8c62a4, type: 3}
|
||||
SkillParent: {fileID: 2035101381}
|
||||
ExpFileObj: {fileID: 732537458938328743, guid: 952564c9dd0531e4da92ba005feee1e0, type: 3}
|
||||
ExpFilePrante: {fileID: 9463995}
|
||||
@ -3259,7 +3259,7 @@ GameObject:
|
||||
m_Icon: {fileID: 0}
|
||||
m_NavMeshLayer: 0
|
||||
m_StaticEditorFlags: 0
|
||||
m_IsActive: 0
|
||||
m_IsActive: 1
|
||||
--- !u!224 &1136445683
|
||||
RectTransform:
|
||||
m_ObjectHideFlags: 0
|
||||
@ -4165,7 +4165,6 @@ MonoBehaviour:
|
||||
LevelAsset: {fileID: 4900000, guid: bb3d00dd8f76e124faa356d8394be29a, type: 3}
|
||||
SkillAsset: {fileID: 4900000, guid: a8003fd7bb7ee3f4da293b457be01220, type: 3}
|
||||
m_Level: []
|
||||
m_WaveData: []
|
||||
--- !u!1 &1342038372
|
||||
GameObject:
|
||||
m_ObjectHideFlags: 0
|
||||
@ -5731,10 +5730,10 @@ RectTransform:
|
||||
m_Father: {fileID: 453763628}
|
||||
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: 1080, y: 0}
|
||||
m_AnchorMin: {x: 0, y: 1}
|
||||
m_AnchorMax: {x: 0, y: 1}
|
||||
m_AnchoredPosition: {x: 540, y: -290}
|
||||
m_SizeDelta: {x: 1080, y: 360}
|
||||
m_Pivot: {x: 0.5, y: 0.5}
|
||||
--- !u!114 &2035101382
|
||||
MonoBehaviour:
|
||||
@ -5787,6 +5786,10 @@ PrefabInstance:
|
||||
m_Modification:
|
||||
m_TransformParent: {fileID: 1683495821}
|
||||
m_Modifications:
|
||||
- target: {fileID: 1961437616405254013, guid: 10c7a38d6cf88b248a0faaa9cd1c2ccc, type: 3}
|
||||
propertyPath: minLevelimg
|
||||
value:
|
||||
objectReference: {fileID: 21300000, guid: b2b0cad377a99a04f813365be0e8e33d, type: 3}
|
||||
- target: {fileID: 5585480709271062087, guid: 10c7a38d6cf88b248a0faaa9cd1c2ccc, type: 3}
|
||||
propertyPath: m_AnchorMax.y
|
||||
value: 1
|
||||
|
@ -72,9 +72,13 @@ public class SkillBox : Base
|
||||
for (int i = 0; i < Base.GlobalObj.GetComponent<gameGlobal>().CarryCardId.Count; 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>().SkillID
|
||||
obj.GetComponent<Skill_Spend>().MySkill = MengyaoInfo.Instance.m_SkillData[i].skills[j];
|
||||
}
|
||||
|
||||
|
||||
}
|
||||
|
||||
|
@ -28,12 +28,16 @@ public class Skill_Spend : MonoBehaviour
|
||||
public event Action OnItemsAn;
|
||||
|
||||
public int SkillID;
|
||||
public int skillNumber;
|
||||
|
||||
private int level = 0;
|
||||
public GameObject infobox_skill_up;
|
||||
|
||||
public int levelNumber;
|
||||
public int Maxlevel;
|
||||
|
||||
public Skill MySkill = new Skill();
|
||||
|
||||
// Start is called before the first frame update
|
||||
void Start()
|
||||
{
|
||||
@ -46,14 +50,24 @@ public class Skill_Spend : MonoBehaviour
|
||||
UpgradeBtn.onClick.AddListener(UpgradeClick);
|
||||
}
|
||||
|
||||
|
||||
public void Init()
|
||||
{
|
||||
|
||||
}
|
||||
|
||||
void UpgradeClick()
|
||||
{
|
||||
|
||||
infobox_skill_up.GetComponent<infobox_skill_up>().Skillspend = this;
|
||||
infobox_skill_up.GetComponent<infobox_skill_up>().ShowPanelMessage(SkillID);
|
||||
infobox_skill_up.GetComponent<infobox_skill_up>().SwitchLevel(levelNumber);
|
||||
infobox_skill_up.gameObject.SetActive(true);
|
||||
}
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
void SpendClick()
|
||||
{
|
||||
musk.gameObject.SetActive(false);
|
||||
@ -75,9 +89,5 @@ public class Skill_Spend : MonoBehaviour
|
||||
{
|
||||
OnItemsAn?.Invoke();
|
||||
}
|
||||
|
||||
|
||||
|
||||
|
||||
}
|
||||
}
|
||||
|
@ -16,7 +16,7 @@ public class infobox_skill_up : MonoBehaviour
|
||||
|
||||
public Button UpgradeBtn;
|
||||
public Sprite maxlevelimg;
|
||||
|
||||
public Sprite minLevelimg;
|
||||
|
||||
|
||||
public Skill_Spend Skillspend;
|
||||
@ -24,7 +24,6 @@ public class infobox_skill_up : MonoBehaviour
|
||||
void Start()
|
||||
{
|
||||
UpgradeBtn.onClick.AddListener(UpgradeCLick);
|
||||
|
||||
}
|
||||
|
||||
void UpgradeCLick()
|
||||
@ -33,33 +32,75 @@ public class infobox_skill_up : MonoBehaviour
|
||||
if (Skillspend.levelNumber <Skillspend.Maxlevel && (SkillBox.instance.expList.Count - Skillspend.spendNumber)>=0)
|
||||
{
|
||||
SkillBox.instance.UpdataExp(-Skillspend.spendNumber);
|
||||
LevelText.text = "Lv." + (Skillspend.levelNumber + 1);
|
||||
Debug.Log(LevelText.text);
|
||||
Skillspend.levelNumber++;
|
||||
UpgradeBtn.GetComponent<Image>().sprite = minLevelimg;
|
||||
UpgradeBtn.transform.Find("UpgradText").GetComponent<Text>().text = "Éý¼¶";
|
||||
UpgradeBtn.enabled = true;
|
||||
SwitchLevel(Skillspend.levelNumber);
|
||||
Debug.Log(Skillspend.levelNumber);
|
||||
}
|
||||
else
|
||||
{
|
||||
Debug.Log("战魂不足");
|
||||
}
|
||||
if(Skillspend.levelNumber == Skillspend.Maxlevel)
|
||||
if(Skillspend.levelNumber >= Skillspend.Maxlevel)
|
||||
{
|
||||
Skillspend.levelNumber = Skillspend.Maxlevel;
|
||||
LevelText.text = "Lv." + Skillspend.levelNumber;
|
||||
UpgradeBtn.GetComponent<Image>().sprite = maxlevelimg;
|
||||
UpgradeBtn.transform.Find("UpgradText").GetComponent<Text>().text = "等级已满";
|
||||
UpgradeBtn.enabled = false;
|
||||
SwitchLevel(Skillspend.levelNumber);
|
||||
return;
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
public void ShowPanelMessage(int skillid)
|
||||
void BtnUpdata()
|
||||
{
|
||||
UpgradeBtn.GetComponent<Image>().sprite = minLevelimg;
|
||||
UpgradeBtn.transform.Find("UpgradText").GetComponent<Text>().text = "Éý¼¶";
|
||||
UpgradeBtn.enabled = true;
|
||||
}
|
||||
|
||||
|
||||
public void SwitchLevel(int level)
|
||||
{
|
||||
switch (level)
|
||||
{
|
||||
|
||||
case 0:
|
||||
BtnUpdata();
|
||||
ShowPanelMessage(Skillspend.MySkill.name, (Skillspend.levelNumber+1).ToString(), Skillspend.MySkill.positioning, Skillspend.MySkill.effects.level_1);
|
||||
break;
|
||||
case 1:
|
||||
BtnUpdata();
|
||||
ShowPanelMessage(Skillspend.MySkill.name, (Skillspend.levelNumber+1).ToString(), Skillspend.MySkill.positioning, Skillspend.MySkill.effects.level_2);
|
||||
break;
|
||||
case 2:
|
||||
BtnUpdata();
|
||||
ShowPanelMessage(Skillspend.MySkill.name, (Skillspend.levelNumber + 1).ToString(), Skillspend.MySkill.positioning, Skillspend.MySkill.effects.level_3);
|
||||
break;
|
||||
case 3:
|
||||
BtnUpdata();
|
||||
ShowPanelMessage(Skillspend.MySkill.name, (Skillspend.levelNumber + 1).ToString(), Skillspend.MySkill.positioning, Skillspend.MySkill.effects.level_4);
|
||||
break;
|
||||
case 4:
|
||||
ShowPanelMessage(Skillspend.MySkill.name, (Skillspend.levelNumber + 1).ToString(), Skillspend.MySkill.positioning, Skillspend.MySkill.effects.level_5);
|
||||
break;
|
||||
case 5:
|
||||
ShowPanelMessage(Skillspend.MySkill.name, Skillspend.levelNumber.ToString(), Skillspend.MySkill.positioning, Skillspend.MySkill.effects.level_5);
|
||||
break;
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
public void ShowPanelMessage(string skillname,string levelText,string infptext,string improvement_effect)
|
||||
{
|
||||
//这里将其中的字段设置为从配置表中读取出来的数据
|
||||
|
||||
|
||||
|
||||
SkillName.text = skillname;
|
||||
LevelText.text ="Lv."+levelText;
|
||||
infpText.text = infptext;
|
||||
Improvement_Effect.text =improvement_effect;
|
||||
}
|
||||
|
||||
|
||||
|
@ -14,7 +14,7 @@ public class MengyaoInfo :JsonReadBase
|
||||
public List<Character> m_Name;
|
||||
public List<Level> m_Level;
|
||||
public List<WaveData> m_WaveData;
|
||||
public List<SkillsInfoRoot> m_SkillData;
|
||||
public List<Monster> m_SkillData;
|
||||
public static MengyaoInfo Instance;
|
||||
// Start is called before the first frame update
|
||||
void Awake()
|
||||
@ -30,9 +30,9 @@ public class MengyaoInfo :JsonReadBase
|
||||
m_WaveData = base.LoadJson<WaveData>(m_Asset);
|
||||
base.DisplayData<WaveData>(m_WaveData);
|
||||
|
||||
m_SkillData = base.LoadJson<SkillsInfoRoot>(SkillAsset);
|
||||
Debug.Log(m_SkillData);
|
||||
//base.DisplayData<SkillsInfoRoot>(m_SkillData);
|
||||
m_SkillData = base.LoadJson<Monster>(SkillAsset);
|
||||
// Debug.Log(m_SkillData);
|
||||
base.DisplayData<Monster>(m_SkillData);
|
||||
}
|
||||
|
||||
// Update is called once per frame
|
||||
@ -80,74 +80,51 @@ public class Reward
|
||||
public int RewardNumber { get; set; }
|
||||
}
|
||||
|
||||
[System.Serializable]
|
||||
public class EnemyAttribute
|
||||
|
||||
|
||||
public class Enemy
|
||||
{
|
||||
|
||||
public string EnemyId { get; set; }
|
||||
|
||||
|
||||
public int EnemyLevel { get; set; }
|
||||
|
||||
|
||||
public int IntervalTime { get; set; }
|
||||
|
||||
|
||||
public int KillOutput { get; set; }
|
||||
public string id { get; set; }
|
||||
public int level { get; set; }
|
||||
public int health { get; set; }
|
||||
public int damage { get; set; }
|
||||
}
|
||||
|
||||
[System.Serializable]
|
||||
public class EnemyStatistic
|
||||
public class EnemyStatistics
|
||||
{
|
||||
|
||||
public int NumberOfLevels { get; set; }
|
||||
|
||||
|
||||
public List<EnemyAttribute> EnemyAttributes { get; set; }
|
||||
public int type { get; set; }
|
||||
public List<Enemy> enemies { get; set; }
|
||||
}
|
||||
|
||||
[System.Serializable]
|
||||
public class WaveData
|
||||
{
|
||||
|
||||
public string WaveNumberId { get; set; }
|
||||
|
||||
|
||||
public int AffiliatedWaveNumber { get; set; }
|
||||
|
||||
|
||||
public int WaveRewards { get; set; }
|
||||
|
||||
|
||||
public List<EnemyStatistic> EnemyStatistics { get; set; }
|
||||
public List<EnemyStatistics> EnemyStatistics { get; set; }
|
||||
}
|
||||
|
||||
//---------------------------------------
|
||||
|
||||
|
||||
public class SkillsInfoRoot
|
||||
public class Effects
|
||||
{
|
||||
public List<MonsterSkillInfo> SkillsInfo { get; set; } // 所有技能信息的列表
|
||||
}
|
||||
|
||||
public class MonsterSkillInfo
|
||||
{
|
||||
public string TempId { get; set; } // 临时 ID
|
||||
public string MonsterCode { get; set; } // 怪物代号
|
||||
public List<Skill> Skills { get; set; } // 技能列表
|
||||
public string level_1 { get; set; }
|
||||
public string level_2 { get; set; }
|
||||
public string level_3 { get; set; }
|
||||
public string level_4 { get; set; }
|
||||
public string level_5 { get; set; }
|
||||
}
|
||||
|
||||
public class Skill
|
||||
{
|
||||
public string Positioning { get; set; } // 技能定位
|
||||
public string Name { get; set; } // 技能名称
|
||||
public SkillEffects Effects { get; set; } // 技能效果
|
||||
public string positioning { get; set; }
|
||||
public string name { get; set; }
|
||||
public Effects effects { get; set; }
|
||||
}
|
||||
|
||||
public class SkillEffects
|
||||
public class Monster
|
||||
{
|
||||
public string Level1 { get; set; } // 1级技能效果
|
||||
public string Level2 { get; set; } // 2级技能效果
|
||||
public string Level3 { get; set; } // 3级技能效果
|
||||
public string Level4 { get; set; } // 4级技能效果
|
||||
public string Level5 { get; set; } // 5级技能效果
|
||||
public string temp_id { get; set; }
|
||||
public string monster_code { get; set; }
|
||||
public List<Skill> skills { get; set; }
|
||||
}
|
20
meng_yao/Assets/script/A_Fight/skillItemInfo.cs
Normal file
20
meng_yao/Assets/script/A_Fight/skillItemInfo.cs
Normal file
@ -0,0 +1,20 @@
|
||||
using System.Collections;
|
||||
using System.Collections.Generic;
|
||||
using UnityEngine;
|
||||
|
||||
public class skillItemInfo : MonoBehaviour
|
||||
{
|
||||
|
||||
|
||||
// Start is called before the first frame update
|
||||
void Start()
|
||||
{
|
||||
|
||||
}
|
||||
|
||||
// Update is called once per frame
|
||||
void Update()
|
||||
{
|
||||
|
||||
}
|
||||
}
|
11
meng_yao/Assets/script/A_Fight/skillItemInfo.cs.meta
Normal file
11
meng_yao/Assets/script/A_Fight/skillItemInfo.cs.meta
Normal file
@ -0,0 +1,11 @@
|
||||
fileFormatVersion: 2
|
||||
guid: dc9e1f09bc16eb44393e54af37f3fb47
|
||||
MonoImporter:
|
||||
externalObjects: {}
|
||||
serializedVersion: 2
|
||||
defaultReferences: []
|
||||
executionOrder: 0
|
||||
icon: {instanceID: 0}
|
||||
userData:
|
||||
assetBundleName:
|
||||
assetBundleVariant:
|
Loading…
Reference in New Issue
Block a user