Skip to content

Commit

Permalink
Update format of shake example so it looks better.
Browse files Browse the repository at this point in the history
  • Loading branch information
pvcraven committed Oct 8, 2021
1 parent 53357b7 commit 1cdaa6f
Showing 1 changed file with 3 additions and 1 deletion.
4 changes: 3 additions & 1 deletion arcade/examples/sprite_move_scrolling_shake.py
Original file line number Diff line number Diff line change
Expand Up @@ -157,8 +157,10 @@ def on_update(self, delta_time):
# How 'far' to shake
shake_amplitude = 10
# Calculate a vector based on that
shake_vector = math.cos(shake_direction) * shake_amplitude, \
shake_vector = (
math.cos(shake_direction) * shake_amplitude,
math.sin(shake_direction) * shake_amplitude
)
# Frequency of the shake
shake_speed = 1.5
# How fast to damp the shake
Expand Down

0 comments on commit 1cdaa6f

Please sign in to comment.