"Incrementing" a value on a model
If I have a private int _damage on a model, and then I do the following code:
public void AddDamageToModel(int damage)
{
SetDamage(model.damage + damage);
}
public void SetDamage(int damage)
{
model.damage = damage;
}
And multiple clients call this function. What happens? Will it sequentially increment without overriding each other?
public void AddDamageToModel(int damage)
{
SetDamage(model.damage + damage);
}
public void SetDamage(int damage)
{
model.damage = damage;
}
And multiple clients call this function. What happens? Will it sequentially increment without overriding each other?