public override void SimulateController() { // IPlayerCommandInputInput input C'est comme ca on appel les Imput de Bolt //PlayerCommandInput.Create(); c'est comme ca On appel la classImput que j'ai crée dans l'inspector IPlayerCommandInputInput input = PlayerCommandInput.Create(); input.Forward = _forward; input.Backward = _backward; input.Right = _right; input.Left = _left; input.Yaw = _yaw; input.Pitch = _pitch; input.Jump = _jump; input.Fire = _fire; input.Scope = _aiming; input.Reload = _reload; //cette ligne est tres importante, elle permet de lister tout les imputs fait par le joeur entity.QueueInput(input); //Le joueur fait bouger le personnage dans lui sont monde vrai monde _playerMotor.ExecuteCommand(_forward, _backward, _left, _right, _jump, _yaw, _pitch); _playerWeapons.ExecuteCommand(_fire, _aiming, _reload, BoltNetwork.ServerFrame % 1024); }
public override void SimulateController() { IPlayerCommandInput input = PlayerCommand.Create(); input.Forward = _forward; input.Backward = _backward; input.Right = _right; input.Left = _left; input.Yaw = _yaw; input.Pitch = _pitch; input.Jump = _jump; input.Fire = _fire; input.Scope = _aiming; input.Reload = _reload; entity.QueueInput(input); _playerMotor.ExecuteCommand(_forward, _backward, _left, _right, _jump, _yaw, _pitch); _playerWeapons.ExecuteCommand(_fire, _aiming, _reload, BoltNetwork.ServerFrame % 1024); }