Hey guys,
I am learning (try to, haha) about JavaScript + Construct and a tried a simple function but I think I made it wrong.
My function set opacity of object:
function setOpacity(obj, opacity) {
obj.opacity = opacity / 100;
}
And I call the function every the Family "enemies" is created: