Skip to content

Commit

Permalink
LiveReload logging basic info
Browse files Browse the repository at this point in the history
  • Loading branch information
joshuaskelly committed Apr 27, 2020
1 parent 4285107 commit 50b7626
Showing 1 changed file with 3 additions and 1 deletion.
Original file line number Diff line number Diff line change
Expand Up @@ -48,7 +48,6 @@ public void run() {
long now = System.currentTimeMillis();

if (watchedExtensions.contains(extension) && now - lastTimeCalled > MIN_TIME_BETWEEN_CALLS) {
Gdx.app.log("Editor", "Live loading assets");
lastTimeCalled = now;

// Reload must happen on main render thread.
Expand All @@ -66,6 +65,7 @@ public void run() {
}

public void init() {
Gdx.app.log("LiveReload", "Initializing");
if (watcher.isAlive()) {
return;
}
Expand All @@ -75,11 +75,13 @@ public void init() {
}

public void dispose() {
Gdx.app.log("LiveReload", "Disposing");
watcher.interrupt();
}

public void tick() {
if (needToReloadAssets.compareAndSet(true, false)) {
Gdx.app.log("LiveReload", "Reloading assets");
EditorArt.refresh();
Editor.app.initTextures();
}
Expand Down

0 comments on commit 50b7626

Please sign in to comment.