/// <summary> /// Initializes a new instance of the <see cref="Core.Controllers.Actions.CreateBuilding"/> class. /// </summary> /// <param name="model">action model.</param> public CreateBuilding(Core.Models.ModelEntity model) : base(model) { var action = (Core.Models.Action)Model; var param = action.Parameters; if (param[CREATE_POSITION].GetType() != typeof(PositionI)) { param[CREATE_POSITION] = new Core.Models.PositionI((Newtonsoft.Json.Linq.JContainer)param[CREATE_POSITION]); } }
/// <summary> /// Initializes a new instance of the <see cref="Core.Controllers.Actions.MoveUnit"/> class. /// </summary> /// <param name="model">action model.</param> public MoveUnit(Core.Models.ModelEntity model) : base(model) { var action = (Core.Models.Action)Model; var param = action.Parameters; if (param[START_POSITION].GetType() != typeof(PositionI)) { param[START_POSITION] = new Core.Models.PositionI((Newtonsoft.Json.Linq.JContainer)param[START_POSITION]); } if (param[END_POSITION].GetType() != typeof(PositionI)) { param[END_POSITION] = new Core.Models.PositionI((Newtonsoft.Json.Linq.JContainer)param[END_POSITION]); } }