Expose debugFloat

This commit is contained in:
luboslenco 2019-04-24 21:55:20 +02:00
parent 5f82c6674c
commit 078a415ba9
2 changed files with 8 additions and 3 deletions

View file

@ -180,6 +180,11 @@ class Uniforms {
return armory.renderpath.DynamicResolutionScale.dynamicScale;
}
#end
#if arm_debug
if (link == "_debugFloat") {
return armory.trait.internal.DebugConsole.debugFloat;
}
#end
return null;
}
}

View file

@ -52,7 +52,7 @@ class DebugConsole extends Trait {
static var lrow = [1/2, 1/2];
static var row4 = [1/4, 1/4, 1/4, 1/4];
public static var f = 1.0;
public static var debugFloat = 1.0;
public static var watchNodes:Array<armory.logicnode.LogicNode> = [];
public function new(scaleFactor = 1.0) {
@ -71,8 +71,8 @@ class DebugConsole extends Trait {
// Toggle console
kha.input.Keyboard.get().notify(null, null, function(char: String) {
if (char == "~") visible = !visible;
else if (char == "[") f -= 0.1;
else if (char == "]") f += 0.1;
else if (char == "[") debugFloat -= 0.1;
else if (char == "]") debugFloat += 0.1;
});
});
}