private void ProcrastinateWalk() { //if this is not a second move if (procrastinatorStoredMove.Equals(Vector2Int.zero)) { //set the move if valid procrastinatorStoredMove = ConvertToVectorInt(InputToDirection()); Vector2Int nextPosition = gridMovement.GetPositionVector2Int() + procrastinatorStoredMove; if (!gridMovement.IsValidMovement(nextPosition.x, nextPosition.y, false)) { procrastinatorStoredMove = Vector2Int.zero; } } else { //check if the 2nd move is valid Vector2Int secondMove = ConvertToVectorInt(InputToDirection()); Vector2Int nextPosition = gridMovement.GetPositionVector2Int() + procrastinatorStoredMove + secondMove; bool checkValid = gridMovement.IsValidMovement(nextPosition.x, nextPosition.y, manager.playerLivesLeft == 1); if (!checkValid) { procrastinatorStoredMove = Vector2Int.zero; return; } //sets direction gridMovement.direction = InputToDirection(); gridAnimator.TriggerWalk(); //execute previous move and next move MoveInDirection(procrastinatorStoredMove); gridAnimator.AddToAnimateQueue(gridMovement.GetPositionVector2Int()); MoveInDirection(secondMove); gridAnimator.AddToAnimateQueue(gridMovement.GetPositionVector2Int()); procrastinatorStoredMove = Vector2Int.zero; manager.DecrementLivesLeft(); } }