Game Development Reference
In-Depth Information
if the player is jumping on the turtle is by looking at the y velocity. We assume that
if that velocity is positive the player is jumping on the turtle. In that case, we call
the Jump method to make the player jump extra high:
else if (idleTime > 0 && player.Velocity.Y > 0)
player.Jump(1500);
This completes the main interaction programming. In the next chapter, we will finish
this game by adding some mountains and moving clouds in the background. We will
also manage the transitions between the levels.
29.5 What You Have Learned
In this chapter, you have learned:
how to program various kinds of player interaction, between water drops and
enemies;
how to program ice tile behavior;
how to let the player die in certain situations.
Search WWH ::




Custom Search