2024-08-07 11:48:39 +02:00
|
|
|
function nodeValue_Output(_name, _node, _type, _value, _tooltip = "") { return new NodeValue_Output(_name, _node, _type, _value, _tooltip); }
|
2024-08-06 14:04:41 +02:00
|
|
|
|
2024-08-20 10:15:53 +02:00
|
|
|
function NodeValue_Output(_name, _node, _type, _value, _tooltip = "") : NodeValue(_name, _node, CONNECT_TYPE.output, _type, _value, _tooltip) constructor {
|
2024-08-06 14:04:41 +02:00
|
|
|
|
2024-08-14 09:55:53 +02:00
|
|
|
index = array_length(node.outputs);
|
|
|
|
|
2024-08-06 14:04:41 +02:00
|
|
|
/////============== GET =============
|
|
|
|
|
2024-08-09 13:30:09 +02:00
|
|
|
output_value = _value;
|
2024-08-06 14:04:41 +02:00
|
|
|
|
2024-08-14 09:55:53 +02:00
|
|
|
static getValue = function(_time = CURRENT_FRAME, applyUnit = true, arrIndex = 0, useCache = false, log = false) {
|
2024-08-06 14:04:41 +02:00
|
|
|
return output_value;
|
|
|
|
}
|
|
|
|
|
|
|
|
static getValueRecursive = function(arr = __curr_get_val, _time = CURRENT_FRAME) {
|
|
|
|
arr[@ 0] = output_value;
|
|
|
|
arr[@ 1] = self;
|
|
|
|
}
|
|
|
|
|
2024-08-14 09:55:53 +02:00
|
|
|
static __getAnimValue = function() /*=>*/ {return output_value};
|
|
|
|
static showValue = function() /*=>*/ {return output_value};
|
2024-08-06 14:04:41 +02:00
|
|
|
|
|
|
|
/////============== SET =============
|
|
|
|
|
2024-08-14 09:55:53 +02:00
|
|
|
static setValue = function(val = 0, record = true, time = CURRENT_FRAME, _update = true) {
|
2024-08-06 14:04:41 +02:00
|
|
|
output_value = val;
|
2024-08-08 06:57:51 +02:00
|
|
|
|
|
|
|
for( var i = 0, n = array_length(value_to_loop); i < n; i++ )
|
|
|
|
value_to_loop[i].updateValue();
|
|
|
|
|
2024-08-06 14:04:41 +02:00
|
|
|
return true;
|
|
|
|
}
|
|
|
|
|
|
|
|
static setValueDirect = function(val = 0, index = noone, record = true, time = CURRENT_FRAME, _update = true) {
|
|
|
|
output_value = val;
|
|
|
|
return true;
|
|
|
|
}
|
2024-08-14 09:55:53 +02:00
|
|
|
}
|
|
|
|
|
|
|
|
function NodeValue_Input_Bypass(_from, _name, _node, _type, _index) : NodeValue_Output(_name, _node, _type, 0, "") constructor {
|
|
|
|
from_junc = _from;
|
|
|
|
visible = false;
|
|
|
|
index = 1000 + _index;
|
|
|
|
|
|
|
|
static drawBypass = function(params = {}) {
|
|
|
|
if(!from_junc.isVisible()) return;
|
|
|
|
|
|
|
|
var _aa = params.aa;
|
|
|
|
var _s = params.s;
|
|
|
|
|
|
|
|
draw_set_color(color_display);
|
|
|
|
draw_line_width(from_junc.x * _aa, from_junc.y * _aa, x * _aa, y * _aa, 4 * _aa * _s);
|
|
|
|
}
|
2024-08-06 14:04:41 +02:00
|
|
|
}
|