public void AddSkill(Skill addedSkill) { int skillID = addedSkill.skillID; //检查重复性 foreach (Skill skill in cardOwnSkill) { if (skill.skillID == skillID) { LogsSystem.Instance.Print("添加失败,该玩家已经有了同样ID的技能" + skillID, LogLevel.WARN); return; } } this.cardOwnSkill.Add(addedSkill); }
private void AddSkill(Skill skill) { this.skillList.Add(skill); }