Beispiel #1
0
        /// <summary>
        /// Converts a PlayerActionHolder to a PlayerAction
        /// </summary>
        /// <param name="actionHolder"></param>
        /// <returns></returns>
        public PlayerAction ConvertToAction(CachedPlayerAction actionHolder)
        {
            Player affectedPlayer = null;
            if (actionHolder.AffectedPlayer != null)
            {
                affectedPlayer = ConvertToPlayer(actionHolder.AffectedPlayer.PlayerId, actionHolder.AffectedPlayer.TeamId);
            }

            PlayerAction convertedAction = new PlayerAction(affectedPlayer, actionHolder.TargetPoint, actionHolder.Type);
            convertedAction.IsActionToGetBall = actionHolder.IsActionToGetBall;

            return convertedAction;
        }
Beispiel #2
0
 public CachedRoundAction(CachedPlayerAction heldAction, CachedPlayer heldPlayer)
 {
     HeldAction = heldAction;
     HeldPlayer = heldPlayer;
 }