Update node interface
This commit is contained in:
parent
f03dc18590
commit
48ecb814f5
|
@ -6,13 +6,13 @@ class AddGroupNode extends LogicNode {
|
|||
super(tree);
|
||||
}
|
||||
|
||||
override function run() {
|
||||
override function run(from:Int) {
|
||||
var groupName:String = inputs[1].get();
|
||||
|
||||
if (iron.Scene.active.groups.get(groupName) == null) {
|
||||
iron.Scene.active.groups.set(groupName, []);
|
||||
}
|
||||
|
||||
super.run();
|
||||
runOutput(0);
|
||||
}
|
||||
}
|
||||
|
|
|
@ -8,7 +8,7 @@ class AddTraitNode extends LogicNode {
|
|||
super(tree);
|
||||
}
|
||||
|
||||
override function run() {
|
||||
override function run(from:Int) {
|
||||
var object:Object = inputs[1].get();
|
||||
var trait:Dynamic = inputs[2].get();
|
||||
|
||||
|
@ -16,6 +16,6 @@ class AddTraitNode extends LogicNode {
|
|||
|
||||
object.addTrait(trait);
|
||||
|
||||
super.run();
|
||||
runOutput(0);
|
||||
}
|
||||
}
|
||||
|
|
|
@ -8,8 +8,8 @@ class AlternateNode extends LogicNode {
|
|||
super(tree);
|
||||
}
|
||||
|
||||
override function run() {
|
||||
b ? runOutputs(0) : runOutputs(1);
|
||||
override function run(from:Int) {
|
||||
b ? runOutput(0) : runOutput(1);
|
||||
b = !b;
|
||||
}
|
||||
}
|
||||
|
|
|
@ -12,7 +12,7 @@ class AppendTransformNode extends LogicNode {
|
|||
super(tree);
|
||||
}
|
||||
|
||||
override function run() {
|
||||
override function run(from:Int) {
|
||||
var object:Object = inputs[1].get();
|
||||
var matrix:Mat4 = inputs[2].get();
|
||||
|
||||
|
@ -25,6 +25,6 @@ class AppendTransformNode extends LogicNode {
|
|||
if (rigidBody != null) rigidBody.syncTransform();
|
||||
#end
|
||||
|
||||
super.run();
|
||||
runOutput(0);
|
||||
}
|
||||
}
|
||||
|
|
|
@ -10,7 +10,7 @@ class ApplyForceAtLocationNode extends LogicNode {
|
|||
super(tree);
|
||||
}
|
||||
|
||||
override function run() {
|
||||
override function run(from:Int) {
|
||||
var object:Object = inputs[1].get();
|
||||
var force:Vec4 = inputs[2].get();
|
||||
var location:Vec4 = inputs[3].get();
|
||||
|
@ -22,6 +22,6 @@ class ApplyForceAtLocationNode extends LogicNode {
|
|||
rb.applyForce(force, location);
|
||||
#end
|
||||
|
||||
super.run();
|
||||
runOutput(0);
|
||||
}
|
||||
}
|
||||
|
|
|
@ -10,7 +10,7 @@ class ApplyForceNode extends LogicNode {
|
|||
super(tree);
|
||||
}
|
||||
|
||||
override function run() {
|
||||
override function run(from:Int) {
|
||||
var object:Object = inputs[1].get();
|
||||
var force:Vec4 = inputs[2].get();
|
||||
|
||||
|
@ -21,6 +21,6 @@ class ApplyForceNode extends LogicNode {
|
|||
rb.applyForce(force);
|
||||
#end
|
||||
|
||||
super.run();
|
||||
runOutput(0);
|
||||
}
|
||||
}
|
||||
|
|
|
@ -10,7 +10,7 @@ class ApplyImpulseAtLocationNode extends LogicNode {
|
|||
super(tree);
|
||||
}
|
||||
|
||||
override function run() {
|
||||
override function run(from:Int) {
|
||||
var object:Object = inputs[1].get();
|
||||
var impulse:Vec4 = inputs[2].get();
|
||||
var location:Vec4 = inputs[3].get();
|
||||
|
@ -22,6 +22,6 @@ class ApplyImpulseAtLocationNode extends LogicNode {
|
|||
rb.applyImpulse(impulse, location);
|
||||
#end
|
||||
|
||||
super.run();
|
||||
runOutput(0);
|
||||
}
|
||||
}
|
||||
|
|
|
@ -10,7 +10,7 @@ class ApplyImpulseNode extends LogicNode {
|
|||
super(tree);
|
||||
}
|
||||
|
||||
override function run() {
|
||||
override function run(from:Int) {
|
||||
var object:Object = inputs[1].get();
|
||||
var impulse:Vec4 = inputs[2].get();
|
||||
|
||||
|
@ -21,6 +21,6 @@ class ApplyImpulseNode extends LogicNode {
|
|||
rb.applyImpulse(impulse);
|
||||
#end
|
||||
|
||||
super.run();
|
||||
runOutput(0);
|
||||
}
|
||||
}
|
||||
|
|
|
@ -6,7 +6,7 @@ class ArrayAddNode extends LogicNode {
|
|||
super(tree);
|
||||
}
|
||||
|
||||
override function run() {
|
||||
override function run(from:Int) {
|
||||
var ar:Array<Dynamic> = inputs[1].get();
|
||||
if (ar == null) return;
|
||||
|
||||
|
@ -17,6 +17,6 @@ class ArrayAddNode extends LogicNode {
|
|||
}
|
||||
}
|
||||
|
||||
super.run();
|
||||
runOutput(0);
|
||||
}
|
||||
}
|
||||
|
|
|
@ -6,7 +6,7 @@ class ArrayAddUniqueNode extends LogicNode {
|
|||
super(tree);
|
||||
}
|
||||
|
||||
override function run() {
|
||||
override function run(from:Int) {
|
||||
var ar:Array<Dynamic> = inputs[1].get();
|
||||
if (ar == null) return;
|
||||
|
||||
|
@ -17,6 +17,6 @@ class ArrayAddUniqueNode extends LogicNode {
|
|||
}
|
||||
}
|
||||
|
||||
super.run();
|
||||
runOutput(0);
|
||||
}
|
||||
}
|
||||
|
|
|
@ -8,15 +8,15 @@ class ArrayLoopNode extends LogicNode {
|
|||
super(tree);
|
||||
}
|
||||
|
||||
override function run() {
|
||||
override function run(from:Int) {
|
||||
var ar:Array<Dynamic> = inputs[1].get();
|
||||
if (ar == null) return;
|
||||
|
||||
for (val in ar) {
|
||||
value = val;
|
||||
runOutputs(0);
|
||||
runOutput(0);
|
||||
}
|
||||
runOutputs(2);
|
||||
runOutput(2);
|
||||
}
|
||||
|
||||
override function get(from:Int):Dynamic {
|
||||
|
|
|
@ -8,7 +8,7 @@ class ArrayRemoveNode extends LogicNode {
|
|||
super(tree);
|
||||
}
|
||||
|
||||
override function run() {
|
||||
override function run(from:Int) {
|
||||
var ar:Array<Dynamic> = inputs[1].get();
|
||||
if (ar == null) return;
|
||||
|
||||
|
@ -18,7 +18,7 @@ class ArrayRemoveNode extends LogicNode {
|
|||
removedValue = ar[i];
|
||||
ar.splice(i, 1);
|
||||
|
||||
runOutputs(0);
|
||||
runOutput(0);
|
||||
}
|
||||
|
||||
override function get(from:Int):Dynamic {
|
||||
|
|
|
@ -8,7 +8,7 @@ class ArrayRemoveValueNode extends LogicNode {
|
|||
super(tree);
|
||||
}
|
||||
|
||||
override function run() {
|
||||
override function run(from:Int) {
|
||||
var ar:Array<Dynamic> = inputs[1].get();
|
||||
if (ar == null) return;
|
||||
|
||||
|
@ -17,7 +17,7 @@ class ArrayRemoveValueNode extends LogicNode {
|
|||
removedValue = val;
|
||||
ar.remove(val);
|
||||
|
||||
runOutputs(0);
|
||||
runOutput(0);
|
||||
}
|
||||
|
||||
override function get(from:Int):Dynamic {
|
||||
|
|
|
@ -6,7 +6,7 @@ class ArraySetNode extends LogicNode {
|
|||
super(tree);
|
||||
}
|
||||
|
||||
override function run() {
|
||||
override function run(from:Int) {
|
||||
var ar:Array<Dynamic> = inputs[1].get();
|
||||
if (ar == null) return;
|
||||
|
||||
|
@ -16,6 +16,6 @@ class ArraySetNode extends LogicNode {
|
|||
if (i < 0) ar[ar.length + i] = value;
|
||||
else ar[i] = value;
|
||||
|
||||
super.run();
|
||||
runOutput(0);
|
||||
}
|
||||
}
|
||||
|
|
|
@ -6,7 +6,7 @@ class ArraySpliceNode extends LogicNode {
|
|||
super(tree);
|
||||
}
|
||||
|
||||
override function run() {
|
||||
override function run(from:Int) {
|
||||
var ar:Array<Dynamic> = inputs[1].get();
|
||||
if (ar == null) return;
|
||||
|
||||
|
@ -15,6 +15,6 @@ class ArraySpliceNode extends LogicNode {
|
|||
|
||||
ar.splice(i, len);
|
||||
|
||||
super.run();
|
||||
runOutput(0);
|
||||
}
|
||||
}
|
||||
|
|
|
@ -8,7 +8,7 @@ class BlendActionNode extends LogicNode {
|
|||
super(tree);
|
||||
}
|
||||
|
||||
override function run() {
|
||||
override function run(from:Int) {
|
||||
var object:Object = inputs[1].get();
|
||||
var action1:String = inputs[2].get();
|
||||
var action2:String = inputs[3].get();
|
||||
|
@ -20,6 +20,6 @@ class BlendActionNode extends LogicNode {
|
|||
|
||||
animation.blend(action1, action2, blendFactor);
|
||||
|
||||
runOutputs(0);
|
||||
runOutput(0);
|
||||
}
|
||||
}
|
||||
|
|
|
@ -15,7 +15,7 @@ class BoneFKNode extends LogicNode {
|
|||
super(tree);
|
||||
}
|
||||
|
||||
override function run() {
|
||||
override function run(from:Int) {
|
||||
var object:Object = inputs[1].get();
|
||||
var boneName:String = inputs[2].get();
|
||||
var transform:Mat4 = inputs[3].get();
|
||||
|
@ -44,6 +44,6 @@ class BoneFKNode extends LogicNode {
|
|||
notified = true;
|
||||
}
|
||||
|
||||
runOutputs(0);
|
||||
runOutput(0);
|
||||
}
|
||||
}
|
||||
|
|
|
@ -13,7 +13,7 @@ class BoneIKNode extends LogicNode {
|
|||
super(tree);
|
||||
}
|
||||
|
||||
override function run() {
|
||||
override function run(from:Int) {
|
||||
var object:Object = inputs[1].get();
|
||||
var boneName:String = inputs[2].get();
|
||||
goal = inputs[3].get();
|
||||
|
@ -36,6 +36,6 @@ class BoneIKNode extends LogicNode {
|
|||
notified = true;
|
||||
}
|
||||
|
||||
runOutputs(0);
|
||||
runOutput(0);
|
||||
}
|
||||
}
|
||||
|
|
|
@ -6,8 +6,8 @@ class BranchNode extends LogicNode {
|
|||
super(tree);
|
||||
}
|
||||
|
||||
override function run() {
|
||||
override function run(from:Int) {
|
||||
var b:Bool = inputs[1].get();
|
||||
b ? runOutputs(0) : runOutputs(1);
|
||||
b ? runOutput(0) : runOutput(1);
|
||||
}
|
||||
}
|
||||
|
|
|
@ -10,7 +10,7 @@ class CallGroupNode extends LogicNode {
|
|||
}
|
||||
|
||||
@:access(iron.Trait)
|
||||
override function run() {
|
||||
override function run(from:Int) {
|
||||
|
||||
if (callTree == null) {
|
||||
var classType = Type.resolveClass(property0);
|
||||
|
@ -21,6 +21,6 @@ class CallGroupNode extends LogicNode {
|
|||
|
||||
if (callTree._init != null) callTree._init[0]();
|
||||
|
||||
runOutputs(0);
|
||||
runOutput(0);
|
||||
}
|
||||
}
|
||||
|
|
|
@ -10,7 +10,7 @@ class CallHaxeNode extends LogicNode {
|
|||
super(tree);
|
||||
}
|
||||
|
||||
override function run() {
|
||||
override function run(from:Int) {
|
||||
var object:Object = inputs[1].get();
|
||||
if (object == null) return;
|
||||
|
||||
|
@ -18,7 +18,7 @@ class CallHaxeNode extends LogicNode {
|
|||
|
||||
result = Reflect.callMethod(object, Reflect.field(object, funName), null);
|
||||
|
||||
runOutputs(0);
|
||||
runOutput(0);
|
||||
}
|
||||
|
||||
override function get(from:Int):Dynamic {
|
||||
|
|
|
@ -8,7 +8,7 @@ class CallHaxeStaticNode extends LogicNode {
|
|||
super(tree);
|
||||
}
|
||||
|
||||
override function run() {
|
||||
override function run(from:Int) {
|
||||
|
||||
var path:String = inputs[1].get();
|
||||
if (path != '') {
|
||||
|
@ -19,7 +19,7 @@ class CallHaxeStaticNode extends LogicNode {
|
|||
result = Reflect.callMethod(classType, Reflect.field(classType, funName), [tree]);
|
||||
}
|
||||
|
||||
runOutputs(0);
|
||||
runOutput(0);
|
||||
}
|
||||
|
||||
override function get(from:Int):Dynamic {
|
||||
|
|
|
@ -19,10 +19,10 @@ class CanvasSetTextNode extends LogicNode {
|
|||
tree.removeUpdate(update);
|
||||
|
||||
canvas.getElement(element).text = Std.string(text);
|
||||
super.run();
|
||||
runOutput(0);
|
||||
}
|
||||
|
||||
override function run() {
|
||||
override function run(from:Int) {
|
||||
element = inputs[1].get();
|
||||
text = inputs[2].get();
|
||||
canvas = Scene.active.getTrait(CanvasScript);
|
||||
|
|
|
@ -8,7 +8,7 @@ class ClearParentNode extends LogicNode {
|
|||
super(tree);
|
||||
}
|
||||
|
||||
override function run() {
|
||||
override function run(from:Int) {
|
||||
var object:Object = inputs[1].get();
|
||||
var keepTransform:Bool = inputs[2].get();
|
||||
|
||||
|
@ -17,6 +17,6 @@ class ClearParentNode extends LogicNode {
|
|||
object.parent.removeChild(object, keepTransform);
|
||||
iron.Scene.active.root.addChild(object, false);
|
||||
|
||||
super.run();
|
||||
runOutput(0);
|
||||
}
|
||||
}
|
||||
|
|
|
@ -9,7 +9,7 @@ class ExpressionNode extends LogicNode {
|
|||
super(tree);
|
||||
}
|
||||
|
||||
override function run() {
|
||||
override function run(from:Int) {
|
||||
|
||||
#if arm_hscript
|
||||
var expr = property0;
|
||||
|
@ -19,7 +19,7 @@ class ExpressionNode extends LogicNode {
|
|||
result = interp.execute(ast);
|
||||
#end
|
||||
|
||||
runOutputs(0);
|
||||
runOutput(0);
|
||||
}
|
||||
|
||||
override function get(from:Int):Dynamic {
|
||||
|
|
|
@ -11,7 +11,7 @@ class GateNode extends LogicNode {
|
|||
super(tree);
|
||||
}
|
||||
|
||||
override function run() {
|
||||
override function run(from:Int) {
|
||||
|
||||
var v1:Dynamic = inputs[1].get();
|
||||
var v2:Dynamic = inputs[2].get();
|
||||
|
@ -47,6 +47,6 @@ class GateNode extends LogicNode {
|
|||
}
|
||||
}
|
||||
|
||||
cond ? runOutputs(0) : runOutputs(1);
|
||||
cond ? runOutput(0) : runOutput(1);
|
||||
}
|
||||
}
|
||||
|
|
|
@ -10,7 +10,7 @@ class GoToLocationNode extends LogicNode {
|
|||
super(tree);
|
||||
}
|
||||
|
||||
override function run() {
|
||||
override function run(from:Int) {
|
||||
var object:Object = inputs[1].get();
|
||||
var location:Vec4 = inputs[2].get();
|
||||
|
||||
|
@ -26,6 +26,6 @@ class GoToLocationNode extends LogicNode {
|
|||
});
|
||||
#end
|
||||
|
||||
super.run();
|
||||
runOutput(0);
|
||||
}
|
||||
}
|
||||
|
|
|
@ -6,8 +6,8 @@ class GroupOutputNode extends LogicNode {
|
|||
super(tree);
|
||||
}
|
||||
|
||||
override function run() {
|
||||
override function run(from:Int) {
|
||||
|
||||
super.run();
|
||||
runOutput(0);
|
||||
}
|
||||
}
|
||||
|
|
|
@ -9,12 +9,12 @@ class InverseNode extends LogicNode {
|
|||
tree.notifyOnUpdate(update);
|
||||
}
|
||||
|
||||
override function run() {
|
||||
override function run(from:Int) {
|
||||
c = true;
|
||||
}
|
||||
|
||||
function update() {
|
||||
if (!c) super.run();
|
||||
if (!c) runOutput(0);
|
||||
c = false;
|
||||
}
|
||||
}
|
||||
|
|
|
@ -6,9 +6,9 @@ class IsFalseNode extends LogicNode {
|
|||
super(tree);
|
||||
}
|
||||
|
||||
override function run() {
|
||||
override function run(from:Int) {
|
||||
|
||||
var v1:Bool = inputs[1].get();
|
||||
if (!v1) super.run();
|
||||
if (!v1) runOutput(0);
|
||||
}
|
||||
}
|
||||
|
|
|
@ -6,9 +6,9 @@ class IsNoneNode extends LogicNode {
|
|||
super(tree);
|
||||
}
|
||||
|
||||
override function run() {
|
||||
override function run(from:Int) {
|
||||
|
||||
var v1:Dynamic = inputs[1].get();
|
||||
if (v1 == null) super.run();
|
||||
if (v1 == null) runOutput(0);
|
||||
}
|
||||
}
|
||||
|
|
|
@ -6,9 +6,9 @@ class IsNotNoneNode extends LogicNode {
|
|||
super(tree);
|
||||
}
|
||||
|
||||
override function run() {
|
||||
override function run(from:Int) {
|
||||
|
||||
var v1:Dynamic = inputs[1].get();
|
||||
if (v1 != null) super.run();
|
||||
if (v1 != null) runOutput(0);
|
||||
}
|
||||
}
|
||||
|
|
|
@ -6,9 +6,9 @@ class IsTrueNode extends LogicNode {
|
|||
super(tree);
|
||||
}
|
||||
|
||||
override function run() {
|
||||
override function run(from:Int) {
|
||||
|
||||
var v1:Bool = inputs[1].get();
|
||||
if (v1) super.run();
|
||||
if (v1) runOutput(0);
|
||||
}
|
||||
}
|
||||
|
|
|
@ -26,9 +26,28 @@ class LogicNode {
|
|||
outputs.push(nodes);
|
||||
}
|
||||
|
||||
function run() { for (ar in outputs) for (o in ar) o.run(); }
|
||||
/**
|
||||
* Called when this node is activated.
|
||||
* @param from impulse index
|
||||
*/
|
||||
function run(from:Int) {}
|
||||
|
||||
function runOutputs(i:Int) { if (i < outputs.length) for (o in outputs[i]) o.run(); }
|
||||
/**
|
||||
* Call to activate node connected to the output.
|
||||
* @param i output index
|
||||
*/
|
||||
function runOutput(i:Int) {
|
||||
if (i >= outputs.length) return;
|
||||
for (o in outputs[i]) {
|
||||
// Check which input activated the node
|
||||
for (j in 0...o.inputs.length) {
|
||||
if (o.inputs[j].node == this) {
|
||||
o.run(j);
|
||||
break;
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
@:allow(armory.logicnode.LogicNodeInput)
|
||||
function get(from:Int):Dynamic { return this; }
|
||||
|
|
|
@ -6,7 +6,7 @@ class LoopBreakNode extends LogicNode {
|
|||
super(tree);
|
||||
}
|
||||
|
||||
override function run() {
|
||||
override function run(from:Int) {
|
||||
tree.loopBreak = true;
|
||||
}
|
||||
}
|
||||
|
|
|
@ -8,20 +8,20 @@ class LoopNode extends LogicNode {
|
|||
super(tree);
|
||||
}
|
||||
|
||||
override function run() {
|
||||
override function run(from:Int) {
|
||||
index = 0;
|
||||
var from:Int = inputs[1].get();
|
||||
var to:Int = inputs[2].get();
|
||||
for (i in from...to) {
|
||||
index = i;
|
||||
runOutputs(0);
|
||||
runOutput(0);
|
||||
|
||||
if (tree.loopBreak) {
|
||||
tree.loopBreak = false;
|
||||
break;
|
||||
}
|
||||
}
|
||||
runOutputs(2);
|
||||
runOutput(2);
|
||||
}
|
||||
|
||||
override function get(from:Int):Dynamic {
|
||||
|
|
|
@ -6,7 +6,7 @@ class MergeNode extends LogicNode {
|
|||
super(tree);
|
||||
}
|
||||
|
||||
override function run() {
|
||||
super.run();
|
||||
override function run(from:Int) {
|
||||
runOutput(0);
|
||||
}
|
||||
}
|
||||
|
|
|
@ -52,6 +52,6 @@ class OnContactNode extends LogicNode {
|
|||
|
||||
lastContact = contact;
|
||||
|
||||
if (b) run();
|
||||
if (b) runOutput(0);
|
||||
}
|
||||
}
|
||||
|
|
|
@ -23,7 +23,7 @@ class OnEventNode extends LogicNode {
|
|||
}
|
||||
|
||||
function onEvent() {
|
||||
run();
|
||||
runOutput(0);
|
||||
}
|
||||
|
||||
function onRemove() {
|
||||
|
|
|
@ -28,6 +28,6 @@ class OnGamepadNode extends LogicNode {
|
|||
// case "Moved Right":
|
||||
// b = gamepad.rightStick.movementX != 0 || gamepad.rightStick.movementY != 0;
|
||||
}
|
||||
if (b) run();
|
||||
if (b) runOutput(0);
|
||||
}
|
||||
}
|
||||
|
|
|
@ -13,16 +13,16 @@ class OnInitNode extends LogicNode {
|
|||
function init() {
|
||||
#if arm_physics
|
||||
var noPhysics = PhysicsWorld.active == null || PhysicsWorld.active._lateUpdate == null;
|
||||
noPhysics ? run() : PhysicsWorld.active.notifyOnPreUpdate(physics_init);
|
||||
noPhysics ? runOutput(0) : PhysicsWorld.active.notifyOnPreUpdate(physics_init);
|
||||
#else
|
||||
run();
|
||||
runOutput(0);
|
||||
#end
|
||||
}
|
||||
|
||||
#if arm_physics
|
||||
function physics_init() {
|
||||
PhysicsWorld.active.removePreUpdate(physics_init);
|
||||
run();
|
||||
runOutput(0);
|
||||
}
|
||||
#end
|
||||
}
|
||||
|
|
|
@ -22,6 +22,6 @@ class OnKeyboardNode extends LogicNode {
|
|||
case "Released":
|
||||
b = keyboard.released(property1);
|
||||
}
|
||||
if (b) run();
|
||||
if (b) runOutput(0);
|
||||
}
|
||||
}
|
||||
|
|
|
@ -24,6 +24,6 @@ class OnMouseNode extends LogicNode {
|
|||
case "Moved":
|
||||
b = mouse.moved;
|
||||
}
|
||||
if (b) run();
|
||||
if (b) runOutput(0);
|
||||
}
|
||||
}
|
||||
|
|
|
@ -23,6 +23,6 @@ class OnSurfaceNode extends LogicNode {
|
|||
case "Moved":
|
||||
b = surface.moved;
|
||||
}
|
||||
if (b) run();
|
||||
if (b) runOutput(0);
|
||||
}
|
||||
}
|
||||
|
|
|
@ -21,7 +21,7 @@ class OnTimerNode extends LogicNode {
|
|||
duration -= iron.system.Time.delta;
|
||||
if (duration <= 0.0) {
|
||||
if (!repeat) tree.removeUpdate(update);
|
||||
run();
|
||||
runOutput(0);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
|
|
@ -9,6 +9,6 @@ class OnUpdateNode extends LogicNode {
|
|||
}
|
||||
|
||||
function update() {
|
||||
run();
|
||||
runOutput(0);
|
||||
}
|
||||
}
|
||||
|
|
|
@ -23,6 +23,6 @@ class OnVirtualButtonNode extends LogicNode {
|
|||
case "Released":
|
||||
b = vb.released;
|
||||
}
|
||||
if (b) run();
|
||||
if (b) runOutput(0);
|
||||
}
|
||||
}
|
||||
|
|
|
@ -47,6 +47,6 @@ class OnVolumeTriggerNode extends LogicNode {
|
|||
|
||||
lastOverlap = overlap;
|
||||
|
||||
if (b) run();
|
||||
if (b) runOutput(0);
|
||||
}
|
||||
}
|
||||
|
|
|
@ -8,7 +8,7 @@ class PauseActionNode extends LogicNode {
|
|||
super(tree);
|
||||
}
|
||||
|
||||
override function run() {
|
||||
override function run(from:Int) {
|
||||
var object:Object = inputs[1].get();
|
||||
|
||||
if (object == null) return;
|
||||
|
@ -17,6 +17,6 @@ class PauseActionNode extends LogicNode {
|
|||
|
||||
animation.pause();
|
||||
|
||||
super.run();
|
||||
runOutput(0);
|
||||
}
|
||||
}
|
||||
|
|
|
@ -8,10 +8,10 @@ class PauseSoundNode extends LogicNode {
|
|||
super(tree);
|
||||
}
|
||||
|
||||
override function run() {
|
||||
override function run(from:Int) {
|
||||
var object:SpeakerObject = cast(inputs[1].get(), SpeakerObject);
|
||||
if (object == null) return;
|
||||
object.pause();
|
||||
super.run();
|
||||
runOutput(0);
|
||||
}
|
||||
}
|
||||
|
|
|
@ -8,13 +8,13 @@ class PauseTilesheetNode extends LogicNode {
|
|||
super(tree);
|
||||
}
|
||||
|
||||
override function run() {
|
||||
override function run(from:Int) {
|
||||
var object:MeshObject = inputs[1].get();
|
||||
|
||||
if (object == null) return;
|
||||
|
||||
object.tilesheet.pause();
|
||||
|
||||
super.run();
|
||||
runOutput(0);
|
||||
}
|
||||
}
|
||||
|
|
|
@ -6,12 +6,12 @@ class PauseTraitNode extends LogicNode {
|
|||
super(tree);
|
||||
}
|
||||
|
||||
override function run() {
|
||||
override function run(from:Int) {
|
||||
var trait:Dynamic = inputs[1].get();
|
||||
if (trait == null || !Std.is(trait, LogicTree)) return;
|
||||
|
||||
cast(trait, LogicTree).pause();
|
||||
|
||||
super.run();
|
||||
runOutput(0);
|
||||
}
|
||||
}
|
||||
|
|
|
@ -8,7 +8,7 @@ class PlayActionNode extends LogicNode {
|
|||
super(tree);
|
||||
}
|
||||
|
||||
override function run() {
|
||||
override function run(from:Int) {
|
||||
var object:Object = inputs[1].get();
|
||||
var action:String = inputs[2].get();
|
||||
// TODO: assume input exists
|
||||
|
@ -19,9 +19,9 @@ class PlayActionNode extends LogicNode {
|
|||
if (animation == null) animation = object.getParentArmature(object.name);
|
||||
|
||||
animation.play(action, function() {
|
||||
runOutputs(1);
|
||||
runOutput(1);
|
||||
}, blendTime);
|
||||
|
||||
runOutputs(0);
|
||||
runOutput(0);
|
||||
}
|
||||
}
|
||||
|
|
|
@ -8,10 +8,10 @@ class PlaySoundNode extends LogicNode {
|
|||
super(tree);
|
||||
}
|
||||
|
||||
override function run() {
|
||||
override function run(from:Int) {
|
||||
var object:SpeakerObject = cast(inputs[1].get(), SpeakerObject);
|
||||
if (object == null) return;
|
||||
object.play();
|
||||
super.run();
|
||||
runOutput(0);
|
||||
}
|
||||
}
|
||||
|
|
|
@ -8,10 +8,10 @@ class PlaySoundRawNode extends LogicNode {
|
|||
super(tree);
|
||||
}
|
||||
|
||||
override function run() {
|
||||
override function run(from:Int) {
|
||||
iron.data.Data.getSound(property0, function(sound:kha.Sound) {
|
||||
iron.system.Audio.play(sound, false);
|
||||
});
|
||||
super.run();
|
||||
runOutput(0);
|
||||
}
|
||||
}
|
||||
|
|
|
@ -8,16 +8,16 @@ class PlayTilesheetNode extends LogicNode {
|
|||
super(tree);
|
||||
}
|
||||
|
||||
override function run() {
|
||||
override function run(from:Int) {
|
||||
var object:MeshObject = inputs[1].get();
|
||||
var action:String = inputs[2].get();
|
||||
|
||||
if (object == null) return;
|
||||
|
||||
object.tilesheet.play(action, function() {
|
||||
runOutputs(1);
|
||||
runOutput(1);
|
||||
});
|
||||
|
||||
runOutputs(0);
|
||||
runOutput(0);
|
||||
}
|
||||
}
|
||||
|
|
|
@ -6,11 +6,11 @@ class PrintNode extends LogicNode {
|
|||
super(tree);
|
||||
}
|
||||
|
||||
override function run() {
|
||||
override function run(from:Int) {
|
||||
var value:Dynamic = inputs[1].get();
|
||||
|
||||
trace(value);
|
||||
|
||||
super.run();
|
||||
runOutput(0);
|
||||
}
|
||||
}
|
||||
|
|
|
@ -6,9 +6,9 @@ class RemoveActiveSceneNode extends LogicNode {
|
|||
super(tree);
|
||||
}
|
||||
|
||||
override function run() {
|
||||
override function run(from:Int) {
|
||||
|
||||
iron.Scene.active.remove();
|
||||
runOutputs(0);
|
||||
runOutput(0);
|
||||
}
|
||||
}
|
||||
|
|
|
@ -6,11 +6,11 @@ class RemoveGroupNode extends LogicNode {
|
|||
super(tree);
|
||||
}
|
||||
|
||||
override function run() {
|
||||
override function run(from:Int) {
|
||||
var groupName:String = inputs[1].get();
|
||||
|
||||
iron.Scene.active.groups.remove(groupName);
|
||||
|
||||
super.run();
|
||||
runOutput(0);
|
||||
}
|
||||
}
|
||||
|
|
|
@ -8,13 +8,13 @@ class RemoveObjectNode extends LogicNode {
|
|||
super(tree);
|
||||
}
|
||||
|
||||
override function run() {
|
||||
override function run(from:Int) {
|
||||
var object:Object = inputs[1].get();
|
||||
|
||||
if (object == null) return;
|
||||
|
||||
object.remove();
|
||||
|
||||
super.run();
|
||||
runOutput(0);
|
||||
}
|
||||
}
|
||||
|
|
|
@ -8,11 +8,11 @@ class RemoveTraitNode extends LogicNode {
|
|||
super(tree);
|
||||
}
|
||||
|
||||
override function run() {
|
||||
override function run(from:Int) {
|
||||
var trait:Dynamic = inputs[1].get();
|
||||
if (trait == null) return;
|
||||
trait.remove();
|
||||
|
||||
super.run();
|
||||
runOutput(0);
|
||||
}
|
||||
}
|
||||
|
|
|
@ -8,7 +8,7 @@ class ResumeActionNode extends LogicNode {
|
|||
super(tree);
|
||||
}
|
||||
|
||||
override function run() {
|
||||
override function run(from:Int) {
|
||||
var object:Object = inputs[1].get();
|
||||
|
||||
if (object == null) return;
|
||||
|
@ -17,6 +17,6 @@ class ResumeActionNode extends LogicNode {
|
|||
|
||||
animation.resume();
|
||||
|
||||
super.run();
|
||||
runOutput(0);
|
||||
}
|
||||
}
|
||||
|
|
|
@ -8,13 +8,13 @@ class ResumeTilesheetNode extends LogicNode {
|
|||
super(tree);
|
||||
}
|
||||
|
||||
override function run() {
|
||||
override function run(from:Int) {
|
||||
var object:MeshObject = inputs[1].get();
|
||||
|
||||
if (object == null) return;
|
||||
|
||||
object.tilesheet.resume();
|
||||
|
||||
super.run();
|
||||
runOutput(0);
|
||||
}
|
||||
}
|
||||
|
|
|
@ -6,12 +6,12 @@ class ResumeTraitNode extends LogicNode {
|
|||
super(tree);
|
||||
}
|
||||
|
||||
override function run() {
|
||||
override function run(from:Int) {
|
||||
var trait:Dynamic = inputs[1].get();
|
||||
if (trait == null || !Std.is(trait, LogicTree)) return;
|
||||
|
||||
cast(trait, LogicTree).resume();
|
||||
|
||||
super.run();
|
||||
runOutput(0);
|
||||
}
|
||||
}
|
||||
|
|
|
@ -14,7 +14,7 @@ class RotateObjectNode extends LogicNode {
|
|||
super(tree);
|
||||
}
|
||||
|
||||
override function run() {
|
||||
override function run(from:Int) {
|
||||
var object:Object = inputs[1].get();
|
||||
var vec:Vec4 = inputs[2].get();
|
||||
|
||||
|
@ -30,6 +30,6 @@ class RotateObjectNode extends LogicNode {
|
|||
if (rigidBody != null) rigidBody.syncTransform();
|
||||
#end
|
||||
|
||||
super.run();
|
||||
runOutput(0);
|
||||
}
|
||||
}
|
||||
|
|
|
@ -11,7 +11,7 @@ class ScaleObjectNode extends LogicNode {
|
|||
super(tree);
|
||||
}
|
||||
|
||||
override function run() {
|
||||
override function run(from:Int) {
|
||||
var object:Object = inputs[1].get();
|
||||
var vec:Vec4 = inputs[2].get();
|
||||
|
||||
|
@ -25,6 +25,6 @@ class ScaleObjectNode extends LogicNode {
|
|||
if (rigidBody != null) rigidBody.syncTransform();
|
||||
#end
|
||||
|
||||
super.run();
|
||||
runOutput(0);
|
||||
}
|
||||
}
|
||||
|
|
|
@ -15,7 +15,7 @@ class ScriptNode extends LogicNode {
|
|||
super(tree);
|
||||
}
|
||||
|
||||
override function run() {
|
||||
override function run(from:Int) {
|
||||
|
||||
var v:Dynamic = inputs[1].get();
|
||||
|
||||
|
@ -33,7 +33,7 @@ class ScriptNode extends LogicNode {
|
|||
result = interp.execute(ast);
|
||||
#end
|
||||
|
||||
runOutputs(0);
|
||||
runOutput(0);
|
||||
}
|
||||
|
||||
override function get(from:Int):Dynamic {
|
||||
|
|
|
@ -11,7 +11,7 @@ class SendEventNode extends LogicNode {
|
|||
super(tree);
|
||||
}
|
||||
|
||||
override function run() {
|
||||
override function run(from:Int) {
|
||||
var name:String = inputs[1].get();
|
||||
var object:Object = inputs.length > 2 ? inputs[2].get() : tree.object;
|
||||
|
||||
|
@ -27,6 +27,6 @@ class SendEventNode extends LogicNode {
|
|||
if (entries == null) return;
|
||||
for (e in entries) e.onEvent();
|
||||
|
||||
super.run();
|
||||
runOutput(0);
|
||||
}
|
||||
}
|
||||
|
|
|
@ -11,7 +11,7 @@ class SendGlobalEventNode extends LogicNode {
|
|||
super(tree);
|
||||
}
|
||||
|
||||
override function run() {
|
||||
override function run(from:Int) {
|
||||
var name:String = inputs[1].get();
|
||||
|
||||
// if (entries == null) {
|
||||
|
@ -20,6 +20,6 @@ class SendGlobalEventNode extends LogicNode {
|
|||
if (entries == null) return; // Event does not exist
|
||||
for (e in entries) e.onEvent();
|
||||
|
||||
super.run();
|
||||
runOutput(0);
|
||||
}
|
||||
}
|
||||
|
|
|
@ -6,7 +6,7 @@ class SequenceNode extends LogicNode {
|
|||
super(tree);
|
||||
}
|
||||
|
||||
override function run() {
|
||||
super.run();
|
||||
override function run(from:Int) {
|
||||
runOutput(0);
|
||||
}
|
||||
}
|
||||
|
|
|
@ -8,7 +8,7 @@ class SetActionSpeedNode extends LogicNode {
|
|||
super(tree);
|
||||
}
|
||||
|
||||
override function run() {
|
||||
override function run(from:Int) {
|
||||
var object:Object = inputs[1].get();
|
||||
var speed:Float = inputs[2].get();
|
||||
|
||||
|
@ -18,6 +18,6 @@ class SetActionSpeedNode extends LogicNode {
|
|||
|
||||
animation.speed = speed;
|
||||
|
||||
super.run();
|
||||
runOutput(0);
|
||||
}
|
||||
}
|
||||
|
|
|
@ -8,7 +8,7 @@ class SetCameraFovNode extends LogicNode {
|
|||
super(tree);
|
||||
}
|
||||
|
||||
override function run() {
|
||||
override function run(from:Int) {
|
||||
var camera:CameraObject = inputs[1].get();
|
||||
var fov:Float = inputs[2].get();
|
||||
|
||||
|
@ -17,6 +17,6 @@ class SetCameraFovNode extends LogicNode {
|
|||
camera.data.raw.fov = fov;
|
||||
camera.buildProjection();
|
||||
|
||||
super.run();
|
||||
runOutput(0);
|
||||
}
|
||||
}
|
||||
|
|
|
@ -10,7 +10,7 @@ class SetGravityNode extends LogicNode {
|
|||
super(tree);
|
||||
}
|
||||
|
||||
override function run() {
|
||||
override function run(from:Int) {
|
||||
var gravity:Vec4 = inputs[1].get();
|
||||
|
||||
if (gravity == null) return;
|
||||
|
@ -20,6 +20,6 @@ class SetGravityNode extends LogicNode {
|
|||
physics.setGravity(gravity);
|
||||
#end
|
||||
|
||||
super.run();
|
||||
runOutput(0);
|
||||
}
|
||||
}
|
||||
|
|
|
@ -8,7 +8,7 @@ class SetLightColorNode extends LogicNode {
|
|||
super(tree);
|
||||
}
|
||||
|
||||
override function run() {
|
||||
override function run(from:Int) {
|
||||
var light:LightObject = inputs[1].get();
|
||||
var color:iron.math.Vec4 = inputs[2].get();
|
||||
|
||||
|
@ -18,6 +18,6 @@ class SetLightColorNode extends LogicNode {
|
|||
light.data.raw.color[1] = color.y;
|
||||
light.data.raw.color[2] = color.z;
|
||||
|
||||
super.run();
|
||||
runOutput(0);
|
||||
}
|
||||
}
|
||||
|
|
|
@ -8,7 +8,7 @@ class SetLightStrengthNode extends LogicNode {
|
|||
super(tree);
|
||||
}
|
||||
|
||||
override function run() {
|
||||
override function run(from:Int) {
|
||||
var light:LightObject = inputs[1].get();
|
||||
var strength:Float = inputs[2].get();
|
||||
|
||||
|
@ -16,6 +16,6 @@ class SetLightStrengthNode extends LogicNode {
|
|||
|
||||
light.data.raw.strength = light.data.raw.type == "sun" ? strength * 0.325 : strength * 0.026;
|
||||
|
||||
super.run();
|
||||
runOutput(0);
|
||||
}
|
||||
}
|
||||
|
|
|
@ -10,7 +10,7 @@ class SetLocationNode extends LogicNode {
|
|||
super(tree);
|
||||
}
|
||||
|
||||
override function run() {
|
||||
override function run(from:Int) {
|
||||
var object:Object = inputs[1].get();
|
||||
var vec:Vec4 = inputs[2].get();
|
||||
|
||||
|
@ -24,6 +24,6 @@ class SetLocationNode extends LogicNode {
|
|||
if (rigidBody != null) rigidBody.syncTransform();
|
||||
#end
|
||||
|
||||
super.run();
|
||||
runOutput(0);
|
||||
}
|
||||
}
|
||||
|
|
|
@ -19,7 +19,7 @@ class SetMaterialImageParamNode extends LogicNode {
|
|||
}
|
||||
}
|
||||
|
||||
override function run() {
|
||||
override function run(from:Int) {
|
||||
mat = inputs[1].get();
|
||||
node = inputs[2].get();
|
||||
if (mat == null || node == null) return;
|
||||
|
@ -29,7 +29,7 @@ class SetMaterialImageParamNode extends LogicNode {
|
|||
image = img;
|
||||
});
|
||||
|
||||
super.run();
|
||||
runOutput(0);
|
||||
}
|
||||
|
||||
static function textureLink(object:Object, mat:MaterialData, link:String):kha.Image {
|
||||
|
|
|
@ -9,7 +9,7 @@ class SetMaterialNode extends LogicNode {
|
|||
super(tree);
|
||||
}
|
||||
|
||||
override function run() {
|
||||
override function run(from:Int) {
|
||||
var object:MeshObject = inputs[1].get();
|
||||
var mat:MaterialData = inputs[2].get();
|
||||
|
||||
|
@ -19,6 +19,6 @@ class SetMaterialNode extends LogicNode {
|
|||
object.materials[i] = mat;
|
||||
}
|
||||
|
||||
super.run();
|
||||
runOutput(0);
|
||||
}
|
||||
}
|
||||
|
|
|
@ -19,12 +19,12 @@ class SetMaterialRgbParamNode extends LogicNode {
|
|||
}
|
||||
}
|
||||
|
||||
override function run() {
|
||||
override function run(from:Int) {
|
||||
mat = inputs[1].get();
|
||||
node = inputs[2].get();
|
||||
col = inputs[3].get();
|
||||
|
||||
super.run();
|
||||
runOutput(0);
|
||||
}
|
||||
|
||||
static function vec3Link(object:Object, mat:MaterialData, link:String):iron.math.Vec4 {
|
||||
|
|
|
@ -9,7 +9,7 @@ class SetMaterialSlotNode extends LogicNode {
|
|||
super(tree);
|
||||
}
|
||||
|
||||
override function run() {
|
||||
override function run(from:Int) {
|
||||
var object:MeshObject = inputs[1].get();
|
||||
var mat:MaterialData = inputs[2].get();
|
||||
var slot:Int = inputs[3].get();
|
||||
|
@ -19,6 +19,6 @@ class SetMaterialSlotNode extends LogicNode {
|
|||
|
||||
object.materials[slot] = mat;
|
||||
|
||||
super.run();
|
||||
runOutput(0);
|
||||
}
|
||||
}
|
||||
|
|
|
@ -19,12 +19,12 @@ class SetMaterialValueParamNode extends LogicNode {
|
|||
}
|
||||
}
|
||||
|
||||
override function run() {
|
||||
override function run(from:Int) {
|
||||
mat = inputs[1].get();
|
||||
node = inputs[2].get();
|
||||
value = inputs[3].get();
|
||||
|
||||
super.run();
|
||||
runOutput(0);
|
||||
}
|
||||
|
||||
static function floatLink(object:Object, mat:MaterialData, link:String):Null<kha.FastFloat> {
|
||||
|
|
|
@ -9,7 +9,7 @@ class SetMeshNode extends LogicNode {
|
|||
super(tree);
|
||||
}
|
||||
|
||||
override function run() {
|
||||
override function run(from:Int) {
|
||||
var object:MeshObject = inputs[1].get();
|
||||
var mesh:MeshData = inputs[2].get();
|
||||
|
||||
|
@ -17,6 +17,6 @@ class SetMeshNode extends LogicNode {
|
|||
|
||||
object.data = mesh;
|
||||
|
||||
super.run();
|
||||
runOutput(0);
|
||||
}
|
||||
}
|
||||
|
|
|
@ -6,10 +6,10 @@ class SetMouseLockNode extends LogicNode {
|
|||
super(tree);
|
||||
}
|
||||
|
||||
override function run() {
|
||||
override function run(from:Int) {
|
||||
var lock:Bool = inputs[1].get();
|
||||
var mouse = iron.system.Input.getMouse();
|
||||
lock ? mouse.lock() : mouse.unlock();
|
||||
super.run();
|
||||
runOutput(0);
|
||||
}
|
||||
}
|
||||
|
|
|
@ -8,7 +8,7 @@ class SetNameNode extends LogicNode {
|
|||
super(tree);
|
||||
}
|
||||
|
||||
override function run() {
|
||||
override function run(from:Int) {
|
||||
var object:Object = inputs[1].get();
|
||||
var name:String = inputs[2].get();
|
||||
|
||||
|
@ -16,6 +16,6 @@ class SetNameNode extends LogicNode {
|
|||
|
||||
object.name = name;
|
||||
|
||||
super.run();
|
||||
runOutput(0);
|
||||
}
|
||||
}
|
||||
|
|
|
@ -8,7 +8,7 @@ class SetNativePropertyNode extends LogicNode {
|
|||
super(tree);
|
||||
}
|
||||
|
||||
override function run() {
|
||||
override function run(from:Int) {
|
||||
var object:Object = inputs[1].get();
|
||||
var property:String = inputs[2].get();
|
||||
var value:Dynamic = inputs[3].get();
|
||||
|
@ -17,6 +17,6 @@ class SetNativePropertyNode extends LogicNode {
|
|||
|
||||
Reflect.setProperty(object, property, value);
|
||||
|
||||
super.run();
|
||||
runOutput(0);
|
||||
}
|
||||
}
|
||||
|
|
|
@ -8,7 +8,7 @@ class SetParentBoneNode extends LogicNode {
|
|||
super(tree);
|
||||
}
|
||||
|
||||
override function run() {
|
||||
override function run(from:Int) {
|
||||
var object:Object = inputs[1].get();
|
||||
var parent:Object = inputs[2].get();
|
||||
var bone:String = inputs[3].get();
|
||||
|
@ -23,6 +23,6 @@ class SetParentBoneNode extends LogicNode {
|
|||
var banim = object.getParentArmature(object.parent.name);
|
||||
banim.addBoneChild(bone, object);
|
||||
|
||||
super.run();
|
||||
runOutput(0);
|
||||
}
|
||||
}
|
||||
|
|
|
@ -8,7 +8,7 @@ class SetParentNode extends LogicNode {
|
|||
super(tree);
|
||||
}
|
||||
|
||||
override function run() {
|
||||
override function run(from:Int) {
|
||||
var object:Object = inputs[1].get();
|
||||
|
||||
var parent:Object;
|
||||
|
@ -25,6 +25,6 @@ class SetParentNode extends LogicNode {
|
|||
object.parent.removeChild(object, isUnparent); // keepTransform
|
||||
parent.addChild(object, !isUnparent); // applyInverse
|
||||
|
||||
super.run();
|
||||
runOutput(0);
|
||||
}
|
||||
}
|
||||
|
|
|
@ -8,7 +8,7 @@ class SetParticleSpeedNode extends LogicNode {
|
|||
super(tree);
|
||||
}
|
||||
|
||||
override function run() {
|
||||
override function run(from:Int) {
|
||||
#if arm_particles
|
||||
var object:Object = inputs[1].get();
|
||||
var speed:Float = inputs[2].get();
|
||||
|
@ -21,7 +21,7 @@ class SetParticleSpeedNode extends LogicNode {
|
|||
|
||||
psys.speed = speed;
|
||||
|
||||
super.run();
|
||||
runOutput(0);
|
||||
#end
|
||||
}
|
||||
}
|
||||
|
|
|
@ -8,7 +8,7 @@ class SetPropertyNode extends LogicNode {
|
|||
super(tree);
|
||||
}
|
||||
|
||||
override function run() {
|
||||
override function run(from:Int) {
|
||||
var object:Object = inputs[1].get();
|
||||
var property:String = inputs[2].get();
|
||||
var value:Dynamic = inputs[3].get();
|
||||
|
@ -17,6 +17,6 @@ class SetPropertyNode extends LogicNode {
|
|||
if (object.properties == null) object.properties = new Map();
|
||||
object.properties.set(property, value);
|
||||
|
||||
super.run();
|
||||
runOutput(0);
|
||||
}
|
||||
}
|
||||
|
|
|
@ -10,7 +10,7 @@ class SetRotationNode extends LogicNode {
|
|||
super(tree);
|
||||
}
|
||||
|
||||
override function run() {
|
||||
override function run(from:Int) {
|
||||
var object:Object = inputs[1].get();
|
||||
var vec:Vec4 = inputs[2].get();
|
||||
|
||||
|
@ -24,6 +24,6 @@ class SetRotationNode extends LogicNode {
|
|||
if (rigidBody != null) rigidBody.syncTransform();
|
||||
#end
|
||||
|
||||
super.run();
|
||||
runOutput(0);
|
||||
}
|
||||
}
|
||||
|
|
|
@ -10,7 +10,7 @@ class SetScaleNode extends LogicNode {
|
|||
super(tree);
|
||||
}
|
||||
|
||||
override function run() {
|
||||
override function run(from:Int) {
|
||||
var object:Object = inputs[1].get();
|
||||
var vec:Vec4 = inputs[2].get();
|
||||
|
||||
|
@ -24,6 +24,6 @@ class SetScaleNode extends LogicNode {
|
|||
if (rigidBody != null) rigidBody.syncTransform();
|
||||
#end
|
||||
|
||||
super.run();
|
||||
runOutput(0);
|
||||
}
|
||||
}
|
||||
|
|
|
@ -10,12 +10,12 @@ class SetSceneNode extends LogicNode {
|
|||
super(tree);
|
||||
}
|
||||
|
||||
override function run() {
|
||||
override function run(from:Int) {
|
||||
var sceneName:String = inputs[1].get();
|
||||
|
||||
iron.Scene.setActive(sceneName, function(o:iron.object.Object) {
|
||||
root = o;
|
||||
runOutputs(0);
|
||||
runOutput(0);
|
||||
});
|
||||
}
|
||||
|
||||
|
|
|
@ -6,7 +6,7 @@ class SetStaticPropertyNode extends LogicNode {
|
|||
super(tree);
|
||||
}
|
||||
|
||||
override function run() {
|
||||
override function run(from:Int) {
|
||||
var className:String = inputs[1].get();
|
||||
var property:String = inputs[2].get();
|
||||
var value:Dynamic = inputs[3].get();
|
||||
|
@ -15,6 +15,6 @@ class SetStaticPropertyNode extends LogicNode {
|
|||
if (cl == null) return;
|
||||
Reflect.setField(cl, property, value);
|
||||
|
||||
super.run();
|
||||
runOutput(0);
|
||||
}
|
||||
}
|
||||
|
|
|
@ -6,9 +6,9 @@ class SetTimeScaleNode extends LogicNode {
|
|||
super(tree);
|
||||
}
|
||||
|
||||
override function run() {
|
||||
override function run(from:Int) {
|
||||
var f:Float = inputs[1].get();
|
||||
iron.system.Time.scale = f;
|
||||
super.run();
|
||||
runOutput(0);
|
||||
}
|
||||
}
|
||||
|
|
|
@ -10,7 +10,7 @@ class SetTransformNode extends LogicNode {
|
|||
super(tree);
|
||||
}
|
||||
|
||||
override function run() {
|
||||
override function run(from:Int) {
|
||||
var object:Object = inputs[1].get();
|
||||
var matrix:Mat4 = inputs[2].get();
|
||||
|
||||
|
@ -23,6 +23,6 @@ class SetTransformNode extends LogicNode {
|
|||
if (rigidBody != null) rigidBody.syncTransform();
|
||||
#end
|
||||
|
||||
super.run();
|
||||
runOutput(0);
|
||||
}
|
||||
}
|
||||
|
|
|
@ -6,12 +6,12 @@ class SetVariableNode extends LogicNode {
|
|||
super(tree);
|
||||
}
|
||||
|
||||
override function run() {
|
||||
override function run(from:Int) {
|
||||
var variable = inputs[1];
|
||||
var value:Dynamic = inputs[2].get();
|
||||
|
||||
variable.set(value);
|
||||
|
||||
super.run();
|
||||
runOutput(0);
|
||||
}
|
||||
}
|
||||
|
|
|
@ -10,7 +10,7 @@ class SetVelocityNode extends LogicNode {
|
|||
super(tree);
|
||||
}
|
||||
|
||||
override function run() {
|
||||
override function run(from:Int) {
|
||||
var object:Object = inputs[1].get();
|
||||
var linear:Vec4 = inputs[2].get();
|
||||
var linearFactor:Vec4 = inputs[3].get();
|
||||
|
@ -28,6 +28,6 @@ class SetVelocityNode extends LogicNode {
|
|||
rb.setAngularFactor(angularFactor.x, angularFactor.y, angularFactor.z);
|
||||
#end
|
||||
|
||||
super.run();
|
||||
runOutput(0);
|
||||
}
|
||||
}
|
||||
|
|
|
@ -8,7 +8,7 @@ class SetVisibleNode extends LogicNode {
|
|||
super(tree);
|
||||
}
|
||||
|
||||
override function run() {
|
||||
override function run(from:Int) {
|
||||
var object:Object = inputs[1].get();
|
||||
var visible:Bool = inputs[2].get();
|
||||
|
||||
|
@ -16,6 +16,6 @@ class SetVisibleNode extends LogicNode {
|
|||
|
||||
object.visible = visible;
|
||||
|
||||
super.run();
|
||||
runOutput(0);
|
||||
}
|
||||
}
|
||||
|
|
|
@ -6,10 +6,10 @@ class ShowMouseNode extends LogicNode {
|
|||
super(tree);
|
||||
}
|
||||
|
||||
override function run() {
|
||||
override function run(from:Int) {
|
||||
var show:Bool = inputs[1].get();
|
||||
var mouse = iron.system.Input.getMouse();
|
||||
show ? mouse.show() : mouse.hide();
|
||||
super.run();
|
||||
runOutput(0);
|
||||
}
|
||||
}
|
||||
|
|
|
@ -6,7 +6,7 @@ class ShutdownNode extends LogicNode {
|
|||
super(tree);
|
||||
}
|
||||
|
||||
override function run() {
|
||||
override function run(from:Int) {
|
||||
kha.System.stop();
|
||||
}
|
||||
}
|
||||
|
|
Some files were not shown because too many files have changed in this diff Show more
Loading…
Reference in a new issue