I'm trying from a long time to create two instance of Array to let them to be of different size and contains different values.
I need, for example, two Array_Test.
The first has 3 values (1,2,3)
The second has 5 values (5,6,7,8,9).
How I can do this VIA CODE?
I'm becoming crazy!
Someone can help me, please?
why not use 2 arrays ?
1) Create two different array objects in your project
2) If your data is 1d or 2d, you can use 3d array
3) Create separate instances of same array object and refer to them via UID you store during creation, or IID: array(0).at(0,0) or array(1).at(0,0)
It's only because I want to learn how to use instances of objects!
I've used the 3) point you suggested on my own, it's the simplest method I think.
Develop games in your browser. Powerful, performant & highly capable.
Another option to organize array instances is to tie an array to another object (invisible sprite) via a container. This particular method is useful in that it allows your arrays to have a "physical location", for example, multiple grid systems on a layout that you can mouse over. It allows you to pick the arrays any way you would normally pick a sprite object, which people are most familiar with.
Ok, I'll give a look at this, too.