Class DevTools
- java.lang.Object
 - 
- com.bombinggames.wurfelengine.core.DevTools
 
 
- 
public class DevTools extends java.lang.ObjectShows data for developers. Also has some tools like buttons to edito the map. 
- 
- 
Field Summary
Fields Modifier and Type Field Description static intmaxStepsVisualizedstatic intWIDTHThe visualised width of every data 
- 
Constructor Summary
Constructors Constructor Description DevTools(int xPos, int yPos) 
- 
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description voidclear()sets the frame time of every frame to 0floatgetAverageDelta()Returns the average delta time over every recorded frame.floatgetAverageDelta(int lastNSteps)Get the avererage raw delta time over the last n stepsjava.lang.StringgetDataAsString(int everyNthn)CSV (RFC 4180) compliant.intgetLeftOffset()floatgetSavedDelta(int pos)Get a recorded frame time value.intgetTopOffset()intgetWidth()Width of FPS diag.booleanisVisible()Is the diagramm visible?voidrender(GameView view)Renders the diagramm.voidsetCapacity(int cap)the amount of frame times storedvoidsetVisible(boolean visible)Set the FPSdiag visible.voidupdate()Updates the diagramm 
 - 
 
- 
- 
Field Detail
- 
WIDTH
public static final int WIDTH
The visualised width of every data- See Also:
 - Constant Field Values
 
 
- 
maxStepsVisualized
public static final int maxStepsVisualized
- See Also:
 - Constant Field Values
 
 
 - 
 
- 
Method Detail
- 
setCapacity
public void setCapacity(int cap)
the amount of frame times stored- Parameters:
 cap-
 
- 
clear
public void clear()
sets the frame time of every frame to 0 
- 
update
public void update()
Updates the diagramm 
- 
render
public void render(GameView view)
Renders the diagramm. The batches should be closed before calling this method.- Parameters:
 view- if from classEditorViewremoves or shows the buttons
 
- 
getSavedDelta
public float getSavedDelta(int pos)
Get a recorded frame time value. The time between savings is at least the timeStepMin.- Parameters:
 pos- the array position- Returns:
 - time in s
 
 
- 
getAverageDelta
public float getAverageDelta()
Returns the average delta time over every recorded frame.- Returns:
 - time in s
 
 
- 
getAverageDelta
public float getAverageDelta(int lastNSteps)
Get the avererage raw delta time over the last n steps- Parameters:
 lastNSteps-- Returns:
 - time in s
 
 
- 
isVisible
public boolean isVisible()
Is the diagramm visible?- Returns:
 
 
- 
setVisible
public void setVisible(boolean visible)
Set the FPSdiag visible. You must nevertheless callrender(GameView)once a frame to let it appear.- Parameters:
 visible-
 
- 
getLeftOffset
public int getLeftOffset()
- Returns:
 
 
- 
getTopOffset
public int getTopOffset()
- Returns:
 - Y-Up
 
 
- 
getWidth
public int getWidth()
Width of FPS diag.- Returns:
 - in pixels
 
 
- 
getDataAsString
public java.lang.String getDataAsString(int everyNthn)
CSV (RFC 4180) compliant.- Parameters:
 everyNthn- take every n-th data- Returns:
 - in ms
 
 
 - 
 
 -