// Update is called once per frame
    void Update()
    {
        if (this.Context == null || !this.Context.isRunning || this.controlItemType == null || !this.items.HasItems())
        {
            return;
        }

        float horizontal    = Input.GetAxis("Horizontal");
        float vertical      = Input.GetAxis("Vertical");
        int   horizontalInt = horizontal >= 1.0f ? 1 : (horizontal <= -1.0f ? -1 : 0);
        int   verticalInt   = vertical >= 1.0f ? 1 : (vertical <= -1.0f ? -1 : 0);

        if (horizontalInt != 0 || verticalInt != 0)
        {
            var movementDirection = new Vector2Int(horizontalInt, verticalInt);
            var direction         = movementDirection.AsMovementType();
            if (!direction.HasValue)
            {
                this.ResetCharges();
                return;
            }
            if (!this.movementCharges[direction.Value])
            {
                return;
            }
            foreach (var item in this.items)
            {
                var destination = item.warehouseDestination != null ? item.warehouseDestination.WarehouseIndex.Value + movementDirection : item.WarehouseIndex.Value + movementDirection;
                this.warehouseManager.OnGroundSelected(this.warehouseManager.GetGround(destination));
                if (item.warehouseDestination != null)
                {
                    this.SetCharge(direction.Value);
                }
            }
        }
        else
        {
            this.ResetCharges();
            this.SetCharge();
        }
    }