private void OnEnable() { _virtualAxis = _virtualAxis ?? new VirtualAxis(AxisName); LastFingerId = -1; CnInputManager.RegisterVirtualAxis(_virtualAxis); }
private void OnEnable() { // When we enable, we get our virtual axis HorizintalAxis = HorizintalAxis ?? new VirtualAxis(HorizontalAxisName); VerticalAxis = VerticalAxis ?? new VirtualAxis(VerticalAxisName); // And register them in our input system CnInputManager.RegisterVirtualAxis(HorizintalAxis); CnInputManager.RegisterVirtualAxis(VerticalAxis); }
private void OnEnable() { // When we enable, we get our virtual axis MovementHAxis = MovementHAxis ?? new VirtualAxis(MovementHAxisName); MovementVAxis = MovementVAxis ?? new VirtualAxis(MovementVAxisName); // And register them in our input system CnInputManager.RegisterVirtualAxis(MovementHAxis); CnInputManager.RegisterVirtualAxis(MovementVAxis); }