public IHttpActionResult GetDataMovements(MultiDataModel model) { BoardMovement data = JsonConvert.DeserializeObject <BoardMovement>(model.String1); var ListData = _InputOutput.GetDataMovements(data); return(Ok(ListData)); }
void Start() { player = PlayerCharacter.Instance; movement = GetComponent <BoardMovement>(); rigidbody = GetComponent <Rigidbody2D>(); DOVirtual.DelayedCall(0.5f, () => StartCoroutine(LoopOnce())); }
// Update is called once per frame void Update() { GetComponent <RectTransform>().sizeDelta = new Vector2(heatBarFillPercent * 1050 - 525, GetComponent <RectTransform>().sizeDelta.y); heatBarFillPercent -= heatBarDeplete; // Make sure the player slows down as their heat decreases below 5% GameObject go_player = GameObject.FindGameObjectWithTag("Player"); BoardMovement boardMovement = go_player.GetComponent <BoardMovement>(); if (heatBarFillPercent < 0.05F) { boardMovement.heatSpeedMod = Math.Max(heatBarFillPercent / 0.05F, 0); } // Make sure the player speeds up as their heat increases above 50% else if (heatBarFillPercent > 0.50F) { boardMovement.heatSpeedMod = (float)Math.Pow(speedModBase, heatBarFillPercent + 0.5F) - (speedModBase - 1.0F); } // Else, make sure that the speed increase/decrease is non-existent else { boardMovement.heatSpeedMod = 1.0F; } Debug.Log("Speed boost mod: " + boardMovement.heatSpeedMod); }
/// <summary> /// Initialize the controller of the selection /// </summary> void Awake() { select = new Select[2]; move = GetComponent <BoardMovement>(); teamTurn = GetComponent <TeamTurn>(); select[0] = new SelectPawn(selectColor, whatFirstCanSelect, teamTurn); select[1] = new Select(selectColor, whatSecondCanSelect); }
protected void DoMovement(BoardMovement movement) { if (!IsInTurn) { return; } OnMovementDecided?.Invoke(this, movement); }
public ActionResult Filter(BoardMovement data) { Api API = new Api(); Dictionary <string, string> arg = new Dictionary <string, string>() { { "String1", JsonConvert.SerializeObject(data) } }; ViewBag.DataQueryMovement = API.Post <BoardMovement>("ProductWarehouse/GetDataMovements", arg); return(PartialView("_BoardQueryMovementPartial")); }
public BoardMovement GetDataMovements(BoardMovement data) { try { var objData = _InputOutput.GetData(data); return(objData); } catch (Exception) { return(null); } }
public BoardEntity(BoardRenderer boardRenderer) { Alive = true; Name = Id; IsFalling = false; Transform = new Transform(); _board = new Board(new Size(10, 20)); _boardRenderer = boardRenderer; Movement = new BoardMovement(_board); }
public BoardMovement GetData(BoardMovement data) { try { int skip = (data.Index - 1) * data.Take; var query = (from mov in Ctx.Movement // SystemUsers (LEFT JOIN) - i_InsertUserId join sys in Ctx.SystemUser on new { i_InsertUserId = mov.i_InsertUserId } equals new { i_InsertUserId = sys.i_SystemUserId } into sys_join from sys in sys_join.DefaultIfEmpty() // SystemUsers (LEFT JOIN) - i_UpdateUserId join sys2 in Ctx.SystemUser on new { i_UpdateUserId = mov.i_UpdateUserId } equals new { i_UpdateUserId = sys2.i_SystemUserId } into sys2_join from sys2 in sys2_join.DefaultIfEmpty() // Node (LEFT JOIN) - i_UpdateNodeId join nod in Ctx.Node on new { i_UpdateNodeId = mov.i_UpdateNodeId } equals new { i_UpdateNodeId = nod.i_NodeId } into nod_join from nod in nod_join.DefaultIfEmpty() // SystemParameter (INNER JOIN) - i_IsProcessed join syp in Ctx.SystemParameter on new { a = 111, b = mov.i_IsLocallyProcessed.Value } equals new { a = syp.i_GroupId, b = syp.i_ParameterId } // Supplier (LEFT JOIN) - i_SupplierId join sup in Ctx.Supplier on new { a = mov.v_SupplierId } equals new { a = sup.v_SupplierId } into sup_join from sup in sup_join.DefaultIfEmpty() // SystemParameter (INNER JOIN) - i_MovementTypeId join syp2 in Ctx.SystemParameter on new { a = 109, b = mov.i_MovementTypeId.Value } equals new { a = syp2.i_GroupId, b = syp2.i_ParameterId } // SystemParameter (INNER JOIN) - i_MotiveTypeId join syp3 in Ctx.SystemParameter on new { a = 110, b = mov.i_MotiveTypeId.Value } equals new { a = syp3.i_GroupId, b = syp3.i_ParameterId } // Condiciones where mov.v_WarehouseId == data.WarehouseId && (data.MovementType == -1 || mov.i_MovementTypeId == data.MovementType) && (mov.d_Date >= data.StartDate && mov.d_Date <= data.EndDate) // Ordenamiento orderby mov.d_Date descending select new MovementList { v_MovementId = mov.v_MovementId, v_SupplierId = mov.v_SupplierId, v_SupplierName = sup.v_Name, v_IsProcessed = syp.v_Value1, i_ProcessTypeId = mov.i_ProcessTypeId, i_MovementTypeId = mov.i_MovementTypeId, v_MovementTypeDescription = syp2.v_Value1, i_MotiveTypeId = mov.i_MotiveTypeId, v_MotiveTypeDescription = syp3.v_Value1, d_MovementDate = mov.d_Date, r_TotalQuantity = mov.r_TotalQuantity, v_WarehouseId = mov.v_WarehouseId, v_ReferentDocument = mov.v_ReferenceDocument, //v_ProductName = pro.v_Name, v_CreationUser = sys.v_UserName, v_UpdateUser = sys2.v_UserName, d_UpdateDate = mov.d_UpdateDate, v_UpdateNodeName = nod.v_Description }).ToList(); if (data.Take > 0) { query = query.Skip(skip).Take(data.Take).ToList(); } data.TotalRecords = query.ToList().Count; data.List = query.ToList(); return(data); } catch (Exception ex) { return(null); } }
internal override void TemplateAfterAwake() { base.TemplateAfterAwake(); Movement = new BoardMovement(); Movement.IsMoving = false; }
private void Awake() { boardInput = new BoardInput(this, connectionLine); boardSpawn = new BoardSpawn(this); boardMovement = new BoardMovement(this); }
public void Move(BoardMovementDirection direction) { Position += BoardMovement.DirectionToOffset(direction); }