I am trying to create a simple rectangular board that consists of individual cells.
I am following tutorial projects as examples.
Config file made it easy to create a board of cells:
Position = (0, 0, 1.0); <= We place our first vertical wall
Graphic = CellGraphic;
Repeat = (22, 17, 1); tile graphic (x, y, 0) times on axis
Scale = @Cells
Body = WallBody
Then I display this object:
I then set event callback:
pstClock = orxClock_FindFirst(orx2F(-1.0f), orxCLOCK_TYPE_CORE);
/* Registers our update callback */
orxClock_Register(pstClock, Update, orxNULL, orxMODULE_ID_MAIN, orxCLOCK_PRIORITY_NORMAL);
And here is my update callback that changes the color of the object. I expected to pick an individual cell, but the entire collection of cells changes the color.
I think there is nothing wrong with that, but now I am stuck and can't figure out how to select just one object. I suspect that one INI section name is one object. If that's the case, then I assume I have to create objects inside Init function and I don't know how to do that. I am sorry, it must be trivial, but I want to make sure I don't do something stupid.