Hello everyone, there was a question and I hope there is a good solution for it. Please help.
I need to call a function in a render loop for objects. I will give an example to make it clearer.
I am creating a Box object: with properties, id as int, name as string, ....
but the boxes are very different and need to be processed by different functions in a loop.
For example, through CallSub: callsub2(me,"DrawBox_" & box.id,box) (function search many times per second)
Although I could have given an exact reference to the function when creating the object.
I could do the enumeration,
via if or select case, but there can be many types of boxes. And it's not convenient.
I know that in java you can put a link to a function in a variable and call it.
What solution can you recommend? THX :/
I need to call a function in a render loop for objects. I will give an example to make it clearer.
I am creating a Box object: with properties, id as int, name as string, ....
but the boxes are very different and need to be processed by different functions in a loop.
For example, through CallSub: callsub2(me,"DrawBox_" & box.id,box) (function search many times per second)
Although I could have given an exact reference to the function when creating the object.
I could do the enumeration,
via if or select case, but there can be many types of boxes. And it's not convenient.
I know that in java you can put a link to a function in a variable and call it.
What solution can you recommend? THX :/