コード例 #1
0
        public static string ActionToString(UCGameplayAction action, TeamGameplayModel teamModel)
        {
            UCPlayer player = action.PlayerId > 0 ? teamModel.Players.SingleOrDefault(i => i.Id == action.PlayerId) : null;

            return(string.Format("Q{5} <strong>{0}</strong> {1} ({2})... {3}-{4}",
                                 action.GameTime.ToString("mm:ss"),
                                 GameAction.GetAction(action.ActionCode).Text,
                                 player == null ? "" : string.Format("{0} {1}. {2}", player.PlayerNumber, player.FirstName.Substring(0, 1), player.LastName),
                                 action.TeamScore1,
                                 action.TeamScore2,
                                 action.Quarter
                                 ));
        }
コード例 #2
0
 public PlayerGameplayModel(TeamGameplayModel teamModel, UCPlayer player)
 {
     TeamModel = teamModel;
     PlayerId  = player.Id;
 }