Skip to content

Commit

Permalink
assert the bad call
Browse files Browse the repository at this point in the history
  • Loading branch information
prime31 committed Oct 9, 2016
1 parent 06aee53 commit b523aa8
Showing 1 changed file with 1 addition and 0 deletions.
1 change: 1 addition & 0 deletions Nez-PCL/ECS/Components/FollowCamera.cs
Original file line number Diff line number Diff line change
Expand Up @@ -209,6 +209,7 @@ public void follow( Entity targetEntity, CameraStyle cameraStyle = CameraStyle.C
/// <param name="height">Height.</param>
public void setCenteredDeadzone( int width, int height )
{
Assert.isFalse( camera == null, "camera is null. We cant get its bounds if its null. Either set it or wait until after this Component is added to the Entity." );
var cameraBounds = camera.bounds;
deadzone = new RectangleF( ( cameraBounds.width - width ) / 2, ( cameraBounds.height - height ) / 2, width, height );
}
Expand Down

0 comments on commit b523aa8

Please sign in to comment.