Game Development Reference
In-Depth Information
What is still left is the bottom row of classes in the diagram, all of which point to the
abstract class: AbstractGameObject . They all implement a specialized type of this
class, and thus share a common functionality of being a general game object that can
be rendered in the game world. Furthermore, these classes have been grouped in
this diagram to indicate their purpose in this game. You might want to peek at the
end of Chapter 1 , Introduction to LibGDX and Project Setup , again and take a quick look
at the sketch that shows all the relevant game objects in one picture. Here is a brief
description of the grouped classes:
• Player character:
° BunnyHead : This represents the character that is controlled by the
player
• Level objects:
° Rock : This represents a platform that has an edge at the left- and
right-hand side, and a middle part that can be set to an arbitrary
length. It is the ground in a level where the player will move on.
• Level items:
° GoldCoin : This represents an item that will increase the player's score
when picked up
° Feather : This represents a power-up that will grant the ability to fly
to the player's character when picked up
• Level decorations:
° WaterOverlay : This represents an image that is attached to the
camera's horizontal position; thus, it is always visible regardless of
wherever the camera moves on its x axis
° Mountains : This represents two mountain images moving at different
speeds to simulate a parallax optical illusion
° Cloud : This represents one cloud moving slowly to the left-hand side
in the sky
These classes will be covered in much more detail from Chapter 4 , Gathering
Resources , to Chapter 6 , Adding the Actors .
 
Search WWH ::




Custom Search