summaryrefslogtreecommitdiffhomepage
diff options
context:
space:
mode:
authorrealtradam <[email protected]>2021-04-25 18:53:22 -0400
committerrealtradam <[email protected]>2021-04-25 18:53:22 -0400
commit1e5deba7f865fff9f3e680669552c7437939a84b (patch)
tree99f612ec559fd9163564a299430fefda1007d537
parenta3e96f57e36bfd96b753aab3a7fbe28be9bdfcf8 (diff)
downloadruby2d-camera-old-1e5deba7f865fff9f3e680669552c7437939a84b.tar.gz
ruby2d-camera-old-1e5deba7f865fff9f3e680669552c7437939a84b.zip
.
-rw-r--r--README.md2
1 files changed, 1 insertions, 1 deletions
diff --git a/README.md b/README.md
index f6984c2..359be3f 100644
--- a/README.md
+++ b/README.md
@@ -20,7 +20,7 @@ Feel free to use any part of this code in your own projects, no credit required(
Copy the `lib/camera/` directory into your ruby project and then in your code simply ```require_relative 'camera/camera'``` at the top. In your `Update do` loop you must add ```Camera.redraw``` at the bottom(this is so that the camera applies any changes you tell it to do). Your camera is now ready to use!
To add an object to the camera simply do ```Camera << @your_object``` and the camera will do its magic on your object. Only the various shape/image/text/line/sprite/etc. from Ruby2D are supported.
-Whenever an object is wrapped by the camera it gets `x` and `y` methods if it does not already have them which you can use to move the object around in the camera. The text object also gets a `center` method which you can set to true if you wish the origin of text to be its center. Otherwise the origin of all objects is the top left corner. Other then these methods mentioned, object behave as expected within the context of the camera.
+Whenever an object is wrapped by the camera it gets `x` and `y` methods if it does not already have them which you can use to move the object around in the camera. The text object also gets a `center` method which you can set to true if you wish the origin of text to be its center. Otherwise the origin of all objects is the top left corner. Other then these methods mentioned, object and their methods behave as expected within the context of the camera.
When unloading an object, make sure to also remove it from the Camera or else it will attempt to update it when it is Nil. To do this use the following: `Camera.remove(@your_object)`