public void ProcessKnockOut(HitCatapult knockoutInfo) { // hide the ball and strap this.strapVisible = StrapVisible.Hidden; this.BallVisible = BallVisible.Hidden; this.Disabled = true; // Remove everything except catpault base/prong this.Delegate?.DidBreak(this, knockoutInfo.JustKnockedout, knockoutInfo.Vortex); }
public void OnGrab(CameraInfo cameraInfo) { // this is now always at the center, so it shouldn't be affected by yaw this.baseWorldPosition = this.Base.PresentationNode.WorldPosition; this.firstGrabTime = GameTime.Time; this.playerWorldPosition = cameraInfo.Ray.Position; var ballPosition = this.ComputeBallPosition(cameraInfo); this.rope.GrabBall(ballPosition); this.strapVisible = StrapVisible.Visible; this.BallVisible = BallVisible.Visible; this.AlignCatapult(cameraInfo); // rotate the slingshot before we move it this.AnimateGrab(ballPosition); this.IsPulledTooFar = false; }