Pixel-Composer/scripts/_node_smoke/_node_smoke.gml

19 lines
581 B
Text
Raw Normal View History

2024-03-19 09:49:29 +01:00
function Node_Smoke(_x, _y, _group = noone) : Node(_x, _y, _group) constructor {
2023-11-10 11:32:46 +01:00
color = COLORS.node_blend_smoke;
icon = THEME.smoke_sim;
2023-10-09 16:07:33 +02:00
update_on_frame = true;
2023-02-14 02:48:33 +01:00
2023-10-09 16:07:33 +02:00
static updateForward = function(frame = CURRENT_FRAME, _update = true) {
2023-02-14 02:48:33 +01:00
if(_update) update(frame);
2023-09-14 16:29:39 +02:00
//print($"Update {frame}: {name}");
2023-02-14 02:48:33 +01:00
2024-08-08 06:57:51 +02:00
var outJunc = outputs[0];
2023-12-19 14:30:34 +01:00
for( var i = 0; i < array_length(outJunc.value_to); i++ ) {
var _to = outJunc.value_to[i];
2023-02-14 02:48:33 +01:00
if(_to.value_from != outJunc) continue;
if(!struct_has(_to.node, "updateForward")) continue;
_to.node.updateForward(frame);
}
}
}