void OnEnable() { //set this GameObject as a listener for the events coming from the Input System playerControls = new GameControls(); playerControls.Gameplay.SetCallbacks(this); playerControls.Enable(); }
void Start() { _controls = new GameControls(); _controls.Enable(); _controls.Keyboard.Interact.performed += context => { Interact(); }; _controls.Keyboard.Throw.performed += context => { PickupThrow(); }; }
private void OnEnable() { ResetState(); overlay.gameObject.SetActive(true); gameControls.Enable(); }
private void Awake() { _controls = new GameControls(); _controls.Default.Space.performed += HandleSpace; _controls.Enable(); }
private void OnEnable() { _gameControls.Default.Move.performed += OnMovePerformed; _gameControls.Default.Restart.performed += OnRestartPerformed; _gameControls.Default.Exit.performed += OnExitPerformed; _gameControls.Enable(); StartCoroutine(MoveCommandCoroutine()); }
private void OnEnable() { GameControls = new GameControls(); GameControls.Enable(); GameControls.CityBuilding.Movement.performed += CameraMovementEvent.Invoke; GameControls.CityBuilding.Rotation.performed += CameraRotationEvent.Invoke; GameControls.CityBuilding.Zoom.performed += CameraZoomEvent.Invoke; GameControls.CityBuilding.SelectionClick.performed += SelectionEvent.Invoke; }
public override void OnStartAuthority() { _cameraTransform.gameObject.SetActive(true); _controls = new GameControls(); _controls.Player.CameraMove.performed += SetPreviousInput; _controls.Player.CameraMove.canceled += SetPreviousInput; _controls.Enable(); }
public void Awake() { GameControls inputController = new GameControls(); inputController.GameControl.CursorLocation.performed += ctx => { Vector2 mousePos = ctx.ReadValue <Vector2>(); transform.position = new Vector3(mousePos.x, mousePos.y, -10); }; inputController.Enable(); }
private void Awake() { _movementController = GetComponent <MovementController>(); _shootingController = GetComponent <ShootingController>(); _transform = GetComponent <Transform>(); _controls = new GameControls(); _controls.Default.Move.performed += HandleMove; _controls.Default.Move.canceled += HandleMove; _controls.Default.Shoot.performed += HandleShoot; _controls.Enable(); }
private void Start() { GiveItem(0); GiveItem("Titanium", 1999); GiveItem("Diamond", 100); InventoryPanel.SetActive(false); GameControls test = new GameControls(); test.GameControl.SpawnStation.performed += _ => { Debug.Log("Giving Item"); GiveItem(0, 700); }; test.GameControl.SpawnShip.performed += _ => { Debug.Log("Giving Diamond"); GiveItem(1, 800); }; test.Enable(); }
// Start is called before the first frame update void Start() { playerObject = GetComponent <PlayerObject>(); playerObject.OnCharacterDeath += OnPlayerDied; gameControls = new GameControls(); gameControls.Game.Select.performed += OnSelect; gameControls.Game.Escape.performed += OnEscape; gameControls.Game.Discard.performed += OnDiscard; gameControls.Game.North.performed += OnNorth; gameControls.Game.South.performed += OnSouth; gameControls.Game.East.performed += OnEast; gameControls.Game.West.performed += OnWest; gameControls.Game.EndTurn.performed += OnEndTurn; gameControls.Game.Reset.performed += OnResetLevel; gameControls.Enable(); LevelManager.Get().OnLevelStateChange += OnLevelStateChange; }
private void OnEnable() { gameInputController.Enable(); }
private void OnEnable() { inputActions.Enable(); }
private void OnEnable() { input.Enable(); }
private void OnEnable() { _gameControls.Default.Move.performed += OnMovePerformed; _gameControls.Enable(); }
public PlayerShootingController() { _playerControls = new GameControls(); _playerControls.Enable(); _bulletViewPrefab = Resources.Load <GameObject>(BulletViewPath); }
public void OnEnable() { gameControls.Enable(); }
private void OnEnable() { _gameControls.Enable(); }
public PlayerMovementController() { _controls = new GameControls(); _controls.Enable(); }
private void OnEnable() { _controls.Enable(); }
private void OnEnable() { input.Enable(); // enables user input }
protected virtual void OnEnable() { gameControls.Enable(); }