Exemplo n.º 1
0
    public Game(MonoEventRelay monoEventRelay, UserInterface userInterface)
    {
        // These are MonoBehaviours so they have to be injected.
        MonoEventRelay = monoEventRelay;
        UserInterface  = userInterface;

        InputManager.RegisterMap(new InputMapPC());
        Data      = new Data();
        GameState = new GameState(this);
    }
Exemplo n.º 2
0
    public InputMapPC()
    {
        MonoEventRelay.RegisterForLateUpdate(this);
        bindings = new Dictionary <InputAction, KeyCode>();

        // Default bindings
        AddBinding(InputAction.Select, KeyCode.Space);
        AddBinding(InputAction.Inventory, KeyCode.Tab);
        AddBinding(InputAction.Back, KeyCode.Backspace);
        AddBinding(InputAction.Interact, KeyCode.E);
        AddBinding(InputAction.Up, KeyCode.UpArrow);
        AddBinding(InputAction.Right, KeyCode.RightArrow);
        AddBinding(InputAction.Down, KeyCode.DownArrow);
        AddBinding(InputAction.Left, KeyCode.LeftArrow);
        AddBinding(InputAction.Drop, KeyCode.Delete);
        AddBinding(InputAction.LeftBumper, KeyCode.Q);  // Debug
        AddBinding(InputAction.RightBumper, KeyCode.E); // Debug
    }