Beispiel #1
0
        protected void OutputForExperience(EntityTypeCollection entityTypeCollection, EntityTypeAttributes entityTypeAttributes, StatsSheetSettings.UnitSetting unitSetting = null)
        {
            UnitAttributes unitAttributes = entityTypeAttributes.Get <UnitAttributes>();

            if (unitAttributes == null)
            {
                return;
            }

            using (BeginScope(entityTypeAttributes.Name))
            {
                // Unit Attributes
                Print($"readableName: {unitSetting.readableName}");
                Print($"cu: {unitAttributes.Resource1Cost}");
                Print($"ru: {unitAttributes.Resource2Cost}");
                Print($"time: {unitAttributes.ProductionTime}");
                Print($"pop: {unitAttributes.PopCapCost}");
                Print($"hp: {unitAttributes.MaxHealth}");
                Print($"armor: {unitAttributes.Armour}");
                Print($"sensor: {unitAttributes.SensorRadius}");
                Print($"contact: {unitAttributes.ContactRadius}");
                Print($"xp: {unitAttributes.ExperienceValue}");

                // Experience Attributes
                ExperienceAttributes experience = entityTypeAttributes.Get <ExperienceAttributes>();
                if (experience != null)
                {
                    OutputForExperienceAttributes(experience);
                }
            }
        }
Beispiel #2
0
 protected void OutputForExperienceAttributes(ExperienceAttributes experience)
 {
     using (BeginScope($"experience"))
     {
         for (int i = 0; i < experience.Levels.Length; ++i)
         {
             ExperienceLevelAttributes level = experience.Levels[i];
             using (BeginScope(i.ToString()))
             {
                 Print($"requiredxp: {level.RequiredExperience}");
                 if (level.Buff != null)
                 {
                     using (BeginScope("buffSet"))
                     {
                         OutputForAttributeBuffSet(new AttributeBuffSetWrapper(level.Buff));
                     }
                 }
             }
         }
     }
 }
 public ExperienceAttributesWrapper(ExperienceAttributes other)
 {
     Names  = other.Names;
     Levels = other.Levels?.ToArray();
 }