November 2015
Beginner to intermediate
420 pages
9h 2m
English
We will first look at the primary business logic that maintains the state and calculations involved in determining the outcome of a particular player's battle with an enemy. The following code snippet represents the BattleState class, which can be found at core\src\com\packtpub\libgdx\bludbourne\battle\BattleState.java:
package com.packtpub.libgdx.bludbourne.battle;
import com.badlogic.gdx.math.MathUtils;
import com.packtpub.libgdx.bludbourne.Entity;
import com.packtpub.libgdx.bludbourne.EntityConfig;
import com.packtpub.libgdx.bludbourne.UI.InventoryObserver;
import com.packtpub.libgdx.bludbourne.profile.ProfileManager;
public class BattleState extends BattleSubject implements
InventoryObserver {We need a way to communicate changes ...