Skip to content

Commit

Permalink
add open all debug mode
Browse files Browse the repository at this point in the history
  • Loading branch information
lfkdsk committed May 8, 2016
1 parent 04f27db commit 97237fa
Showing 1 changed file with 14 additions and 2 deletions.
16 changes: 14 additions & 2 deletions engine/src/main/java/com/lfk/justweengine/Engine/Engine.java
Original file line number Diff line number Diff line change
Expand Up @@ -53,15 +53,16 @@ public abstract class Engine extends Activity implements Runnable, View.OnTouchL
private int e_touchNum;
private int e_backgroundColor;
private boolean e_isFrameOpen;
// private boolean isOpenDebug = false;
private boolean isOpenDebug;
private boolean e_openAllDebug;
private TouchMode e_touch_Mode;
private CopyOnWriteArrayList<BaseSub> e_sprite_group;
private CopyOnWriteArrayList<BaseSub> e_sprite_recycle_group;
// for buttons
private HashMap<String, BaseButton> e_button_group;
private boolean e_is_hit_button;
private BaseButton e_hit_button = null;
private boolean isOpenDebug;


/**
* engine constructor
Expand Down Expand Up @@ -97,6 +98,7 @@ private void Engine() {
e_typeface = null;
e_touchModesAble = true;
e_touchNum = 5;
e_openAllDebug = false;
e_isFrameOpen = true;
e_touch_Mode = TouchMode.SINGLE;
e_backgroundColor = Color.BLACK;
Expand Down Expand Up @@ -305,6 +307,8 @@ public void run() {
}
if (isOpenDebug && baseSub.isCollidable() && baseSub.isCollided()) {
drawDebugLine(baseSub.getBounds());
} else if (e_openAllDebug) {
drawDebugLine(baseSub.getBounds());
}
}

Expand Down Expand Up @@ -791,4 +795,12 @@ public void drawDebugLine(RectF bound) {
e_canvas.drawRect(bound, e_paintDraw);
}
}

public boolean isOpenAllDebug() {
return e_openAllDebug;
}

public void setOpenAllDebug(boolean e_openAllDebug) {
this.e_openAllDebug = e_openAllDebug;
}
}

0 comments on commit 97237fa

Please sign in to comment.