public UpdatesPlayerStatistics(UpdatesPlayerStatisticsInfo info, Actor self) { this.info = info; var valuedInfo = self.Info.TraitInfoOrDefault <ValuedInfo>(); cost = valuedInfo != null ? valuedInfo.Cost : 0; playerStats = self.Owner.PlayerActor.Trait <PlayerStatistics>(); actorName = info.OverrideActor ?? self.Info.Name; }
public UpdatesPlayerStatistics(UpdatesPlayerStatisticsInfo info, Actor self) { this.info = info; if (self.Info.HasTraitInfo <ValuedInfo>()) { cost = self.Info.TraitInfo <ValuedInfo>().Cost; } playerStats = self.Owner.PlayerActor.Trait <PlayerStatistics>(); }