Anatol

Forum Replies Created

Viewing 4 posts - 16 through 19 (of 19 total)
  • Author
    Posts
  • in reply to: Best Practice: Class vs Struct and Array vs List #10975

    Anatol
    Participant

    Hi,

    thanks for the hint nerobot. I’m just doing the “double work” out of habit, so should I ever change the way I disable controllers I only need to change it in one place, i.e. in Method Disable. I think here the performance impact should be negligible.

    And cocon, I just came up with this manager class to keep it as flexible as possible. In the setup I basically just create controls with a condition and a callback. I could add this stuff into the render loop but I prefer to have it packaged in this class not to “pollute” the render loop too much, and also to easily disable/enable controls later. That’s where the Lamda functions are really useful.

    So in the main program this is how I’m using this class:

    I could later then just do something like

    <div id=”crayon-59d4ac7531a47621632511-36″ class=”crayon-line”></div>

    in reply to: Best Practice: Class vs Struct and Array vs List #10928

    Anatol
    Participant

    Thanks Mark. That’s good advice.

    In this case I actually changed it to a key map so that I have easy access to individual collection items via its key.

    Also, very nice that we have Lamda functions now. It’s really fun to use Monkey 2, now that I got more used to the syntax and strict types again.

    in reply to: Creating an empty class or struct array #10908

    Anatol
    Participant

    Oh! Thanks Jesse. I could’ve sworn that I tried this, but apparently not. And yes, that works well, even with length 0.

    in reply to: Accelerometer? #10666

    Anatol
    Participant

    Ah, great! Thanks for the info. I’ll try that.

Viewing 4 posts - 16 through 19 (of 19 total)