internal Player(PlayerModel model, IInputProxy input) { _model = model; _input = input; _input.AxisOnChange += _model.Ship.Move; _input.AccelerationOnChange += AccelerationChange; _input.MouseAxisOnChange += _model.Ship.Rotation; _input.MainFireOnPressed += _model.Ship.MainFire; _input.ReloadWeaponOnPressed += _model.Ship.ReloadWeapon; }
internal MoveController(IInputProxy input, IMovable unit) { _unit = unit; _inputProxy = input; _inputProxy.AxisOnChage += InputAxisOnChange; }
internal InputController(IInputProxy input) { _input = input; }
public IInputProxy GetInput() { IInputProxy result = _pcInput; return(result); }
public InputController(IInputProxy input) { _input = input; }
public InputInitializator() { _pcInput = new PCInput(); }
internal void ListenToRestart(IInputProxy input) { input.RestartOnPressed += Restart; }
public void InjectInput(IInputProxy inputHandler) { this.InputProxy = inputHandler; this.enabled = true; }
public void ClearInput() { InputProxy = null; this.enabled = false; }
internal PlayerInitializer(IPlayerContorllable ship, PlayerData data, IInputProxy input) { var model = new PlayerModel(ship, data); PlayerController = new Player(model, input); }