public StatInstance this[StatIdentifier identifier] { get { if (Stats == null) { return(null); } return(Stats[identifier]); } }
public StatTemplate this[StatIdentifier identifier] { get { if (Stats == null) { return(null); } return(Stats[identifier]); } }
public StatInstance this[StatIdentifier identifier] { get { if (Stats == null) { return(null); } if (!Stats.TryGetValue(identifier, out var instance)) { var template = traitContext.Stats[identifier]; instance = template.CreateInstance(identifier); Stats.Add(identifier, instance); } return(instance); } }