BSBussell / BML

The SDL Wrapper used by BlueKit2D to Simplify I/O and Rendering
2 stars 0 forks source link

Custom Events #37

Open BSBussell opened 1 year ago

BSBussell commented 1 year ago

Setup our event library so that the user can do

void jump() {
    return bEvent::keyDown('space');
}

bEvent::addEvent("Jump", &jump);
if (bEvent::Event("Jump")) {
    // jump logic
}

That way if someone wanted to change the jump button they just had to update the jump event

BSBussell commented 1 year ago

Kinda sloppy but ... yeah, might go back to the drawing board with this, essentially just want it to be easy to define actions and then change them (similar to godot's system)