private void StartBallMovement() { var direction = _startingDirections[Random.Range(0, _startingDirections.Count)]; var forceEvent = new AddForceEvent(direction, StartingBallForce); EventManager.Instance.TriggerEvent(forceEvent); }
private void AddForce(AddForceEvent addForceEvent) { var forceVector = addForceEvent.Direction.normalized * addForceEvent.Amount; _rigidbody.velocity = Vector3.zero; _rigidbody.AddForce(forceVector, ForceMode.Impulse); }