private void Start() { if (instance == null) { instance = this; } }
public PlayerDefinition( string userId, string name, CombatStats combatStats, SkillStats skillStats, SkillResources skillResources, Statistics statistics, PlayerAppearanceDefinition appearance, InventoryDefinition inventory) { this.UserId = userId; this.Name = name; this.CombatStats = combatStats ?? new CombatStats(); this.SkillStats = skillStats ?? new SkillStats(); this.SkillResources = skillResources ?? new SkillResources(); this.Statistics = statistics ?? new Statistics(); this.Appearance = appearance; this.Inventory = inventory ?? new InventoryDefinition(null, null); }
public SkillResource(SkillResources resource, int maxValue) { this.resource = resource; this.maxValue = maxValue; }
/// <summary> /// Adds a skill resource to the unit. /// </summary> /// <param name="resource">The skill resource</param> public void AddSkillResource(SkillResources resourceValue, SkillResource resource) { skillResources.Add(resourceValue, resource); }