Pixel-Composer/scripts/_node_smoke/_node_smoke.gml

19 lines
583 B
Text
Raw Normal View History

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