Exemple #1
0
 private void Start()
 {
     if (instance == null)
     {
         instance = this;
     }
 }
Exemple #2
0
 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);
 }
Exemple #3
0
 public SkillResource(SkillResources resource, int maxValue)
 {
     this.resource = resource;
     this.maxValue = maxValue;
 }
Exemple #4
0
 /// <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);
 }