In my game, I have a pallets on which the character can put or take a blocks
Before character lay or take some block is called function “check_content”
(the character must know where to take or put a block).Everything works very nicely.
The problem is that the pallets on the scene can be tens or hundreds and
function “check_content” is included in the Update functions.
function Update{
If (change) check_content();
}
function check_content(){
//checks the contents of the palette`
}
Some pallets can be updated often ,other rarely and other never but
it does not matter because practically this means hundreds acting
Update functions in the scene.
Is there any technique that would replace Update functions ?