Example #1
0
 private void OnHit(HitBoltEvent hit)
 {
     if (hit.Id == entity.NetworkId)
     {
         if (state.ReadyToMove)
         {
             HitGolfBall(hit.Force);
         }
         else
         {
             state.PreMove = hit.Force;
         }
     }
 }
Example #2
0
    private void HitSelectedGolfBall()
    {
        var force = gameInput.Direction.normalized * gameInput.Charge;

        HitBoltEvent.Post(GlobalTargets.OnlyServer, force, gameInput.SelectedGolfBall);
    }
Example #3
0
 public override void OnEvent(HitBoltEvent evnt)
 => GameEventManager.Publish(evnt);