五张牌!
This commit is contained in:
@@ -72,10 +72,24 @@ namespace Continentis.MainGame
|
||||
current[attributeName] = originalAttribute;
|
||||
}
|
||||
}
|
||||
|
||||
public void ModifyAttribute(string attributeName,
|
||||
|
||||
public void ModifyAttribute(string attributeName,
|
||||
float numericChange, float percentageChangeOfAccumulation, float percentChangeOfMultiplication)
|
||||
{
|
||||
if (!current.ContainsKey(attributeName))
|
||||
{
|
||||
if (attributeName.Contains("Multiplier"))
|
||||
{
|
||||
current[attributeName] = 1f;
|
||||
}
|
||||
else
|
||||
{
|
||||
current[attributeName] = 0f;
|
||||
}
|
||||
|
||||
Debug.Log($"{attributeName} is not found in current attributes, use default value");
|
||||
}
|
||||
|
||||
current[attributeName] += numericChange;
|
||||
current[attributeName] = (1 + percentageChangeOfAccumulation) * current[attributeName];
|
||||
current[attributeName] = percentChangeOfMultiplication * current[attributeName];
|
||||
|
||||
Reference in New Issue
Block a user