Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion 2.1.06-Exercise-LoadA9Patch/build.gradle
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@ buildscript {
}
dependencies {
classpath 'de.richsource.gradle.plugins:gwt-gradle-plugin:0.6'
classpath 'com.android.tools.build:gradle:2.2.3'
classpath 'com.android.tools.build:gradle:2.3.3'
classpath 'org.robovm:robovm-gradle-plugin:1.8.0'
}
}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -13,8 +13,8 @@ public class NinePatchDemo extends ApplicationAdapter {
private static final float TEST_SIZE_1 = 20;
private static final float TEST_SIZE_2 = 40;

SpriteBatch batch;
FitViewport viewport;
private SpriteBatch batch;
private FitViewport viewport;

// TODO: Add a Texture for the raw platform image

Expand Down
2 changes: 1 addition & 1 deletion 2.1.07-Exercise-Animations/build.gradle
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@ buildscript {
}
dependencies {
classpath 'de.richsource.gradle.plugins:gwt-gradle-plugin:0.6'
classpath 'com.android.tools.build:gradle:2.2.3'
classpath 'com.android.tools.build:gradle:2.3.3'
classpath 'org.robovm:robovm-gradle-plugin:1.8.0'
}
}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -23,14 +23,14 @@ public class Animations extends ApplicationAdapter {

private static final float WALK_LOOP_FRAME_DURATION = 0.1f;

SpriteBatch batch;
ExtendViewport viewport;
private SpriteBatch batch;
private ExtendViewport viewport;

Animation walkLoop;
long startTime;
private Animation walkLoop;
private long startTime;

Animation explosion;
DelayedRemovalArray<OneShotAnimation> explosions;
private Animation explosion;
private DelayedRemovalArray<OneShotAnimation> explosions;

@Override
public void create() {
Expand Down Expand Up @@ -141,12 +141,12 @@ private void updateExplosions() {
}


class OneShotAnimation {
public final Vector2 position;
private class OneShotAnimation {
final Vector2 position;
private final Animation animation;
private final long startTimeNanos;

public OneShotAnimation(Animation animation, Vector2 position, long startTimeNanos) {
OneShotAnimation(Animation animation, Vector2 position, long startTimeNanos) {
this.animation = animation;
this.position = position;
this.startTimeNanos = startTimeNanos;
Expand All @@ -156,11 +156,11 @@ private float elapsedTime() {
return MathUtils.nanoToSec * (TimeUtils.nanoTime() - startTimeNanos);
}

public TextureRegion getFrame() {
TextureRegion getFrame() {
return animation.getKeyFrame(elapsedTime());
}

public boolean isAnimationFinished() {
boolean isAnimationFinished() {
return animation.isAnimationFinished(elapsedTime());
}

Expand Down
2 changes: 1 addition & 1 deletion 2.1.08-Exercise-CreatingATextureAtlas/build.gradle
Original file line number Diff line number Diff line change
Expand Up @@ -13,7 +13,7 @@ buildscript {
}
dependencies {
classpath 'de.richsource.gradle.plugins:gwt-gradle-plugin:0.6'
classpath 'com.android.tools.build:gradle:2.2.3'
classpath 'com.android.tools.build:gradle:2.3.3'
classpath 'org.robovm:robovm-gradle-plugin:1.8.0'
// TODO: Add buildscript dependency on gdx-tools
classpath "com.badlogicgames.gdx:gdx-tools:1.7.0"
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -9,15 +9,15 @@

public class TextureAtlasExercise extends ApplicationAdapter implements AssetErrorListener {

public static final String TAG = TextureAtlasExercise.class.getName();
private static final String TAG = TextureAtlasExercise.class.getName();

private static final String ATLAS = "images/gigagal.pack.atlas";
private static final String STANDING_RIGHT = "standing-right";

// TODO: Add an AssetManager


SpriteBatch batch;
private SpriteBatch batch;

// TODO: Add an AtlasRegion to hold the standing right sprite

Expand Down