本文整理汇总了C#中Skill.SetUp方法的典型用法代码示例。如果您正苦于以下问题:C# Skill.SetUp方法的具体用法?C# Skill.SetUp怎么用?C# Skill.SetUp使用的例子?那么恭喜您, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类Skill
的用法示例。
在下文中一共展示了Skill.SetUp方法的1个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的C#代码示例。
示例1: ChangeSkill
//assign a new skill to the manager (put into the list) return whether the change is successful
public static bool ChangeSkill(Skill skill, int index)
{
if((skill.attack_type != status_manager.weapon_type && skill.attack_type != Skill.AttackType.anytype) || skill.level_req > status_manager.level)
{
return false;
}
//if skill is already there
for(int i = 0; i < 6; ++i)
{
if(skills[i] != null && skills[i].id == skill.id)
{
skills[i].Remove();
skills[i] = null;
StatusGUIManager.EmptySkillIcon(i);
SkillSlotManager.EmptySkill(i);
}
}
if(skills[index] != null)
{
skills[index].Remove();
}
StatusGUIManager.ChangeSkillIcon(index, skill.icon);
SkillSlotManager.AssignSkill(index, skill);
skill.ownership = Skill.Ownership.player;
skill.SetUp(status_manager);
skills[index] = skill;
return true;
}