diff options
| author | realtradam <[email protected]> | 2021-01-19 19:40:02 -0500 |
|---|---|---|
| committer | realtradam <[email protected]> | 2021-01-19 19:40:02 -0500 |
| commit | ba1392414af9c18779c386af4f67325c546d9025 (patch) | |
| tree | 19e29b7f57367b5afcfb5d79bd28de09752c9c45 /run.rb | |
| parent | 5f9ad4e95625e1152bd0ad8bda1a460b696a7d13 (diff) | |
| download | ruby2d-camera-old-ba1392414af9c18779c386af4f67325c546d9025.tar.gz ruby2d-camera-old-ba1392414af9c18779c386af4f67325c546d9025.zip | |
improved documentation
Diffstat (limited to 'run.rb')
| -rw-r--r-- | run.rb | 6 |
1 files changed, 4 insertions, 2 deletions
@@ -10,7 +10,8 @@ require_relative 'animator' Camera << @background Camera.add @player -# This controls how fast the camera will follow an object +# This controls how slowly the camera will follow an object +# Set to 1 to not have any elasticity # it is not used by the .move_to or .move_by Camera.elasticity = 10 @@ -80,7 +81,8 @@ update do square.update Camera.camera_position end - + + # Alternating between follow and manual control if @is_follow Camera.follow @player else |
