init static method

void init(
  1. Stage stage
)

Initializes the GKeyboard utility class.

This method sets up listeners for keyboard events on the specified Stage.

Implementation

static void init(Stage stage) {
  _stage = stage;
  _stage!.keyboard!.onDown.add(_onKey);
  _stage!.keyboard!.onUp.add(_onKey);
}