public void showSkill(int n) { skillObj skl = SkillManager.instance.idToSkillObj[n]; nameTxt.text = skl.name; explTxt.text = skl.expln; }
SkillManager() { SkillcdList.Clear(); skillObj sk1 = new skillObj(0, "放炸弹", "在原地放一个炸弹,不会伤害到玩家", ""); skillObj sk2 = new skillObj(1, "放炸弹2", "在原地放一个炸弹,不会伤害到玩家2", ""); skillObj sk3 = new skillObj(2, "放炸弹3", "在原地放一个炸弹,不会伤害到玩家3", ""); idToSkillObj.Add(sk1.id, sk1); idToSkillObj.Add(sk2.id, sk2); idToSkillObj.Add(sk3.id, sk3); SkillBase sb = new Skill_1(); idToSkillBase.Add(sb.getSkillId(), sb); }