Status icons, skill/character refactoring

This commit is contained in:
Regalis
2015-09-25 12:42:42 +03:00
parent bf7619bcc4
commit 3587b4a4bb
20 changed files with 483 additions and 188 deletions
+2 -26
View File
@@ -7,28 +7,6 @@ using System.Xml.Linq;
namespace Subsurface
{
class Skill
{
string name;
int level;
public string Name
{
get { return name; }
}
public int Level
{
get { return level; }
}
public Skill(string name, int level)
{
this.name = name;
this.level = level;
}
}
class Job
{
@@ -76,11 +54,9 @@ namespace Subsurface
prefab = jobPrefab;
skills = new Dictionary<string, Skill>();
foreach (KeyValuePair<string, Vector2> skill in prefab.Skills)
foreach (SkillPrefab skillPrefab in prefab.Skills)
{
skills.Add(
skill.Key,
new Skill( skill.Key, (int)Rand.Range(skill.Value.X, skill.Value.Y, false)));
skills.Add(skillPrefab.Name, new Skill(skillPrefab));
}
}