Exemplo n.º 1
0
 /// <summary>
 /// Converts a given line to an <see cref="Action"/> of type actionType.
 /// </summary>
 /// <param name="line"></param>
 /// <param name="actionType"></param>
 /// <param name="actionText"></param>
 /// <returns></returns>
 public Action StringToAction(string line, GameSystem.ActionEnum actionType, string actionText, Game game)
 {
     string param = line.GetTextAfter(actionText).Trim();
     Player target = null;
     if (game != null) target = game.GetPlayer(param, "");
     Action action = new Action(actionType);
     if (target == null) action.Text = param;
     else action.Target = target;
     return action;
 }
Exemplo n.º 2
0
 public Action(GameSystem.ActionEnum actionEnum)
 {
     Type = actionEnum;
 }