Another Foreach Foreach?

@sampattuzzi what are alternatives to this… this is the second foreach foreach you implemented after refactoring the stat one into a lookup table and telling us not to use a double foreach…

Aren’t raycasts heavy to begin with? Now a double foreach on what we hit? Is this a good idea? …or am I just too concerned with performance… what if we were building this to mobile? Would this be laggy?

On a PC, this shoudln’t be much of an issue, and this is the best way to deal with cursor affordances.

For a mobile game, I would probably do this quite differently, implementing the interfaace IPointerClickHandler on each item that is now IRayCastable, which would then pretty much do what IRayCastable is doing now. You won’t have cursor affordances, but those dont’ mean much on a Mobile game.

This topic was automatically closed 24 hours after the last reply. New replies are no longer allowed.

Privacy & Terms