It is well known that if $X$ is a $CW$-complex and $X^n$ is an $n$-skeleton of $X$, then a map $f:X\to Y$ is continuous if and only if $f_i=f_{|X^i}:X^i\to Y$ is continuous for each $i$.
In general, given a colimit $X$ of a sequence of topological subspaces $X_1\subset X_2\subset\ldots$ and a map $f:X\to Y$ can we guarantee the that: $$f\quad\text{is continuous} \Leftrightarrow f_i=f_{|X^i}:X^i\to Y\quad \text{is continuous}\quad \forall i\, ?$$
This is, essentially, the definition of the colimit of topological spaces. One implication is trivial. For the converse, given a function $f:X\to Y$ whose restrictions to the $X_i$ are all continuous, we have a cocone over the diagram formed by the $X_i$ and thus a uniquely induced continuous map $X\to Y$ agreeing with this cocone. The only point is that this map is $f$ again, because colimits of spaces are just colimits of the underlying sets, with the appropriate topology.