ActionMap Stack
Introduction
ActionMap Stack Overview
Stack Functions
Pushing and Popping ActionMaps
Example Usage
// Create two ActionMaps
new ActionMap(map1);
new ActionMap(map2);
// Set up keybinds for map1
map1.bind(keyboard, "w", "moveForward");
map1.bind(keyboard, "s", "moveBackward");
// Set up keybinds for map2
map2.bind(keyboard, "w", "strafeLeft");
map2.bind(keyboard, "d", "strafeRight");
// Push map1 onto the stack
map1.push();
// Handle input events and callbacks for map1
// ...
// Push map2 onto the stack
map2.push();
// Handle input events and callbacks for map2
// ...
// Pop map2 from the stack
map2.pop();
// Handle input events and callbacks for map1 again
// ...
// Pop map1 from the stack
map1.pop();Last updated