6. In the coordinate plane, there are two regions $M$ and $N$. $M$ is determined by the inequalities $y \geqslant 0$, $y \leqslant x$, and $y \leqslant 2-x$. $N$ is a region that varies with $t$, determined by the inequality $t \leqslant x \leqslant t+1$, where the range of $t$ is $0 \leqslant t \leqslant 1$. Let the common area of $M$ and $N$ be the function $f(t)$, then $f(t)$ is:
(A) $-t^{2}+t+\frac{1}{2}$;
(B) $-2 t^{2}+2 t$;
(C) $1-\frac{1}{2} t^{2}$;
(D) $\frac{1}{2}(t-2)^{2}$.
6. (A)

According to the problem, region $M$ is the $\triangle A O B$ in the figure. Region $N$ is the strip between the lines $x=t$ and $x=t+1$ $(0 \leqslant t \leqslant 1)$. The common part of $M$ and $N$ is the shaded area shown in the figure, and its area is
$$
\begin{aligned}
f(t) & =S_{\triangle O A B}-S_{\triangle O C D}-S_{\triangle B E F} \\
& =\frac{1}{2} \cdot 2 \cdot 1-\frac{1}{2} \cdot t^{2}-\frac{1}{2}[2-(t+1)]^{2} \\
& =1-\frac{1}{2} t^{2}-\frac{1}{2}(1-t)^{2} \\
& =-t^{2}+t+\frac{1}{2} . \quad(0 \leqslant t \leqslant 1)
\end{aligned}
$$