Exemplo n.º 1
0
 protected override void GenerateAccessToCustomProperties()
 {
     SetProperties.Add("freezepercentage", SetFreezePercentage);
     SetProperties.Add("freezetime", SetFreezeTime);
     GetProperties.Add("freezepercentage", GetFreezePercentage);
     GetProperties.Add("freezetime", GetFreezeTime);
 }
Exemplo n.º 2
0
 protected override void GenerateAccessToCustomProperties()
 {
     SetProperties.Add("moneytime", SetMoneyTime);
     SetProperties.Add("moneyamount", SetMoneyAmount);
     GetProperties.Add("moneytime", GetMoneyTime);
     GetProperties.Add("moneyamount", GetMoneyAmount);
     GetProperties.Add("moneypersecond", GetMoneyPerSecond);
 }
Exemplo n.º 3
0
        protected override void GenerateAccessToCustomProperties()
        {
            SetProperties.Add("healthtime", SetHealthTime);
            SetProperties.Add("healthamount", SetHealthAmount);

            GetProperties.Add("healthtime", GetHealthTime);
            GetProperties.Add("healthamount", GetHealthAmount);
            GetProperties.Add("healthpersecond", GetHealthPerSecond);
        }
Exemplo n.º 4
0
        protected override void GenerateAccessToCustomProperties()
        {
            SetProperties.Add("poisontime", SetPoisonTime);
            SetProperties.Add("poisonamount", SetPoisonAmount);
            SetProperties.Add("poisoncountertime", SetDotCounterTime);

            GetProperties.Add("poisontime", GetPoisonTime);
            GetProperties.Add("poisonamount", GetPoisonAmount);
            GetProperties.Add("poisoncountertime", GetDotCounterTime);
            GetProperties.Add("damageoverall", GetDamageOverall);
        }
 /// <summary>
 /// Setups the values.
 /// </summary>
 /// <returns>This.</returns>
 public void SetupValues()
 {
     if (GetProperties.Count > 0 || SetProperties.Count > 0)
     {
         return;
     }
     foreach (var Property in TypeCacheFor <TClass> .Properties.Where(x => x.GetIndexParameters().Length == 0))
     {
         var Key = Property.Name.GetHashCode(StringComparison.OrdinalIgnoreCase);
         if (Property.CanRead)
         {
             GetProperties.Add(Key, Property.PropertyGetter <TClass>().Compile());
         }
         if (Property.CanWrite)
         {
             SetProperties.Add(Key, (Property.PropertySetter <TClass, object>()?.Compile()) !);
         }
     }
 }
Exemplo n.º 6
0
 public PropertyContainer()
 {
     foreach (PropertyInfo propertyInfo in typeof(T).GetProperties())
     {
         if (Attribute.IsDefined(propertyInfo, typeof(InversePropertyAttribute)) != true)
         {
             var property = new Property(propertyInfo);
             getter.Add(property.Name, propertyInfo.GetValueGetter <T>());
             setter.Add(property.Name, propertyInfo.GetValueSetter <T>());
             if (property.IsKey)
             {
                 GetProperties.Insert(0, property);
             }
             else
             {
                 GetProperties.Add(property);
             }
         }
     }
     properties = GetProperties.ToDictionary(p => p.Name);
 }
Exemplo n.º 7
0
 protected override void GenerateAccessToCustomProperties()
 {
     SetProperties.Add("shotcostmultiplier", SetShotCostMultiplier);
     GetProperties.Add("shotcostmultiplier", GetShotCostMultiplier);
     GetProperties.Add("costpershot", GetCostPerShot);
 }
Exemplo n.º 8
0
 protected override void GenerateAccessToCustomProperties()
 {
     SetProperties.Add("percentage", SetPercentage);
     GetProperties.Add("percentage", GetPercentage);
 }