The next class that we will look at in our class diagram hierarchy is the Entity
class that can be found at core/src/com/packtpub/libgdx/bludbourne/Entity.java
. The Entity
class represents the primary game object, including the player character and non-playable characters (NPCs), which can move around in the world and interact with their environment.
The following class diagram demonstrates the relevant attributes and methods that we are going to use for this chapter (Figure 11):
We will discuss some of the imports from the source code of Entity
:
package com.packtpub.libgdx.bludbourne; import java.util.UUID; import com.badlogic.gdx.Gdx; import com.badlogic.gdx.graphics.Texture; import com.badlogic.gdx.graphics.g2d.Animation; import com.badlogic.gdx.graphics.g2d.Sprite; import com.badlogic.gdx.graphics.g2d.TextureRegion; import com.badlogic.gdx.math.Rectangle; import com.badlogic.gdx.math.Vector2; import com.badlogic.gdx.utils...