diff --git a/CONTRIBUTORS.md b/CONTRIBUTORS.md index d542ba27..65470e07 100644 --- a/CONTRIBUTORS.md +++ b/CONTRIBUTORS.md @@ -33,3 +33,4 @@ Halle Jones|HJones@aliacy.com|| [Sanket Dasgupta](https://github.com/SanketDG) | [sanketdasgupta@gmail.com](sanketdasgupta@gmail.com) | [@SanketDG](https://twitter.com/SanketDG) [Serin Delaunay](https://github.com/serin-delaunay) | | [SerinDelaunay](https://twitter.com/SerinDelaunay) [Nils Müller](https://github.com/shimst3r) | [shimst3r@gmail.com](mailto:shimst3r@gmail.com) | [@shimst3r](https://twitter.com/shimst3r) +[Aly Sivji](https://github.com/alysivji) | | [@CaiusSivjus](https://twitter.com/CaiusSivjus) diff --git a/docs/getting-started.rst b/docs/getting-started.rst index 2ca3f94d..a33168cd 100644 --- a/docs/getting-started.rst +++ b/docs/getting-started.rst @@ -236,16 +236,16 @@ First, we need a new class. We'll put it under ``Player``, but above ``setup``. ``main.py``:: class Projectile(ppb.Sprite): - size = 0.25 - direction = ppb.Vector(0, 1) - speed = 6 - - def on_update(self, update_event, signal): - if self.direction: - direction = self.direction.normalize() - else: - direction = self.direction - self.position += direction * self.speed * update_event.time_delta + size = 0.25 + direction = ppb.Vector(0, 1) + speed = 6 + + def on_update(self, update_event, signal): + if self.direction: + direction = self.direction.normalize() + else: + direction = self.direction + self.position += direction * self.speed * update_event.time_delta If we wanted to, we could pull out this ``on_update`` function into a mixin that we could use with either of these classes, but I'm going to leave that as an