Пример #1
0
    public ControlMap RegisterDefaultControls(ControlMap _Controls)
    {
        //Debug.Log("Resetting Controls");
        _Controls.Clear();
        _Controls.RegisterKey("Ability", KeyCode.Space);
        _Controls.RegisterKey("Up", KeyCode.W);
        _Controls.RegisterKey("Down", KeyCode.S);
        _Controls.RegisterKey("Left", KeyCode.A);
        _Controls.RegisterKey("Right", KeyCode.D);
        _Controls.RegisterKey("Percise Move", KeyCode.LeftShift);
        _Controls.RegisterKey("Pause", KeyCode.Escape);

        _Controls.RegisterKey("Cancel", KeyCode.Escape);
        _Controls.RegisterKey("Toggle Editor", KeyCode.E);
        _Controls.RegisterKey("Advance", KeyCode.Space);
        return(_Controls);
    }
Пример #2
0
    void ListenToKeys()
    {
        Event cur = Event.current;

        if (cur.isKey)
        {
            KeyCode curKey = cur.keyCode;
            if (curKey == KeyCode.None)
            {
                Screen.lockCursor = false;
                _listeningTo      = -1;
                return;
            }
            _setControls.RegisterKey(_setControls.controlNames[_listeningTo], curKey);
            _listeningTo      = -1;
            Screen.lockCursor = false;
        }
    }
Пример #3
0
 public ControlMap RegisterDefaultControls(ControlMap _Controls)
 {
     Debug.Log("Resetting Controls");
     _Controls.Clear();
     _Controls.RegisterKey("Accelerate", KeyCode.W);
     _Controls.RegisterKey("Deccelerate", KeyCode.S);
     _Controls.RegisterKey("SteerLeft", KeyCode.A);
     _Controls.RegisterKey("SteerRight", KeyCode.D);
     _Controls.RegisterKey("RollLeft", KeyCode.Q);
     _Controls.RegisterKey("RollRight", KeyCode.E);
     _Controls.RegisterKey("Respawn", KeyCode.R);
     _Controls.RegisterKey("PowerControl", KeyCode.LeftShift);
     _Controls.RegisterKey("UseAbility", KeyCode.Space);
     _Controls.RegisterKey("LookBack", KeyCode.Tab);
     _Controls.RegisterKey("ToggleScreenLock", KeyCode.Escape);
     _Controls.RegisterKey("TargetingMode", KeyCode.Mouse1);
     _Controls.RegisterKey("ChangeShip", KeyCode.C);
     _Controls.RegisterKey("ActivateSheild", KeyCode.LeftControl);
     return _Controls;
 }