Which element is undergoing oxidation in the combustion of methane? Chemical reaction:

$$\ce{CH4(g) + 2O2(g) -&gt; CO2(g) + 2H2O(g)}
$$

The example in our textbook for this type of problem involves the following reaction:

$$\ce{C + 2S -&gt; CS2}
$$

Here, I can clearly see that $\ce{C}$ starts off with an oxidation state of zero and ends with an oxidation state of +4, meaning that it underwent oxidation.

In my given reaction, I see how the $\ce{C}$ in $\ce{CO2}$ has an oxidation state of +4, but I don't quite understand why it doesn't also have an oxidation state of +4 in $\ce{CH4}$. My assumption here is that, in the case of $\ce{CO_2}$, $\ce{C}$ has an oxidation state of +4 and $\ce{O2}$ has an oxidation state of -4; and in the case of $\ce{CH4}$, $\ce{C}$ has an oxidation state of +4 and $\ce{H4}$ has an oxidation state of -4. If that is incorrect, could someone explain why?

Edit: I just realized I overlooked a table that says that hydrogen has an oxidation state of +1, which would mean that in $\ce{CH_4}$, $\ce{C}$ would have an oxidation state of -4. I gather that this means that $\ce{C}$ loses 8 electrons in the reaction, which is why it is considered to undergo oxidation.
I believe I have answered my own question - I assumed that H had an oxidation state of -1, when it appears to have an oxidation state of +1.