private void OnHit(HitBoltEvent hit) { if (hit.Id == entity.NetworkId) { if (state.ReadyToMove) { HitGolfBall(hit.Force); } else { state.PreMove = hit.Force; } } }
private void HitSelectedGolfBall() { var force = gameInput.Direction.normalized * gameInput.Charge; HitBoltEvent.Post(GlobalTargets.OnlyServer, force, gameInput.SelectedGolfBall); }
public override void OnEvent(HitBoltEvent evnt) => GameEventManager.Publish(evnt);