示例#1
0
 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;
 }
示例#3
0
 internal InputController(IInputProxy input)
 {
     _input = input;
 }
示例#4
0
        public IInputProxy GetInput()
        {
            IInputProxy result = _pcInput;

            return(result);
        }
示例#5
0
 public InputController(IInputProxy input)
 {
     _input = input;
 }
示例#6
0
 public InputInitializator()
 {
     _pcInput = new PCInput();
 }
 internal void ListenToRestart(IInputProxy input)
 {
     input.RestartOnPressed += Restart;
 }
示例#8
0
 public void InjectInput(IInputProxy inputHandler)
 {
     this.InputProxy = inputHandler;
     this.enabled = true;
 }
示例#9
0
 public void ClearInput()
 {
     InputProxy = null;
     this.enabled = false;
 }
示例#10
0
        internal PlayerInitializer(IPlayerContorllable ship, PlayerData data, IInputProxy input)
        {
            var model = new PlayerModel(ship, data);

            PlayerController = new Player(model, input);
        }