private void ProcessMovement() { //TODO move into Input script float moveHorizontal = Input.GetAxis("Horizontal"); float moveVertical = Input.GetAxis("Vertical"); Vector3 movement = new Vector3(moveHorizontal, 0, moveVertical).normalized; _ballMotor.Move(movement); }
protected override void PlayerImpact(Player player) { base.PlayerImpact(player); BallMotor _motor = player.GetComponent <BallMotor>(); if (_motor != null) { _motor.Move((player.transform.position - this.transform.position) * _motor.BaseSpeed * 5); } }